diff --git a/lib/analyze.js b/lib/analyze.js index 64f0f00b0..650d87224 100644 --- a/lib/analyze.js +++ b/lib/analyze.js @@ -13,6 +13,7 @@ const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); const analysisPaths = __importStar(require("./analysis-paths")); const codeql_1 = require("./codeql"); const languages_1 = require("./languages"); +const sarifCache = __importStar(require("./sarif-cache")); const sharedEnv = __importStar(require("./shared-environment")); const upload_lib = __importStar(require("./upload-lib")); const util = __importStar(require("./util")); @@ -121,16 +122,23 @@ async function runAnalyze(repositoryNwo, commitOid, ref, analysisKey, analysisNa // Delete the tracer config env var to avoid tracing ourselves delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION]; fs.mkdirSync(outputDir, { recursive: true }); - logger.info("Finalizing database creation"); - await finalizeDatabaseCreation(config, threadsFlag, logger); - logger.info("Analyzing database"); - const queriesStats = await runQueries(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger); - if (!doUpload) { - logger.info("Not uploading results"); - return { ...queriesStats }; + if (await sarifCache.skipAnalysis()) { + sarifCache.copySARIFResults(outputDir); + return {}; + } + else { + logger.info("Finalizing database creation"); + await finalizeDatabaseCreation(config, threadsFlag, logger); + logger.info("Analyzing database"); + const queriesStats = await runQueries(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger); + if (!doUpload) { + logger.info("Not uploading results"); + return { ...queriesStats }; + } + const uploadStats = await upload_lib.upload(outputDir, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, config.gitHubVersion, apiDetails, mode, logger); + await sarifCache.saveSARIFResults(outputDir); + return { ...queriesStats, ...uploadStats }; } - const uploadStats = await upload_lib.upload(outputDir, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, config.gitHubVersion, apiDetails, mode, logger); - return { ...queriesStats, ...uploadStats }; } exports.runAnalyze = runAnalyze; //# sourceMappingURL=analyze.js.map \ No newline at end of file diff --git a/lib/analyze.js.map b/lib/analyze.js.map index 51f11bb34..05b59c1a4 100644 --- a/lib/analyze.js.map +++ b/lib/analyze.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAE3D,gEAAkD;AAElD,qCAAqC;AAErC,2CAA0D;AAG1D,gEAAkD;AAClD,yDAA2C;AAC3C,6CAA+B;AAE/B,MAAa,mBAAoB,SAAQ,KAAK;IAG5C,YAAY,mBAAwC,EAAE,OAAe;QACnE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;CACF;AATD,kDASC;AAmCD,KAAK,UAAU,oBAAoB,CAAC,MAAc;IAChD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAClD,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3D,+FAA+F;QAC/F,OAAO;KACR;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,OAAO,GAAG;QACd,SAAS,EAAE;YACT,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvB,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5B,CAAC;SACF;KACF,CAAC;IAEF,MAAM,IAAI,UAAU,CAAC,UAAU,CAC7B,YAAY,EACZ;QACE,IAAI;QACJ,8EAA8E;KAC/E,EACD,OAAO,CACR,CAAC,IAAI,EAAE,CAAC;IACT,MAAM,CAAC,IAAI,CAAC,kCAAkC,MAAM,EAAE,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAC;IAE/C,MAAM,GAAG,EAAE,CAAC;IACZ,MAAM,IAAI,UAAU,CAAC,U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C;QAC5C,MAAM,wBAAwB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAG5D,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClC,MAAM,YAAY,GAAG,MAAM,UAAU,CACnC,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,MAAM,EACN,MAAM,CACP,CAAC;QAEF,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACrC,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;SAC5B;QAED,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,MAAM,CACzC,SAAS,EACT,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,MAAM,CAAC,aAAa,EACpB,UAAU,EACV,IAAI,EACJ,MAAM,CACP,CAAC;QAEF,MAAM,UAAU,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAA;QAE5C,OAAO,EAAE,GAAG,YAAY,EAAE,GAAG,WAAW,EAAE,CAAC;KAC5C;AACH,CAAC;AAnED,gCAmEC"} \ No newline at end of file diff --git a/lib/init.js b/lib/init.js index a6e7b8c3f..825e8573f 100644 --- a/lib/init.js +++ b/lib/init.js @@ -15,6 +15,7 @@ const analysisPaths = __importStar(require("./analysis-paths")); const codeql_1 = require("./codeql"); const configUtils = __importStar(require("./config-utils")); const tracer_config_1 = require("./tracer-config"); +const sarifCache = __importStar(require("./sarif-cache")); const util = __importStar(require("./util")); async function initCodeQL(codeqlURL, apiDetails, tempDir, toolsDir, mode, logger) { logger.startGroup("Setup CodeQL tools"); @@ -33,6 +34,11 @@ async function initConfig(languagesInput, queriesInput, configFile, repository, } exports.initConfig = initConfig; async function runInit(codeql, config) { + console.log("Restore cache..."); + await sarifCache.restoreSARIFResults(); + if (await sarifCache.skipAnalysis()) { + return undefined; + } const sourceRoot = path.resolve(); fs.mkdirSync(util.getCodeQLDatabasesDir(config.tempDir), { recursive: true }); // TODO: replace this code once CodeQL supports multi-language tracing diff --git a/lib/init.js.map b/lib/init.js.map index 01ffb372f..f5876fe60 100644 --- a/lib/init.js.map +++ b/lib/init.js.map @@ -1 +1 @@ -{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAEpD,gEAAkD;AAElD,qCAA+C;AAC/C,4DAA8C;AAG9C,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,SAA6B,EAC7B,UAA4B,EAC5B,OAAe,EACf,QAAgB,EAChB,IAAe,EACf,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,oBAAW,CAChD,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,MAAM,CACP,CAAC;IACF,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAClC,CAAC;AApBD,gCAoBC;AAEM,KAAK,UAAU,UAAU,CAC9B,cAAkC,EAClC,YAAgC,EAChC,UAA8B,EAC9B,UAAyB,EACzB,OAAe,EACf,YAAoB,EACpB,MAAc,EACd,YAAoB,EACpB,aAAiC,EACjC,UAA4B,EAC5B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,UAAU,CACzC,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,CACP,CAAC;IACF,aAAa,CA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;YAChC,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;gBAC/D,IAAI;gBACJ,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;gBAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC,IAAI,EAAE,CAAC;SACX;aAAM;YACL,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE;gBAChE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC,IAAI,EAAE,CAAC;SACX;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CACZ,+IAA+I,CAChJ,CAAC;QACF,OAAO;KACR;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAnDD,8CAmDC"} \ No newline at end of file diff --git a/lib/sarif-cache.js b/lib/sarif-cache.js new file mode 100644 index 000000000..6c643378b --- /dev/null +++ b/lib/sarif-cache.js @@ -0,0 +1,69 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const cache = __importStar(require("@actions/cache")); +const CACHE_KEY = "cheating-static-key"; // TODO +async function getSARIFCachePath() { + const runnerTemp = process.env.RUNNER_TEMP; + if (runnerTemp === undefined) { + return undefined; + } + return path.join(runnerTemp, "codeql-results-cache"); +} +async function saveSARIFResults(outputPath) { + const sarifCachePath = await getSARIFCachePath(); + if (sarifCachePath === undefined) { + return; + } + if (!await fs.existsSync(sarifCachePath)) { + await fs.promises.mkdir(sarifCachePath); + } + let outputSARIFNames = await fs.promises.readdir(outputPath); + for (let outputSARIFName of outputSARIFNames) { + let outputSARIFPath = path.join(outputPath, outputSARIFName); + let cachedSARIFPath = path.join(sarifCachePath, path.relative(outputPath, outputSARIFPath)); + await fs.promises.copyFile(outputSARIFPath, cachedSARIFPath); + } + await cache.saveCache([sarifCachePath], CACHE_KEY); +} +exports.saveSARIFResults = saveSARIFResults; +async function skipAnalysis() { + const sarifCachePath = await getSARIFCachePath(); + if (sarifCachePath === undefined) { + return false; + } + let cachedSARIFPaths = await fs.promises.readdir(sarifCachePath); + return cachedSARIFPaths.length > 0; // TODO +} +exports.skipAnalysis = skipAnalysis; +async function restoreSARIFResults() { + const sarifCachePath = await getSARIFCachePath(); + if (sarifCachePath === undefined) { + return; + } + await fs.promises.mkdir(sarifCachePath); + await cache.restoreCache([sarifCachePath], CACHE_KEY); +} +exports.restoreSARIFResults = restoreSARIFResults; +async function copySARIFResults(outputPath) { + const sarifCachePath = await getSARIFCachePath(); + if (sarifCachePath === undefined) { + return; + } + let cachedSARIFNames = await fs.promises.readdir(sarifCachePath); + for (let cachedSARIFName of cachedSARIFNames) { + let cachedSARIFPath = path.join(sarifCachePath, cachedSARIFName); + let outputSARIFPath = path.join(outputPath, path.relative(sarifCachePath, cachedSARIFPath)); + await fs.promises.copyFile(cachedSARIFPath, outputSARIFPath); + } +} +exports.copySARIFResults = copySARIFResults; +//# sourceMappingURL=sarif-cache.js.map \ No newline at end of file diff --git a/lib/sarif-cache.js.map b/lib/sarif-cache.js.map new file mode 100644 index 000000000..ae9f95b5d --- /dev/null +++ b/lib/sarif-cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sarif-cache.js","sourceRoot":"","sources":["../src/sarif-cache.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,sDAAwC;AAExC,MAAM,SAAS,GAAG,qBAAqB,CAAC,CA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,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACjE,OAAO,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO;AAC7C,CAAC;AARD,oCAQC;AAEM,KAAK,UAAU,mBAAmB;IACvC,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAChD,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,OAAO;KACR;IAED,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACxC,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC;AACxD,CAAC;AARD,kDAQC;AAEM,KAAK,UAAU,gBAAgB,CAAC,UAAkB;IACvD,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAChD,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,OAAO;KACR;IAED,IAAI,gBAAgB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACjE,KAAK,IAAI,eAAe,IAAI,gBAAgB,EAAE;QAC5C,IAAI,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QACjE,IAAI,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC;QAC5F,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;KAC9D;AACH,CAAC;AAZD,4CAYC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/LICENSE.md b/node_modules/@actions/cache/LICENSE.md new file mode 100644 index 000000000..dbae2edb2 --- /dev/null +++ b/node_modules/@actions/cache/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/cache/README.md b/node_modules/@actions/cache/README.md new file mode 100644 index 000000000..2d5aa1a95 --- /dev/null +++ b/node_modules/@actions/cache/README.md @@ -0,0 +1,44 @@ +# `@actions/cache` + +> Functions necessary for caching dependencies and build outputs to improve workflow execution time. + +See ["Caching dependencies to speed up workflows"](https://help.github.com/github/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows) for how caching works. + +Note that GitHub will remove any cache entries that have not been accessed in over 7 days. There is no limit on the number of caches you can store, but the total size of all caches in a repository is limited to 5 GB. If you exceed this limit, GitHub will save your cache but will begin evicting caches until the total size is less than 5 GB. + +## Usage + +This package is used by the v2+ versions of our first party cache action. You can find an example implementation in the cache repo [here](https://github.com/actions/cache). + +#### Restore Cache + +Restores a cache based on `key` and `restoreKeys` to the `paths` provided. Function returns the cache key for cache hit and returns undefined if cache not found. + +```js +const cache = require('@actions/cache'); +const paths = [ + 'node_modules', + 'packages/*/node_modules/' +] +const key = 'npm-foobar-d5ea0750' +const restoreKeys = [ + 'npm-foobar-', + 'npm-' +] +const cacheKey = await cache.restoreCache(paths, key, restoreKeys) +``` + +#### Save Cache + +Saves a cache containing the files in `paths` using the `key` provided. The files would be compressed using zstandard compression algorithm if zstd is installed, otherwise gzip is used. Function returns the cache id if the cache was saved succesfully and throws an error if cache upload fails. + +```js +const cache = require('@actions/cache'); +const paths = [ + 'node_modules', + 'packages/*/node_modules/' +] +const key = 'npm-foobar-d5ea0750' +const cacheId = await cache.saveCache(paths, key) +``` + diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts new file mode 100644 index 000000000..805a8e571 --- /dev/null +++ b/node_modules/@actions/cache/lib/cache.d.ts @@ -0,0 +1,26 @@ +import { DownloadOptions, UploadOptions } from './options'; +export declare class ValidationError extends Error { + constructor(message: string); +} +export declare class ReserveCacheError extends Error { + constructor(message: string); +} +/** + * Restores cache from keys + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key + * @param downloadOptions cache download options + * @returns string returns the key for the cache hit, otherwise returns undefined + */ +export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions): Promise; +/** + * Saves a list of files with the specified key + * + * @param paths a list of file paths to be cached + * @param key an explicit key for restoring the cache + * @param options cache upload options + * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails + */ +export declare function saveCache(paths: string[], key: string, options?: UploadOptions): Promise; diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js new file mode 100644 index 000000000..237f144c2 --- /dev/null +++ b/node_modules/@actions/cache/lib/cache.js @@ -0,0 +1,147 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const path = __importStar(require("path")); +const utils = __importStar(require("./internal/cacheUtils")); +const cacheHttpClient = __importStar(require("./internal/cacheHttpClient")); +const tar_1 = require("./internal/tar"); +class ValidationError extends Error { + constructor(message) { + super(message); + this.name = 'ValidationError'; + Object.setPrototypeOf(this, ValidationError.prototype); + } +} +exports.ValidationError = ValidationError; +class ReserveCacheError extends Error { + constructor(message) { + super(message); + this.name = 'ReserveCacheError'; + Object.setPrototypeOf(this, ReserveCacheError.prototype); + } +} +exports.ReserveCacheError = ReserveCacheError; +function checkPaths(paths) { + if (!paths || paths.length === 0) { + throw new ValidationError(`Path Validation Error: At least one directory or file path is required`); + } +} +function checkKey(key) { + if (key.length > 512) { + throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`); + } + const regex = /^[^,]*$/; + if (!regex.test(key)) { + throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`); + } +} +/** + * Restores cache from keys + * + * @param paths a list of file paths to restore from the cache + * @param primaryKey an explicit key for restoring the cache + * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key + * @param downloadOptions cache download options + * @returns string returns the key for the cache hit, otherwise returns undefined + */ +function restoreCache(paths, primaryKey, restoreKeys, options) { + return __awaiter(this, void 0, void 0, function* () { + checkPaths(paths); + restoreKeys = restoreKeys || []; + const keys = [primaryKey, ...restoreKeys]; + core.debug('Resolved Keys:'); + core.debug(JSON.stringify(keys)); + if (keys.length > 10) { + throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); + } + for (const key of keys) { + 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}`); + try { + // Download the cache from the cache entry + yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); + const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); + core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + yield tar_1.extractTar(archivePath, compressionMethod); + } + finally { + // Try to delete the archive to save space + try { + yield utils.unlinkFile(archivePath); + } + catch (error) { + core.debug(`Failed to delete archive: ${error}`); + } + } + return cacheEntry.cacheKey; + }); +} +exports.restoreCache = restoreCache; +/** + * Saves a list of files with the specified key + * + * @param paths a list of file paths to be cached + * @param key an explicit key for restoring the cache + * @param options cache upload options + * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails + */ +function saveCache(paths, key, options) { + return __awaiter(this, void 0, void 0, function* () { + checkPaths(paths); + checkKey(key); + const compressionMethod = yield utils.getCompressionMethod(); + core.debug('Reserving Cache'); + const cacheId = yield cacheHttpClient.reserveCache(key, paths, { + compressionMethod + }); + if (cacheId === -1) { + throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); + } + core.debug(`Cache ID: ${cacheId}`); + const cachePaths = yield utils.resolvePaths(paths); + core.debug('Cache Paths:'); + core.debug(`${JSON.stringify(cachePaths)}`); + const archiveFolder = yield utils.createTempDirectory(); + const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); + yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod); + const fileSizeLimit = 5 * 1024 * 1024 * 1024; // 5GB per repo limit + const archiveFileSize = utils.getArchiveFileSizeIsBytes(archivePath); + core.debug(`File Size: ${archiveFileSize}`); + if (archiveFileSize > fileSizeLimit) { + throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 5GB limit, not saving cache.`); + } + core.debug(`Saving Cache (ID: ${cacheId})`); + yield cacheHttpClient.saveCache(cacheId, archivePath, options); + return cacheId; + }); +} +exports.saveCache = saveCache; +//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/cache.js.map b/node_modules/@actions/cache/lib/cache.js.map new file mode 100644 index 000000000..dd5c85347 --- /dev/null +++ b/node_modules/@actions/cache/lib/cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,2CAA4B;AAC5B,6DAA8C;AAC9C,4EAA6D;AAC7D,wCAAoD;AAGpD,MAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACxD,CAAC;CACF;AAND,0CAMC;AAED,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAA;QAC/B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IAC1D,CAAC;CACF;AAND,8CAMC;AAED,SAAS,UAAU,CAAC,KAAe;IACjC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,MAAM,IAAI,eAAe,CACvB,wEAAwE,CACzE,CAAA;K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AChB,CAAC;CAAA;AAlDD,8BAkDC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/cacheHttpClient.d.ts b/node_modules/@actions/cache/lib/internal/cacheHttpClient.d.ts new file mode 100644 index 000000000..8a6571052 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheHttpClient.d.ts @@ -0,0 +1,8 @@ +import { CompressionMethod } from './constants'; +import { ArtifactCacheEntry, InternalCacheOptions } from './contracts'; +import { DownloadOptions, UploadOptions } from '../options'; +export declare function getCacheVersion(paths: string[], compressionMethod?: CompressionMethod): string; +export declare function getCacheEntry(keys: string[], paths: string[], options?: InternalCacheOptions): Promise; +export declare function downloadCache(archiveLocation: string, archivePath: string, options?: DownloadOptions): Promise; +export declare function reserveCache(key: string, paths: string[], options?: InternalCacheOptions): Promise; +export declare function saveCache(cacheId: number, archivePath: string, options?: UploadOptions): Promise; diff --git a/node_modules/@actions/cache/lib/internal/cacheHttpClient.js b/node_modules/@actions/cache/lib/internal/cacheHttpClient.js new file mode 100644 index 000000000..c94ff6809 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheHttpClient.js @@ -0,0 +1,215 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const http_client_1 = require("@actions/http-client"); +const auth_1 = require("@actions/http-client/auth"); +const crypto = __importStar(require("crypto")); +const fs = __importStar(require("fs")); +const url_1 = require("url"); +const utils = __importStar(require("./cacheUtils")); +const constants_1 = require("./constants"); +const downloadUtils_1 = require("./downloadUtils"); +const options_1 = require("../options"); +const requestUtils_1 = require("./requestUtils"); +const versionSalt = '1.0'; +function getCacheApiUrl(resource) { + // Ideally we just use ACTIONS_CACHE_URL + const baseUrl = (process.env['ACTIONS_CACHE_URL'] || + process.env['ACTIONS_RUNTIME_URL'] || + '').replace('pipelines', 'artifactcache'); + if (!baseUrl) { + throw new Error('Cache Service Url not found, unable to restore cache.'); + } + const url = `${baseUrl}_apis/artifactcache/${resource}`; + core.debug(`Resource Url: ${url}`); + return url; +} +function createAcceptHeader(type, apiVersion) { + return `${type};api-version=${apiVersion}`; +} +function getRequestOptions() { + const requestOptions = { + headers: { + Accept: createAcceptHeader('application/json', '6.0-preview.1') + } + }; + return requestOptions; +} +function createHttpClient() { + const token = process.env['ACTIONS_RUNTIME_TOKEN'] || ''; + const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token); + return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); +} +function getCacheVersion(paths, compressionMethod) { + const components = paths.concat(!compressionMethod || compressionMethod === constants_1.CompressionMethod.Gzip + ? [] + : [compressionMethod]); + // Add salt to cache version to support breaking changes in cache entry + components.push(versionSalt); + return crypto + .createHash('sha256') + .update(components.join('|')) + .digest('hex'); +} +exports.getCacheVersion = getCacheVersion; +function getCacheEntry(keys, paths, options) { + return __awaiter(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); + const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; + const response = yield requestUtils_1.retryTypedResponse('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); + if (response.statusCode === 204) { + return null; + } + if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) { + throw new Error(`Cache service responded with ${response.statusCode}`); + } + const cacheResult = response.result; + const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation; + if (!cacheDownloadUrl) { + throw new Error('Cache not found.'); + } + core.setSecret(cacheDownloadUrl); + core.debug(`Cache Result:`); + core.debug(JSON.stringify(cacheResult)); + return cacheResult; + }); +} +exports.getCacheEntry = getCacheEntry; +function downloadCache(archiveLocation, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + const archiveUrl = new url_1.URL(archiveLocation); + const downloadOptions = options_1.getDownloadOptions(options); + if (downloadOptions.useAzureSdk && + archiveUrl.hostname.endsWith('.blob.core.windows.net')) { + // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability. + yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions); + } + else { + // Otherwise, download using the Actions http-client. + yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath); + } + }); +} +exports.downloadCache = downloadCache; +// Reserve Cache +function reserveCache(key, paths, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod); + const reserveCacheRequest = { + key, + version + }; + const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); + })); + return (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.cacheId) !== null && _b !== void 0 ? _b : -1; + }); +} +exports.reserveCache = reserveCache; +function getContentRange(start, end) { + // Format: `bytes start-end/filesize + // start and end are inclusive + // filesize can be * + // For a 200 byte chunk starting at byte 0: + // Content-Range: bytes 0-199/* + return `bytes ${start}-${end}/*`; +} +function uploadChunk(httpClient, resourceUrl, openStream, start, end) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`Uploading chunk of size ${end - + start + + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + const additionalHeaders = { + 'Content-Type': 'application/octet-stream', + 'Content-Range': getContentRange(start, end) + }; + const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () { + return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders); + })); + if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) { + throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`); + } + }); +} +function uploadFile(httpClient, cacheId, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + // Upload Chunks + const fileSize = fs.statSync(archivePath).size; + const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); + const fd = fs.openSync(archivePath, 'r'); + const uploadOptions = options_1.getUploadOptions(options); + const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency); + const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize); + const parallelUploads = [...new Array(concurrency).keys()]; + core.debug('Awaiting all uploads'); + let offset = 0; + try { + yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () { + while (offset < fileSize) { + const chunkSize = Math.min(fileSize - offset, maxChunkSize); + const start = offset; + const end = offset + chunkSize - 1; + offset += maxChunkSize; + yield uploadChunk(httpClient, resourceUrl, () => fs + .createReadStream(archivePath, { + fd, + start, + end, + autoClose: false + }) + .on('error', error => { + throw new Error(`Cache upload failed because file read failed with ${error.message}`); + }), start, end); + } + }))); + } + finally { + fs.closeSync(fd); + } + return; + }); +} +function commitCache(httpClient, cacheId, filesize) { + return __awaiter(this, void 0, void 0, function* () { + const commitCacheRequest = { size: filesize }; + return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); + })); + }); +} +function saveCache(cacheId, archivePath, options) { + return __awaiter(this, void 0, void 0, function* () { + const httpClient = createHttpClient(); + core.debug('Upload cache'); + yield uploadFile(httpClient, cacheId, archivePath, options); + // Commit Cache + core.debug('Commiting cache'); + const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath); + const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); + if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) { + throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); + } + core.info('Cache saved successfully'); + }); +} +exports.saveCache = saveCache; +//# sourceMappingURL=cacheHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/cacheHttpClient.js.map b/node_modules/@actions/cache/lib/internal/cacheHttpClient.js.map new file mode 100644 index 000000000..94e1f39b2 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cacheHttpClient.js","sourceRoot":"","sources":["../../src/internal/cacheHttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,sDAA+C;AAC/C,oDAAiE;AAEjE,+CAAgC;AAChC,uCAAwB;AACxB,6BAAuB;AAEvB,oDAAqC;AACrC,2CAA6C;AAQ7C,mDAAgF;AAChF,wCAKmB;AACnB,iDAIuB;AAEvB,MAAM,WAAW,GAAG,KAAK,CAAA;AAEzB,SAAS,cAAc,CAAC,QAAgB;IACtC,wCAAwC;IACxC,MAAM,OAAO,GAAW,CACtB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAClC,EAAE,CACH,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,CAAA;IACvC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;KACzE;IAED,MAAM,GAAG,GAAG,GAAG,OAAO,uBAAuB,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CACF,CAAA;IACH,CAAC;CAAA;AAED,SAAsB,SAAS,CAC7B,OAAe,EACf,WAAmB,EACnB,OAAuB;;QAEvB,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAA;QAErC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAC1B,MAAM,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;QAE3D,eAAe;QACf,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAA;QAC9D,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;QAC7E,IAAI,CAAC,kCAAmB,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE;YACxD,MAAM,IAAI,KAAK,CACb,gCAAgC,mBAAmB,CAAC,UAAU,uBAAuB,CACtF,CAAA;SACF;QAED,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;IACvC,CAAC;CAAA;AArBD,8BAqBC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/cacheUtils.d.ts b/node_modules/@actions/cache/lib/internal/cacheUtils.d.ts new file mode 100644 index 000000000..5d1565009 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheUtils.d.ts @@ -0,0 +1,11 @@ +/// +import * as fs from 'fs'; +import { CompressionMethod } from './constants'; +export declare function createTempDirectory(): Promise; +export declare function getArchiveFileSizeIsBytes(filePath: string): number; +export declare function resolvePaths(patterns: string[]): Promise; +export declare function unlinkFile(filePath: fs.PathLike): Promise; +export declare function getCompressionMethod(): Promise; +export declare function getCacheFileName(compressionMethod: CompressionMethod): string; +export declare function isGnuTarInstalled(): Promise; +export declare function assertDefined(name: string, value?: T): T; diff --git a/node_modules/@actions/cache/lib/internal/cacheUtils.js b/node_modules/@actions/cache/lib/internal/cacheUtils.js new file mode 100644 index 000000000..091e81a79 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheUtils.js @@ -0,0 +1,168 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const exec = __importStar(require("@actions/exec")); +const glob = __importStar(require("@actions/glob")); +const io = __importStar(require("@actions/io")); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const semver = __importStar(require("semver")); +const util = __importStar(require("util")); +const uuid_1 = require("uuid"); +const constants_1 = require("./constants"); +// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23 +function createTempDirectory() { + return __awaiter(this, void 0, void 0, function* () { + const IS_WINDOWS = process.platform === 'win32'; + let tempDirectory = process.env['RUNNER_TEMP'] || ''; + if (!tempDirectory) { + let baseLocation; + if (IS_WINDOWS) { + // On Windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; + } + else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } + else { + baseLocation = '/home'; + } + } + tempDirectory = path.join(baseLocation, 'actions', 'temp'); + } + const dest = path.join(tempDirectory, uuid_1.v4()); + yield io.mkdirP(dest); + return dest; + }); +} +exports.createTempDirectory = createTempDirectory; +function getArchiveFileSizeIsBytes(filePath) { + return fs.statSync(filePath).size; +} +exports.getArchiveFileSizeIsBytes = getArchiveFileSizeIsBytes; +function resolvePaths(patterns) { + var e_1, _a; + var _b; + return __awaiter(this, void 0, void 0, function* () { + const paths = []; + const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); + const globber = yield glob.create(patterns.join('\n'), { + implicitDescendants: false + }); + try { + for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { + const file = _d.value; + const relativeFile = path.relative(workspace, file); + core.debug(`Matched: ${relativeFile}`); + // Paths are made relative so the tar entries are all relative to the root of the workspace. + paths.push(`${relativeFile}`); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + return paths; + }); +} +exports.resolvePaths = resolvePaths; +function unlinkFile(filePath) { + return __awaiter(this, void 0, void 0, function* () { + return util.promisify(fs.unlink)(filePath); + }); +} +exports.unlinkFile = unlinkFile; +function getVersion(app) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`Checking ${app} --version`); + let versionOutput = ''; + try { + yield exec.exec(`${app} --version`, [], { + ignoreReturnCode: true, + silent: true, + listeners: { + stdout: (data) => (versionOutput += data.toString()), + stderr: (data) => (versionOutput += data.toString()) + } + }); + } + catch (err) { + core.debug(err.message); + } + versionOutput = versionOutput.trim(); + core.debug(versionOutput); + return versionOutput; + }); +} +// Use zstandard if possible to maximize cache performance +function getCompressionMethod() { + return __awaiter(this, void 0, void 0, function* () { + if (process.platform === 'win32' && !(yield isGnuTarInstalled())) { + // Disable zstd due to bug https://github.com/actions/cache/issues/301 + return constants_1.CompressionMethod.Gzip; + } + const versionOutput = yield getVersion('zstd'); + const version = semver.clean(versionOutput); + if (!versionOutput.toLowerCase().includes('zstd command line interface')) { + // zstd is not installed + return constants_1.CompressionMethod.Gzip; + } + else if (!version || semver.lt(version, 'v1.3.2')) { + // zstd is installed but using a version earlier than v1.3.2 + // v1.3.2 is required to use the `--long` options in zstd + return constants_1.CompressionMethod.ZstdWithoutLong; + } + else { + return constants_1.CompressionMethod.Zstd; + } + }); +} +exports.getCompressionMethod = getCompressionMethod; +function getCacheFileName(compressionMethod) { + return compressionMethod === constants_1.CompressionMethod.Gzip + ? constants_1.CacheFilename.Gzip + : constants_1.CacheFilename.Zstd; +} +exports.getCacheFileName = getCacheFileName; +function isGnuTarInstalled() { + return __awaiter(this, void 0, void 0, function* () { + const versionOutput = yield getVersion('tar'); + return versionOutput.toLowerCase().includes('gnu tar'); + }); +} +exports.isGnuTarInstalled = isGnuTarInstalled; +function assertDefined(name, value) { + if (value === undefined) { + throw Error(`Expected ${name} but value was undefiend`); + } + return value; +} +exports.assertDefined = assertDefined; +//# sourceMappingURL=cacheUtils.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/cacheUtils.js.map b/node_modules/@actions/cache/lib/internal/cacheUtils.js.map new file mode 100644 index 000000000..aabe419b2 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/cacheUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cacheUtils.js","sourceRoot":"","sources":["../../src/internal/cacheUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,oDAAqC;AACrC,oDAAqC;AACrC,gDAA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EAAE,KAAS;IACtD,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,MAAM,KAAK,CAAC,YAAY,IAAI,0BAA0B,CAAC,CAAA;KACxD;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAND,sCAMC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/constants.d.ts b/node_modules/@actions/cache/lib/internal/constants.d.ts new file mode 100644 index 000000000..36ac06e33 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/constants.d.ts @@ -0,0 +1,12 @@ +export declare enum CacheFilename { + Gzip = "cache.tgz", + Zstd = "cache.tzst" +} +export declare enum CompressionMethod { + Gzip = "gzip", + ZstdWithoutLong = "zstd-without-long", + Zstd = "zstd" +} +export declare const DefaultRetryAttempts = 2; +export declare const DefaultRetryDelay = 5000; +export declare const SocketTimeout = 5000; diff --git a/node_modules/@actions/cache/lib/internal/constants.js b/node_modules/@actions/cache/lib/internal/constants.js new file mode 100644 index 000000000..301068ffa --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/constants.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var CacheFilename; +(function (CacheFilename) { + CacheFilename["Gzip"] = "cache.tgz"; + CacheFilename["Zstd"] = "cache.tzst"; +})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); +var CompressionMethod; +(function (CompressionMethod) { + CompressionMethod["Gzip"] = "gzip"; + // Long range mode was added to zstd in v1.3.2. + // This enum is for earlier version of zstd that does not have --long support + CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; + CompressionMethod["Zstd"] = "zstd"; +})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); +// The default number of retry attempts. +exports.DefaultRetryAttempts = 2; +// The default delay in milliseconds between retry attempts. +exports.DefaultRetryDelay = 5000; +// Socket timeout in milliseconds during download. If no traffic is received +// over the socket during this period, the socket is destroyed and the download +// is aborted. +exports.SocketTimeout = 5000; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/constants.js.map b/node_modules/@actions/cache/lib/internal/constants.js.map new file mode 100644 index 000000000..ccdec94fe --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":";;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,+CAA+C;IAC/C,6EAA6E;IAC7E,0DAAqC,CAAA;IACrC,kCAAa,CAAA;AACf,CAAC,EANW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAM5B;AAED,wCAAwC;AAC3B,QAAA,oBAAoB,GAAG,CAAC,CAAA;AAErC,4DAA4D;AAC/C,QAAA,iBAAiB,GAAG,IAAI,CAAA;AAErC,6EAA6E;AAC7E,+EAA+E;AAC/E,cAAc;AACD,QAAA,aAAa,GAAG,IAAI,CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/downloadUtils.d.ts b/node_modules/@actions/cache/lib/internal/downloadUtils.d.ts new file mode 100644 index 000000000..23a38b7eb --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/downloadUtils.d.ts @@ -0,0 +1,74 @@ +import { TransferProgressEvent } from '@azure/ms-rest-js'; +import { DownloadOptions } from '../options'; +/** + * Class for tracking the download state and displaying stats. + */ +export declare class DownloadProgress { + contentLength: number; + segmentIndex: number; + segmentSize: number; + segmentOffset: number; + receivedBytes: number; + startTime: number; + displayedComplete: boolean; + timeoutHandle?: ReturnType; + constructor(contentLength: number); + /** + * Progress to the next segment. Only call this method when the previous segment + * is complete. + * + * @param segmentSize the length of the next segment + */ + nextSegment(segmentSize: number): void; + /** + * Sets the number of bytes received for the current segment. + * + * @param receivedBytes the number of bytes received + */ + setReceivedBytes(receivedBytes: number): void; + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes(): number; + /** + * Returns true if the download is complete. + */ + isDone(): boolean; + /** + * Prints the current download stats. Once the download completes, this will print one + * last line and then stop. + */ + display(): void; + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress(): (progress: TransferProgressEvent) => void; + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs?: number): void; + /** + * Stops the timer that displays the stats. As this typically indicates the download + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer(): void; +} +/** + * Download the cache using the Actions toolkit http-client + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ +export declare function downloadCacheHttpClient(archiveLocation: string, archivePath: string): Promise; +/** + * Download the cache using the Azure Storage SDK. Only call this method if the + * URL points to an Azure Storage endpoint. + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + * @param options the download options with the defaults set + */ +export declare function downloadCacheStorageSDK(archiveLocation: string, archivePath: string, options: DownloadOptions): Promise; diff --git a/node_modules/@actions/cache/lib/internal/downloadUtils.js b/node_modules/@actions/cache/lib/internal/downloadUtils.js new file mode 100644 index 000000000..64a574d13 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/downloadUtils.js @@ -0,0 +1,230 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const http_client_1 = require("@actions/http-client"); +const storage_blob_1 = require("@azure/storage-blob"); +const buffer = __importStar(require("buffer")); +const fs = __importStar(require("fs")); +const stream = __importStar(require("stream")); +const util = __importStar(require("util")); +const utils = __importStar(require("./cacheUtils")); +const constants_1 = require("./constants"); +const requestUtils_1 = require("./requestUtils"); +/** + * Pipes the body of a HTTP response to a stream + * + * @param response the HTTP response + * @param output the writable stream + */ +function pipeResponseToStream(response, output) { + return __awaiter(this, void 0, void 0, function* () { + const pipeline = util.promisify(stream.pipeline); + yield pipeline(response.message, output); + }); +} +/** + * Class for tracking the download state and displaying stats. + */ +class DownloadProgress { + constructor(contentLength) { + this.contentLength = contentLength; + this.segmentIndex = 0; + this.segmentSize = 0; + this.segmentOffset = 0; + this.receivedBytes = 0; + this.displayedComplete = false; + this.startTime = Date.now(); + } + /** + * Progress to the next segment. Only call this method when the previous segment + * is complete. + * + * @param segmentSize the length of the next segment + */ + nextSegment(segmentSize) { + this.segmentOffset = this.segmentOffset + this.segmentSize; + this.segmentIndex = this.segmentIndex + 1; + this.segmentSize = segmentSize; + this.receivedBytes = 0; + core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + } + /** + * Sets the number of bytes received for the current segment. + * + * @param receivedBytes the number of bytes received + */ + setReceivedBytes(receivedBytes) { + this.receivedBytes = receivedBytes; + } + /** + * Returns the total number of bytes transferred. + */ + getTransferredBytes() { + return this.segmentOffset + this.receivedBytes; + } + /** + * Returns true if the download is complete. + */ + isDone() { + return this.getTransferredBytes() === this.contentLength; + } + /** + * Prints the current download stats. Once the download completes, this will print one + * last line and then stop. + */ + display() { + if (this.displayedComplete) { + return; + } + const transferredBytes = this.segmentOffset + this.receivedBytes; + const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); + const elapsedTime = Date.now() - this.startTime; + const downloadSpeed = (transferredBytes / + (1024 * 1024) / + (elapsedTime / 1000)).toFixed(1); + core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + if (this.isDone()) { + this.displayedComplete = true; + } + } + /** + * Returns a function used to handle TransferProgressEvents. + */ + onProgress() { + return (progress) => { + this.setReceivedBytes(progress.loadedBytes); + }; + } + /** + * Starts the timer that displays the stats. + * + * @param delayInMs the delay between each write + */ + startDisplayTimer(delayInMs = 1000) { + const displayCallback = () => { + this.display(); + if (!this.isDone()) { + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + }; + this.timeoutHandle = setTimeout(displayCallback, delayInMs); + } + /** + * Stops the timer that displays the stats. As this typically indicates the download + * is complete, this will display one last line, unless the last line has already + * been written. + */ + stopDisplayTimer() { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + this.timeoutHandle = undefined; + } + this.display(); + } +} +exports.DownloadProgress = DownloadProgress; +/** + * Download the cache using the Actions toolkit http-client + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + */ +function downloadCacheHttpClient(archiveLocation, archivePath) { + return __awaiter(this, void 0, void 0, function* () { + const writeStream = fs.createWriteStream(archivePath); + const httpClient = new http_client_1.HttpClient('actions/cache'); + const downloadResponse = yield requestUtils_1.retryHttpClientResponse('downloadCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); + // Abort download if no traffic received over the socket. + downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { + downloadResponse.message.destroy(); + core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + }); + yield pipeResponseToStream(downloadResponse, writeStream); + // Validate download size. + const contentLengthHeader = downloadResponse.message.headers['content-length']; + if (contentLengthHeader) { + const expectedLength = parseInt(contentLengthHeader); + const actualLength = utils.getArchiveFileSizeIsBytes(archivePath); + if (actualLength !== expectedLength) { + throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); + } + } + else { + core.debug('Unable to validate download, no Content-Length header'); + } + }); +} +exports.downloadCacheHttpClient = downloadCacheHttpClient; +/** + * Download the cache using the Azure Storage SDK. Only call this method if the + * URL points to an Azure Storage endpoint. + * + * @param archiveLocation the URL for the cache + * @param archivePath the local path where the cache is saved + * @param options the download options with the defaults set + */ +function downloadCacheStorageSDK(archiveLocation, archivePath, options) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, { + retryOptions: { + // Override the timeout used when downloading each 4 MB chunk + // The default is 2 min / MB, which is way too slow + tryTimeoutInMs: options.timeoutInMs + } + }); + const properties = yield client.getProperties(); + const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; + if (contentLength < 0) { + // We should never hit this condition, but just in case fall back to downloading the + // file as one large stream + core.debug('Unable to determine content length, downloading file with http-client...'); + yield downloadCacheHttpClient(archiveLocation, archivePath); + } + else { + // Use downloadToBuffer for faster downloads, since internally it splits the + // file into 4 MB chunks which can then be parallelized and retried independently + // + // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB + // on 64-bit systems), split the download into multiple segments + const maxSegmentSize = buffer.constants.MAX_LENGTH; + const downloadProgress = new DownloadProgress(contentLength); + const fd = fs.openSync(archivePath, 'w'); + try { + downloadProgress.startDisplayTimer(); + 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, { + concurrency: options.downloadConcurrency, + onProgress: downloadProgress.onProgress() + }); + fs.writeFileSync(fd, result); + } + } + finally { + downloadProgress.stopDisplayTimer(); + fs.closeSync(fd); + } + } + }); +} +exports.downloadCacheStorageSDK = downloadCacheStorageSDK; +//# sourceMappingURL=downloadUtils.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/downloadUtils.js.map b/node_modules/@actions/cache/lib/internal/downloadUtils.js.map new file mode 100644 index 000000000..8c0ba620a --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/downloadUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"downloadUtils.js","sourceRoot":"","sources":["../../src/internal/downloadUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,sDAA+C;AAE/C,sDAAmD;AAEnD,+CAAgC;AAChC,uCAAwB;AACxB,+CAAgC;AAChC,2CAA4B;AAE5B,oDAAqC;AACrC,2CAAyC;AAEzC,iDAAsD;AAEtD;;;;;GAKG;AACH,SAAe,oBAAoB,CACjC,QAA6B,EAC7B,MAA6B;;QAE7B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChD,MAAM,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAC1C,CAAC;CAAA;AAED;;GAEG;AACH,MAAa,gBAAgB;IAU3B,YAAY,aAAqB;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAA;QACpB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAA;QACtB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAA;QACtB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAA;QAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC7B,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,WAAmB;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAA;QAC1D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;QACzC,IAAI,CAAC,W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Ac,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAA;YAClD,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,aAAa,CAAC,CAAA;YAE5D,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;YAExC,IAAI;gBACF,gBAAgB,CAAC,iBAAiB,EAAE,CAAA;gBAEpC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE;oBACjC,MAAM,YAAY,GAChB,gBAAgB,CAAC,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAA;oBAE/D,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAC1B,cAAc,EACd,aAAa,GAAG,YAAY,CAC7B,CAAA;oBAED,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;oBAEzC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAC1C,YAAY,EACZ,WAAW,EACX;wBACE,WAAW,EAAE,OAAO,CAAC,mBAAmB;wBACxC,UAAU,EAAE,gBAAgB,CAAC,UAAU,EAAE;qBAC1C,CACF,CAAA;oBAED,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;iBAC7B;aACF;oBAAS;gBACR,gBAAgB,CAAC,gBAAgB,EAAE,CAAA;gBACnC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;aACjB;SACF;;CACF;AAjED,0DAiEC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/requestUtils.d.ts b/node_modules/@actions/cache/lib/internal/requestUtils.d.ts new file mode 100644 index 000000000..ec40300e4 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/requestUtils.d.ts @@ -0,0 +1,7 @@ +import { IHttpClientResponse, ITypedResponse } from '@actions/http-client/interfaces'; +export declare function isSuccessStatusCode(statusCode?: number): boolean; +export declare function isServerErrorStatusCode(statusCode?: number): boolean; +export declare function isRetryableStatusCode(statusCode?: number): boolean; +export declare function retry(name: string, method: () => Promise, getStatusCode: (arg0: T) => number | undefined, maxAttempts?: number, delay?: number, onError?: ((arg0: Error) => T | undefined) | undefined): Promise; +export declare function retryTypedResponse(name: string, method: () => Promise>, maxAttempts?: number, delay?: number): Promise>; +export declare function retryHttpClientResponse(name: string, method: () => Promise, maxAttempts?: number, delay?: number): Promise; diff --git a/node_modules/@actions/cache/lib/internal/requestUtils.js b/node_modules/@actions/cache/lib/internal/requestUtils.js new file mode 100644 index 000000000..68123f9ba --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/requestUtils.js @@ -0,0 +1,119 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const http_client_1 = require("@actions/http-client"); +const constants_1 = require("./constants"); +function isSuccessStatusCode(statusCode) { + if (!statusCode) { + return false; + } + return statusCode >= 200 && statusCode < 300; +} +exports.isSuccessStatusCode = isSuccessStatusCode; +function isServerErrorStatusCode(statusCode) { + if (!statusCode) { + return true; + } + return statusCode >= 500; +} +exports.isServerErrorStatusCode = isServerErrorStatusCode; +function isRetryableStatusCode(statusCode) { + if (!statusCode) { + return false; + } + const retryableStatusCodes = [ + http_client_1.HttpCodes.BadGateway, + http_client_1.HttpCodes.ServiceUnavailable, + http_client_1.HttpCodes.GatewayTimeout + ]; + return retryableStatusCodes.includes(statusCode); +} +exports.isRetryableStatusCode = isRetryableStatusCode; +function sleep(milliseconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise(resolve => setTimeout(resolve, milliseconds)); + }); +} +function retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = undefined) { + return __awaiter(this, void 0, void 0, function* () { + let errorMessage = ''; + let attempt = 1; + while (attempt <= maxAttempts) { + let response = undefined; + let statusCode = undefined; + let isRetryable = false; + try { + response = yield method(); + } + catch (error) { + if (onError) { + response = onError(error); + } + isRetryable = true; + errorMessage = error.message; + } + if (response) { + statusCode = getStatusCode(response); + if (!isServerErrorStatusCode(statusCode)) { + return response; + } + } + if (statusCode) { + isRetryable = isRetryableStatusCode(statusCode); + errorMessage = `Cache service responded with ${statusCode}`; + } + core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + if (!isRetryable) { + core.debug(`${name} - Error is not retryable`); + break; + } + yield sleep(delay); + attempt++; + } + throw Error(`${name} failed: ${errorMessage}`); + }); +} +exports.retry = retry; +function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { + return __awaiter(this, void 0, void 0, function* () { + return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, + // If the error object contains the statusCode property, extract it and return + // an ITypedResponse so it can be processed by the retry logic. + (error) => { + if (error instanceof http_client_1.HttpClientError) { + return { + statusCode: error.statusCode, + result: null, + headers: {} + }; + } + else { + return undefined; + } + }); + }); +} +exports.retryTypedResponse = retryTypedResponse; +function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { + return __awaiter(this, void 0, void 0, function* () { + return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay); + }); +} +exports.retryHttpClientResponse = retryHttpClientResponse; +//# sourceMappingURL=requestUtils.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/requestUtils.js.map b/node_modules/@actions/cache/lib/internal/requestUtils.js.map new file mode 100644 index 000000000..8679b4472 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/requestUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"requestUtils.js","sourceRoot":"","sources":["../../src/internal/requestUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,sDAA+D;AAK/D,2CAAmE;AAEnE,SAAgB,mBAAmB,CAAC,UAAmB;IACrD,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IACD,OAAO,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAA;AAC9C,CAAC;AALD,kDAKC;AAED,SAAgB,uBAAuB,CAAC,UAAmB;IACzD,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,UAAU,IAAI,GAAG,CAAA;AAC1B,CAAC;AALD,0DAKC;AAED,SAAgB,qBAAqB,CAAC,UAAmB;IACvD,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IACD,MAAM,oBAAoB,GAAG;QAC3B,uBAAS,CAAC,UAAU;QACpB,uBAAS,CAAC,kBAAkB;QAC5B,uBAAS,CAAC,cAAc;KACzB,CAAA;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AAClD,CAAC;AAVD,sDAUC;AAED,SAAe,KAAK,CAAC,YAAoB;;QACvC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;IAClE,CAAC;CAAA;AAED,SAAsB,KAAK,CACzB,IAAY,EACZ,MAAwB,EACxB,aAA8C,EAC9C,WAAW,GAAG,gCAAoB,EAClC,KAAK,GAAG,6BAAiB,EACzB,UAAwD,SAAS;;QAEjE,IAAI,Y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EzB,OAAO,MAAM,KAAK,CAChB,IAAI,EACJ,MAAM,EACN,CAAC,QAA2B,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,EACpD,WAAW,EACX,KAAK;QACL,8EAA8E;QAC9E,kEAAkE;QAClE,CAAC,KAAY,EAAE,EAAE;YACf,IAAI,KAAK,YAAY,6BAAe,EAAE;gBACpC,OAAO;oBACL,UAAU,EAAE,KAAK,CAAC,UAAU;oBAC5B,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,EAAE;iBACZ,CAAA;aACF;iBAAM;gBACL,OAAO,SAAS,CAAA;aACjB;QACH,CAAC,CACF,CAAA;IACH,CAAC;CAAA;AA1BD,gDA0BC;AAED,SAAsB,uBAAuB,CAC3C,IAAY,EACZ,MAA0C,EAC1C,WAAW,GAAG,gCAAoB,EAClC,KAAK,GAAG,6BAAiB;;QAEzB,OAAO,MAAM,KAAK,CAChB,IAAI,EACJ,MAAM,EACN,CAAC,QAA6B,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,EAC9D,WAAW,EACX,KAAK,CACN,CAAA;IACH,CAAC;CAAA;AAbD,0DAaC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/tar.d.ts b/node_modules/@actions/cache/lib/internal/tar.d.ts new file mode 100644 index 000000000..35d0bd830 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/tar.d.ts @@ -0,0 +1,3 @@ +import { CompressionMethod } from './constants'; +export declare function extractTar(archivePath: string, compressionMethod: CompressionMethod): Promise; +export declare function createTar(archiveFolder: string, sourceDirectories: string[], compressionMethod: CompressionMethod): Promise; diff --git a/node_modules/@actions/cache/lib/internal/tar.js b/node_modules/@actions/cache/lib/internal/tar.js new file mode 100644 index 000000000..62334d9b0 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/tar.js @@ -0,0 +1,125 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const exec_1 = require("@actions/exec"); +const io = __importStar(require("@actions/io")); +const fs_1 = require("fs"); +const path = __importStar(require("path")); +const utils = __importStar(require("./cacheUtils")); +const constants_1 = require("./constants"); +function getTarPath(args, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + const IS_WINDOWS = process.platform === 'win32'; + if (IS_WINDOWS) { + const systemTar = `${process.env['windir']}\\System32\\tar.exe`; + if (compressionMethod !== constants_1.CompressionMethod.Gzip) { + // We only use zstandard compression on windows when gnu tar is installed due to + // a bug with compressing large files with bsdtar + zstd + args.push('--force-local'); + } + else if (fs_1.existsSync(systemTar)) { + return systemTar; + } + else if (yield utils.isGnuTarInstalled()) { + args.push('--force-local'); + } + } + return yield io.which('tar', true); + }); +} +function execTar(args, compressionMethod, cwd) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exec_1.exec(`"${yield getTarPath(args, compressionMethod)}"`, args, { cwd }); + } + catch (error) { + throw new Error(`Tar failed with error: ${error === null || error === void 0 ? void 0 : error.message}`); + } + }); +} +function getWorkingDirectory() { + var _a; + return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); +} +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(), + '-xf', + archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + '-P', + '-C', + workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/') + ]; + yield execTar(args, compressionMethod); + }); +} +exports.extractTar = extractTar; +function createTar(archiveFolder, sourceDirectories, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + // Write source directories to manifest.txt to avoid command length limits + const manifestFilename = 'manifest.txt'; + const cacheFileName = utils.getCacheFileName(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. + // --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']; + case constants_1.CompressionMethod.ZstdWithoutLong: + return ['--use-compress-program', 'zstd -T0']; + default: + return ['-z']; + } + } + const args = [ + '--posix', + ...getCompressionProgram(), + '-cf', + cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + '-P', + '-C', + workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + '--files-from', + manifestFilename + ]; + yield execTar(args, compressionMethod, archiveFolder); + }); +} +exports.createTar = createTar; +//# sourceMappingURL=tar.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/internal/tar.js.map b/node_modules/@actions/cache/lib/internal/tar.js.map new file mode 100644 index 000000000..eef0bc4a7 --- /dev/null +++ b/node_modules/@actions/cache/lib/internal/tar.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tar.js","sourceRoot":"","sources":["../../src/internal/tar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wCAAkC;AAClC,gDAAiC;AACjC,2BAA4C;AAC5C,2CAA4B;AAC5B,oDAAqC;AACrC,2CAA6C;AAE7C,SAAe,UAAU,CACvB,IAAc,EACd,iBAAoC;;QAEpC,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;QAC/C,IAAI,UAAU,EAAE;YACd,MAAM,SAAS,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAA;YAC/D,IAAI,iBAAiB,KAAK,6BAAiB,CAAC,IAAI,EAAE;gBAChD,gFAAgF;gBAChF,wDAAwD;gBACxD,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;aAC3B;iBAAM,IAAI,eAAU,CAAC,SAAS,CAAC,EAAE;gBAChC,OAAO,SAAS,CAAA;aACjB;iBAAM,IAAI,MAAM,KAAK,CAAC,iBAAiB,EAAE,EAAE;gBAC1C,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;aAC3B;SACF;QACD,OAAO,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACpC,CAAC;CAAA;AAED,SAAe,OAAO,CACpB,IAAc,EACd,iBAAoC,EACpC,GAAY;;QAEZ,IAAI;YACF,MAAM,WAAI,CAAC,IAAI,MAAM,UAAU,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAC,GAAG,EAAC,CAAC,CAAA;SAC1E;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,K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gBAAgB,GAAG,cAAc,CAAA;QACvC,MAAM,aAAa,GAAG,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;QAC/D,kBAAa,CACX,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAC1C,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7B,CAAA;QACD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAA;QAE9C,+GAA+G;QAC/G,iHAAiH;QACjH,oEAAoE;QACpE,0GAA0G;QAC1G,SAAS,qBAAqB;YAC5B,QAAQ,iBAAiB,EAAE;gBACzB,KAAK,6BAAiB,CAAC,IAAI;oBACzB,OAAO,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAA;gBACzD,KAAK,6BAAiB,CAAC,eAAe;oBACpC,OAAO,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAA;gBAC/C;oBACE,OAAO,CAAC,IAAI,CAAC,CAAA;aAChB;QACH,CAAC;QACD,MAAM,IAAI,GAAG;YACX,SAAS;YACT,GAAG,qBAAqB,EAAE;YAC1B,KAAK;YACL,aAAa,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC;YAC5D,IAAI;YACJ,IAAI;YACJ,gBAAgB,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC;YAC/D,cAAc;YACd,gBAAgB;SACjB,CAAA;QACD,MAAM,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,aAAa,CAAC,CAAA;IACvD,CAAC;CAAA;AAxCD,8BAwCC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/options.d.ts b/node_modules/@actions/cache/lib/options.d.ts new file mode 100644 index 000000000..0cb0d6e12 --- /dev/null +++ b/node_modules/@actions/cache/lib/options.d.ts @@ -0,0 +1,56 @@ +/** + * Options to control cache upload + */ +export interface UploadOptions { + /** + * Number of parallel cache upload + * + * @default 4 + */ + uploadConcurrency?: number; + /** + * Maximum chunk size in bytes for cache upload + * + * @default 32MB + */ + uploadChunkSize?: number; +} +/** + * Options to control cache download + */ +export interface DownloadOptions { + /** + * Indicates whether to use the Azure Blob SDK to download caches + * that are stored on Azure Blob Storage to improve reliability and + * performance + * + * @default true + */ + useAzureSdk?: boolean; + /** + * Number of parallel downloads (this option only applies when using + * the Azure SDK) + * + * @default 8 + */ + downloadConcurrency?: number; + /** + * Maximum time for each download request, in milliseconds (this + * option only applies when using the Azure SDK) + * + * @default 30000 + */ + timeoutInMs?: number; +} +/** + * Returns a copy of the upload options with defaults filled in. + * + * @param copy the original upload options + */ +export declare function getUploadOptions(copy?: UploadOptions): UploadOptions; +/** + * Returns a copy of the download options with defaults filled in. + * + * @param copy the original download options + */ +export declare function getDownloadOptions(copy?: DownloadOptions): DownloadOptions; diff --git a/node_modules/@actions/cache/lib/options.js b/node_modules/@actions/cache/lib/options.js new file mode 100644 index 000000000..1a7877a60 --- /dev/null +++ b/node_modules/@actions/cache/lib/options.js @@ -0,0 +1,62 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +/** + * Returns a copy of the upload options with defaults filled in. + * + * @param copy the original upload options + */ +function getUploadOptions(copy) { + const result = { + uploadConcurrency: 4, + uploadChunkSize: 32 * 1024 * 1024 + }; + if (copy) { + if (typeof copy.uploadConcurrency === 'number') { + result.uploadConcurrency = copy.uploadConcurrency; + } + if (typeof copy.uploadChunkSize === 'number') { + result.uploadChunkSize = copy.uploadChunkSize; + } + } + core.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core.debug(`Upload chunk size: ${result.uploadChunkSize}`); + return result; +} +exports.getUploadOptions = getUploadOptions; +/** + * Returns a copy of the download options with defaults filled in. + * + * @param copy the original download options + */ +function getDownloadOptions(copy) { + const result = { + useAzureSdk: true, + downloadConcurrency: 8, + timeoutInMs: 30000 + }; + if (copy) { + if (typeof copy.useAzureSdk === 'boolean') { + result.useAzureSdk = copy.useAzureSdk; + } + if (typeof copy.downloadConcurrency === 'number') { + result.downloadConcurrency = copy.downloadConcurrency; + } + if (typeof copy.timeoutInMs === 'number') { + result.timeoutInMs = copy.timeoutInMs; + } + } + core.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core.debug(`Download concurrency: ${result.downloadConcurrency}`); + core.debug(`Request timeout (ms): ${result.timeoutInMs}`); + return result; +} +exports.getDownloadOptions = getDownloadOptions; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/@actions/cache/lib/options.js.map b/node_modules/@actions/cache/lib/options.js.map new file mode 100644 index 000000000..2cda122ed --- /dev/null +++ b/node_modules/@actions/cache/lib/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAqC;AAkDrC;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAoB;IACnD,MAAM,MAAM,GAAkB;QAC5B,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;KAClC,CAAA;IAED,IAAI,IAAI,EAAE;QACR,IAAI,OAAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ,EAAE;YAC9C,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAA;SAClD;QAED,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE;YAC5C,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;SAC9C;KACF;IAED,IAAI,CAAC,KAAK,CAAC,uBAAuB,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC7D,IAAI,CAAC,KAAK,CAAC,sBAAsB,MAAM,CAAC,eAAe,EAAE,CAAC,CAAA;IAE1D,OAAO,MAAM,CAAA;AACf,CAAC;AApBD,4CAoBC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAsB;IACvD,MAAM,MAAM,GAAoB;QAC9B,WAAW,EAAE,IAAI;QACjB,mBAAmB,EAAE,CAAC;QACtB,WAAW,EAAE,KAAK;KACnB,CAAA;IAED,IAAI,IAAI,EAAE;QACR,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YACzC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;SACtC;QAED,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,QAAQ,EAAE;YAChD,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;SACtD;QAED,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;YACxC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;SACtC;KACF;IAED,IAAI,CAAC,KAAK,CAAC,kBAAkB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAA;IAClD,IAAI,CAAC,KAAK,CAAC,yBAAyB,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAA;IACjE,IAAI,CAAC,KAAK,CAAC,yBAAyB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAA;IAEzD,OAAO,MAAM,CAAA;AACf,CAAC;AA1BD,gDA0BC"} \ No newline at end of file diff --git a/node_modules/@actions/cache/node_modules/.bin/semver b/node_modules/@actions/cache/node_modules/.bin/semver new file mode 120000 index 000000000..5aaadf42c --- /dev/null +++ b/node_modules/@actions/cache/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/@actions/cache/node_modules/.bin/uuid b/node_modules/@actions/cache/node_modules/.bin/uuid new file mode 120000 index 000000000..b3e45bc53 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/LICENSE b/node_modules/@actions/cache/node_modules/@actions/http-client/LICENSE new file mode 100644 index 000000000..5823a51c3 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/LICENSE @@ -0,0 +1,21 @@ +Actions Http Client for Node.js + +Copyright (c) GitHub, Inc. + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/README.md b/node_modules/@actions/cache/node_modules/@actions/http-client/README.md new file mode 100644 index 000000000..be61eb351 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/README.md @@ -0,0 +1,79 @@ + +

+ +

+ +# Actions Http-Client + +[![Http Status](https://github.com/actions/http-client/workflows/http-tests/badge.svg)](https://github.com/actions/http-client/actions) + +A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await. + +## Features + + - HTTP client with TypeScript generics and async/await/Promises + - Typings included so no need to acquire separately (great for intellisense and no versioning drift) + - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner + - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. + - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. + - Redirects supported + +Features and releases [here](./RELEASES.md) + +## Install + +``` +npm install @actions/http-client --save +``` + +## Samples + +See the [HTTP](./__tests__) tests for detailed examples. + +## Errors + +### HTTP + +The HTTP client does not throw unless truly exceptional. + +* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. +* Redirects (3xx) will be followed by default. + +See [HTTP tests](./__tests__) for detailed examples. + +## Debugging + +To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: + +``` +export NODE_DEBUG=http +``` + +## Node support + +The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. + +## Support and Versioning + +We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). + +## Contributing + +We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. + +once: + +```bash +$ npm install +``` + +To build: + +```bash +$ npm run build +``` + +To run all tests: +```bash +$ npm test +``` diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/RELEASES.md b/node_modules/@actions/cache/node_modules/@actions/http-client/RELEASES.md new file mode 100644 index 000000000..245477d61 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/RELEASES.md @@ -0,0 +1,22 @@ +## Releases + +## 1.0.9 +Throw HttpClientError instead of a generic Error from the \Json() helper methods when the server responds with a non-successful status code. + +## 1.0.8 +Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27) + +## 1.0.7 +Update NPM dependencies and add 429 to the list of HttpCodes + +## 1.0.6 +Automatically sends Content-Type and Accept application/json headers for \Json() helper methods if not set in the client or parameters. + +## 1.0.5 +Adds \Json() helper methods for json over http scenarios. + +## 1.0.4 +Started to add \Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types. + +## 1.0.1 to 1.0.3 +Adds proxy support. diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/actions.png b/node_modules/@actions/cache/node_modules/@actions/http-client/actions.png new file mode 100644 index 000000000..1857ef375 Binary files /dev/null and b/node_modules/@actions/cache/node_modules/@actions/http-client/actions.png differ diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/auth.d.ts b/node_modules/@actions/cache/node_modules/@actions/http-client/auth.d.ts new file mode 100644 index 000000000..1094189cf --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/auth.d.ts @@ -0,0 +1,23 @@ +import ifm = require('./interfaces'); +export declare class BasicCredentialHandler implements ifm.IRequestHandler { + username: string; + password: string; + constructor(username: string, password: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} +export declare class BearerCredentialHandler implements ifm.IRequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} +export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: any): void; + canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; + handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; +} diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/auth.js b/node_modules/@actions/cache/node_modules/@actions/http-client/auth.js new file mode 100644 index 000000000..67a58aa78 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/auth.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + + Buffer.from(this.username + ':' + this.password).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = 'Bearer ' + this.token; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/index.d.ts b/node_modules/@actions/cache/node_modules/@actions/http-client/index.d.ts new file mode 100644 index 000000000..9583dc72a --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/index.d.ts @@ -0,0 +1,124 @@ +/// +import http = require('http'); +import ifm = require('./interfaces'); +export declare enum HttpCodes { + OK = 200, + MultipleChoices = 300, + MovedPermanently = 301, + ResourceMoved = 302, + SeeOther = 303, + NotModified = 304, + UseProxy = 305, + SwitchProxy = 306, + TemporaryRedirect = 307, + PermanentRedirect = 308, + BadRequest = 400, + Unauthorized = 401, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthenticationRequired = 407, + RequestTimeout = 408, + Conflict = 409, + Gone = 410, + TooManyRequests = 429, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504 +} +export declare enum Headers { + Accept = "accept", + ContentType = "content-type" +} +export declare enum MediaTypes { + ApplicationJson = "application/json" +} +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +export declare function getProxyUrl(serverUrl: string): string; +export declare class HttpClientError extends Error { + constructor(message: string, statusCode: number); + statusCode: number; + result?: any; +} +export declare class HttpClientResponse implements ifm.IHttpClientResponse { + constructor(message: http.IncomingMessage); + message: http.IncomingMessage; + readBody(): Promise; +} +export declare function isHttps(requestUrl: string): boolean; +export declare class HttpClient { + userAgent: string | undefined; + handlers: ifm.IRequestHandler[]; + requestOptions: ifm.IRequestOptions; + private _ignoreSslError; + private _socketTimeout; + private _allowRedirects; + private _allowRedirectDowngrade; + private _maxRedirects; + private _allowRetries; + private _maxRetries; + private _agent; + private _proxyAgent; + private _keepAlive; + private _disposed; + constructor(userAgent?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions); + options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; + head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise; + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise>; + postJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; + putJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; + patchJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: ifm.IHeaders): Promise; + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose(): void; + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream): Promise; + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => void): void; + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl: string): http.Agent; + private _prepareRequest; + private _mergeHeaders; + private _getExistingOrDefaultHeader; + private _getAgent; + private _performExponentialBackoff; + private static dateTimeDeserializer; + private _processResponse; +} diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/index.js b/node_modules/@actions/cache/node_modules/@actions/http-client/index.js new file mode 100644 index 000000000..5c54cf84b --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/index.js @@ -0,0 +1,535 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const https = require("https"); +const pm = require("./proxy"); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + let parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = require('tunnel'); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, + host: proxyUrl.hostname, + port: proxyUrl.port + } + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.d.ts b/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.d.ts new file mode 100644 index 000000000..78bd85b34 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.d.ts @@ -0,0 +1,49 @@ +/// +import http = require('http'); +export interface IHeaders { + [key: string]: any; +} +export interface IHttpClient { + options(requestUrl: string, additionalHeaders?: IHeaders): Promise; + get(requestUrl: string, additionalHeaders?: IHeaders): Promise; + del(requestUrl: string, additionalHeaders?: IHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise; + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise; + requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise; + requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void; +} +export interface IRequestHandler { + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(response: IHttpClientResponse): boolean; + handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise; +} +export interface IHttpClientResponse { + message: http.IncomingMessage; + readBody(): Promise; +} +export interface IRequestInfo { + options: http.RequestOptions; + parsedUrl: URL; + httpModule: any; +} +export interface IRequestOptions { + headers?: IHeaders; + socketTimeout?: number; + ignoreSslError?: boolean; + allowRedirects?: boolean; + allowRedirectDowngrade?: boolean; + maxRedirects?: number; + maxSockets?: number; + keepAlive?: boolean; + deserializeDates?: boolean; + allowRetries?: boolean; + maxRetries?: number; +} +export interface ITypedResponse { + statusCode: number; + result: T | null; + headers: Object; +} diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.js b/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/interfaces.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/package.json b/node_modules/@actions/cache/node_modules/@actions/http-client/package.json new file mode 100644 index 000000000..bfc3c9234 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/package.json @@ -0,0 +1,67 @@ +{ + "_from": "@actions/http-client@^1.0.9", + "_id": "@actions/http-client@1.0.9", + "_inBundle": false, + "_integrity": "sha512-0O4SsJ7q+MK0ycvXPl2e6bMXV7dxAXOGjrXS1eTF9s2S401Tp6c/P3c3Joz04QefC1J6Gt942Wl2jbm3f4mLcg==", + "_location": "/@actions/cache/@actions/http-client", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@actions/http-client@^1.0.9", + "name": "@actions/http-client", + "escapedName": "@actions%2fhttp-client", + "scope": "@actions", + "rawSpec": "^1.0.9", + "saveSpec": null, + "fetchSpec": "^1.0.9" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.9.tgz", + "_shasum": "af1947d020043dbc6a3b4c5918892095c30ffb52", + "_spec": "@actions/http-client@^1.0.9", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "author": { + "name": "GitHub, Inc." + }, + "bugs": { + "url": "https://github.com/actions/http-client/issues" + }, + "bundleDependencies": false, + "dependencies": { + "tunnel": "0.0.6" + }, + "deprecated": false, + "description": "Actions Http Client", + "devDependencies": { + "@types/jest": "^25.1.4", + "@types/node": "^12.12.31", + "jest": "^25.1.0", + "prettier": "^2.0.4", + "proxy": "^1.0.1", + "ts-jest": "^25.2.1", + "typescript": "^3.8.3" + }, + "homepage": "https://github.com/actions/http-client#readme", + "keywords": [ + "Actions", + "Http" + ], + "license": "MIT", + "main": "index.js", + "name": "@actions/http-client", + "repository": { + "type": "git", + "url": "git+https://github.com/actions/http-client.git" + }, + "scripts": { + "audit-check": "npm audit --audit-level=moderate", + "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", + "format": "prettier --write *.ts && prettier --write **/*.ts", + "format-check": "prettier --check *.ts && prettier --check **/*.ts", + "test": "jest" + }, + "version": "1.0.9" +} diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.d.ts b/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.d.ts new file mode 100644 index 000000000..459986540 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.d.ts @@ -0,0 +1,2 @@ +export declare function getProxyUrl(reqUrl: URL): URL | undefined; +export declare function checkBypass(reqUrl: URL): boolean; diff --git a/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.js b/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.js new file mode 100644 index 000000000..88f00ecd1 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/@actions/http-client/proxy.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + if (proxyVar) { + proxyUrl = new URL(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; diff --git a/node_modules/@actions/cache/node_modules/semver/CHANGELOG.md b/node_modules/@actions/cache/node_modules/semver/CHANGELOG.md new file mode 100644 index 000000000..f567dd3fe --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/CHANGELOG.md @@ -0,0 +1,70 @@ +# changes log + +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/@actions/cache/node_modules/semver/LICENSE b/node_modules/@actions/cache/node_modules/semver/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@actions/cache/node_modules/semver/README.md b/node_modules/@actions/cache/node_modules/semver/README.md new file mode 100644 index 000000000..2293a14fd --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/README.md @@ -0,0 +1,443 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero element in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/@actions/cache/node_modules/semver/bin/semver.js b/node_modules/@actions/cache/node_modules/semver/bin/semver.js new file mode 100755 index 000000000..666034a75 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/@actions/cache/node_modules/semver/package.json b/node_modules/@actions/cache/node_modules/semver/package.json new file mode 100644 index 000000000..75ce5c437 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/package.json @@ -0,0 +1,60 @@ +{ + "_from": "semver@^6.1.0", + "_id": "semver@6.3.0", + "_inBundle": false, + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_location": "/@actions/cache/semver", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "semver@^6.1.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "^6.1.0", + "saveSpec": null, + "fetchSpec": "^6.1.0" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d", + "_spec": "semver@^6.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "bin": { + "semver": "bin/semver.js" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^14.3.1" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, + "tap": { + "check-coverage": true + }, + "version": "6.3.0" +} diff --git a/node_modules/@actions/cache/node_modules/semver/range.bnf b/node_modules/@actions/cache/node_modules/semver/range.bnf new file mode 100644 index 000000000..d4c6ae0d7 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/@actions/cache/node_modules/semver/semver.js b/node_modules/@actions/cache/node_modules/semver/semver.js new file mode 100644 index 000000000..636fa4365 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/semver/semver.js @@ -0,0 +1,1596 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} diff --git a/node_modules/@actions/cache/node_modules/uuid/AUTHORS b/node_modules/@actions/cache/node_modules/uuid/AUTHORS new file mode 100644 index 000000000..5a1052306 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/node_modules/@actions/cache/node_modules/uuid/CHANGELOG.md b/node_modules/@actions/cache/node_modules/uuid/CHANGELOG.md new file mode 100644 index 000000000..f811b8a0c --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + + +### Bug Fixes + +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +* Fix typo (#178) +* Simple typo fix (#165) + +### Features +* v5 support in CLI (#197) +* V5 support (#188) + + +# 3.0.1 (2016-11-28) + +* split uuid versions into separate files + + +# 3.0.0 (2016-11-17) + +* remove .parse and .unparse + + +# 2.0.0 + +* Removed uuid.BufferClass + + +# 1.4.0 + +* Improved module context detection +* Removed public RNG functions + + +# 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + + +# 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/@actions/cache/node_modules/uuid/LICENSE.md b/node_modules/@actions/cache/node_modules/uuid/LICENSE.md new file mode 100644 index 000000000..8c84e3986 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@actions/cache/node_modules/uuid/README.md b/node_modules/@actions/cache/node_modules/uuid/README.md new file mode 100644 index 000000000..1752e4751 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/README.md @@ -0,0 +1,276 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/@actions/cache/node_modules/uuid/bin/uuid b/node_modules/@actions/cache/node_modules/uuid/bin/uuid new file mode 100755 index 000000000..502626e60 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/node_modules/@actions/cache/node_modules/uuid/index.js b/node_modules/@actions/cache/node_modules/uuid/index.js new file mode 100644 index 000000000..e96791ab4 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/bytesToUuid.js b/node_modules/@actions/cache/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 000000000..24b60412a --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,26 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/md5-browser.js b/node_modules/@actions/cache/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 000000000..9b3b6c7ef --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/md5.js b/node_modules/@actions/cache/node_modules/uuid/lib/md5.js new file mode 100644 index 000000000..7044b872f --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/rng-browser.js b/node_modules/@actions/cache/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 000000000..6361fb814 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/rng.js b/node_modules/@actions/cache/node_modules/uuid/lib/rng.js new file mode 100644 index 000000000..58f0dc9cf --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/sha1-browser.js b/node_modules/@actions/cache/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 000000000..5758ed75c --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/sha1.js b/node_modules/@actions/cache/node_modules/uuid/lib/sha1.js new file mode 100644 index 000000000..0b54b2507 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/node_modules/@actions/cache/node_modules/uuid/lib/v35.js b/node_modules/@actions/cache/node_modules/uuid/lib/v35.js new file mode 100644 index 000000000..8b066cc5e --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/node_modules/@actions/cache/node_modules/uuid/package.json b/node_modules/@actions/cache/node_modules/uuid/package.json new file mode 100644 index 000000000..c6541c7bb --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/package.json @@ -0,0 +1,100 @@ +{ + "_from": "uuid@^3.3.3", + "_id": "uuid@3.4.0", + "_inBundle": false, + "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "_location": "/@actions/cache/uuid", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "uuid@^3.3.3", + "name": "uuid", + "escapedName": "uuid", + "rawSpec": "^3.3.3", + "saveSpec": null, + "fetchSpec": "^3.3.3" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "_shasum": "b23e4358afa8a202fe7a100af1f5f883f02007ee", + "_spec": "uuid@^3.3.3", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "bin": { + "uuid": "bin/uuid" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "bugs": { + "url": "https://github.com/uuidjs/uuid/issues" + }, + "bundleDependencies": false, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "contributors": [ + { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + }, + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" + }, + { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + } + ], + "deprecated": false, + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "devDependencies": { + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "homepage": "https://github.com/uuidjs/uuid#readme", + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "name": "uuid", + "repository": { + "type": "git", + "url": "git+https://github.com/uuidjs/uuid.git" + }, + "scripts": { + "lint": "eslint .", + "md": "runmd --watch --output=README.md README_js.md", + "prepare": "runmd --output=README.md README_js.md", + "release": "standard-version", + "test": "npm run lint && mocha test/test.js" + }, + "version": "3.4.0" +} diff --git a/node_modules/@actions/cache/node_modules/uuid/v1.js b/node_modules/@actions/cache/node_modules/uuid/v1.js new file mode 100644 index 000000000..8c245de43 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/node_modules/@actions/cache/node_modules/uuid/v3.js b/node_modules/@actions/cache/node_modules/uuid/v3.js new file mode 100644 index 000000000..ee7e14c0f --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/node_modules/@actions/cache/node_modules/uuid/v4.js b/node_modules/@actions/cache/node_modules/uuid/v4.js new file mode 100644 index 000000000..1f07be1c5 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/node_modules/@actions/cache/node_modules/uuid/v5.js b/node_modules/@actions/cache/node_modules/uuid/v5.js new file mode 100644 index 000000000..4945baf38 --- /dev/null +++ b/node_modules/@actions/cache/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/node_modules/@actions/cache/package.json b/node_modules/@actions/cache/package.json new file mode 100644 index 000000000..ae5b074a1 --- /dev/null +++ b/node_modules/@actions/cache/package.json @@ -0,0 +1,84 @@ +{ + "_from": "@actions/cache", + "_id": "@actions/cache@1.0.4", + "_inBundle": false, + "_integrity": "sha512-1grYfbu8P6JDDHc40eOI5tQDRcAxMwq5HBWhaCqEg9o/ixDRZfwPHlQvQAop2ZzFCjF2ns0ENQOIBAH8GNn+zA==", + "_location": "/@actions/cache", + "_phantomChildren": { + "tunnel": "0.0.6" + }, + "_requested": { + "type": "tag", + "registry": true, + "raw": "@actions/cache", + "name": "@actions/cache", + "escapedName": "@actions%2fcache", + "scope": "@actions", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.4.tgz", + "_shasum": "8a867be9bdbd625dbf03bc72c082bf123a29b03a", + "_spec": "@actions/cache", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@actions/core": "^1.2.6", + "@actions/exec": "^1.0.1", + "@actions/glob": "^0.1.0", + "@actions/http-client": "^1.0.9", + "@actions/io": "^1.0.1", + "@azure/ms-rest-js": "^2.0.7", + "@azure/storage-blob": "^12.1.2", + "semver": "^6.1.0", + "uuid": "^3.3.3" + }, + "deprecated": false, + "description": "Actions cache lib", + "devDependencies": { + "@types/semver": "^6.0.0", + "@types/uuid": "^3.4.5", + "typescript": "^3.8.3" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/cache", + "keywords": [ + "github", + "actions", + "cache" + ], + "license": "MIT", + "main": "lib/cache.js", + "name": "@actions/cache", + "preview": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/cache" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "types": "lib/cache.d.ts", + "version": "1.0.4" +} diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index f2a33e803..d5b58a339 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,16 +1,42 @@ { - "name": "@actions/core", - "version": "1.2.6", - "description": "Actions core lib", - "keywords": [ - "github", - "actions", - "core" + "_args": [ + [ + "@actions/core@1.2.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", - "license": "MIT", - "main": "lib/core.js", - "types": "lib/core.d.ts", + "_from": "@actions/core@1.2.6", + "_id": "@actions/core@1.2.6", + "_inBundle": false, + "_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==", + "_location": "/@actions/core", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/core@1.2.6", + "name": "@actions/core", + "escapedName": "@actions%2fcore", + "scope": "@actions", + "rawSpec": "1.2.6", + "saveSpec": null, + "fetchSpec": "1.2.6" + }, + "_requiredBy": [ + "/", + "/@actions/cache", + "/@actions/glob" + ], + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "_spec": "1.2.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions core lib", + "devDependencies": { + "@types/node": "^12.0.2" + }, "directories": { "lib": "lib", "test": "__tests__" @@ -19,6 +45,15 @@ "lib", "!.DS_Store" ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", + "keywords": [ + "github", + "actions", + "core" + ], + "license": "MIT", + "main": "lib/core.js", + "name": "@actions/core", "publishConfig": { "access": "public" }, @@ -32,10 +67,6 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "devDependencies": { - "@types/node": "^12.0.2" - } -} \ No newline at end of file + "types": "lib/core.d.ts", + "version": "1.2.6" +} diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json index 5255e599d..21cbf39bd 100644 --- a/node_modules/@actions/exec/package.json +++ b/node_modules/@actions/exec/package.json @@ -1,15 +1,42 @@ { - "name": "@actions/exec", - "version": "1.0.1", - "description": "Actions exec lib", - "keywords": [ - "github", - "actions", - "exec" + "_args": [ + [ + "@actions/exec@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", - "license": "MIT", - "main": "lib/exec.js", + "_from": "@actions/exec@1.0.1", + "_id": "@actions/exec@1.0.1", + "_inBundle": false, + "_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==", + "_location": "/@actions/exec", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/exec@1.0.1", + "name": "@actions/exec", + "escapedName": "@actions%2fexec", + "scope": "@actions", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/", + "/@actions/cache", + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions exec lib", + "devDependencies": { + "@actions/io": "^1.0.1" + }, "directories": { "lib": "lib", "test": "__tests__" @@ -17,6 +44,16 @@ "files": [ "lib" ], + "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", + "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", + "keywords": [ + "github", + "actions", + "exec" + ], + "license": "MIT", + "main": "lib/exec.js", + "name": "@actions/exec", "publishConfig": { "access": "public" }, @@ -28,11 +65,5 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "devDependencies": { - "@actions/io": "^1.0.1" - }, - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52" -} \ No newline at end of file + "version": "1.0.1" +} diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json index 9ef4aed47..def9e252a 100644 --- a/node_modules/@actions/github/package.json +++ b/node_modules/@actions/github/package.json @@ -1,15 +1,47 @@ { - "name": "@actions/github", - "version": "4.0.0", - "description": "Actions github lib", - "keywords": [ - "github", - "actions" + "_args": [ + [ + "@actions/github@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", - "license": "MIT", - "main": "lib/github.js", - "types": "lib/github.d.ts", + "_from": "@actions/github@4.0.0", + "_id": "@actions/github@4.0.0", + "_inBundle": false, + "_integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "_location": "/@actions/github", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/github@4.0.0", + "name": "@actions/github", + "escapedName": "@actions%2fgithub", + "scope": "@actions", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^1.0.8", + "@octokit/core": "^3.0.0", + "@octokit/plugin-paginate-rest": "^2.2.3", + "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + }, + "description": "Actions github lib", + "devDependencies": { + "jest": "^25.1.0", + "proxy": "^1.0.1" + }, "directories": { "lib": "lib", "test": "__tests__" @@ -18,6 +50,14 @@ "lib", "!.DS_Store" ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", + "keywords": [ + "github", + "actions" + ], + "license": "MIT", + "main": "lib/github.js", + "name": "@actions/github", "publishConfig": { "access": "public" }, @@ -28,23 +68,12 @@ }, "scripts": { "audit-moderate": "npm install && npm audit --audit-level=moderate", - "test": "jest", "build": "tsc", "format": "prettier --write **/*.ts", "format-check": "prettier --check **/*.ts", + "test": "jest", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "dependencies": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" - }, - "devDependencies": { - "jest": "^25.1.0", - "proxy": "^1.0.1" - } -} \ No newline at end of file + "types": "lib/github.d.ts", + "version": "4.0.0" +} diff --git a/node_modules/@actions/glob/LICENSE.md b/node_modules/@actions/glob/LICENSE.md new file mode 100644 index 000000000..dbae2edb2 --- /dev/null +++ b/node_modules/@actions/glob/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/glob/README.md b/node_modules/@actions/glob/README.md new file mode 100644 index 000000000..9575beaa1 --- /dev/null +++ b/node_modules/@actions/glob/README.md @@ -0,0 +1,113 @@ +# `@actions/glob` + +## Usage + +### Basic + +You can use this package to search for files matching glob patterns. + +Relative paths and absolute paths are both allowed. Relative paths are rooted against the current working directory. + +```js +const glob = require('@actions/glob'); + +const patterns = ['**/tar.gz', '**/tar.bz'] +const globber = await glob.create(patterns.join('\n')) +const files = await globber.glob() +``` + +### Opt out of following symbolic links + +```js +const glob = require('@actions/glob'); + +const globber = await glob.create('**', {followSymbolicLinks: false}) +const files = await globber.glob() +``` + +### Iterator + +When dealing with a large amount of results, consider iterating the results as they are returned: + +```js +const glob = require('@actions/glob'); + +const globber = await glob.create('**') +for await (const file of globber.globGenerator()) { + console.log(file) +} +``` + +## Recommended action inputs + +Glob follows symbolic links by default. Following is often appropriate unless deleting files. + +Users may want to opt-out from following symbolic links for other reasons. For example, +excessive amounts of symbolic links can create the appearance of very, very many files +and slow the search. + +When an action allows a user to specify input patterns, it is generally recommended to +allow users to opt-out from following symbolic links. + +Snippet from `action.yml`: + +```yaml +inputs: + files: + description: 'Files to print' + required: true + follow-symbolic-links: + description: 'Indicates whether to follow symbolic links' + default: true +``` + +And corresponding toolkit consumption: + +```js +const core = require('@actions/core') +const glob = require('@actions/glob') + +const globOptions = { + followSymbolicLinks: core.getInput('follow-symbolic-links').toUpper() !== 'FALSE' +} +const globber = glob.create(core.getInput('files'), globOptions) +for await (const file of globber.globGenerator()) { + console.log(file) +} +``` + +## Patterns + +### Glob behavior + +Patterns `*`, `?`, `[...]`, `**` (globstar) are supported. + +With the following behaviors: +- File names that begin with `.` may be included in the results +- Case insensitive on Windows +- Directory separator `/` and `\` both supported on Windows + +### Tilde expansion + +Supports basic tilde expansion, for current user HOME replacement only. + +Example: +- `~` may expand to /Users/johndoe +- `~/foo` may expand to /Users/johndoe/foo + +### Comments + +Patterns that begin with `#` are treated as comments. + +### Exclude patterns + +Leading `!` changes the meaning of an include pattern to exclude. + +Multiple leading `!` flips the meaning. + +### Escaping + +Wrapping special characters in `[]` can be used to escape literal glob characters +in a file name. For example the literal file name `hello[a-z]` can be escaped as `hello[[]a-z]`. + +On Linux/macOS `\` is also treated as an escape character. diff --git a/node_modules/@actions/glob/lib/glob.d.ts b/node_modules/@actions/glob/lib/glob.d.ts new file mode 100644 index 000000000..56424fc3a --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.d.ts @@ -0,0 +1,10 @@ +import { Globber } from './internal-globber'; +import { GlobOptions } from './internal-glob-options'; +export { Globber, GlobOptions }; +/** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ +export declare function create(patterns: string, options?: GlobOptions): Promise; diff --git a/node_modules/@actions/glob/lib/glob.js b/node_modules/@actions/glob/lib/glob.js new file mode 100644 index 000000000..ea8f15a28 --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.js @@ -0,0 +1,25 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const internal_globber_1 = require("./internal-globber"); +/** + * Constructs a globber + * + * @param patterns Patterns separated by newlines + * @param options Glob options + */ +function create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); +} +exports.create = create; +//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/glob.js.map b/node_modules/@actions/glob/lib/glob.js.map new file mode 100644 index 000000000..91c910b57 --- /dev/null +++ b/node_modules/@actions/glob/lib/glob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"glob.js","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yDAA0D;AAK1D;;;;;GAKG;AACH,SAAsB,MAAM,CAC1B,QAAgB,EAChB,OAAqB;;QAErB,OAAO,MAAM,iCAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IACvD,CAAC;CAAA;AALD,wBAKC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts b/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts new file mode 100644 index 000000000..8a789606e --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.d.ts @@ -0,0 +1,5 @@ +import { GlobOptions } from './internal-glob-options'; +/** + * Returns a copy with defaults filled in. + */ +export declare function getOptions(copy?: GlobOptions): GlobOptions; diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.js b/node_modules/@actions/glob/lib/internal-glob-options-helper.js new file mode 100644 index 000000000..c1ae2165a --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.js @@ -0,0 +1,37 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +/** + * Returns a copy with defaults filled in. + */ +function getOptions(copy) { + const result = { + followSymbolicLinks: true, + implicitDescendants: true, + omitBrokenSymbolicLinks: true + }; + if (copy) { + if (typeof copy.followSymbolicLinks === 'boolean') { + result.followSymbolicLinks = copy.followSymbolicLinks; + core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + } + if (typeof copy.implicitDescendants === 'boolean') { + result.implicitDescendants = copy.implicitDescendants; + core.debug(`implicitDescendants '${result.implicitDescendants}'`); + } + if (typeof copy.omitBrokenSymbolicLinks === 'boolean') { + result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; + core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + } + } + return result; +} +exports.getOptions = getOptions; +//# sourceMappingURL=internal-glob-options-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map b/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map new file mode 100644 index 000000000..5e1b8309f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-glob-options-helper.js","sourceRoot":"","sources":["../src/internal-glob-options-helper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAqC;AAGrC;;GAEG;AACH,SAAgB,UAAU,CAAC,IAAkB;IAC3C,MAAM,MAAM,GAAgB;QAC1B,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,IAAI;QACzB,uBAAuB,EAAE,IAAI;KAC9B,CAAA;IAED,IAAI,IAAI,EAAE;QACR,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YACjD,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;YACrD,IAAI,CAAC,KAAK,CAAC,wBAAwB,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAA;SAClE;QAED,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;YACjD,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;YACrD,IAAI,CAAC,KAAK,CAAC,wBAAwB,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAA;SAClE;QAED,IAAI,OAAO,IAAI,CAAC,uBAAuB,KAAK,SAAS,EAAE;YACrD,MAAM,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAA;YAC7D,IAAI,CAAC,KAAK,CAAC,4BAA4B,MAAM,CAAC,uBAAuB,GAAG,CAAC,CAAA;SAC1E;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAzBD,gCAyBC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options.d.ts b/node_modules/@actions/glob/lib/internal-glob-options.d.ts new file mode 100644 index 000000000..c1cac0f1f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.d.ts @@ -0,0 +1,29 @@ +/** + * Options to control globbing behavior + */ +export interface GlobOptions { + /** + * Indicates whether to follow symbolic links. Generally should set to false + * when deleting files. + * + * @default true + */ + followSymbolicLinks?: boolean; + /** + * Indicates whether directories that match a glob pattern, should implicitly + * cause all descendant paths to be matched. + * + * For example, given the directory `my-dir`, the following glob patterns + * would produce the same results: `my-dir/**`, `my-dir/`, `my-dir` + * + * @default true + */ + implicitDescendants?: boolean; + /** + * Indicates whether broken symbolic should be ignored and omitted from the + * result set. Otherwise an error will be thrown. + * + * @default true + */ + omitBrokenSymbolicLinks?: boolean; +} diff --git a/node_modules/@actions/glob/lib/internal-glob-options.js b/node_modules/@actions/glob/lib/internal-glob-options.js new file mode 100644 index 000000000..8960c70ef --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=internal-glob-options.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-glob-options.js.map b/node_modules/@actions/glob/lib/internal-glob-options.js.map new file mode 100644 index 000000000..dec795329 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-glob-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-glob-options.js","sourceRoot":"","sources":["../src/internal-glob-options.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-globber.d.ts b/node_modules/@actions/glob/lib/internal-globber.d.ts new file mode 100644 index 000000000..6d0036bf7 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.d.ts @@ -0,0 +1,42 @@ +import { GlobOptions } from './internal-glob-options'; +export { GlobOptions }; +/** + * Used to match files and directories + */ +export interface Globber { + /** + * Returns the search path preceding the first glob segment, from each pattern. + * Duplicates and descendants of other paths are filtered out. + * + * Example 1: The patterns `/foo/*` and `/bar/*` returns `/foo` and `/bar`. + * + * Example 2: The patterns `/foo/*` and `/foo/bar/*` returns `/foo`. + */ + getSearchPaths(): string[]; + /** + * Returns files and directories matching the glob patterns. + * + * Order of the results is not guaranteed. + */ + glob(): Promise; + /** + * Returns files and directories matching the glob patterns. + * + * Order of the results is not guaranteed. + */ + globGenerator(): AsyncGenerator; +} +export declare class DefaultGlobber implements Globber { + private readonly options; + private readonly patterns; + private readonly searchPaths; + private constructor(); + getSearchPaths(): string[]; + glob(): Promise; + globGenerator(): AsyncGenerator; + /** + * Constructs a DefaultGlobber + */ + static create(patterns: string, options?: GlobOptions): Promise; + private static stat; +} diff --git a/node_modules/@actions/glob/lib/internal-globber.js b/node_modules/@actions/glob/lib/internal-globber.js new file mode 100644 index 000000000..c73c5f5ee --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.js @@ -0,0 +1,222 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const fs = __importStar(require("fs")); +const globOptionsHelper = __importStar(require("./internal-glob-options-helper")); +const path = __importStar(require("path")); +const patternHelper = __importStar(require("./internal-pattern-helper")); +const internal_match_kind_1 = require("./internal-match-kind"); +const internal_pattern_1 = require("./internal-pattern"); +const internal_search_state_1 = require("./internal-search-state"); +const IS_WINDOWS = process.platform === 'win32'; +class DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + // Return a copy + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { + const itemPath = _c.value; + result.push(itemPath); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator(this, arguments, function* globGenerator_1() { + // Fill in defaults options + const options = globOptionsHelper.getOptions(this.options); + // Implicit descendants? + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && + (pattern.trailingSeparator || + pattern.segments[pattern.segments.length - 1] !== '**')) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, pattern.segments.concat('**'))); + } + } + // Push the search paths + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core.debug(`Search path '${searchPath}'`); + // Exists? + try { + // Intentionally using lstat. Detection for broken symlink + // will be performed later (if following symlinks). + yield __await(fs.promises.lstat(searchPath)); + } + catch (err) { + if (err.code === 'ENOENT') { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + // Search + const traversalChain = []; // used to detect cycles + while (stack.length) { + // Pop + const item = stack.pop(); + // Match? + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + // Stat + const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + // Broken symlink, or symlink cycle detected, or no longer exists + if (!stats) { + continue; + } + // Directory + if (stats.isDirectory()) { + // Matched + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await(item.path); + } + // Descend? + else if (!partialMatch) { + continue; + } + // Push the child items in reverse + const childLevel = item.level + 1; + const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } + // File + else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter(this, void 0, void 0, function* () { + const result = new DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, '\n'); + patterns = patterns.replace(/\r/g, '\n'); + } + const lines = patterns.split('\n').map(x => x.trim()); + for (const line of lines) { + // Empty or comment + if (!line || line.startsWith('#')) { + continue; + } + // Pattern + else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter(this, void 0, void 0, function* () { + // Note: + // `stat` returns info about the target of a symlink (or symlink chain) + // `lstat` returns info about a symlink itself + let stats; + if (options.followSymbolicLinks) { + try { + // Use `stat` (following symlinks) + stats = yield fs.promises.stat(item.path); + } + catch (err) { + if (err.code === 'ENOENT') { + if (options.omitBrokenSymbolicLinks) { + core.debug(`Broken symlink '${item.path}'`); + return undefined; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } + else { + // Use `lstat` (not following symlinks) + stats = yield fs.promises.lstat(item.path); + } + // Note, isDirectory() returns false for the lstat of a symlink + if (stats.isDirectory() && options.followSymbolicLinks) { + // Get the realpath + const realPath = yield fs.promises.realpath(item.path); + // Fixup the traversal chain to match the item level + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + // Test for a cycle + if (traversalChain.some((x) => x === realPath)) { + core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return undefined; + } + // Update the traversal chain + traversalChain.push(realPath); + } + return stats; + }); + } +} +exports.DefaultGlobber = DefaultGlobber; +//# sourceMappingURL=internal-globber.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-globber.js.map b/node_modules/@actions/glob/lib/internal-globber.js.map new file mode 100644 index 000000000..352346636 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-globber.js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AA;iBACV;aACF;iBAAM;gBACL,uCAAuC;gBACvC,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;aAC3C;YAED,+DAA+D;YAC/D,IAAI,KAAK,CAAC,WAAW,EAAE,IAAI,OAAO,CAAC,mBAAmB,EAAE;gBACtD,mBAAmB;gBACnB,MAAM,QAAQ,GAAW,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAE9D,oDAAoD;gBACpD,OAAO,cAAc,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE;oBAC1C,cAAc,CAAC,GAAG,EAAE,CAAA;iBACrB;gBAED,mBAAmB;gBACnB,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,EAAE;oBACtD,IAAI,CAAC,KAAK,CACR,oCAAoC,IAAI,CAAC,IAAI,mBAAmB,QAAQ,GAAG,CAC5E,CAAA;oBACD,OAAO,SAAS,CAAA;iBACjB;gBAED,6BAA6B;gBAC7B,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;aAC9B;YAED,OAAO,KAAK,CAAA;QACd,CAAC;KAAA;CACF;AAtMD,wCAsMC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-match-kind.d.ts b/node_modules/@actions/glob/lib/internal-match-kind.d.ts new file mode 100644 index 000000000..a7e60aaf7 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.d.ts @@ -0,0 +1,13 @@ +/** + * Indicates whether a pattern matches a path + */ +export declare enum MatchKind { + /** Not matched */ + None = 0, + /** Matched if the path is a directory */ + Directory = 1, + /** Matched if the path is a regular file */ + File = 2, + /** Matched */ + All = 3 +} diff --git a/node_modules/@actions/glob/lib/internal-match-kind.js b/node_modules/@actions/glob/lib/internal-match-kind.js new file mode 100644 index 000000000..827caf1eb --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Indicates whether a pattern matches a path + */ +var MatchKind; +(function (MatchKind) { + /** Not matched */ + MatchKind[MatchKind["None"] = 0] = "None"; + /** Matched if the path is a directory */ + MatchKind[MatchKind["Directory"] = 1] = "Directory"; + /** Matched if the path is a regular file */ + MatchKind[MatchKind["File"] = 2] = "File"; + /** Matched */ + MatchKind[MatchKind["All"] = 3] = "All"; +})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +//# sourceMappingURL=internal-match-kind.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-match-kind.js.map b/node_modules/@actions/glob/lib/internal-match-kind.js.map new file mode 100644 index 000000000..b0eec643d --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-match-kind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-match-kind.js","sourceRoot":"","sources":["../src/internal-match-kind.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,kBAAkB;IAClB,yCAAQ,CAAA;IAER,yCAAyC;IACzC,mDAAa,CAAA;IAEb,4CAA4C;IAC5C,yCAAQ,CAAA;IAER,cAAc;IACd,uCAAsB,CAAA;AACxB,CAAC,EAZW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAYpB"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path-helper.d.ts b/node_modules/@actions/glob/lib/internal-path-helper.d.ts new file mode 100644 index 000000000..0375c36c5 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.d.ts @@ -0,0 +1,42 @@ +/** + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` + */ +export declare function dirname(p: string): string; +/** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ +export declare function ensureAbsoluteRoot(root: string, itemPath: string): string; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ +export declare function hasAbsoluteRoot(itemPath: string): boolean; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). + */ +export declare function hasRoot(itemPath: string): boolean; +/** + * Removes redundant slashes and converts `/` to `\` on Windows + */ +export declare function normalizeSeparators(p: string): string; +/** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ +export declare function safeTrimTrailingSeparator(p: string): string; diff --git a/node_modules/@actions/glob/lib/internal-path-helper.js b/node_modules/@actions/glob/lib/internal-path-helper.js new file mode 100644 index 000000000..dab4df4c0 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.js @@ -0,0 +1,185 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __importStar(require("path")); +const assert_1 = __importDefault(require("assert")); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths. + * + * For example, on Linux/macOS: + * - `/ => /` + * - `/hello => /` + * + * For example, on Windows: + * - `C:\ => C:\` + * - `C:\hello => C:\` + * - `C: => C:` + * - `C:hello => C:` + * - `\ => \` + * - `\hello => \` + * - `\\hello => \\hello` + * - `\\hello\world => \\hello\world` + */ +function dirname(p) { + // Normalize slashes and trim unnecessary trailing slash + p = safeTrimTrailingSeparator(p); + // Windows UNC root, e.g. \\hello or \\hello\world + if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { + return p; + } + // Get dirname + let result = path.dirname(p); + // Trim trailing slash for Windows UNC root, e.g. \\hello\world\ + if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { + result = safeTrimTrailingSeparator(result); + } + return result; +} +exports.dirname = dirname; +/** + * Roots the path if not already rooted. On Windows, relative roots like `\` + * or `C:` are expanded based on the current working directory. + */ +function ensureAbsoluteRoot(root, itemPath) { + assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + // Already rooted + if (hasAbsoluteRoot(itemPath)) { + return itemPath; + } + // Windows + if (IS_WINDOWS) { + // Check for itemPath like C: or C:foo + if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { + let cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + // Drive letter matches cwd? Expand to cwd + if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { + // Drive only, e.g. C: + if (itemPath.length === 2) { + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}`; + } + // Drive + path, e.g. C:foo + else { + if (!cwd.endsWith('\\')) { + cwd += '\\'; + } + // Preserve specified drive letter case (upper or lower) + return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; + } + } + // Different drive + else { + return `${itemPath[0]}:\\${itemPath.substr(2)}`; + } + } + // Check for itemPath like \ or \foo + else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { + const cwd = process.cwd(); + assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + return `${cwd[0]}:\\${itemPath.substr(1)}`; + } + } + assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + // Otherwise ensure root ends with a separator + if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { + // Intentionally empty + } + else { + // Append separator + root += path.sep; + } + return root + itemPath; +} +exports.ensureAbsoluteRoot = ensureAbsoluteRoot; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\\hello\share` and `C:\hello` (and using alternate separator). + */ +function hasAbsoluteRoot(itemPath) { + assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \\hello\share or C:\hello + return itemPath.startsWith('\\\\') || /^[A-Z]:\\/i.test(itemPath); + } + // E.g. /hello + return itemPath.startsWith('/'); +} +exports.hasAbsoluteRoot = hasAbsoluteRoot; +/** + * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like: + * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). + */ +function hasRoot(itemPath) { + assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + // Normalize separators + itemPath = normalizeSeparators(itemPath); + // Windows + if (IS_WINDOWS) { + // E.g. \ or \hello or \\hello + // E.g. C: or C:\hello + return itemPath.startsWith('\\') || /^[A-Z]:/i.test(itemPath); + } + // E.g. /hello + return itemPath.startsWith('/'); +} +exports.hasRoot = hasRoot; +/** + * Removes redundant slashes and converts `/` to `\` on Windows + */ +function normalizeSeparators(p) { + p = p || ''; + // Windows + if (IS_WINDOWS) { + // Convert slashes on Windows + p = p.replace(/\//g, '\\'); + // Remove redundant slashes + const isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello + return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading \\ for UNC + } + // Remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +exports.normalizeSeparators = normalizeSeparators; +/** + * Normalizes the path separators and trims the trailing separator (when safe). + * For example, `/foo/ => /foo` but `/ => /` + */ +function safeTrimTrailingSeparator(p) { + // Short-circuit if empty + if (!p) { + return ''; + } + // Normalize separators + p = normalizeSeparators(p); + // No trailing slash + if (!p.endsWith(path.sep)) { + return p; + } + // Check '/' on Linux/macOS and '\' on Windows + if (p === path.sep) { + return p; + } + // On Windows check if drive root. E.g. C:\ + if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { + return p; + } + // Otherwise trim trailing slash + return p.substr(0, p.length - 1); +} +exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; +//# sourceMappingURL=internal-path-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path-helper.js.map b/node_modules/@actions/glob/lib/internal-path-helper.js.map new file mode 100644 index 000000000..639acc80f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-path-helper.js","sourceRoot":"","sources":["../src/internal-path-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4B;AAC5B,oDAA2B;AAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,OAAO,CAAC,CAAS;IAC/B,wDAAwD;IACxD,CAAC,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAA;IAEhC,kDAAkD;IAClD,IAAI,UAAU,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACnD,OAAO,CAAC,CAAA;KACT;IAED,cAAc;IACd,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5B,gEAAgE;IAChE,IAAI,UAAU,IAAI,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACvD,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAA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CAAC,CAAA;KACT;IAED,8CAA8C;IAC9C,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE;QAClB,OAAO,CAAC,CAAA;KACT;IAED,2CAA2C;IAC3C,IAAI,UAAU,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACvC,OAAO,CAAC,CAAA;KACT;IAED,gCAAgC;IAChC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClC,CAAC;AA1BD,8DA0BC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path.d.ts b/node_modules/@actions/glob/lib/internal-path.d.ts new file mode 100644 index 000000000..5e0a2641f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.d.ts @@ -0,0 +1,15 @@ +/** + * Helper class for parsing paths into segments + */ +export declare class Path { + segments: string[]; + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath: string | string[]); + /** + * Converts the path to it's string representation + */ + toString(): string; +} diff --git a/node_modules/@actions/glob/lib/internal-path.js b/node_modules/@actions/glob/lib/internal-path.js new file mode 100644 index 000000000..33b81d31f --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.js @@ -0,0 +1,100 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __importStar(require("path")); +const pathHelper = __importStar(require("./internal-path-helper")); +const assert_1 = __importDefault(require("assert")); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Helper class for parsing paths into segments + */ +class Path { + /** + * Constructs a Path + * @param itemPath Path or array of segments + */ + constructor(itemPath) { + this.segments = []; + // String + if (typeof itemPath === 'string') { + assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // Not rooted + if (!pathHelper.hasRoot(itemPath)) { + this.segments = itemPath.split(path.sep); + } + // Rooted + else { + // Add all segments, while not at the root + let remaining = itemPath; + let dir = pathHelper.dirname(remaining); + while (dir !== remaining) { + // Add the segment + const basename = path.basename(remaining); + this.segments.unshift(basename); + // Truncate the last segment + remaining = dir; + dir = pathHelper.dirname(remaining); + } + // Remainder is the root + this.segments.unshift(remaining); + } + } + // Array + else { + // Must not be empty + assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + // Each segment + for (let i = 0; i < itemPath.length; i++) { + let segment = itemPath[i]; + // Must not be empty + assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + // Normalize slashes + segment = pathHelper.normalizeSeparators(itemPath[i]); + // Root segment + if (i === 0 && pathHelper.hasRoot(segment)) { + segment = pathHelper.safeTrimTrailingSeparator(segment); + assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + this.segments.push(segment); + } + // All other segments + else { + // Must not contain slash + assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + this.segments.push(segment); + } + } + } + } + /** + * Converts the path to it's string representation + */ + toString() { + // First segment + let result = this.segments[0]; + // All others + let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result)); + for (let i = 1; i < this.segments.length; i++) { + if (skipSlash) { + skipSlash = false; + } + else { + result += path.sep; + } + result += this.segments[i]; + } + return result; + } +} +exports.Path = Path; +//# sourceMappingURL=internal-path.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-path.js.map b/node_modules/@actions/glob/lib/internal-path.js.map new file mode 100644 index 000000000..9e741a8b7 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-path.js.map @@ -0,0 +1 @@ +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AC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7C,IAAI,SAAS,EAAE;gBACb,SAAS,GAAG,KAAK,CAAA;aAClB;iBAAM;gBACL,MAAM,IAAI,IAAI,CAAC,GAAG,CAAA;aACnB;YAED,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;SAC3B;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAvGD,oBAuGC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts b/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts new file mode 100644 index 000000000..c5dcc0725 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.d.ts @@ -0,0 +1,15 @@ +import { MatchKind } from './internal-match-kind'; +import { Pattern } from './internal-pattern'; +/** + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. + */ +export declare function getSearchPaths(patterns: Pattern[]): string[]; +/** + * Matches the patterns against the path + */ +export declare function match(patterns: Pattern[], itemPath: string): MatchKind; +/** + * Checks whether to descend further into the directory + */ +export declare function partialMatch(patterns: Pattern[], itemPath: string): boolean; diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.js b/node_modules/@actions/glob/lib/internal-pattern-helper.js new file mode 100644 index 000000000..8bd59e070 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.js @@ -0,0 +1,81 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const pathHelper = __importStar(require("./internal-path-helper")); +const internal_match_kind_1 = require("./internal-match-kind"); +const IS_WINDOWS = process.platform === 'win32'; +/** + * Given an array of patterns, returns an array of paths to search. + * Duplicates and paths under other included paths are filtered out. + */ +function getSearchPaths(patterns) { + // Ignore negate patterns + patterns = patterns.filter(x => !x.negate); + // Create a map of all search paths + const searchPathMap = {}; + for (const pattern of patterns) { + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + searchPathMap[key] = 'candidate'; + } + const result = []; + for (const pattern of patterns) { + // Check if already included + const key = IS_WINDOWS + ? pattern.searchPath.toUpperCase() + : pattern.searchPath; + if (searchPathMap[key] === 'included') { + continue; + } + // Check for an ancestor search path + let foundAncestor = false; + let tempKey = key; + let parent = pathHelper.dirname(tempKey); + while (parent !== tempKey) { + if (searchPathMap[parent]) { + foundAncestor = true; + break; + } + tempKey = parent; + parent = pathHelper.dirname(tempKey); + } + // Include the search pattern in the result + if (!foundAncestor) { + result.push(pattern.searchPath); + searchPathMap[key] = 'included'; + } + } + return result; +} +exports.getSearchPaths = getSearchPaths; +/** + * Matches the patterns against the path + */ +function match(patterns, itemPath) { + let result = internal_match_kind_1.MatchKind.None; + for (const pattern of patterns) { + if (pattern.negate) { + result &= ~pattern.match(itemPath); + } + else { + result |= pattern.match(itemPath); + } + } + return result; +} +exports.match = match; +/** + * Checks whether to descend further into the directory + */ +function partialMatch(patterns, itemPath) { + return patterns.some(x => !x.negate && x.partialMatch(itemPath)); +} +exports.partialMatch = partialMatch; +//# sourceMappingURL=internal-pattern-helper.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern-helper.js.map b/node_modules/@actions/glob/lib/internal-pattern-helper.js.map new file mode 100644 index 000000000..7dd661538 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern-helper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-pattern-helper.js","sourceRoot":"","sources":["../src/internal-pattern-helper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mEAAoD;AACpD,+DAA+C;AAG/C,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;;GAGG;AACH,SAAgB,cAAc,CAAC,QAA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F;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AA9CD,wCA8CC;AAED;;GAEG;AACH,SAAgB,KAAK,CAAC,QAAmB,EAAE,QAAgB;IACzD,IAAI,MAAM,GAAc,+BAAS,CAAC,IAAI,CAAA;IAEtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;SACnC;aAAM;YACL,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;SAClC;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAZD,sBAYC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,QAAmB,EAAE,QAAgB;IAChE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,oCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern.d.ts b/node_modules/@actions/glob/lib/internal-pattern.d.ts new file mode 100644 index 000000000..728ec0a82 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.d.ts @@ -0,0 +1,60 @@ +import { MatchKind } from './internal-match-kind'; +export declare class Pattern { + /** + * Indicates whether matches should be excluded from the result set + */ + readonly negate: boolean; + /** + * The directory to search. The literal path prior to the first glob segment. + */ + readonly searchPath: string; + /** + * The path/pattern segments. Note, only the first segment (the root directory) + * may contain a directory separator character. Use the trailingSeparator field + * to determine whether the pattern ended with a trailing slash. + */ + readonly segments: string[]; + /** + * Indicates the pattern should only match directories, not regular files. + */ + readonly trailingSeparator: boolean; + /** + * The Minimatch object used for matching + */ + private readonly minimatch; + /** + * Used to workaround a limitation with Minimatch when determining a partial + * match and the path is a root directory. For example, when the pattern is + * `/foo/**` or `C:\foo\**` and the path is `/` or `C:\`. + */ + private readonly rootRegExp; + constructor(pattern: string); + constructor(pattern: string, segments: undefined, homedir: string); + constructor(negate: boolean, segments: string[]); + /** + * Matches the pattern against the specified path + */ + match(itemPath: string): MatchKind; + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath: string): boolean; + /** + * Escapes glob patterns within a path + */ + static globEscape(s: string): string; + /** + * Normalizes slashes and ensures absolute root + */ + private static fixupPattern; + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + private static getLiteral; + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + private static regExpEscape; +} diff --git a/node_modules/@actions/glob/lib/internal-pattern.js b/node_modules/@actions/glob/lib/internal-pattern.js new file mode 100644 index 000000000..11d84793e --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.js @@ -0,0 +1,241 @@ +"use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __importStar(require("os")); +const path = __importStar(require("path")); +const pathHelper = __importStar(require("./internal-path-helper")); +const assert_1 = __importDefault(require("assert")); +const minimatch_1 = require("minimatch"); +const internal_match_kind_1 = require("./internal-match-kind"); +const internal_path_1 = require("./internal-path"); +const IS_WINDOWS = process.platform === 'win32'; +class Pattern { + constructor(patternOrNegate, segments, homedir) { + /** + * Indicates whether matches should be excluded from the result set + */ + this.negate = false; + // Pattern overload + let pattern; + if (typeof patternOrNegate === 'string') { + pattern = patternOrNegate.trim(); + } + // Segments overload + else { + // Convert to pattern + segments = segments || []; + assert_1.default(segments.length, `Parameter 'segments' must not empty`); + const root = Pattern.getLiteral(segments[0]); + assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + pattern = new internal_path_1.Path(segments).toString().trim(); + if (patternOrNegate) { + pattern = `!${pattern}`; + } + } + // Negate + while (pattern.startsWith('!')) { + this.negate = !this.negate; + pattern = pattern.substr(1).trim(); + } + // Normalize slashes and ensures absolute root + pattern = Pattern.fixupPattern(pattern, homedir); + // Segments + this.segments = new internal_path_1.Path(pattern).segments; + // Trailing slash indicates the pattern should only match directories, not regular files + this.trailingSeparator = pathHelper + .normalizeSeparators(pattern) + .endsWith(path.sep); + pattern = pathHelper.safeTrimTrailingSeparator(pattern); + // Search path (literal path prior to the first glob segment) + let foundGlob = false; + const searchSegments = this.segments + .map(x => Pattern.getLiteral(x)) + .filter(x => !foundGlob && !(foundGlob = x === '')); + this.searchPath = new internal_path_1.Path(searchSegments).toString(); + // Root RegExp (required when determining partial match) + this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : ''); + // Create minimatch + const minimatchOptions = { + dot: true, + nobrace: true, + nocase: IS_WINDOWS, + nocomment: true, + noext: true, + nonegate: true + }; + pattern = IS_WINDOWS ? pattern.replace(/\\/g, '/') : pattern; + this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); + } + /** + * Matches the pattern against the specified path + */ + match(itemPath) { + // Last segment is globstar? + if (this.segments[this.segments.length - 1] === '**') { + // Normalize slashes + itemPath = pathHelper.normalizeSeparators(itemPath); + // Append a trailing slash. Otherwise Minimatch will not match the directory immediately + // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns + // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk. + if (!itemPath.endsWith(path.sep)) { + // Note, this is safe because the constructor ensures the pattern has an absolute root. + // For example, formats like C: and C:foo on Windows are resolved to an absolute root. + itemPath = `${itemPath}${path.sep}`; + } + } + else { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + } + // Match + if (this.minimatch.match(itemPath)) { + return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; + } + return internal_match_kind_1.MatchKind.None; + } + /** + * Indicates whether the pattern may match descendants of the specified path + */ + partialMatch(itemPath) { + // Normalize slashes and trim unnecessary trailing slash + itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); + // matchOne does not handle root path correctly + if (pathHelper.dirname(itemPath) === itemPath) { + return this.rootRegExp.test(itemPath); + } + return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); + } + /** + * Escapes glob patterns within a path + */ + static globEscape(s) { + return (IS_WINDOWS ? s : s.replace(/\\/g, '\\\\')) // escape '\' on Linux/macOS + .replace(/(\[)(?=[^/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment + .replace(/\?/g, '[?]') // escape '?' + .replace(/\*/g, '[*]'); // escape '*' + } + /** + * Normalizes slashes and ensures absolute root + */ + static fixupPattern(pattern, homedir) { + // Empty + assert_1.default(pattern, 'pattern cannot be empty'); + // Must not contain `.` segment, unless first segment + // Must not contain `..` segment + const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); + assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r + assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + // Normalize slashes + pattern = pathHelper.normalizeSeparators(pattern); + // Replace leading `.` segment + if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) { + pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1); + } + // Replace leading `~` segment + else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { + homedir = homedir || os.homedir(); + assert_1.default(homedir, 'Unable to determine HOME directory'); + assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + pattern = Pattern.globEscape(homedir) + pattern.substr(1); + } + // Replace relative drive root, e.g. pattern is C: or C:foo + else if (IS_WINDOWS && + (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', pattern.substr(0, 2)); + if (pattern.length > 2 && !root.endsWith('\\')) { + root += '\\'; + } + pattern = Pattern.globEscape(root) + pattern.substr(2); + } + // Replace relative root, e.g. pattern is \ or \foo + else if (IS_WINDOWS && (pattern === '\\' || pattern.match(/^\\[^\\]/))) { + let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', '\\'); + if (!root.endsWith('\\')) { + root += '\\'; + } + pattern = Pattern.globEscape(root) + pattern.substr(1); + } + // Otherwise ensure absolute root + else { + pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern); + } + return pathHelper.normalizeSeparators(pattern); + } + /** + * Attempts to unescape a pattern segment to create a literal path segment. + * Otherwise returns empty string. + */ + static getLiteral(segment) { + let literal = ''; + for (let i = 0; i < segment.length; i++) { + const c = segment[i]; + // Escape + if (c === '\\' && !IS_WINDOWS && i + 1 < segment.length) { + literal += segment[++i]; + continue; + } + // Wildcard + else if (c === '*' || c === '?') { + return ''; + } + // Character set + else if (c === '[' && i + 1 < segment.length) { + let set = ''; + let closed = -1; + for (let i2 = i + 1; i2 < segment.length; i2++) { + const c2 = segment[i2]; + // Escape + if (c2 === '\\' && !IS_WINDOWS && i2 + 1 < segment.length) { + set += segment[++i2]; + continue; + } + // Closed + else if (c2 === ']') { + closed = i2; + break; + } + // Otherwise + else { + set += c2; + } + } + // Closed? + if (closed >= 0) { + // Cannot convert + if (set.length > 1) { + return ''; + } + // Convert to literal + if (set) { + literal += set; + i = closed; + continue; + } + } + // Otherwise fall thru + } + // Append + literal += c; + } + return literal; + } + /** + * Escapes regexp special characters + * https://javascript.info/regexp-escaping + */ + static regExpEscape(s) { + return s.replace(/[[\\^$.|?*+()]/g, '\\$&'); + } +} +exports.Pattern = Pattern; +//# sourceMappingURL=internal-pattern.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-pattern.js.map b/node_modules/@actions/glob/lib/internal-pattern.js.map new file mode 100644 index 000000000..9420b2981 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-pattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-pattern.js","sourceRoot":"","sources":["../src/internal-pattern.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAC5B,mEAAoD;AACpD,oDAA2B;AAC3B,yCAA8E;AAC9E,+DAA+C;AAC/C,mDAAoC;AAEpC,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C,MAAa,OAAO;IA0ClB,YACE,eAAiC,EACjC,QAAmB,EACnB,OAAgB;QA5ClB;;WAEG;QACM,WAAM,GAAY,KAAK,CAAA;QA2C9B,mBAAmB;QACnB,IAAI,OAAe,CAAA;QACnB,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;YACvC,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,CAAA;SACjC;QACD,oBAAoB;aACf;YACH,qBAAqB;YACrB,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;YACzB,gBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,qCAAqC,CAAC,CAAA;YAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC5C,gBAAM,CACJ,IAAI,IAAI,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,EACxC,wDAAwD,CACzD,CAAA;YACD,OAAO,GAAG,IAAI,oBAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;YAC9C,IAAI,eAAe,EAAE;gBACnB,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;aACxB;S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IACK,MAAM,CAAC,YAAY,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACF;AA3TD,0BA2TC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-search-state.d.ts b/node_modules/@actions/glob/lib/internal-search-state.d.ts new file mode 100644 index 000000000..aac344eb3 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.d.ts @@ -0,0 +1,5 @@ +export declare class SearchState { + readonly path: string; + readonly level: number; + constructor(path: string, level: number); +} diff --git a/node_modules/@actions/glob/lib/internal-search-state.js b/node_modules/@actions/glob/lib/internal-search-state.js new file mode 100644 index 000000000..e156f665b --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class SearchState { + constructor(path, level) { + this.path = path; + this.level = level; + } +} +exports.SearchState = SearchState; +//# sourceMappingURL=internal-search-state.js.map \ No newline at end of file diff --git a/node_modules/@actions/glob/lib/internal-search-state.js.map b/node_modules/@actions/glob/lib/internal-search-state.js.map new file mode 100644 index 000000000..efd120167 --- /dev/null +++ b/node_modules/@actions/glob/lib/internal-search-state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal-search-state.js","sourceRoot":"","sources":["../src/internal-search-state.ts"],"names":[],"mappings":";;AAAA,MAAa,WAAW;IAItB,YAAY,IAAY,EAAE,KAAa;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF;AARD,kCAQC"} \ No newline at end of file diff --git a/node_modules/@actions/glob/package.json b/node_modules/@actions/glob/package.json new file mode 100644 index 000000000..dde7d9f3e --- /dev/null +++ b/node_modules/@actions/glob/package.json @@ -0,0 +1,69 @@ +{ + "_from": "@actions/glob@^0.1.0", + "_id": "@actions/glob@0.1.1", + "_inBundle": false, + "_integrity": "sha512-ikM4GVZOgSGDNTjv0ECJ8AOqmDqQwtO4K1M4P465C9iikRq34+FwCjUVSwzgOYDP85qtddyWpzBw5lTub/9Xmg==", + "_location": "/@actions/glob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@actions/glob@^0.1.0", + "name": "@actions/glob", + "escapedName": "@actions%2fglob", + "scope": "@actions", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.1.tgz", + "_shasum": "0af851312dfed21fdf9eac3473cfde93ffa56e40", + "_spec": "@actions/glob@^0.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@actions/core": "^1.2.6", + "minimatch": "^3.0.4" + }, + "deprecated": false, + "description": "Actions glob lib", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/glob", + "keywords": [ + "github", + "actions", + "glob" + ], + "license": "MIT", + "main": "lib/glob.js", + "name": "@actions/glob", + "preview": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/glob" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "types": "lib/glob.d.ts", + "version": "0.1.1" +} diff --git a/node_modules/@actions/http-client/node_modules/tunnel/package.json b/node_modules/@actions/http-client/node_modules/tunnel/package.json index 27cce6b48..ec47141f7 100644 --- a/node_modules/@actions/http-client/node_modules/tunnel/package.json +++ b/node_modules/@actions/http-client/node_modules/tunnel/package.json @@ -1,7 +1,51 @@ { - "name": "tunnel", - "version": "0.0.6", + "_args": [ + [ + "tunnel@0.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "tunnel@0.0.6", + "_id": "tunnel@0.0.6", + "_inBundle": false, + "_integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "_location": "/@actions/http-client/tunnel", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "tunnel@0.0.6", + "name": "tunnel", + "escapedName": "tunnel", + "rawSpec": "0.0.6", + "saveSpec": null, + "fetchSpec": "0.0.6" + }, + "_requiredBy": [ + "/@actions/http-client" + ], + "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "_spec": "0.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Koichi Kobayashi", + "email": "koichik@improvement.jp" + }, + "bugs": { + "url": "https://github.com/koichik/node-tunnel/issues" + }, "description": "Node HTTP/HTTPS Agents for tunneling proxies", + "devDependencies": { + "mocha": "^5.2.0", + "should": "^13.2.3" + }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + }, + "homepage": "https://github.com/koichik/node-tunnel/", "keywords": [ "http", "https", @@ -9,26 +53,15 @@ "proxy", "tunnel" ], - "homepage": "https://github.com/koichik/node-tunnel/", - "bugs": "https://github.com/koichik/node-tunnel/issues", "license": "MIT", - "author": "Koichi Kobayashi ", "main": "./index.js", - "directories": { - "lib": "./lib" - }, + "name": "tunnel", "repository": { "type": "git", - "url": "https://github.com/koichik/node-tunnel.git" + "url": "git+https://github.com/koichik/node-tunnel.git" }, "scripts": { "test": "mocha" }, - "devDependencies": { - "mocha": "^5.2.0", - "should": "^13.2.3" - }, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } -} \ No newline at end of file + "version": "0.0.6" +} diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json index fbfec5f9d..a9a6e400b 100644 --- a/node_modules/@actions/http-client/package.json +++ b/node_modules/@actions/http-client/package.json @@ -1,29 +1,45 @@ { - "name": "@actions/http-client", - "version": "1.0.8", - "description": "Actions Http Client", - "main": "index.js", - "scripts": { - "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", - "test": "jest", - "format": "prettier --write *.ts && prettier --write **/*.ts", - "format-check": "prettier --check *.ts && prettier --check **/*.ts", - "audit-check": "npm audit --audit-level=moderate" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/http-client.git" - }, - "keywords": [ - "Actions", - "Http" + "_args": [ + [ + "@actions/http-client@1.0.8", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "GitHub, Inc.", - "license": "MIT", + "_from": "@actions/http-client@1.0.8", + "_id": "@actions/http-client@1.0.8", + "_inBundle": false, + "_integrity": "sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==", + "_location": "/@actions/http-client", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/http-client@1.0.8", + "name": "@actions/http-client", + "escapedName": "@actions%2fhttp-client", + "scope": "@actions", + "rawSpec": "1.0.8", + "saveSpec": null, + "fetchSpec": "1.0.8" + }, + "_requiredBy": [ + "/", + "/@actions/github", + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.8.tgz", + "_spec": "1.0.8", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "GitHub, Inc." + }, "bugs": { "url": "https://github.com/actions/http-client/issues" }, - "homepage": "https://github.com/actions/http-client#readme", + "dependencies": { + "tunnel": "0.0.6" + }, + "description": "Actions Http Client", "devDependencies": { "@types/jest": "^25.1.4", "@types/node": "^12.12.31", @@ -33,7 +49,24 @@ "ts-jest": "^25.2.1", "typescript": "^3.8.3" }, - "dependencies": { - "tunnel": "0.0.6" - } -} \ No newline at end of file + "homepage": "https://github.com/actions/http-client#readme", + "keywords": [ + "Actions", + "Http" + ], + "license": "MIT", + "main": "index.js", + "name": "@actions/http-client", + "repository": { + "type": "git", + "url": "git+https://github.com/actions/http-client.git" + }, + "scripts": { + "audit-check": "npm audit --audit-level=moderate", + "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", + "format": "prettier --write *.ts && prettier --write **/*.ts", + "format-check": "prettier --check *.ts && prettier --check **/*.ts", + "test": "jest" + }, + "version": "1.0.8" +} diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json index c19c88922..c4b1d0f88 100644 --- a/node_modules/@actions/io/package.json +++ b/node_modules/@actions/io/package.json @@ -1,15 +1,38 @@ { - "name": "@actions/io", - "version": "1.0.1", - "description": "Actions io lib", - "keywords": [ - "github", - "actions", - "io" + "_args": [ + [ + "@actions/io@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", - "license": "MIT", - "main": "lib/io.js", + "_from": "@actions/io@1.0.1", + "_id": "@actions/io@1.0.1", + "_inBundle": false, + "_integrity": "sha512-rhq+tfZukbtaus7xyUtwKfuiCRXd1hWSfmJNEpFgBQJ4woqPEpsBw04awicjwz9tyG2/MVhAEMfVn664Cri5zA==", + "_location": "/@actions/io", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/io@1.0.1", + "name": "@actions/io", + "escapedName": "@actions%2fio", + "scope": "@actions", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/@actions/cache", + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions io lib", "directories": { "lib": "lib", "test": "__tests__" @@ -17,6 +40,16 @@ "files": [ "lib" ], + "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", + "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", + "keywords": [ + "github", + "actions", + "io" + ], + "license": "MIT", + "main": "lib/io.js", + "name": "@actions/io", "publishConfig": { "access": "public" }, @@ -28,8 +61,5 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52" -} \ No newline at end of file + "version": "1.0.1" +} diff --git a/node_modules/@actions/tool-cache/node_modules/@actions/core/package.json b/node_modules/@actions/tool-cache/node_modules/@actions/core/package.json index e32e6425d..3d4e088d4 100644 --- a/node_modules/@actions/tool-cache/node_modules/@actions/core/package.json +++ b/node_modules/@actions/tool-cache/node_modules/@actions/core/package.json @@ -1,16 +1,40 @@ { - "name": "@actions/core", - "version": "1.2.4", - "description": "Actions core lib", - "keywords": [ - "github", - "actions", - "core" + "_args": [ + [ + "@actions/core@1.2.4", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", - "license": "MIT", - "main": "lib/core.js", - "types": "lib/core.d.ts", + "_from": "@actions/core@1.2.4", + "_id": "@actions/core@1.2.4", + "_inBundle": false, + "_integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==", + "_location": "/@actions/tool-cache/@actions/core", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/core@1.2.4", + "name": "@actions/core", + "escapedName": "@actions%2fcore", + "scope": "@actions", + "rawSpec": "1.2.4", + "saveSpec": null, + "fetchSpec": "1.2.4" + }, + "_requiredBy": [ + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz", + "_spec": "1.2.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions core lib", + "devDependencies": { + "@types/node": "^12.0.2" + }, "directories": { "lib": "lib", "test": "__tests__" @@ -18,6 +42,15 @@ "files": [ "lib" ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", + "keywords": [ + "github", + "actions", + "core" + ], + "license": "MIT", + "main": "lib/core.js", + "name": "@actions/core", "publishConfig": { "access": "public" }, @@ -31,10 +64,6 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "devDependencies": { - "@types/node": "^12.0.2" - } -} \ No newline at end of file + "types": "lib/core.d.ts", + "version": "1.2.4" +} diff --git a/node_modules/@actions/tool-cache/node_modules/semver/package.json b/node_modules/@actions/tool-cache/node_modules/semver/package.json index a330b56c2..2951337d9 100644 --- a/node_modules/@actions/tool-cache/node_modules/semver/package.json +++ b/node_modules/@actions/tool-cache/node_modules/semver/package.json @@ -1,28 +1,63 @@ { - "name": "semver", - "version": "6.3.0", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "_args": [ + [ + "semver@6.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "semver@6.3.0", + "_id": "semver@6.3.0", + "_inBundle": false, + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_location": "/@actions/tool-cache/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@6.3.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "6.3.0", + "saveSpec": null, + "fetchSpec": "6.3.0" }, + "_requiredBy": [ + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_spec": "6.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "semver": "bin/semver.js" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^14.3.1" }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver.js" - }, "files": [ "bin", "range.bnf", "semver.js" ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true - } -} \ No newline at end of file + }, + "version": "6.3.0" +} diff --git a/node_modules/@actions/tool-cache/node_modules/uuid/package.json b/node_modules/@actions/tool-cache/node_modules/uuid/package.json index 4b23f72c7..adf7001d4 100644 --- a/node_modules/@actions/tool-cache/node_modules/uuid/package.json +++ b/node_modules/@actions/tool-cache/node_modules/uuid/package.json @@ -1,21 +1,71 @@ { - "name": "uuid", - "version": "3.4.0", - "description": "RFC4122 (v1, v4, and v5) UUIDs", + "_args": [ + [ + "uuid@3.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "uuid@3.4.0", + "_id": "uuid@3.4.0", + "_inBundle": false, + "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "_location": "/@actions/tool-cache/uuid", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "uuid@3.4.0", + "name": "uuid", + "escapedName": "uuid", + "rawSpec": "3.4.0", + "saveSpec": null, + "fetchSpec": "3.4.0" + }, + "_requiredBy": [ + "/@actions/tool-cache" + ], + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "_spec": "3.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "uuid": "bin/uuid" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "bugs": { + "url": "https://github.com/uuidjs/uuid/issues" + }, "commitlint": { "extends": [ "@commitlint/config-conventional" ] }, - "keywords": [ - "uuid", - "guid", - "rfc4122" + "contributors": [ + { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + }, + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" + }, + { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + } ], - "license": "MIT", - "bin": { - "uuid": "./bin/uuid" - }, + "description": "RFC4122 (v1, v4, and v5) UUIDs", "devDependencies": { "@commitlint/cli": "~8.2.0", "@commitlint/config-conventional": "~8.2.0", @@ -25,25 +75,29 @@ "runmd": "1.2.1", "standard-version": "7.0.0" }, - "scripts": { - "lint": "eslint .", - "test": "npm run lint && mocha test/test.js", - "md": "runmd --watch --output=README.md README_js.md", - "release": "standard-version", - "prepare": "runmd --output=README.md README_js.md" - }, - "browser": { - "./lib/rng.js": "./lib/rng-browser.js", - "./lib/sha1.js": "./lib/sha1-browser.js", - "./lib/md5.js": "./lib/md5-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, + "homepage": "https://github.com/uuidjs/uuid#readme", "husky": { "hooks": { "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } - } -} \ No newline at end of file + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "name": "uuid", + "repository": { + "type": "git", + "url": "git+https://github.com/uuidjs/uuid.git" + }, + "scripts": { + "lint": "eslint .", + "md": "runmd --watch --output=README.md README_js.md", + "prepare": "runmd --output=README.md README_js.md", + "release": "standard-version", + "test": "npm run lint && mocha test/test.js" + }, + "version": "3.4.0" +} diff --git a/node_modules/@actions/tool-cache/package.json b/node_modules/@actions/tool-cache/package.json index ddce94d82..92d0efb77 100644 --- a/node_modules/@actions/tool-cache/package.json +++ b/node_modules/@actions/tool-cache/package.json @@ -1,16 +1,51 @@ { - "name": "@actions/tool-cache", - "version": "1.5.5", - "description": "Actions tool-cache lib", - "keywords": [ - "github", - "actions", - "exec" + "_args": [ + [ + "@actions/tool-cache@1.5.5", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache", - "license": "MIT", - "main": "lib/tool-cache.js", - "types": "lib/tool-cache.d.ts", + "_from": "@actions/tool-cache@1.5.5", + "_id": "@actions/tool-cache@1.5.5", + "_inBundle": false, + "_integrity": "sha512-y/YO37BOaXzOEHpvoGZDLCwvg6XZWQ7Ala4Np4xzrKD1r48mff+K/GAmzXMejnApU7kgqC6lL/aCKTZDCrhdmw==", + "_location": "/@actions/tool-cache", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/tool-cache@1.5.5", + "name": "@actions/tool-cache", + "escapedName": "@actions%2ftool-cache", + "scope": "@actions", + "rawSpec": "1.5.5", + "saveSpec": null, + "fetchSpec": "1.5.5" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.5.tgz", + "_spec": "1.5.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/core": "^1.2.3", + "@actions/exec": "^1.0.0", + "@actions/http-client": "^1.0.8", + "@actions/io": "^1.0.1", + "semver": "^6.1.0", + "uuid": "^3.3.2" + }, + "description": "Actions tool-cache lib", + "devDependencies": { + "@types/nock": "^10.0.3", + "@types/semver": "^6.0.0", + "@types/uuid": "^3.4.4", + "nock": "^10.0.6" + }, "directories": { "lib": "lib", "test": "__tests__" @@ -19,6 +54,15 @@ "lib", "scripts" ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache", + "keywords": [ + "github", + "actions", + "exec" + ], + "license": "MIT", + "main": "lib/tool-cache.js", + "name": "@actions/tool-cache", "publishConfig": { "access": "public" }, @@ -32,21 +76,6 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "dependencies": { - "@actions/core": "^1.2.3", - "@actions/exec": "^1.0.0", - "@actions/http-client": "^1.0.8", - "@actions/io": "^1.0.1", - "semver": "^6.1.0", - "uuid": "^3.3.2" - }, - "devDependencies": { - "@types/nock": "^10.0.3", - "@types/semver": "^6.0.0", - "@types/uuid": "^3.4.4", - "nock": "^10.0.6" - } -} \ No newline at end of file + "types": "lib/tool-cache.d.ts", + "version": "1.5.5" +} diff --git a/node_modules/@ava/typescript/node_modules/escape-string-regexp/package.json b/node_modules/@ava/typescript/node_modules/escape-string-regexp/package.json index d7bec7c3d..be2aeaa3c 100644 --- a/node_modules/@ava/typescript/node_modules/escape-string-regexp/package.json +++ b/node_modules/@ava/typescript/node_modules/escape-string-regexp/package.json @@ -1,28 +1,55 @@ { - "name": "escape-string-regexp", - "version": "2.0.0", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": "sindresorhus/escape-string-regexp", + "_args": [ + [ + "escape-string-regexp@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "escape-string-regexp@2.0.0", + "_id": "escape-string-regexp@2.0.0", + "_inBundle": false, + "_integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "_location": "/@ava/typescript/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-string-regexp@2.0.0", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/@ava/typescript" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Boy Nicolai Appelman (jbna.nl)" - ], + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", "keywords": [ "escape", "regex", @@ -35,9 +62,26 @@ "special", "characters" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/@ava/typescript/package.json b/node_modules/@ava/typescript/package.json index d064983ae..53bc3ef1c 100644 --- a/node_modules/@ava/typescript/package.json +++ b/node_modules/@ava/typescript/package.json @@ -1,32 +1,64 @@ { - "name": "@ava/typescript", - "version": "1.1.1", - "description": "TypeScript provider for AVA", - "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0" + "_args": [ + [ + "@ava/typescript@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@ava/typescript@1.1.1", + "_id": "@ava/typescript@1.1.1", + "_inBundle": false, + "_integrity": "sha512-KbLUAe2cWXK63WLK6LnOJonjwEDU/8MNXCOA1ooX/YFZgKRmeAD1kZu+2K0ks5fnOCEcckNQAooyBNGdZUmMQA==", + "_location": "/@ava/typescript", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@ava/typescript@1.1.1", + "name": "@ava/typescript", + "escapedName": "@ava%2ftypescript", + "scope": "@ava", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" }, - "files": [ - "index.js" + "_requiredBy": [ + "#DEV:/" ], - "author": "Mark Wubben (https://novemberborn.net)", - "repository": "avajs/typescript", - "license": "MIT", - "keywords": [ - "ava", - "typescript" - ], - "scripts": { - "test": "xo && nyc ava" + "_resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net" + }, + "bugs": { + "url": "https://github.com/avajs/typescript/issues" }, "dependencies": { "escape-string-regexp": "^2.0.0" }, + "description": "TypeScript provider for AVA", "devDependencies": { "ava": "^3.0.0", "execa": "^4.0.0", "nyc": "^15.0.0", "xo": "^0.25.3" }, + "engines": { + "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/avajs/typescript#readme", + "keywords": [ + "ava", + "typescript" + ], + "license": "MIT", + "name": "@ava/typescript", "nyc": { "reporter": [ "html", @@ -34,9 +66,17 @@ "text" ] }, + "repository": { + "type": "git", + "url": "git+https://github.com/avajs/typescript.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.1.1", "xo": { "rules": { "import/order": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/@azure/abort-controller/LICENSE b/node_modules/@azure/abort-controller/LICENSE new file mode 100644 index 000000000..21071075c --- /dev/null +++ b/node_modules/@azure/abort-controller/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@azure/abort-controller/README.md b/node_modules/@azure/abort-controller/README.md new file mode 100644 index 000000000..b509c849c --- /dev/null +++ b/node_modules/@azure/abort-controller/README.md @@ -0,0 +1,109 @@ +# Azure Abort Controller library for JS + +The `@azure/abort-controller` package provides `AbortController` and `AbortSignal` classes. These classes are compatible +with the [AbortController](https://developer.mozilla.org/docs/Web/API/AbortController) built into modern browsers +and the `AbortSignal` used by [fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API). +Use the `AbortController` class to create an instance of the `AbortSignal` class that can be used to cancel an operation +in an Azure SDK that accept a parameter of type `AbortSignalLike`. + +## Getting started + +### Installation + +Install this libray using npm as follows + +``` +npm install @azure/abort-controller +``` + +## Key Concepts + +Use the `AbortController` to create an `AbortSignal` which can then be passed to Azure SDK operations to cancel +pending work. The `AbortSignal` can be accessed via the `signal` property on an instantiated `AbortController`. +An `AbortSignal` can also be returned directly from a static method, e.g. `AbortController.timeout(100)`. +that is cancelled after 100 milliseconds. + +Calling `abort()` on the instantiated `AbortController` invokes the registered `abort` +event listeners on the associated `AbortSignal`. +Any subsequent calls to `abort()` on the same controller will have no effect. + +The `AbortSignal.none` static property returns an `AbortSignal` that can not be aborted. + +Multiple instances of an `AbortSignal` can be linked so that calling `abort()` on the parent signal, +aborts all linked signals. +This linkage is one-way, meaning that a parent signal can affect a linked signal, but not the other way around. +To link `AbortSignals` together, pass in the parent signals to the `AbortController` constructor. + +## Examples + +The below examples assume that `doAsyncWork` is a function that takes a bag of properties, one of which is +of the abort signal. + +### Example 1 - basic usage + +```js +import { AbortController } from "@azure/abort-controller"; + +const controller = new AbortController(); +doAsyncWork({ abortSignal: controller.signal }); + +// at some point later +controller.abort(); +``` + +### Example 2 - Aborting with timeout + +```js +import { AbortController } from "@azure/abort-controller"; + +const signal = AbortController.timeout(1000); +doAsyncWork({ abortSignal: signal }); +``` + +### Example 3 - Aborting sub-tasks + +```js +import { AbortController } from "@azure/abort-controller"; + +const allTasksController = new AbortController(); + +const subTask1 = new AbortController(allTasksController.signal); +const subtask2 = new AbortController(allTasksController.signal); + +allTasksController.abort(); // aborts allTasksSignal, subTask1, subTask2 +subTask1.abort(); // aborts only subTask1 +``` + +### Example 4 - Aborting with parent signal or timeout + +```js +import { AbortController } from "@azure/abort-controller"; + +const allTasksController = new AbortController(); + +// create a subtask controller that can be aborted manually, +// or when either the parent task aborts or the timeout is reached. +const subTask = new AbortController(allTasksController.signal, AbortController.timeout(100)); + +allTasksController.abort(); // aborts allTasksSignal, subTask +subTask.abort(); // aborts only subTask +``` + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor +License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your +contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and +decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. +You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/b38ae36b293f08f72b80dbb1d75cb4d276098fa1/CONTRIBUTING.md) to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. +For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional +questions or comments. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fabort-controller%2FREADME.png) diff --git a/node_modules/@azure/abort-controller/changelog.md b/node_modules/@azure/abort-controller/changelog.md new file mode 100644 index 000000000..edc654f2b --- /dev/null +++ b/node_modules/@azure/abort-controller/changelog.md @@ -0,0 +1,15 @@ +## 1.0.1 - 2019-12-04 + +Fixes the [bug 6271](https://github.com/Azure/azure-sdk-for-js/issues/6271) that can occur with angular prod builds due to triple-slash directives. +([PR 6344](https://github.com/Azure/azure-sdk-for-js/pull/6344)) + +## 1.0.0 - 2019-10-29 + +This release marks the general availability of the `@azure/abort-controller` package. + +Removed the browser bundle. A browser-compatible library can still be created through the use of a bundler such as Rollup, Webpack, or Parcel. +([#5860](https://github.com/Azure/azure-sdk-for-js/pull/5860)) + +## 1.0.0-preview.2 - 2019-09-09 + +Listeners attached to an `AbortSignal` now receive an event with the type `abort`. (PR #4756) diff --git a/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js b/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js new file mode 100644 index 000000000..3473b9e8c --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js @@ -0,0 +1,130 @@ +import { __extends } from "tslib"; +import { AbortSignal, abortSignal } from "./AbortSignal"; +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + */ +var AbortError = /** @class */ (function (_super) { + __extends(AbortError, _super); + function AbortError(message) { + var _this = _super.call(this, message) || this; + _this.name = "AbortError"; + return _this; + } + return AbortError; +}(Error)); +export { AbortError }; +/** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * // Abort an operation when another event fires + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * + * @example + * // Share aborter cross multiple operations in 30s + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + * + * @example + * // Cascaded aborting + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * + * @export + * @class AbortController + * @implements {AbortSignalLike} + */ +var AbortController = /** @class */ (function () { + function AbortController(parentSignals) { + var _this = this; + this._signal = new AbortSignal(); + if (!parentSignals) { + return; + } + // coerce parentSignals into an array + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (var _i = 0, parentSignals_1 = parentSignals; _i < parentSignals_1.length; _i++) { + var parentSignal = parentSignals_1[_i]; + // if the parent signal has already had abort() called, + // then call abort on this signal as well. + if (parentSignal.aborted) { + this.abort(); + } + else { + // when the parent signal aborts, this signal should as well. + parentSignal.addEventListener("abort", function () { + _this.abort(); + }); + } + } + } + Object.defineProperty(AbortController.prototype, "signal", { + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + * @type {AbortSignal} + * @memberof AbortController + */ + get: function () { + return this._signal; + }, + enumerable: true, + configurable: true + }); + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + * + * @memberof AbortController + */ + AbortController.prototype.abort = function () { + abortSignal(this._signal); + }; + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * + * @static + * @params {number} ms Elapsed time in milliseconds to trigger an abort. + * @returns {AbortSignal} + */ + AbortController.timeout = function (ms) { + var signal = new AbortSignal(); + var timer = setTimeout(abortSignal, ms, signal); + // Prevent the active Timer from keeping the Node.js event loop active. + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + }; + return AbortController; +}()); +export { AbortController }; +//# sourceMappingURL=AbortController.js.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map b/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map new file mode 100644 index 000000000..260561afa --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbortController.js","sourceRoot":"","sources":["../../src/AbortController.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAE1E;;;;;;;;;;;;;;;GAeG;AACH;IAAgC,8BAAK;IACnC,oBAAY,OAAgB;QAA5B,YACE,kBAAM,OAAO,CAAC,SAEf;QADC,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC;;IAC3B,CAAC;IACH,iBAAC;AAAD,CAAC,AALD,CAAgC,KAAK,GAKpC;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IAaE,yBAAY,aAAmB;QAA/B,iBAsBC;QArBC,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAEjC,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QACD,qCAAqC;QACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;YACjC,aAAa,GAAG,SAAS,CAAC;SAC3B;QACD,KAA2B,UAAa,EAAb,+BAAa,EAAb,2BAAa,EAAb,IAAa,EAAE;YAArC,IAAM,YAAY,sBAAA;YACrB,uDAAuD;YACvD,0CAA0C;YAC1C,IAAI,YAAY,CAAC,OAAO,EAAE;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;aACd;iBAAM;gBACL,6DAA6D;gBAC7D,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE;oBACrC,KAAI,CAAC,KAAK,EAAE,CAAC;gBACf,CAAC,CAAC,CAAC;aACJ;SACF;IACH,CAAC;IAUD,sBAAW,mCAAM;QARjB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;;;OAAA;IAED;;;;;OAKG;IACH,+BAAK,GAAL;QACE,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACW,uBAAO,GAArB,UAAsB,EAAU;QAC9B,IAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QACjC,IAAM,KAAK,GAAG,UAAU,CAAC,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QAClD,uEAAuE;QACvE,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;YACrC,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,sBAAC;AAAD,CAAC,AA3ED,IA2EC"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js b/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js new file mode 100644 index 000000000..fb75b5c21 --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js @@ -0,0 +1,130 @@ +var listenersMap = new WeakMap(); +var abortedMap = new WeakMap(); +/** + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * // Abort without timeout + * await doAsyncWork(AbortSignal.none); + * + * @export + * @class AbortSignal + * @implements {AbortSignalLike} + */ +var AbortSignal = /** @class */ (function () { + function AbortSignal() { + /** + * onabort event listener. + * + * @memberof AbortSignal + */ + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + Object.defineProperty(AbortSignal.prototype, "aborted", { + /** + * Status of whether aborted or not. + * + * @readonly + * @type {boolean} + * @memberof AbortSignal + */ + get: function () { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbortSignal, "none", { + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + * @static + * @type {AbortSignal} + * @memberof AbortSignal + */ + get: function () { + return new AbortSignal(); + }, + enumerable: true, + configurable: true + }); + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + AbortSignal.prototype.addEventListener = function ( + // tslint:disable-next-line:variable-name + _type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + var listeners = listenersMap.get(this); + listeners.push(listener); + }; + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + AbortSignal.prototype.removeEventListener = function ( + // tslint:disable-next-line:variable-name + _type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + var listeners = listenersMap.get(this); + var index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + }; + /** + * Dispatches a synthetic event to the AbortSignal. + */ + AbortSignal.prototype.dispatchEvent = function (_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + }; + return AbortSignal; +}()); +export { AbortSignal }; +/** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @returns + * @internal + */ +export function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + var listeners = listenersMap.get(signal); + if (listeners) { + listeners.forEach(function (listener) { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); +} +//# sourceMappingURL=AbortSignal.js.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map b/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map new file mode 100644 index 000000000..19145dd11 --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbortSignal.js","sourceRoot":"","sources":["../../src/AbortSignal.ts"],"names":[],"mappings":"AAGA,IAAM,YAAY,GAAG,IAAI,OAAO,EAAqC,CAAC;AACtE,IAAM,UAAU,GAAG,IAAI,OAAO,EAAwB,CAAC;AA6BvD;;;;;;;;;;;;;;GAcG;AACH;IACE;QAgCA;;;;WAIG;QACI,YAAO,GAAiC,IAAI,CAAC;QApClD,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3B,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IASD,sBAAW,gCAAO;QAPlB;;;;;;WAMG;aACH;YACE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACzB,MAAM,IAAI,SAAS,CAAC,mDAAmD,CAAC,CAAC;aAC1E;YAED,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QAC/B,CAAC;;;OAAA;IAUD,sBAAkB,mBAAI;QARtB;;;;;;;WAOG;aACH;YACE,O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AAE,CAAC;IAC5C,IAAI,SAAS,EAAE;QACb,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ;YACzB,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;KACJ;IAED,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist-esm/src/aborter.js b/node_modules/@azure/abort-controller/dist-esm/src/aborter.js new file mode 100644 index 000000000..760bcad97 --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/aborter.js @@ -0,0 +1,10 @@ +// Changes to Aborter +// * Rename Aborter to AbortSignal +// * Remove withValue and getValue - async context should be solved differently/wholistically, not tied to cancellation +// * Remove withTimeout, it's moved to the controller +// * AbortSignal constructor no longer takes a parent. Cancellation graphs are created from the controller. +// Potential changes to align with DOM Spec +// * dispatchEvent on Signal +export { AbortController, AbortError } from "./AbortController"; +export { AbortSignal } from "./AbortSignal"; +//# sourceMappingURL=aborter.js.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist-esm/src/aborter.js.map b/node_modules/@azure/abort-controller/dist-esm/src/aborter.js.map new file mode 100644 index 000000000..3438ffbcd --- /dev/null +++ b/node_modules/@azure/abort-controller/dist-esm/src/aborter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aborter.js","sourceRoot":"","sources":["../../src/aborter.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,kCAAkC;AAClC,uHAAuH;AACvH,qDAAqD;AACrD,2GAA2G;AAE3G,2CAA2C;AAC3C,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/dist/index.js b/node_modules/@azure/abort-controller/dist/index.js new file mode 100644 index 000000000..61651dc30 --- /dev/null +++ b/node_modules/@azure/abort-controller/dist/index.js @@ -0,0 +1,265 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var tslib = require('tslib'); + +var listenersMap = new WeakMap(); +var abortedMap = new WeakMap(); +/** + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * // Abort without timeout + * await doAsyncWork(AbortSignal.none); + * + * @export + * @class AbortSignal + * @implements {AbortSignalLike} + */ +var AbortSignal = /** @class */ (function () { + function AbortSignal() { + /** + * onabort event listener. + * + * @memberof AbortSignal + */ + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + Object.defineProperty(AbortSignal.prototype, "aborted", { + /** + * Status of whether aborted or not. + * + * @readonly + * @type {boolean} + * @memberof AbortSignal + */ + get: function () { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbortSignal, "none", { + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + * @static + * @type {AbortSignal} + * @memberof AbortSignal + */ + get: function () { + return new AbortSignal(); + }, + enumerable: true, + configurable: true + }); + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + AbortSignal.prototype.addEventListener = function ( + // tslint:disable-next-line:variable-name + _type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + var listeners = listenersMap.get(this); + listeners.push(listener); + }; + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + AbortSignal.prototype.removeEventListener = function ( + // tslint:disable-next-line:variable-name + _type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + var listeners = listenersMap.get(this); + var index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + }; + /** + * Dispatches a synthetic event to the AbortSignal. + */ + AbortSignal.prototype.dispatchEvent = function (_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + }; + return AbortSignal; +}()); +/** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @returns + * @internal + */ +function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + var listeners = listenersMap.get(signal); + if (listeners) { + listeners.forEach(function (listener) { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); +} + +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + */ +var AbortError = /** @class */ (function (_super) { + tslib.__extends(AbortError, _super); + function AbortError(message) { + var _this = _super.call(this, message) || this; + _this.name = "AbortError"; + return _this; + } + return AbortError; +}(Error)); +/** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * // Abort an operation when another event fires + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * + * @example + * // Share aborter cross multiple operations in 30s + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + * + * @example + * // Cascaded aborting + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * + * @export + * @class AbortController + * @implements {AbortSignalLike} + */ +var AbortController = /** @class */ (function () { + function AbortController(parentSignals) { + var _this = this; + this._signal = new AbortSignal(); + if (!parentSignals) { + return; + } + // coerce parentSignals into an array + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (var _i = 0, parentSignals_1 = parentSignals; _i < parentSignals_1.length; _i++) { + var parentSignal = parentSignals_1[_i]; + // if the parent signal has already had abort() called, + // then call abort on this signal as well. + if (parentSignal.aborted) { + this.abort(); + } + else { + // when the parent signal aborts, this signal should as well. + parentSignal.addEventListener("abort", function () { + _this.abort(); + }); + } + } + } + Object.defineProperty(AbortController.prototype, "signal", { + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + * @type {AbortSignal} + * @memberof AbortController + */ + get: function () { + return this._signal; + }, + enumerable: true, + configurable: true + }); + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + * + * @memberof AbortController + */ + AbortController.prototype.abort = function () { + abortSignal(this._signal); + }; + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * + * @static + * @params {number} ms Elapsed time in milliseconds to trigger an abort. + * @returns {AbortSignal} + */ + AbortController.timeout = function (ms) { + var signal = new AbortSignal(); + var timer = setTimeout(abortSignal, ms, signal); + // Prevent the active Timer from keeping the Node.js event loop active. + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + }; + return AbortController; +}()); + +exports.AbortController = AbortController; +exports.AbortError = AbortError; +exports.AbortSignal = AbortSignal; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/abort-controller/dist/index.js.map b/node_modules/@azure/abort-controller/dist/index.js.map new file mode 100644 index 000000000..96aa1d58e --- /dev/null +++ b/node_modules/@azure/abort-controller/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/AbortSignal.ts","../src/AbortController.ts"],"sourcesContent":["/// \ntype AbortEventListener = (this: AbortSignalLike, ev?: any) => any;\n\nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n}\n\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * // Abort without timeout\n * await doAsyncWork(AbortSignal.none);\n *\n * @export\n * @class AbortSignal\n * @implements {AbortSignalLike}\n */\nexport class AbortSignal implements AbortSignalLike {\n constructor() {\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n * @type {boolean}\n * @memberof AbortSignal\n */\n public get aborted(): boolean {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n return abortedMap.get(this)!;\n }\n\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n * @static\n * @type {AbortSignal}\n * @memberof AbortSignal\n */\n public static get none(): AbortSignal {\n return new AbortSignal();\n }\n\n /**\n * onabort event listener.\n *\n * @memberof AbortSignal\n */\n public onabort: ((ev?: Event) => any) | null = null;\n\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param {\"abort\"} _type Only support \"abort\" event\n * @param {(this: AbortSignalLike, ev: any) => any} listener\n * @memberof AbortSignal\n */\n public addEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n listeners.push(listener);\n }\n\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param {\"abort\"} _type Only support \"abort\" event\n * @param {(this: AbortSignalLike, ev: any) => any} listener\n * @memberof AbortSignal\n */\n public removeEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event: Event): boolean {\n throw new Error(\n \"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\"\n );\n }\n}\n\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @returns\n * @internal\n */\nexport function abortSignal(signal: AbortSignal) {\n if (signal.aborted) {\n return;\n }\n\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n\n const listeners = listenersMap.get(signal)!;\n if (listeners) {\n listeners.forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n\n abortedMap.set(signal, true);\n}\n","import { AbortSignal, abortSignal, AbortSignalLike } from \"./AbortSignal\";\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * // Abort an operation when another event fires\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n *\n * @example\n * // Share aborter cross multiple operations in 30s\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *\n * @example\n * // Cascaded aborting\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n *\n * @export\n * @class AbortController\n * @implements {AbortSignalLike}\n */\nexport class AbortController {\n private _signal: AbortSignal;\n\n /**\n * @param {AbortSignalLike[]} [parentSignals] The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n * @constructor\n */\n constructor(parentSignals?: AbortSignalLike[]);\n /**\n * @param {...AbortSignalLike} parentSignals The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n * @constructor\n */\n constructor(...parentSignals: AbortSignalLike[]);\n constructor(parentSignals?: any) {\n this._signal = new AbortSignal();\n\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n } else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n * @type {AbortSignal}\n * @memberof AbortController\n */\n public get signal() {\n return this._signal;\n }\n\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n *\n * @memberof AbortController\n */\n abort() {\n abortSignal(this._signal);\n }\n\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n *\n * @static\n * @params {number} ms Elapsed time in milliseconds to trigger an abort.\n * @returns {AbortSignal}\n */\n public static timeout(ms: number): AbortSignal {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n"],"names":["__extends"],"mappings":";;;;;;AAGA,IAAM,YAAY,GAAG,IAAI,OAAO,EAAqC,CAAC;AACtE,IAAM,UAAU,GAAG,IAAI,OAAO,EAAwB,CAAC;;;;;;;;;;;;;;;;AA4CvD;IACE;;;;;;QAqCO,YAAO,GAAiC,IAAI,CAAC;QApClD,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3B,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAC7B;IASD,sBAAW,gCAAO;;;;;;;;aAAlB;YACE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACzB,MAAM,IAAI,SAAS,CAAC,mDAAmD,CAAC,CAAC;aAC1E;YAED,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;SAC9B;;;OAAA;IAUD,sBAAkB,mBAAI;;;;;;;;;aAAtB;YACE,OAAO,IAAI,WAAW,EAAE,CAAC;SAC1B;;;OAAA;;;;;;;;IAgBM,sCAAgB,G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AAK,KAAK,UAAU,EAAE;YACrC,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QACD,OAAO,MAAM,CAAC;KACf;IACH,sBAAC;CAAA;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/package.json b/node_modules/@azure/abort-controller/package.json new file mode 100644 index 000000000..7478dfc8c --- /dev/null +++ b/node_modules/@azure/abort-controller/package.json @@ -0,0 +1,141 @@ +{ + "_from": "@azure/abort-controller@^1.0.0", + "_id": "@azure/abort-controller@1.0.1", + "_inBundle": false, + "_integrity": "sha512-wP2Jw6uPp8DEDy0n4KNidvwzDjyVV2xnycEIq7nPzj1rHyb/r+t3OPeNT1INZePP2wy5ZqlwyuyOMTi0ePyY1A==", + "_location": "/@azure/abort-controller", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/abort-controller@^1.0.0", + "name": "@azure/abort-controller", + "escapedName": "@azure%2fabort-controller", + "scope": "@azure", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/@azure/core-auth", + "/@azure/core-http", + "/@azure/core-lro", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.1.tgz", + "_shasum": "8510935b25ac051e58920300e9d7b511ca6e656a", + "_spec": "@azure/abort-controller@^1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "tslib": "^1.9.3" + }, + "deprecated": false, + "description": "Microsoft Azure SDK for JavaScript - Aborter", + "devDependencies": { + "@microsoft/api-extractor": "^7.5.4", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^5.2.5", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^6.0.3", + "delay": "^4.2.0", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "karma": "^4.0.1", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-junit-reporter": "^2.0.1", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-coverage": "^0.1.5", + "mocha": "^6.2.2", + "mocha-junit-reporter": "^1.18.0", + "mocha-multi": "^1.1.3", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-multi-entry": "^2.1.0", + "rollup-plugin-node-resolve": "^5.0.2", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "ts-node": "^8.3.0", + "typescript": "~3.6.4" + }, + "engine": { + "node": ">=8.0.0" + }, + "files": [ + "dist/", + "dist-esm/src/", + "src/", + "types/src", + "tsconfig.json" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/abort-controller", + "keywords": [ + "Azure", + "Aborter", + "AbortSignal", + "Cancellation", + "Node.js", + "TypeScript", + "JavaScript", + "Browser" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/aborter.js", + "name": "@azure/abort-controller", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "npm run build:es6 && npm run build:nodebrowser", + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build:test": "rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm dist-test types temp browser/*.js* browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml", + "execute:samples": "echo skipped", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint -c ../../.eslintrc.json src test --ext .ts -f html -o abort-controller-lintReport.html || exit 0", + "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "pretest": "npm run build:test", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" mocha --require ts-node/register --require source-map-support/register --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=- --full-trace --no-timeouts test/*.spec.ts" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "./types/src/aborter.d.ts", + "version": "1.0.1" +} diff --git a/node_modules/@azure/abort-controller/src/AbortController.ts b/node_modules/@azure/abort-controller/src/AbortController.ts new file mode 100644 index 000000000..d660a28c9 --- /dev/null +++ b/node_modules/@azure/abort-controller/src/AbortController.ts @@ -0,0 +1,133 @@ +import { AbortSignal, abortSignal, AbortSignalLike } from "./AbortSignal"; + +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + */ +export class AbortError extends Error { + constructor(message?: string) { + super(message); + this.name = "AbortError"; + } +} + +/** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * // Abort an operation when another event fires + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * + * @example + * // Share aborter cross multiple operations in 30s + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + * + * @example + * // Cascaded aborting + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * + * @export + * @class AbortController + * @implements {AbortSignalLike} + */ +export class AbortController { + private _signal: AbortSignal; + + /** + * @param {AbortSignalLike[]} [parentSignals] The AbortSignals that will signal aborted on the AbortSignal associated with this controller. + * @constructor + */ + constructor(parentSignals?: AbortSignalLike[]); + /** + * @param {...AbortSignalLike} parentSignals The AbortSignals that will signal aborted on the AbortSignal associated with this controller. + * @constructor + */ + constructor(...parentSignals: AbortSignalLike[]); + constructor(parentSignals?: any) { + this._signal = new AbortSignal(); + + if (!parentSignals) { + return; + } + // coerce parentSignals into an array + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + // if the parent signal has already had abort() called, + // then call abort on this signal as well. + if (parentSignal.aborted) { + this.abort(); + } else { + // when the parent signal aborts, this signal should as well. + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + * @type {AbortSignal} + * @memberof AbortController + */ + public get signal() { + return this._signal; + } + + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + * + * @memberof AbortController + */ + abort() { + abortSignal(this._signal); + } + + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * + * @static + * @params {number} ms Elapsed time in milliseconds to trigger an abort. + * @returns {AbortSignal} + */ + public static timeout(ms: number): AbortSignal { + const signal = new AbortSignal(); + const timer = setTimeout(abortSignal, ms, signal); + // Prevent the active Timer from keeping the Node.js event loop active. + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } +} diff --git a/node_modules/@azure/abort-controller/src/AbortSignal.ts b/node_modules/@azure/abort-controller/src/AbortSignal.ts new file mode 100644 index 000000000..04e8e7500 --- /dev/null +++ b/node_modules/@azure/abort-controller/src/AbortSignal.ts @@ -0,0 +1,170 @@ +/// +type AbortEventListener = (this: AbortSignalLike, ev?: any) => any; + +const listenersMap = new WeakMap(); +const abortedMap = new WeakMap(); + +/** + * Allows the request to be aborted upon firing of the "abort" event. + * Compatible with the browser built-in AbortSignal and common polyfills. + */ +export interface AbortSignalLike { + /** + * Indicates if the signal has already been aborted. + */ + readonly aborted: boolean; + /** + * Add new "abort" event listener, only support "abort" event. + */ + addEventListener( + type: "abort", + listener: (this: AbortSignalLike, ev: any) => any, + options?: any + ): void; + /** + * Remove "abort" event listener, only support "abort" event. + */ + removeEventListener( + type: "abort", + listener: (this: AbortSignalLike, ev: any) => any, + options?: any + ): void; +} + +/** + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * // Abort without timeout + * await doAsyncWork(AbortSignal.none); + * + * @export + * @class AbortSignal + * @implements {AbortSignalLike} + */ +export class AbortSignal implements AbortSignalLike { + constructor() { + listenersMap.set(this, []); + abortedMap.set(this, false); + } + + /** + * Status of whether aborted or not. + * + * @readonly + * @type {boolean} + * @memberof AbortSignal + */ + public get aborted(): boolean { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + + return abortedMap.get(this)!; + } + + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + * @static + * @type {AbortSignal} + * @memberof AbortSignal + */ + public static get none(): AbortSignal { + return new AbortSignal(); + } + + /** + * onabort event listener. + * + * @memberof AbortSignal + */ + public onabort: ((ev?: Event) => any) | null = null; + + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + public addEventListener( + // tslint:disable-next-line:variable-name + _type: "abort", + listener: (this: AbortSignalLike, ev: any) => any + ): void { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + + const listeners = listenersMap.get(this)!; + listeners.push(listener); + } + + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + public removeEventListener( + // tslint:disable-next-line:variable-name + _type: "abort", + listener: (this: AbortSignalLike, ev: any) => any + ): void { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + + const listeners = listenersMap.get(this)!; + + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event: Event): boolean { + throw new Error( + "This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes." + ); + } +} + +/** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @returns + * @internal + */ +export function abortSignal(signal: AbortSignal) { + if (signal.aborted) { + return; + } + + if (signal.onabort) { + signal.onabort.call(signal); + } + + const listeners = listenersMap.get(signal)!; + if (listeners) { + listeners.forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + + abortedMap.set(signal, true); +} diff --git a/node_modules/@azure/abort-controller/src/aborter.ts b/node_modules/@azure/abort-controller/src/aborter.ts new file mode 100644 index 000000000..20ebe2137 --- /dev/null +++ b/node_modules/@azure/abort-controller/src/aborter.ts @@ -0,0 +1,11 @@ +// Changes to Aborter +// * Rename Aborter to AbortSignal +// * Remove withValue and getValue - async context should be solved differently/wholistically, not tied to cancellation +// * Remove withTimeout, it's moved to the controller +// * AbortSignal constructor no longer takes a parent. Cancellation graphs are created from the controller. + +// Potential changes to align with DOM Spec +// * dispatchEvent on Signal + +export { AbortController, AbortError } from "./AbortController"; +export { AbortSignal, AbortSignalLike } from "./AbortSignal"; diff --git a/node_modules/@azure/abort-controller/src/shims-public.d.ts b/node_modules/@azure/abort-controller/src/shims-public.d.ts new file mode 100644 index 000000000..7ef8e860a --- /dev/null +++ b/node_modules/@azure/abort-controller/src/shims-public.d.ts @@ -0,0 +1,2 @@ +// forward declaration of Event in case DOM libs are not present. +interface Event {} diff --git a/node_modules/@azure/abort-controller/tsconfig.json b/node_modules/@azure/abort-controller/tsconfig.json new file mode 100644 index 000000000..6f18f95de --- /dev/null +++ b/node_modules/@azure/abort-controller/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.package", + "compilerOptions": { + "target": "es5", + "declarationDir": "./types", + "outDir": "./dist-esm" + }, + "compileOnSave": true, + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"] +} diff --git a/node_modules/@azure/abort-controller/types/src/AbortController.d.ts b/node_modules/@azure/abort-controller/types/src/AbortController.d.ts new file mode 100644 index 000000000..ad1d347fc --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/AbortController.d.ts @@ -0,0 +1,90 @@ +import { AbortSignal, AbortSignalLike } from "./AbortSignal"; +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + */ +export declare class AbortError extends Error { + constructor(message?: string); +} +/** + * An AbortController provides an AbortSignal and the associated controls to signal + * that an asynchronous operation should be aborted. + * + * @example + * // Abort an operation when another event fires + * const controller = new AbortController(); + * const signal = controller.signal; + * doAsyncWork(signal); + * button.addEventListener('click', () => controller.abort()); + * + * @example + * // Share aborter cross multiple operations in 30s + * // Upload the same data to 2 different data centers at the same time, + * // abort another when any of them is finished + * const controller = AbortController.withTimeout(30 * 1000); + * doAsyncWork(controller.signal).then(controller.abort); + * doAsyncWork(controller.signal).then(controller.abort); + * + * @example + * // Cascaded aborting + * // All operations can't take more than 30 seconds + * const aborter = Aborter.timeout(30 * 1000); + * + * // Following 2 operations can't take more than 25 seconds + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * await doAsyncWork(aborter.withTimeout(25 * 1000)); + * + * @export + * @class AbortController + * @implements {AbortSignalLike} + */ +export declare class AbortController { + private _signal; + /** + * @param {AbortSignalLike[]} [parentSignals] The AbortSignals that will signal aborted on the AbortSignal associated with this controller. + * @constructor + */ + constructor(parentSignals?: AbortSignalLike[]); + /** + * @param {...AbortSignalLike} parentSignals The AbortSignals that will signal aborted on the AbortSignal associated with this controller. + * @constructor + */ + constructor(...parentSignals: AbortSignalLike[]); + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + * @type {AbortSignal} + * @memberof AbortController + */ + readonly signal: AbortSignal; + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + * + * @memberof AbortController + */ + abort(): void; + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * + * @static + * @params {number} ms Elapsed time in milliseconds to trigger an abort. + * @returns {AbortSignal} + */ + static timeout(ms: number): AbortSignal; +} +//# sourceMappingURL=AbortController.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map b/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map new file mode 100644 index 000000000..89026b45a --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/AbortController.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AbortController.d.ts","sourceRoot":"","sources":["../../src/AbortController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,eAAe,EAAE,MAAM,eAAe,CAAC;AAE1E;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAc;IAE7B;;;OAGG;gBACS,aAAa,CAAC,EAAE,eAAe,EAAE;IAC7C;;;OAGG;gBACS,GAAG,aAAa,EAAE,eAAe,EAAE;IAyB/C;;;;;;;OAOG;aACQ,MAAM;IAIjB;;;;;OAKG;IACH,KAAK;IAIL;;;;;;OAMG;WACW,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW;CAS/C"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts b/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts new file mode 100644 index 000000000..a1719308a --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts @@ -0,0 +1,92 @@ +/// +/** + * Allows the request to be aborted upon firing of the "abort" event. + * Compatible with the browser built-in AbortSignal and common polyfills. + */ +export interface AbortSignalLike { + /** + * Indicates if the signal has already been aborted. + */ + readonly aborted: boolean; + /** + * Add new "abort" event listener, only support "abort" event. + */ + addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; + /** + * Remove "abort" event listener, only support "abort" event. + */ + removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; +} +/** + * An aborter instance implements AbortSignal interface, can abort HTTP requests. + * + * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled. + * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation + * cannot or will not ever be cancelled. + * + * @example + * // Abort without timeout + * await doAsyncWork(AbortSignal.none); + * + * @export + * @class AbortSignal + * @implements {AbortSignalLike} + */ +export declare class AbortSignal implements AbortSignalLike { + constructor(); + /** + * Status of whether aborted or not. + * + * @readonly + * @type {boolean} + * @memberof AbortSignal + */ + readonly aborted: boolean; + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + * @static + * @type {AbortSignal} + * @memberof AbortSignal + */ + static readonly none: AbortSignal; + /** + * onabort event listener. + * + * @memberof AbortSignal + */ + onabort: ((ev?: Event) => any) | null; + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + addEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param {"abort"} _type Only support "abort" event + * @param {(this: AbortSignalLike, ev: any) => any} listener + * @memberof AbortSignal + */ + removeEventListener(_type: "abort", listener: (this: AbortSignalLike, ev: any) => any): void; + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event: Event): boolean; +} +/** + * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered. + * Will try to trigger abort event for all linked AbortSignal nodes. + * + * - If there is a timeout, the timer will be cancelled. + * - If aborted is true, nothing will happen. + * + * @returns + * @internal + */ +export declare function abortSignal(signal: AbortSignal): void; +//# sourceMappingURL=AbortSignal.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map b/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map new file mode 100644 index 000000000..f8c912a93 --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/AbortSignal.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AbortSignal.d.ts","sourceRoot":"","sources":["../../src/AbortSignal.ts"],"names":[],"mappings":";AAMA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;IACR;;OAEG;IACH,mBAAmB,CACjB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,EACjD,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,YAAW,eAAe;;IAMjD;;;;;;OAMG;aACQ,OAAO,EAAI,OAAO;IAQ7B;;;;;;;OAOG;oBACe,IAAI,EAAI,WAAW;IAIrC;;;;OAIG;IACI,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,CAAQ;IAEpD;;;;;;OAMG;IACI,gBAAgB,CAErB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,GAChD,IAAI;IASP;;;;;;OAMG;IACI,mBAAmB,CAExB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,KAAK,GAAG,GAChD,IAAI;IAaP;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO;CAKtC;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,QAiB9C"} \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/types/src/aborter.d.ts b/node_modules/@azure/abort-controller/types/src/aborter.d.ts new file mode 100644 index 000000000..41d6aaf8e --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/aborter.d.ts @@ -0,0 +1,3 @@ +export { AbortController, AbortError } from "./AbortController"; +export { AbortSignal, AbortSignalLike } from "./AbortSignal"; +//# sourceMappingURL=aborter.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/abort-controller/types/src/aborter.d.ts.map b/node_modules/@azure/abort-controller/types/src/aborter.d.ts.map new file mode 100644 index 000000000..47ead066a --- /dev/null +++ b/node_modules/@azure/abort-controller/types/src/aborter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"aborter.d.ts","sourceRoot":"","sources":["../../src/aborter.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-asynciterator-polyfill/LICENSE b/node_modules/@azure/core-asynciterator-polyfill/LICENSE new file mode 100644 index 000000000..21071075c --- /dev/null +++ b/node_modules/@azure/core-asynciterator-polyfill/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@azure/core-asynciterator-polyfill/README.md b/node_modules/@azure/core-asynciterator-polyfill/README.md new file mode 100644 index 000000000..fd6192c8c --- /dev/null +++ b/node_modules/@azure/core-asynciterator-polyfill/README.md @@ -0,0 +1,56 @@ +# Azure Async Iterator Polyfill client library for JS + +This library provides a polyfill for [Symbol.asyncIterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator) +for platforms that do not have support for it by default. + +## Getting started + +### Installation + +If using this as part of another project in the [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo, +then run `rush install` after cloning the repo. + +Otherwise, use npm to install this package in your application as follows + +``` +npm install @azure/core-asynciterator-polyfill +``` + +## Key concepts + +[Symbol.asyncIterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator) is not supported +in all platforms and therefore you might need a polyfill in order to get it working on such platforms. Importing the polyfill from +this library lets you use the iterator in your applications. + +## Examples + +To use this polyfill, just include an import of this library in your code + +```typescript +import "@azure/core-asynciterator-polyfill"; +``` + +## Next steps + +Try out this package in your application if you are working on platforms that do not have support for +[Symbol.asyncIterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator) and provide feedback! + +## Troubleshooting + +Log an issue at https://github.com/Azure/azure-sdk-for-js/issues + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/64a0cf353678b313bc1c27b430803db431e49c4e/CONTRIBUTING.md) to learn more about how to build and test the code. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/node_modules/@azure/core-asynciterator-polyfill/changelog.md b/node_modules/@azure/core-asynciterator-polyfill/changelog.md new file mode 100644 index 000000000..41f65b26b --- /dev/null +++ b/node_modules/@azure/core-asynciterator-polyfill/changelog.md @@ -0,0 +1,3 @@ +## 1.0.0 - 29th October, 2019 + +This release marks the general availability of the `@azure/core-asynciterator-polyfill` package. diff --git a/node_modules/@azure/core-asynciterator-polyfill/dist-esm/index.js b/node_modules/@azure/core-asynciterator-polyfill/dist-esm/index.js new file mode 100644 index 000000000..86816f203 --- /dev/null +++ b/node_modules/@azure/core-asynciterator-polyfill/dist-esm/index.js @@ -0,0 +1,5 @@ +"use strict"; +if (typeof Symbol === undefined || !Symbol.asyncIterator) { + Symbol.asyncIterator = Symbol.for("Symbol.asyncIterator"); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-asynciterator-polyfill/package.json b/node_modules/@azure/core-asynciterator-polyfill/package.json new file mode 100644 index 000000000..7ba6a2f8a --- /dev/null +++ b/node_modules/@azure/core-asynciterator-polyfill/package.json @@ -0,0 +1,96 @@ +{ + "_from": "@azure/core-asynciterator-polyfill@^1.0.0", + "_id": "@azure/core-asynciterator-polyfill@1.0.0", + "_inBundle": false, + "_integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", + "_location": "/@azure/core-asynciterator-polyfill", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/core-asynciterator-polyfill@^1.0.0", + "name": "@azure/core-asynciterator-polyfill", + "escapedName": "@azure%2fcore-asynciterator-polyfill", + "scope": "@azure", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/@azure/core-paging" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", + "_shasum": "dcccebb88406e5c76e0e1d52e8cc4c43a68b3ee7", + "_spec": "@azure/core-asynciterator-polyfill@^1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-paging", + "author": { + "name": "Microsoft Corporation", + "email": "azsdkteam@microsoft.com", + "url": "https://github.com/Azure/azure-sdk-for-js" + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Polyfill for IE/Node 8 for Symbol.asyncIterator", + "devDependencies": { + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "prettier": "^1.16.4", + "typescript": "^3.2.2" + }, + "files": [ + "dist-esm/**/*.js", + "LICENSE", + "README.md", + "ThirdPartyNotices.txt" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-asynciterator-polyfill", + "keywords": [ + "microsoft", + "clientruntime" + ], + "license": "MIT", + "main": "./dist-esm/index.js", + "name": "@azure/core-asynciterator-polyfill", + "private": false, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p .", + "build:test": "echo skipped", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\"", + "clean": "echo skipped", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint -c ../../.eslintrc.json src --ext .ts -f html -o template-lintReport.html || exit 0", + "lint:fix": "eslint \"src/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "echo skipped" + }, + "sdk-type": "client", + "sideEffects": true, + "tags": [ + "microsoft", + "clientruntime" + ], + "version": "1.0.0" +} diff --git a/node_modules/@azure/core-auth/CHANGELOG.md b/node_modules/@azure/core-auth/CHANGELOG.md new file mode 100644 index 000000000..e903bc730 --- /dev/null +++ b/node_modules/@azure/core-auth/CHANGELOG.md @@ -0,0 +1,44 @@ +# Release History + +## 1.1.3 (2020-06-30) + +- Fix this library to be compatible with ES5 ([#8975](https://github.com/Azure/azure-sdk-for-js/pull/8975)) + +## 1.1.2 (2020-04-28) + +- Remove the below interfaces from the public API of this package as they are defined elsewhere. + Fixes [bug 8301](https://github.com/Azure/azure-sdk-for-js/issues/8301). + - OperationOptions + - OperationRequestOptions + - OperationTracingOptions + - AbortSignalLike + +## 1.1.1 (2020-04-01) + +- Provided down-leveled type declaration files for users of older TypeScript versions between 3.1 and 3.6. + +## 1.1.0 (2020-03-31) + +- Added an `AzureKeyCredential` class that supports credential rotation and a corresponding `KeyCredential` interface to support the use of static string-based keys in Azure clients. + +## 1.0.2 (2019-12-03) + +- Updated to use OpenTelemetry 0.2 via `@azure/core-tracing` + +## 1.0.0 (2019-10-29) + +This release marks the general availability of the `@azure/core-auth` package. + +- Standardizes API to be more consistent with other SDK packages. + ([PR #5899](https://github.com/Azure/azure-sdk-for-js/pull/5899)) +- Removed the browser bundle. A browser-compatible library can still be created through the use of a bundler such as Rollup, Webpack, or Parcel. + ([#5860](https://github.com/Azure/azure-sdk-for-js/pull/5860)) + +## 1.0.0-preview.4 (2019-10-22) + +- Removed the `SimpleTokenCredential` implementation since it is not useful outside of test scenarios +- Updated to use the latest version of `@azure/core-tracing` package + +## 1.0.0-preview.3 (2019-09-09) + +- Fixed a ping timeout issue. The timeout is now configurable. ([PR #4941](https://github.com/Azure/azure-sdk-for-js/pull/4941)) diff --git a/node_modules/@azure/core-auth/LICENSE b/node_modules/@azure/core-auth/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-auth/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-auth/README.md b/node_modules/@azure/core-auth/README.md new file mode 100644 index 000000000..a90c659c9 --- /dev/null +++ b/node_modules/@azure/core-auth/README.md @@ -0,0 +1,9 @@ +## Azure Core Authentication + +This library provides core interfaces and helper methods for authenticating with Azure services using Azure Active Directory and other authentication schemes common across the Azure SDK. As a "core" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-auth%2FREADME.png) diff --git a/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js b/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js new file mode 100644 index 000000000..909caa548 --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +var AzureKeyCredential = /** @class */ (function () { + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key the initial value of the key to use in authentication + */ + function AzureKeyCredential(key) { + if (!key) { + throw new Error("key must be a non-empty string"); + } + this._key = key; + } + Object.defineProperty(AzureKeyCredential.prototype, "key", { + /** + * The value of the key to be used in authentication + */ + get: function () { + return this._key; + }, + enumerable: false, + configurable: true + }); + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey the new key value to be used + */ + AzureKeyCredential.prototype.update = function (newKey) { + this._key = newKey; + }; + return AzureKeyCredential; +}()); +export { AzureKeyCredential }; +//# sourceMappingURL=azureKeyCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map b/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map new file mode 100644 index 000000000..25215eb08 --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"azureKeyCredential.js","sourceRoot":"","sources":["../../src/azureKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC;;;GAGG;AACH;IAUE;;;;;OAKG;IACH,4BAAY,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAhBD,sBAAW,mCAAG;QAHd;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;;;OAAA;IAgBD;;;;;;;OAOG;IACI,mCAAM,GAAb,UAAc,MAAc;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,CAAC;IACH,yBAAC;AAAD,CAAC,AAnCD,IAmCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents a credential defined by a static API key.\n */\nexport interface KeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n}\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key the initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey the new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist-esm/src/index.js b/node_modules/@azure/core-auth/dist-esm/src/index.js new file mode 100644 index 000000000..fea338853 --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/index.js @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { AzureKeyCredential } from "./azureKeyCredential"; +export { isTokenCredential } from "./tokenCredential"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist-esm/src/index.js.map b/node_modules/@azure/core-auth/dist-esm/src/index.js.map new file mode 100644 index 000000000..1985d1fc6 --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAIL,iBAAiB,EAClB,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AzureKeyCredential, KeyCredential } from \"./azureKeyCredential\";\n\nexport {\n TokenCredential,\n GetTokenOptions,\n AccessToken,\n isTokenCredential\n} from \"./tokenCredential\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js b/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js new file mode 100644 index 000000000..58e5a21b4 --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential The assumed TokenCredential to be tested. + */ +export function isTokenCredential(credential) { + // Check for an object with a 'getToken' function and possibly with + // a 'signRequest' function. We do this check to make sure that + // a ServiceClientCredentials implementor (like TokenClientCredentials + // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if + // it doesn't actually implement TokenCredential also. + return (credential && + typeof credential.getToken === "function" && + (credential.signRequest === undefined || credential.getToken.length > 0)); +} +//# sourceMappingURL=tokenCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map b/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map new file mode 100644 index 000000000..5b34b6d9f --- /dev/null +++ b/node_modules/@azure/core-auth/dist-esm/src/tokenCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenCredential.js","sourceRoot":"","sources":["../../src/tokenCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA8DlC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAe;IAC/C,mEAAmE;IACnE,gEAAgE;IAChE,sEAAsE;IACtE,qEAAqE;IACrE,sDAAsD;IACtD,OAAO,CACL,UAAU;QACV,OAAO,UAAU,CAAC,QAAQ,KAAK,UAAU;QACzC,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { SpanOptions } from \"@azure/core-tracing\";\n\n/**\n * Represents a credential capable of providing an authentication token.\n */\nexport interface TokenCredential {\n /**\n * Gets the token provided by this credential.\n *\n * @param scopes The list of scopes for which the token will have access.\n * @param options The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n getToken(scopes: string | string[], options?: GetTokenOptions): Promise;\n}\n\n/**\n * Defines options for TokenCredential.getToken.\n */\nexport interface GetTokenOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: {\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n };\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: {\n /**\n * OpenTelemetry SpanOptions used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n };\n}\n\n/**\n * Represents an access token with an expiration time.\n */\nexport interface AccessToken {\n /**\n * The access token returned by the authentication service.\n */\n token: string;\n\n /**\n * The access token's expiration timestamp in milliseconds, UNIX epoch time.\n */\n expiresOnTimestamp: number;\n}\n\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential: any): credential is TokenCredential {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n return (\n credential &&\n typeof credential.getToken === \"function\" &&\n (credential.signRequest === undefined || credential.getToken.length > 0)\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/dist/index.js b/node_modules/@azure/core-auth/dist/index.js new file mode 100644 index 000000000..5a81f6df6 --- /dev/null +++ b/node_modules/@azure/core-auth/dist/index.js @@ -0,0 +1,68 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +var AzureKeyCredential = /** @class */ (function () { + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key the initial value of the key to use in authentication + */ + function AzureKeyCredential(key) { + if (!key) { + throw new Error("key must be a non-empty string"); + } + this._key = key; + } + Object.defineProperty(AzureKeyCredential.prototype, "key", { + /** + * The value of the key to be used in authentication + */ + get: function () { + return this._key; + }, + enumerable: false, + configurable: true + }); + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey the new key value to be used + */ + AzureKeyCredential.prototype.update = function (newKey) { + this._key = newKey; + }; + return AzureKeyCredential; +}()); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential The assumed TokenCredential to be tested. + */ +function isTokenCredential(credential) { + // Check for an object with a 'getToken' function and possibly with + // a 'signRequest' function. We do this check to make sure that + // a ServiceClientCredentials implementor (like TokenClientCredentials + // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if + // it doesn't actually implement TokenCredential also. + return (credential && + typeof credential.getToken === "function" && + (credential.signRequest === undefined || credential.getToken.length > 0)); +} + +exports.AzureKeyCredential = AzureKeyCredential; +exports.isTokenCredential = isTokenCredential; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/core-auth/dist/index.js.map b/node_modules/@azure/core-auth/dist/index.js.map new file mode 100644 index 000000000..1a78ace6f --- /dev/null +++ b/node_modules/@azure/core-auth/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/azureKeyCredential.ts","../src/tokenCredential.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Represents a credential defined by a static API key.\n */\nexport interface KeyCredential {\n /**\n * The value of the API key represented as a string\n */\n readonly key: string;\n}\n\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nexport class AzureKeyCredential implements KeyCredential {\n private _key: string;\n\n /**\n * The value of the key to be used in authentication\n */\n public get key(): string {\n return this._key;\n }\n\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key the initial value of the key to use in authentication\n */\n constructor(key: string) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n\n this._key = key;\n }\n\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey the new key value to be used\n */\n public update(newKey: string): void {\n this._key = newKey;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { SpanOptions } from \"@azure/core-tracing\";\n\n/**\n * Represents a credential capable of providing an authentication token.\n */\nexport interface TokenCredential {\n /**\n * Gets the token provided by this credential.\n *\n * @param scopes The list of scopes for which the token will have access.\n * @param options The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n getToken(scopes: string | string[], options?: GetTokenOptions): Promise;\n}\n\n/**\n * Defines options for TokenCredential.getToken.\n */\nexport interface GetTokenOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: {\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n };\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: {\n /**\n * OpenTelemetry SpanOptions used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n };\n}\n\n/**\n * Represents an access token with an expiration time.\n */\nexport interface AccessToken {\n /**\n * The access token returned by the authentication service.\n */\n token: string;\n\n /**\n * The access token's expiration timestamp in milliseconds, UNIX epoch time.\n */\n expiresOnTimestamp: number;\n}\n\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential: any): credential is TokenCredential {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n return (\n credential &&\n typeof credential.getToken === \"function\" &&\n (credential.signRequest === undefined || credential.getToken.length > 0)\n );\n}\n"],"names":[],"mappings":";;;;AAAA;AACA;AAYA;;;;;;;;;;;IAoBE,4BAAY,GAAW;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;KACjB;IAhBD,sBAAW,mCAAG;;;;aAAd;YACE,OAAO,IAAI,CAAC,IAAI,CAAC;SAClB;;;OAAA;;;;;;;;;IAwBM,mCAAM,GAAb,UAAc,MAAc;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;KACpB;IACH,yBAAC;AAAD,CAAC;;ACpDD;AACA;AA8DA;;;;;AAKA,SAAgB,iBAAiB,CAAC,UAAe;;;;;;IAM/C,QACE,UAAU;QACV,OAAO,UAAU,CAAC,QAAQ,KAAK,UAAU;SACxC,UAAU,CAAC,WAAW,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EACxE;AACJ,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/CHANGELOG.md b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/CHANGELOG.md new file mode 100644 index 000000000..79a7f6aa8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/CHANGELOG.md @@ -0,0 +1,38 @@ +# Release History + +## 1.0.0-preview.8 (2020-04-28) + +- Update `TestSpan` to allow setting span attributes [PR link](https://github.com/Azure/azure-sdk-for-js/pull/6565). +- [BREAKING] Migrate to OpenTelemetry 0.6 using the new `@opentelemetry/api` package. There were a few breaking changes: + - `SpanContext` now requires traceFlags to be set. + - `Tracer` has removed `recordSpanData`, `getBinaryFormat`, and `getHttpTextFormat`. + - `Tracer.getCurrentSpan` returns `undefined` instead of `null` when unset. + - `Link` objects renamed `spanContext` property to `context`. + +## 1.0.0-preview.7 (2019-12-03) + +- Updated the behavior of how incompatible versions of OpenTelemetry Tracer are handled. Now, errors will be thrown only if the user has manually set a Tracer. This means that incompatible versions will be silently ignored when tracing is not enabled. +- Updated to use OpenTelemetry 0.2 via the `@opentelemetry/types` package. There were two breaking changes in this update: + - `isRecordingEvents` on `Span` was renamed to `isRecording`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/454) + - `addLink` was removed from `Span` as links are now only allowed to be added during span creation. This is possible by specifying any necessary links inside `SpanOptions`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/449) + +## 1.0.0-preview.5 (2019-10-22) + +- Fixes issue where loading multiple copies of this module could result in the tracer set by `setTracer()` being reset. + +## 1.0.0-preview.4 (2019-10-08) + +- Remove dependency on the `debug` module to ensure compatibility with IE11 + +## 1.0.0-preview.3 (2019-10-07) + +- Updated to use the latest types from OpenTelemetry (PR [#5182](https://github.com/Azure/azure-sdk-for-js/pull/5182)) +- Clean up and refactored code for easier usage and testability. (PR [#5233](https://github.com/Azure/azure-sdk-for-js/pull/5233) and PR [#5283](https://github.com/Azure/azure-sdk-for-js/pull/5283)) + +## 1.0.0-preview.2 (2019-09-09) + +Updated the `OpenCensusSpanPlugin` & the `NoOpSpanPlugin` to support for retrieving span context. This allows updating of request headers with the right [span context](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format). (PR [#4712](https://github.com/Azure/azure-sdk-for-js/pull/4712)) + +## 1.0.0-preview.1 (2019-08-05) + +Provides low-level interfaces and helper methods for tracing in Azure SDK diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/LICENSE b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/README.md b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/README.md new file mode 100644 index 000000000..30aa19f1f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/README.md @@ -0,0 +1,90 @@ +# Azure Core tracing library for JavaScript + +This is the core tracing library that provides low-level interfaces and helper methods for tracing in Azure SDK JavaScript libraries which work in the browser and Node.js. + +## Getting started + +### Installation + +Install this library using npm as follows + +``` +npm install @azure/core-tracing +``` + +## Key Concepts + +The `@azure/core-tracing` package supports enabling tracing for Azure SDK packages, using an [OpenTelemetry](https://opentelemetry.io/) `Tracer`. If you are using [OpenCensus](https://opencensus.io/) instead, we provide an `OpenCensusTracerWrapper` that allows you to convert an OpenCensus `Tracer` into an OpenTelemetry `Tracer`. + +By default, all libraries log with a `NoOpTracer` that takes no action. +To change this, you have to use `setTracer` to set a new default `Tracer`. + +## Examples + +### Example 1 - Setting an OpenTelemetry Tracer + +```js +const opentelemetry = require("@opentelemetry/core"); +const { BasicTracer, SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin"); +const { setTracer } = require("@azure/core-tracing"); + +const exporter = new ZipkinExporter({ + serviceName: "azure-tracing-sample" +}); +const tracer = new BasicTracer(); +tracer.addSpanProcessor(new SimpleSpanProcessor(exporter)); + +opentelemetry.initGlobalTracer(tracer); + +const rootSpan = opentelemetry.getTracer().startSpan("root"); + +// Call some client library methods and pass rootSpan via tracingOptions. + +rootSpan.end(); +exporter.shutdown(); +``` + +### Example 2 - Setting an OpenCensus Tracer + +```js +const tracing = require("@opencensus/nodejs"); +const { ZipkinTraceExporter } = require("@opencensus/exporter-zipkin"); +const { + setTracer, + OpenCensusTracerWrapper, + OpenCensusSpanWrapper +} = require("@azure/core-tracing"); + +const tracer = tracing.start({ samplingRate: 1 }).tracer; + +tracer.registerSpanEventListener( + new ZipkinTraceExporter({ + serviceName: "azure-tracing-sample", + bufferTimeout: 2 + }) +); +setTracer(new OpenCensusTracerWrapper(tracer)); +tracer.startRootSpan({ name: "root" }, async (rootSpanEx) => { + const rootSpan = new OpenCensusSpanWrapper(rootSpanEx); + // Call some client library methods and pass rootSpan via tracingOptions. + rootSpanEx.end(); // rootSpan.end() should work as well +}); +``` + +### Example 3 - Passing parent Spans to library operations + +```js +// Given a BlobClient from @azure/storage-blob +const result = await blobClient.download(undefined, undefined, { + tracingOptions: { + spanOptions: { parent: rootSpan } + } +}); +``` + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-tracing%2FREADME.png) diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js new file mode 100644 index 000000000..7c5a6eb77 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export { getTracer, setTracer } from "./tracerProxy"; +// Tracers and wrappers +export { NoOpSpan } from "./tracers/noop/noOpSpan"; +export { NoOpTracer } from "./tracers/noop/noOpTracer"; +export { OpenCensusSpanWrapper } from "./tracers/opencensus/openCensusSpanWrapper"; +export { OpenCensusTracerWrapper } from "./tracers/opencensus/openCensusTracerWrapper"; +export { TestTracer } from "./tracers/test/testTracer"; +export { TestSpan } from "./tracers/test/testSpan"; +// Utilities +export { extractSpanContextFromTraceParentHeader, getTraceParentHeader } from "./utils/traceParentHeader"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js.map new file mode 100644 index 000000000..41250416a --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErD,uBAAuB;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,UAAU,EAA4B,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAQnD,YAAY;AACZ,OAAO,EACL,uCAAuC,EACvC,oBAAoB,EACrB,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport { getTracer, setTracer } from \"./tracerProxy\";\n\n// Tracers and wrappers\nexport { NoOpSpan } from \"./tracers/noop/noOpSpan\";\nexport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nexport { OpenCensusSpanWrapper } from \"./tracers/opencensus/openCensusSpanWrapper\";\nexport { OpenCensusTracerWrapper } from \"./tracers/opencensus/openCensusTracerWrapper\";\nexport { TestTracer, SpanGraph, SpanGraphNode } from \"./tracers/test/testTracer\";\nexport { TestSpan } from \"./tracers/test/testSpan\";\n\n// Shared interfaces\nexport { SpanContext, SpanOptions, TraceFlags } from \"./interfaces\";\n\n// OT interfaces\nexport { SpanContext as OTSpanContext, SpanOptions as OTSpanOptions } from \"@opentelemetry/api\";\n\n// Utilities\nexport {\n extractSpanContextFromTraceParentHeader,\n getTraceParentHeader\n} from \"./utils/traceParentHeader\";\n\n// OpenCensus Interfaces\nexport { Tracer as OpenCensusTracer, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nexport { OperationTracingOptions } from \"./interfaces\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js new file mode 100644 index 000000000..60d63a3d3 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map new file mode 100644 index 000000000..ba5a3b33b --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * Shorthand enum for common traceFlags values inside SpanContext\n */\nexport const enum TraceFlags {\n /** No flag set. */\n NONE = 0x0,\n /** Caller is collecting trace information. */\n SAMPLED = 0x1\n}\n\n/**\n * A light interface that tries to be structurally compatible with OpenTelemetry\n */\nexport interface SpanContext {\n /**\n * UUID of a trace.\n */\n traceId: string;\n /**\n * UUID of a Span.\n */\n spanId: string;\n /**\n * https://www.w3.org/TR/trace-context/#trace-flags\n */\n traceFlags: number;\n}\n\n/**\n * An interface that enables manual propagation of Spans\n */\nexport interface SpanOptions {\n /**\n * The SpanContext that refers to a parent span, if any.\n * A null value indicates that this should be a new root span,\n * rather than potentially detecting a span via a context manager.\n */\n parent?: SpanContext | null;\n /**\n * Attributes to set on the Span\n */\n attributes?: { [key: string]: unknown };\n}\n\n/**\n * Tracing options to set on an operation.\n */\nexport interface OperationTracingOptions {\n /**\n * OpenTelemetry SpanOptions used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js new file mode 100644 index 000000000..a06ea736e --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { NoOpTracer } from "./tracers/noop/noOpTracer"; +import { getCache } from "./utils/cache"; +var defaultTracer; +function getDefaultTracer() { + if (!defaultTracer) { + defaultTracer = new NoOpTracer(); + } + return defaultTracer; +} +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +export function setTracer(tracer) { + var cache = getCache(); + cache.tracer = tracer; +} +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +export function getTracer() { + var cache = getCache(); + if (!cache.tracer) { + return getDefaultTracer(); + } + return cache.tracer; +} +//# sourceMappingURL=tracerProxy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map new file mode 100644 index 000000000..c89308703 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracerProxy.js","sourceRoot":"","sources":["../../src/tracerProxy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,IAAI,aAAqB,CAAC;AAE1B,SAAS,gBAAgB;IACvB,IAAI,CAAC,aAAa,EAAE;QAClB,aAAa,GAAG,IAAI,UAAU,EAAE,CAAC;KAClC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,IAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS;IACvB,IAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,OAAO,gBAAgB,EAAE,CAAC;KAC3B;IACD,OAAO,KAAK,CAAC,MAAM,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getCache } from \"./utils/cache\";\n\nlet defaultTracer: Tracer;\n\nfunction getDefaultTracer(): Tracer {\n if (!defaultTracer) {\n defaultTracer = new NoOpTracer();\n }\n return defaultTracer;\n}\n\n/**\n * Sets the global tracer, enabling tracing for the Azure SDK.\n * @param tracer An OpenTelemetry Tracer instance.\n */\nexport function setTracer(tracer: Tracer) {\n const cache = getCache();\n cache.tracer = tracer;\n}\n\n/**\n * Retrieves the active tracer, or returns a\n * no-op implementation if one is not set.\n */\nexport function getTracer() {\n const cache = getCache();\n if (!cache.tracer) {\n return getDefaultTracer();\n }\n return cache.tracer;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js new file mode 100644 index 000000000..5e6775db5 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { TraceFlags } from "@opentelemetry/api"; +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +var NoOpSpan = /** @class */ (function () { + function NoOpSpan() { + } + /** + * Returns the SpanContext associated with this Span. + */ + NoOpSpan.prototype.context = function () { + return { + spanId: "", + traceId: "", + traceFlags: TraceFlags.NONE + }; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + NoOpSpan.prototype.end = function (_endTime) { + /* Noop */ + }; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + NoOpSpan.prototype.setAttribute = function (_key, _value) { + return this; + }; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + NoOpSpan.prototype.setAttributes = function (_attributes) { + return this; + }; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + NoOpSpan.prototype.addEvent = function (_name, _attributes) { + return this; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + NoOpSpan.prototype.setStatus = function (_status) { + return this; + }; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + NoOpSpan.prototype.updateName = function (_name) { + return this; + }; + /** + * Returns whether this span will be recorded + */ + NoOpSpan.prototype.isRecording = function () { + return false; + }; + return NoOpSpan; +}()); +export { NoOpSpan }; +//# sourceMappingURL=noOpSpan.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map new file mode 100644 index 000000000..ad1e84c3f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noOpSpan.js","sourceRoot":"","sources":["../../../../src/tracers/noop/noOpSpan.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAAyC,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvF;;GAEG;AACH;IAAA;IAqEA,CAAC;IApEC;;OAEG;IACH,0BAAO,GAAP;QACE,OAAO;YACL,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,UAAU,CAAC,IAAI;SAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,sBAAG,GAAH,UAAI,QAAiB;QACnB,UAAU;IACZ,CAAC;IAED;;;;OAIG;IACH,+BAAY,GAAZ,UAAa,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,gCAAa,GAAb,UAAc,WAAuB;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,2BAAQ,GAAR,UAAS,KAAa,EAAE,WAAwB;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,4BAAS,GAAT,UAAU,OAAe;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,6BAAU,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,8BAAW,GAAX;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IACH,eAAC;AAAD,CAAC,AArED,IAqEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Span, SpanContext, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Span that can safely be used without side-effects.\n */\nexport class NoOpSpan implements Span {\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return {\n spanId: \"\",\n traceId: \"\",\n traceFlags: TraceFlags.NONE\n };\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n /* Noop */\n }\n\n /**\n * Sets an attribute on the Span\n * @param _key the attribute key\n * @param _value the attribute value\n */\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param _attributes the attributes to add\n */\n setAttributes(_attributes: Attributes): this {\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param _name The name of the event\n * @param _attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n return this;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param _status The status to set.\n */\n setStatus(_status: Status): this {\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param _name the new Span name\n */\n updateName(_name: string): this {\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js new file mode 100644 index 000000000..82c40c823 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { NoOpSpan } from "./noOpSpan"; +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +var NoOpTracer = /** @class */ (function () { + function NoOpTracer() { + } + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + NoOpTracer.prototype.startSpan = function (_name, _options) { + return new NoOpSpan(); + }; + /** + * Returns the current Span from the current context, if available. + */ + NoOpTracer.prototype.getCurrentSpan = function () { + return new NoOpSpan(); + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + NoOpTracer.prototype.withSpan = function (_span, fn) { + return fn(); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + NoOpTracer.prototype.bind = function (target, _span) { + return target; + }; + return NoOpTracer; +}()); +export { NoOpTracer }; +//# sourceMappingURL=noOpTracer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map new file mode 100644 index 000000000..0532ae382 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noOpTracer.js","sourceRoot":"","sources":["../../../../src/tracers/noop/noOpTracer.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;GAGG;AACH;IAAA;IAkCA,CAAC;IAjCC;;;;OAIG;IACH,8BAAS,GAAT,UAAU,KAAa,EAAE,QAAsB;QAC7C,OAAO,IAAI,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,mCAAc,GAAd;QACE,OAAO,IAAI,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,6BAAQ,GAAR,UAA0D,KAAW,EAAE,EAAK;QAC1E,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,yBAAI,GAAJ,UAAQ,MAAS,EAAE,KAAY;QAC7B,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AAlCD,IAkCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { NoOpSpan } from \"./noOpSpan\";\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Tracer that can be used when tracing\n * is disabled.\n */\nexport class NoOpTracer implements Tracer {\n /**\n * Starts a new Span.\n * @param _name The name of the span.\n * @param _options The SpanOptions used during Span creation.\n */\n startSpan(_name: string, _options?: SpanOptions): Span {\n return new NoOpSpan();\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span {\n return new NoOpSpan();\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param fn The function to be executed.\n */\n withSpan ReturnType>(_span: Span, fn: T): ReturnType {\n return fn();\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(target: T, _span?: Span): T {\n return target;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js new file mode 100644 index 000000000..bf2e5e05b --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js @@ -0,0 +1,111 @@ +import { OpenCensusTraceStateWrapper } from "./openCensusTraceStateWrapper"; +function isWrappedSpan(span) { + return !!span && span.getWrappedSpan !== undefined; +} +function isTracer(tracerOrSpan) { + return tracerOrSpan.getWrappedTracer !== undefined; +} +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +var OpenCensusSpanWrapper = /** @class */ (function () { + function OpenCensusSpanWrapper(tracerOrSpan, name, options) { + if (name === void 0) { name = ""; } + if (options === void 0) { options = {}; } + if (isTracer(tracerOrSpan)) { + var parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined; + this._span = tracerOrSpan.getWrappedTracer().startChildSpan({ + name: name, + childOf: parent + }); + this._span.start(); + if (options.links) { + for (var _i = 0, _a = options.links; _i < _a.length; _i++) { + var link = _a[_i]; + // Since there is no way to set the link relationship, leave it as Unspecified. + this._span.addLink(link.context.traceId, link.context.spanId, 0 /* LinkType.UNSPECIFIED */, link.attributes); + } + } + } + else { + this._span = tracerOrSpan; + } + } + /** + * The underlying OpenCensus Span + */ + OpenCensusSpanWrapper.prototype.getWrappedSpan = function () { + return this._span; + }; + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + OpenCensusSpanWrapper.prototype.end = function (_endTime) { + this._span.end(); + }; + /** + * Returns the SpanContext associated with this Span. + */ + OpenCensusSpanWrapper.prototype.context = function () { + var openCensusSpanContext = this._span.spanContext; + return { + spanId: openCensusSpanContext.spanId, + traceId: openCensusSpanContext.traceId, + traceFlags: openCensusSpanContext.options, + traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState) + }; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + OpenCensusSpanWrapper.prototype.setAttribute = function (key, value) { + this._span.addAttribute(key, value); + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + OpenCensusSpanWrapper.prototype.setAttributes = function (attributes) { + this._span.attributes = attributes; + return this; + }; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + OpenCensusSpanWrapper.prototype.addEvent = function (_name, _attributes) { + throw new Error("Method not implemented."); + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + OpenCensusSpanWrapper.prototype.setStatus = function (status) { + this._span.setStatus(status.code, status.message); + return this; + }; + /** + * Updates the name of the Span + * @param name the new Span name + */ + OpenCensusSpanWrapper.prototype.updateName = function (name) { + this._span.name = name; + return this; + }; + /** + * Returns whether this span will be recorded + */ + OpenCensusSpanWrapper.prototype.isRecording = function () { + // NoRecordSpans have an empty traceId + return !!this._span.traceId; + }; + return OpenCensusSpanWrapper; +}()); +export { OpenCensusSpanWrapper }; +//# sourceMappingURL=openCensusSpanWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map new file mode 100644 index 000000000..a3f5276a1 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusSpanWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusSpanWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAI5E,SAAS,aAAa,CAAC,IAAgC;IACrD,OAAO,CAAC,CAAC,IAAI,IAAK,IAA8B,CAAC,cAAc,KAAK,SAAS,CAAC;AAChF,CAAC;AAED,SAAS,QAAQ,CACf,YAAsD;IAEtD,OAAQ,YAAwC,CAAC,gBAAgB,KAAK,SAAS,CAAC;AAClF,CAAC;AAED;;GAEG;AACH;IAsBE,+BACE,YAAsD,EACtD,IAAiB,EACjB,OAAyB;QADzB,qBAAA,EAAA,SAAiB;QACjB,wBAAA,EAAA,YAAyB;QAEzB,IAAI,QAAQ,CAAC,YAAY,CAAC,EA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C;IACJ,CAAC;IAED;;;;OAIG;IACH,4CAAY,GAAZ,UAAa,GAAW,EAAE,KAAc;QACtC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAY,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,6CAAa,GAAb,UAAc,UAAsB;QAClC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,UAAkC,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,wCAAQ,GAAR,UAAS,KAAa,EAAE,WAAwB;QAC9C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,yCAAS,GAAT,UAAU,MAAc;QACtB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,0CAAU,GAAV,UAAW,IAAY;QACrB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,2CAAW,GAAX;QACE,sCAAsC;QACtC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9B,CAAC;IACH,4BAAC;AAAD,CAAC,AA9HD,IA8HC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { SpanContext, Span, SpanOptions, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\nimport { OpenCensusTraceStateWrapper } from \"./openCensusTraceStateWrapper\";\nimport { OpenCensusTracerWrapper } from \"./openCensusTracerWrapper\";\nimport { Attributes as OpenCensusAttributes, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nfunction isWrappedSpan(span?: Span | SpanContext | null): span is OpenCensusSpanWrapper {\n return !!span && (span as OpenCensusSpanWrapper).getWrappedSpan !== undefined;\n}\n\nfunction isTracer(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan\n): tracerOrSpan is OpenCensusTracerWrapper {\n return (tracerOrSpan as OpenCensusTracerWrapper).getWrappedTracer !== undefined;\n}\n\n/**\n * An implementation of OpenTelemetry Span that wraps an OpenCensus Span.\n */\nexport class OpenCensusSpanWrapper implements Span {\n private _span: OpenCensusSpan;\n\n /**\n * The underlying OpenCensus Span\n */\n public getWrappedSpan() {\n return this._span;\n }\n\n /**\n * Wraps an existing OpenCensus Span\n * @param span A Span or RootSpan from OpenCensus\n */\n constructor(span: OpenCensusSpan);\n /**\n * Create a new OpenCensus Span and wrap it.\n * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper\n * @param name The name of the Span\n * @param options Options for the Span\n */\n constructor(tracer: OpenCensusTracerWrapper, name: string, options?: SpanOptions);\n constructor(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan,\n name: string = \"\",\n options: SpanOptions = {}\n ) {\n if (isTracer(tracerOrSpan)) {\n const parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined;\n this._span = tracerOrSpan.getWrappedTracer().startChildSpan({\n name,\n childOf: parent\n });\n this._span.start();\n if (options.links) {\n for (const link of options.links) {\n // Since there is no way to set the link relationship, leave it as Unspecified.\n this._span.addLink(\n link.context.traceId,\n link.context.spanId,\n 0 /* LinkType.UNSPECIFIED */,\n link.attributes as OpenCensusAttributes\n );\n }\n }\n } else {\n this._span = tracerOrSpan;\n }\n }\n\n /**\n * Marks the end of Span execution.\n * @param endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this._span.end();\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n const openCensusSpanContext = this._span.spanContext;\n\n return {\n spanId: openCensusSpanContext.spanId,\n traceId: openCensusSpanContext.traceId,\n traceFlags: openCensusSpanContext.options as TraceFlags,\n traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState)\n };\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this._span.addAttribute(key, value as any);\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n this._span.attributes = attributes as OpenCensusAttributes;\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param name The name of the event\n * @param attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this._span.setStatus(status.code, status.message);\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param name the new Span name\n */\n updateName(name: string): this {\n this._span.name = name;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n // NoRecordSpans have an empty traceId\n return !!this._span.traceId;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js new file mode 100644 index 000000000..d225bd11a --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * @ignore + * @internal + */ +var OpenCensusTraceStateWrapper = /** @class */ (function () { + function OpenCensusTraceStateWrapper(state) { + this._state = state; + } + OpenCensusTraceStateWrapper.prototype.get = function (_key) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.set = function (_key, _value) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.unset = function (_key) { + throw new Error("Method not implemented"); + }; + OpenCensusTraceStateWrapper.prototype.serialize = function () { + return this._state || ""; + }; + return OpenCensusTraceStateWrapper; +}()); +export { OpenCensusTraceStateWrapper }; +//# sourceMappingURL=openCensusTraceStateWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map new file mode 100644 index 000000000..8c1028b26 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusTraceStateWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusTraceStateWrapper.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAIlC;;;GAGG;AACH;IAGE,qCAAY,KAAc;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,yCAAG,GAAH,UAAI,IAAY;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,yCAAG,GAAH,UAAI,IAAY,EAAE,MAAc;QAC9B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,2CAAK,GAAL,UAAM,IAAY;QAChB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IAED,+CAAS,GAAT;QACE,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IAC3B,CAAC;IACH,kCAAC;AAAD,CAAC,AAtBD,IAsBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { TraceState } from \"@opentelemetry/api\";\n\n/**\n * @ignore\n * @internal\n */\nexport class OpenCensusTraceStateWrapper implements TraceState {\n private readonly _state?: string;\n\n constructor(state?: string) {\n this._state = state;\n }\n\n get(_key: string): string | undefined {\n throw new Error(\"Method not implemented.\");\n }\n\n set(_key: string, _value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n\n unset(_key: string): void {\n throw new Error(\"Method not implemented\");\n }\n\n serialize(): string {\n return this._state || \"\";\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js new file mode 100644 index 000000000..098b010a8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js @@ -0,0 +1,52 @@ +import { OpenCensusSpanWrapper } from "./openCensusSpanWrapper"; +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +var OpenCensusTracerWrapper = /** @class */ (function () { + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + function OpenCensusTracerWrapper(tracer) { + this._tracer = tracer; + } + /** + * The wrapped OpenCensus Tracer + */ + OpenCensusTracerWrapper.prototype.getWrappedTracer = function () { + return this._tracer; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + OpenCensusTracerWrapper.prototype.startSpan = function (name, options) { + return new OpenCensusSpanWrapper(this, name, options); + }; + /** + * Returns the current Span from the current context, if available. + */ + OpenCensusTracerWrapper.prototype.getCurrentSpan = function () { + return undefined; + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + OpenCensusTracerWrapper.prototype.withSpan = function (_span, _fn) { + throw new Error("Method not implemented."); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + OpenCensusTracerWrapper.prototype.bind = function (_target, _span) { + throw new Error("Method not implemented."); + }; + return OpenCensusTracerWrapper; +}()); +export { OpenCensusTracerWrapper }; +//# sourceMappingURL=openCensusTracerWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map new file mode 100644 index 000000000..d2600dcde --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusTracerWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusTracerWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH;IAUE;;;OAGG;IACH,iCAAmB,MAAwB;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAbD;;OAEG;IACI,kDAAgB,GAAvB;QACE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAUD;;;;OAIG;IACH,2CAAS,GAAT,UAAU,IAAY,EAAE,OAAqB;QAC3C,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,gDAAc,GAAd;QACE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,0CAAQ,GAAR,UAAoD,KAAW,EAAE,GAAM;QACrE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,sCAAI,GAAJ,UAAQ,OAAU,EAAE,KAAY;QAC9B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACH,8BAAC;AAAD,CAAC,AAnDD,IAmDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\nimport { OpenCensusSpanWrapper } from \"./openCensusSpanWrapper\";\nimport { TracerBase as OpenCensusTracer } from \"@opencensus/web-types\";\n\n/**\n * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer.\n */\nexport class OpenCensusTracerWrapper implements Tracer {\n private _tracer: OpenCensusTracer;\n\n /**\n * The wrapped OpenCensus Tracer\n */\n public getWrappedTracer() {\n return this._tracer;\n }\n\n /**\n * Create a new wrapper around a given OpenCensus Tracer.\n * @param tracer The OpenCensus Tracer to wrap.\n */\n public constructor(tracer: OpenCensusTracer) {\n this._tracer = tracer;\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options?: SpanOptions): Span {\n return new OpenCensusSpanWrapper(this, name, options);\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span | undefined {\n return undefined;\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param _fn The function to be executed.\n */\n withSpan unknown>(_span: Span, _fn: T): ReturnType {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(_target: T, _span?: Span): T {\n throw new Error(\"Method not implemented.\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js new file mode 100644 index 000000000..4191af782 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js @@ -0,0 +1,93 @@ +import { __extends } from "tslib"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { CanonicalCode } from "@opentelemetry/api"; +import { NoOpSpan } from "../noop/noOpSpan"; +/** + * A mock span useful for testing. + */ +var TestSpan = /** @class */ (function (_super) { + __extends(TestSpan, _super); + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + function TestSpan(parentTracer, name, context, kind, parentSpanId, startTime) { + if (startTime === void 0) { startTime = Date.now(); } + var _this = _super.call(this) || this; + _this._tracer = parentTracer; + _this.name = name; + _this.kind = kind; + _this.startTime = startTime; + _this.parentSpanId = parentSpanId; + _this.status = { + code: CanonicalCode.OK + }; + _this.endCalled = false; + _this._context = context; + _this.attributes = {}; + return _this; + } + /** + * Returns the Tracer that created this Span + */ + TestSpan.prototype.tracer = function () { + return this._tracer; + }; + /** + * Returns the SpanContext associated with this Span. + */ + TestSpan.prototype.context = function () { + return this._context; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + TestSpan.prototype.end = function (_endTime) { + this.endCalled = true; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + TestSpan.prototype.setStatus = function (status) { + this.status = status; + return this; + }; + /** + * Returns whether this span will be recorded + */ + TestSpan.prototype.isRecording = function () { + return true; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + TestSpan.prototype.setAttribute = function (key, value) { + this.attributes[key] = value; + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + TestSpan.prototype.setAttributes = function (attributes) { + for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) { + var key = _a[_i]; + this.attributes[key] = attributes[key]; + } + return this; + }; + return TestSpan; +}(NoOpSpan)); +export { TestSpan }; +//# sourceMappingURL=testSpan.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map new file mode 100644 index 000000000..f66d30685 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testSpan.js","sourceRoot":"","sources":["../../../../src/tracers/test/testSpan.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAML,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C;;GAEG;AACH;IAA8B,4BAAQ;IAuCpC;;;;;;;;OAQG;IACH,kBACE,YAAwB,EACxB,IAAY,EACZ,OAAoB,EACpB,IAAc,EACd,YAAqB,EACrB,SAAiC;QAAjC,0BAAA,EAAA,YAAuB,IAAI,CAAC,GAAG,EAAE;QANnC,YAQE,iBAAO,SAYR;QAXC,KAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAI,CAAC,MAAM,GAAG;YACZ,IAAI,EAAE,aAAa,CAAC,EAAE;SACvB,CAAC;QACF,KAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,UAAU,GAAG,EAAE,CAAC;;IACvB,CAAC;IAED;;OAEG;IACH,yBAAM,GAAN;QACE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,0BAAO,GAAP;QACE,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,sBAAG,GAAH,UAAI,QAAiB;QACnB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,4BAAS,GAAT,UAAU,MAAc;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,8BAAW,GAAX;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,+BAAY,GAAZ,UAAa,GAAW,EAAE,KAAc;QACtC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,gCAAa,GAAb,UAAc,UAAsB;QAClC,KAAkB,UAAuB,EAAvB,KAAA,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAvB,cAAuB,EAAvB,IAAuB,EAAE;YAAtC,IAAM,GAAG,SAAA;YACZ,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACH,eAAC;AAAD,CAAC,AAjID,CAA8B,QAAQ,GAiIrC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport {\n TimeInput,\n Tracer,\n SpanKind,\n Status,\n SpanContext,\n CanonicalCode,\n Attributes\n} from \"@opentelemetry/api\";\nimport { NoOpSpan } from \"../noop/noOpSpan\";\nimport { TestTracer } from \"./testTracer\";\n\n/**\n * A mock span useful for testing.\n */\nexport class TestSpan extends NoOpSpan {\n /**\n * The Span's current name\n */\n name: string;\n\n /**\n * The Span's current status\n */\n status: Status;\n\n /**\n * The Span's kind\n */\n kind: SpanKind;\n\n /**\n * True if end() has been called on the Span\n */\n endCalled: boolean;\n\n /**\n * The start time of the Span\n */\n readonly startTime: TimeInput;\n\n /**\n * The id of the parent Span, if any.\n */\n readonly parentSpanId?: string;\n\n /**\n * Known attributes, if any.\n */\n readonly attributes: Attributes;\n\n private _context: SpanContext;\n private readonly _tracer: Tracer;\n\n /**\n * Starts a new Span.\n * @param parentTracer The tracer that created this Span\n * @param name The name of the span.\n * @param context The SpanContext this span belongs to\n * @param kind The SpanKind of this Span\n * @param parentSpanId The identifier of the parent Span\n * @param startTime The startTime of the event (defaults to now)\n */\n constructor(\n parentTracer: TestTracer,\n name: string,\n context: SpanContext,\n kind: SpanKind,\n parentSpanId?: string,\n startTime: TimeInput = Date.now()\n ) {\n super();\n this._tracer = parentTracer;\n this.name = name;\n this.kind = kind;\n this.startTime = startTime;\n this.parentSpanId = parentSpanId;\n this.status = {\n code: CanonicalCode.OK\n };\n this.endCalled = false;\n this._context = context;\n this.attributes = {};\n }\n\n /**\n * Returns the Tracer that created this Span\n */\n tracer(): Tracer {\n return this._tracer;\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return this._context;\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this.endCalled = true;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this.status = status;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return true;\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this.attributes[key] = value;\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n for (const key of Object.keys(attributes)) {\n this.attributes[key] = attributes[key];\n }\n return this;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js new file mode 100644 index 000000000..b474b2619 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js @@ -0,0 +1,127 @@ +import { __extends } from "tslib"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { TestSpan } from "./testSpan"; +import { NoOpTracer } from "../noop/noOpTracer"; +import { SpanKind, TraceFlags } from "@opentelemetry/api"; +/** + * A mock tracer useful for testing + */ +var TestTracer = /** @class */ (function (_super) { + __extends(TestTracer, _super); + function TestTracer() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.traceIdCounter = 0; + _this.spanIdCounter = 0; + _this.rootSpans = []; + _this.knownSpans = []; + return _this; + } + TestTracer.prototype.getNextTraceId = function () { + this.traceIdCounter++; + return String(this.traceIdCounter); + }; + TestTracer.prototype.getNextSpanId = function () { + this.spanIdCounter++; + return String(this.spanIdCounter); + }; + /** + * Returns all Spans that were created without a parent + */ + TestTracer.prototype.getRootSpans = function () { + return this.rootSpans; + }; + /** + * Returns all Spans this Tracer knows about + */ + TestTracer.prototype.getKnownSpans = function () { + return this.knownSpans; + }; + /** + * Returns all Spans where end() has not been called + */ + TestTracer.prototype.getActiveSpans = function () { + return this.knownSpans.filter(function (span) { + return !span.endCalled; + }); + }; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + TestTracer.prototype.getSpanGraph = function (traceId) { + var traceSpans = this.knownSpans.filter(function (span) { + return span.context().traceId === traceId; + }); + var roots = []; + var nodeMap = new Map(); + for (var _i = 0, traceSpans_1 = traceSpans; _i < traceSpans_1.length; _i++) { + var span = traceSpans_1[_i]; + var spanId = span.context().spanId; + var node = { + name: span.name, + children: [] + }; + nodeMap.set(spanId, node); + if (span.parentSpanId) { + var parent = nodeMap.get(span.parentSpanId); + if (!parent) { + throw new Error("Span with name " + node.name + " has an unknown parentSpan with id " + span.parentSpanId); + } + parent.children.push(node); + } + else { + roots.push(node); + } + } + return { + roots: roots + }; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + TestTracer.prototype.startSpan = function (name, options) { + if (options === void 0) { options = {}; } + var parentContext = this._getParentContext(options); + var traceId; + var isRootSpan = false; + if (parentContext && parentContext.traceId) { + traceId = parentContext.traceId; + } + else { + traceId = this.getNextTraceId(); + isRootSpan = true; + } + var context = { + traceId: traceId, + spanId: this.getNextSpanId(), + traceFlags: TraceFlags.NONE + }; + var span = new TestSpan(this, name, context, options.kind || SpanKind.INTERNAL, parentContext ? parentContext.spanId : undefined, options.startTime); + this.knownSpans.push(span); + if (isRootSpan) { + this.rootSpans.push(span); + } + return span; + }; + TestTracer.prototype._getParentContext = function (options) { + var parent = options.parent; + var result; + if (parent) { + if ("traceId" in parent) { + result = parent; + } + else { + result = parent.context(); + } + } + return result; + }; + return TestTracer; +}(NoOpTracer)); +export { TestTracer }; +//# sourceMappingURL=testTracer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map new file mode 100644 index 000000000..05aa2fbba --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testTracer.js","sourceRoot":"","sources":["../../../../src/tracers/test/testTracer.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAe,QAAQ,EAAe,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4BpF;;GAEG;AACH;IAAgC,8BAAU;IAA1C;Q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AAa,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAChD,OAAO,CAAC,SAAS,CAClB,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sCAAiB,GAAzB,UAA0B,OAAoB;QAC5C,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,MAA+B,CAAC;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,SAAS,IAAI,MAAM,EAAE;gBACvB,MAAM,GAAG,MAAM,CAAC;aACjB;iBAAM;gBACL,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;aAC3B;SACF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AA/HD,CAAgC,UAAU,GA+HzC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { TestSpan } from \"./testSpan\";\nimport { NoOpTracer } from \"../noop/noOpTracer\";\nimport { SpanContext, SpanKind, SpanOptions, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * Simple representation of a Span that only has name and child relationships.\n * Children should be arranged in the order they were created.\n */\nexport interface SpanGraphNode {\n /**\n * The Span name\n */\n name: string;\n /**\n * All child Spans of this Span\n */\n children: SpanGraphNode[];\n}\n\n/**\n * Contains all the spans for a particular TraceID\n * starting at unparented roots\n */\nexport interface SpanGraph {\n /**\n * All Spans without a parentSpanId\n */\n roots: SpanGraphNode[];\n}\n\n/**\n * A mock tracer useful for testing\n */\nexport class TestTracer extends NoOpTracer {\n private traceIdCounter = 0;\n private getNextTraceId(): string {\n this.traceIdCounter++;\n return String(this.traceIdCounter);\n }\n\n private spanIdCounter = 0;\n private getNextSpanId(): string {\n this.spanIdCounter++;\n return String(this.spanIdCounter);\n }\n\n private rootSpans: TestSpan[] = [];\n private knownSpans: TestSpan[] = [];\n\n /**\n * Returns all Spans that were created without a parent\n */\n getRootSpans(): TestSpan[] {\n return this.rootSpans;\n }\n\n /**\n * Returns all Spans this Tracer knows about\n */\n getKnownSpans(): TestSpan[] {\n return this.knownSpans;\n }\n\n /**\n * Returns all Spans where end() has not been called\n */\n getActiveSpans(): TestSpan[] {\n return this.knownSpans.filter((span) => {\n return !span.endCalled;\n });\n }\n\n /**\n * Return all Spans for a particular trace, grouped by their\n * parent Span in a tree-like structure\n * @param traceId The traceId to return the graph for\n */\n getSpanGraph(traceId: string): SpanGraph {\n const traceSpans = this.knownSpans.filter((span) => {\n return span.context().traceId === traceId;\n });\n\n const roots: SpanGraphNode[] = [];\n const nodeMap: Map = new Map();\n\n for (const span of traceSpans) {\n const spanId = span.context().spanId;\n const node: SpanGraphNode = {\n name: span.name,\n children: []\n };\n nodeMap.set(spanId, node);\n if (span.parentSpanId) {\n const parent = nodeMap.get(span.parentSpanId);\n if (!parent) {\n throw new Error(\n `Span with name ${node.name} has an unknown parentSpan with id ${span.parentSpanId}`\n );\n }\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n return {\n roots\n };\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options: SpanOptions = {}): TestSpan {\n const parentContext = this._getParentContext(options);\n\n let traceId: string;\n let isRootSpan = false;\n\n if (parentContext && parentContext.traceId) {\n traceId = parentContext.traceId;\n } else {\n traceId = this.getNextTraceId();\n isRootSpan = true;\n }\n\n const context: SpanContext = {\n traceId,\n spanId: this.getNextSpanId(),\n traceFlags: TraceFlags.NONE\n };\n const span = new TestSpan(\n this,\n name,\n context,\n options.kind || SpanKind.INTERNAL,\n parentContext ? parentContext.spanId : undefined,\n options.startTime\n );\n this.knownSpans.push(span);\n if (isRootSpan) {\n this.rootSpans.push(span);\n }\n return span;\n }\n\n private _getParentContext(options: SpanOptions): SpanContext | undefined {\n const parent = options.parent;\n let result: SpanContext | undefined;\n if (parent) {\n if (\"traceId\" in parent) {\n result = parent;\n } else {\n result = parent.context();\n }\n }\n return result;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js new file mode 100644 index 000000000..ede8ac806 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { getGlobalObject } from "./global"; +// V1 = OpenTelemetry 0.1 +// V2 = OpenTelemetry 0.2 +// V3 = OpenTelemetry 0.6.1 +var GLOBAL_TRACER_VERSION = 3; +// preview5 shipped with @azure/core-tracing.tracerCache +// and didn't have smart detection for collisions +var GLOBAL_TRACER_SYMBOL = Symbol.for("@azure/core-tracing.tracerCache2"); +var cache; +function loadTracerCache() { + var globalObj = getGlobalObject(); + var existingCache = globalObj[GLOBAL_TRACER_SYMBOL]; + var setGlobalCache = true; + if (existingCache) { + if (existingCache.version === GLOBAL_TRACER_VERSION) { + cache = existingCache; + } + else { + setGlobalCache = false; + if (existingCache.tracer) { + throw new Error("Two incompatible versions of @azure/core-tracing have been loaded.\n This library is " + GLOBAL_TRACER_VERSION + ", existing is " + existingCache.version + "."); + } + } + } + if (!cache) { + cache = { + tracer: undefined, + version: GLOBAL_TRACER_VERSION + }; + } + if (setGlobalCache) { + globalObj[GLOBAL_TRACER_SYMBOL] = cache; + } +} +export function getCache() { + if (!cache) { + loadTracerCache(); + } + return cache; +} +//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map new file mode 100644 index 000000000..e482161a1 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/utils/cache.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,yBAAyB;AACzB,yBAAyB;AACzB,2BAA2B;AAC3B,IAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,wDAAwD;AACxD,iDAAiD;AACjD,IAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAO5E,IAAI,KAAkB,CAAC;AAEvB,SAAS,eAAe;IACtB,IAAM,SAAS,GAAG,eAAe,EAAE,CAAC;IACpC,IAAM,aAAa,GAAgB,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACnE,IAAI,cAAc,GAAG,IAAI,CAAC;IAC1B,IAAI,aAAa,EAAE;QACjB,IAAI,aAAa,CAAC,OAAO,KAAK,qBAAqB,EAAE;YACnD,KAAK,GAAG,aAAa,CAAC;SACvB;aAAM;YACL,cAAc,GAAG,KAAK,CAAC;YACvB,IAAI,aAAa,CAAC,MAAM,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,mGACkB,qBAAqB,sBAAiB,aAAa,CAAC,OAAO,MAAG,CACjF,CAAC;aACH;SACF;KACF;IAED,IAAI,CAAC,KAAK,EAAE;QACV,KAAK,GAAG;YACN,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,qBAAqB;SAC/B,CAAC;KACH;IACD,IAAI,cAAc,EAAE;QAClB,SAAS,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC;KACzC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,IAAI,CAAC,KAAK,EAAE;QACV,eAAe,EAAE,CAAC;KACnB;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getGlobalObject } from \"./global\";\n\n// V1 = OpenTelemetry 0.1\n// V2 = OpenTelemetry 0.2\n// V3 = OpenTelemetry 0.6.1\nconst GLOBAL_TRACER_VERSION = 3;\n// preview5 shipped with @azure/core-tracing.tracerCache\n// and didn't have smart detection for collisions\nconst GLOBAL_TRACER_SYMBOL = Symbol.for(\"@azure/core-tracing.tracerCache2\");\n\nexport interface TracerCache {\n version: number;\n tracer?: Tracer;\n}\n\nlet cache: TracerCache;\n\nfunction loadTracerCache(): void {\n const globalObj = getGlobalObject();\n const existingCache: TracerCache = globalObj[GLOBAL_TRACER_SYMBOL];\n let setGlobalCache = true;\n if (existingCache) {\n if (existingCache.version === GLOBAL_TRACER_VERSION) {\n cache = existingCache;\n } else {\n setGlobalCache = false;\n if (existingCache.tracer) {\n throw new Error(\n `Two incompatible versions of @azure/core-tracing have been loaded.\n This library is ${GLOBAL_TRACER_VERSION}, existing is ${existingCache.version}.`\n );\n }\n }\n }\n\n if (!cache) {\n cache = {\n tracer: undefined,\n version: GLOBAL_TRACER_VERSION\n };\n }\n if (setGlobalCache) {\n globalObj[GLOBAL_TRACER_SYMBOL] = cache;\n }\n}\n\nexport function getCache(): TracerCache {\n if (!cache) {\n loadTracerCache();\n }\n return cache;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js new file mode 100644 index 000000000..f15f4dbd8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export function getGlobalObject() { + return self; +} +//# sourceMappingURL=global.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map new file mode 100644 index 000000000..c7924aceb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.browser.js","sourceRoot":"","sources":["../../../src/utils/global.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport function getGlobalObject(): any {\n return self;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js new file mode 100644 index 000000000..134df60a7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export function getGlobalObject() { + return global; +} +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map new file mode 100644 index 000000000..37929ce7d --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/utils/global.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,MAAM,UAAU,eAAe;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport function getGlobalObject(): any {\n return global;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js new file mode 100644 index 000000000..d893e779f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +var VERSION = "00"; +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +export function extractSpanContextFromTraceParentHeader(traceParentHeader) { + var parts = traceParentHeader.split("-"); + if (parts.length !== 4) { + return; + } + var version = parts[0], traceId = parts[1], spanId = parts[2], traceOptions = parts[3]; + if (version !== VERSION) { + return; + } + var traceFlags = parseInt(traceOptions, 16); + var spanContext = { + spanId: spanId, + traceId: traceId, + traceFlags: traceFlags + }; + return spanContext; +} +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +export function getTraceParentHeader(spanContext) { + var missingFields = []; + if (!spanContext.traceId) { + missingFields.push("traceId"); + } + if (!spanContext.spanId) { + missingFields.push("spanId"); + } + if (missingFields.length) { + return; + } + var flags = spanContext.traceFlags || 0 /* NONE */; + var hexFlags = flags.toString(16); + var traceFlags = hexFlags.length === 1 ? "0" + hexFlags : hexFlags; + // https://www.w3.org/TR/trace-context/#traceparent-header-field-values + return VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-" + traceFlags; +} +//# sourceMappingURL=traceParentHeader.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map new file mode 100644 index 000000000..7f0d3e68c --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"traceParentHeader.js","sourceRoot":"","sources":["../../../src/utils/traceParentHeader.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAIlC,IAAM,OAAO,GAAG,IAAI,CAAC;AAErB;;;;GAIG;AACH,MAAM,UAAU,uCAAuC,CACrD,iBAAyB;IAEzB,IAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE3C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO;KACR;IAEM,IAAA,kBAAO,EAAE,kBAAO,EAAE,iBAAM,EAAE,uBAAY,CAAU;IAEvD,IAAI,OAAO,KAAK,OAAO,EAAE;QACvB,OAAO;KACR;IAED,IAAM,UAAU,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE9C,IAAM,WAAW,GAAgB;QAC/B,MAAM,QAAA;QACN,OAAO,SAAA;QACP,UAAU,YAAA;KACX,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAwB;IAC3D,IAAM,aAAa,GAAa,EAAE,CAAC;IACnC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;QACxB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC/B;IACD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;QACvB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC9B;IAED,IAAI,aAAa,CAAC,MAAM,EAAE;QACxB,OAAO;KACR;IAED,IAAM,KAAK,GAAG,WAAW,CAAC,UAAU,gBAAmB,CAAC;IACxD,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACpC,IAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAI,QAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;IAErE,uEAAuE;IACvE,OAAU,OAAO,SAAI,WAAW,CAAC,OAAO,SAAI,WAAW,CAAC,MAAM,SAAI,UAAY,CAAC;AACjF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { SpanContext, TraceFlags } from \"../interfaces\";\n\nconst VERSION = \"00\";\n\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nexport function extractSpanContextFromTraceParentHeader(\n traceParentHeader: string\n): SpanContext | undefined {\n const parts = traceParentHeader.split(\"-\");\n\n if (parts.length !== 4) {\n return;\n }\n\n const [version, traceId, spanId, traceOptions] = parts;\n\n if (version !== VERSION) {\n return;\n }\n\n const traceFlags = parseInt(traceOptions, 16);\n\n const spanContext: SpanContext = {\n spanId,\n traceId,\n traceFlags\n };\n\n return spanContext;\n}\n\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nexport function getTraceParentHeader(spanContext: SpanContext): string | undefined {\n const missingFields: string[] = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n\n if (missingFields.length) {\n return;\n }\n\n const flags = spanContext.traceFlags || TraceFlags.NONE;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js new file mode 100644 index 000000000..e84eeaf92 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js @@ -0,0 +1,644 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var api = require('@opentelemetry/api'); +var tslib = require('tslib'); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +var NoOpSpan = /** @class */ (function () { + function NoOpSpan() { + } + /** + * Returns the SpanContext associated with this Span. + */ + NoOpSpan.prototype.context = function () { + return { + spanId: "", + traceId: "", + traceFlags: api.TraceFlags.NONE + }; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + NoOpSpan.prototype.end = function (_endTime) { + /* Noop */ + }; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + NoOpSpan.prototype.setAttribute = function (_key, _value) { + return this; + }; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + NoOpSpan.prototype.setAttributes = function (_attributes) { + return this; + }; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + NoOpSpan.prototype.addEvent = function (_name, _attributes) { + return this; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + NoOpSpan.prototype.setStatus = function (_status) { + return this; + }; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + NoOpSpan.prototype.updateName = function (_name) { + return this; + }; + /** + * Returns whether this span will be recorded + */ + NoOpSpan.prototype.isRecording = function () { + return false; + }; + return NoOpSpan; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +var NoOpTracer = /** @class */ (function () { + function NoOpTracer() { + } + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + NoOpTracer.prototype.startSpan = function (_name, _options) { + return new NoOpSpan(); + }; + /** + * Returns the current Span from the current context, if available. + */ + NoOpTracer.prototype.getCurrentSpan = function () { + return new NoOpSpan(); + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + NoOpTracer.prototype.withSpan = function (_span, fn) { + return fn(); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + NoOpTracer.prototype.bind = function (target, _span) { + return target; + }; + return NoOpTracer; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +function getGlobalObject() { + return global; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +// V1 = OpenTelemetry 0.1 +// V2 = OpenTelemetry 0.2 +// V3 = OpenTelemetry 0.6.1 +var GLOBAL_TRACER_VERSION = 3; +// preview5 shipped with @azure/core-tracing.tracerCache +// and didn't have smart detection for collisions +var GLOBAL_TRACER_SYMBOL = Symbol.for("@azure/core-tracing.tracerCache2"); +var cache; +function loadTracerCache() { + var globalObj = getGlobalObject(); + var existingCache = globalObj[GLOBAL_TRACER_SYMBOL]; + var setGlobalCache = true; + if (existingCache) { + if (existingCache.version === GLOBAL_TRACER_VERSION) { + cache = existingCache; + } + else { + setGlobalCache = false; + if (existingCache.tracer) { + throw new Error("Two incompatible versions of @azure/core-tracing have been loaded.\n This library is " + GLOBAL_TRACER_VERSION + ", existing is " + existingCache.version + "."); + } + } + } + if (!cache) { + cache = { + tracer: undefined, + version: GLOBAL_TRACER_VERSION + }; + } + if (setGlobalCache) { + globalObj[GLOBAL_TRACER_SYMBOL] = cache; + } +} +function getCache() { + if (!cache) { + loadTracerCache(); + } + return cache; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var defaultTracer; +function getDefaultTracer() { + if (!defaultTracer) { + defaultTracer = new NoOpTracer(); + } + return defaultTracer; +} +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +function setTracer(tracer) { + var cache = getCache(); + cache.tracer = tracer; +} +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +function getTracer() { + var cache = getCache(); + if (!cache.tracer) { + return getDefaultTracer(); + } + return cache.tracer; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * @ignore + * @internal + */ +var OpenCensusTraceStateWrapper = /** @class */ (function () { + function OpenCensusTraceStateWrapper(state) { + this._state = state; + } + OpenCensusTraceStateWrapper.prototype.get = function (_key) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.set = function (_key, _value) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.unset = function (_key) { + throw new Error("Method not implemented"); + }; + OpenCensusTraceStateWrapper.prototype.serialize = function () { + return this._state || ""; + }; + return OpenCensusTraceStateWrapper; +}()); + +function isWrappedSpan(span) { + return !!span && span.getWrappedSpan !== undefined; +} +function isTracer(tracerOrSpan) { + return tracerOrSpan.getWrappedTracer !== undefined; +} +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +var OpenCensusSpanWrapper = /** @class */ (function () { + function OpenCensusSpanWrapper(tracerOrSpan, name, options) { + if (name === void 0) { name = ""; } + if (options === void 0) { options = {}; } + if (isTracer(tracerOrSpan)) { + var parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined; + this._span = tracerOrSpan.getWrappedTracer().startChildSpan({ + name: name, + childOf: parent + }); + this._span.start(); + if (options.links) { + for (var _i = 0, _a = options.links; _i < _a.length; _i++) { + var link = _a[_i]; + // Since there is no way to set the link relationship, leave it as Unspecified. + this._span.addLink(link.context.traceId, link.context.spanId, 0 /* LinkType.UNSPECIFIED */, link.attributes); + } + } + } + else { + this._span = tracerOrSpan; + } + } + /** + * The underlying OpenCensus Span + */ + OpenCensusSpanWrapper.prototype.getWrappedSpan = function () { + return this._span; + }; + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + OpenCensusSpanWrapper.prototype.end = function (_endTime) { + this._span.end(); + }; + /** + * Returns the SpanContext associated with this Span. + */ + OpenCensusSpanWrapper.prototype.context = function () { + var openCensusSpanContext = this._span.spanContext; + return { + spanId: openCensusSpanContext.spanId, + traceId: openCensusSpanContext.traceId, + traceFlags: openCensusSpanContext.options, + traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState) + }; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + OpenCensusSpanWrapper.prototype.setAttribute = function (key, value) { + this._span.addAttribute(key, value); + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + OpenCensusSpanWrapper.prototype.setAttributes = function (attributes) { + this._span.attributes = attributes; + return this; + }; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + OpenCensusSpanWrapper.prototype.addEvent = function (_name, _attributes) { + throw new Error("Method not implemented."); + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + OpenCensusSpanWrapper.prototype.setStatus = function (status) { + this._span.setStatus(status.code, status.message); + return this; + }; + /** + * Updates the name of the Span + * @param name the new Span name + */ + OpenCensusSpanWrapper.prototype.updateName = function (name) { + this._span.name = name; + return this; + }; + /** + * Returns whether this span will be recorded + */ + OpenCensusSpanWrapper.prototype.isRecording = function () { + // NoRecordSpans have an empty traceId + return !!this._span.traceId; + }; + return OpenCensusSpanWrapper; +}()); + +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +var OpenCensusTracerWrapper = /** @class */ (function () { + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + function OpenCensusTracerWrapper(tracer) { + this._tracer = tracer; + } + /** + * The wrapped OpenCensus Tracer + */ + OpenCensusTracerWrapper.prototype.getWrappedTracer = function () { + return this._tracer; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + OpenCensusTracerWrapper.prototype.startSpan = function (name, options) { + return new OpenCensusSpanWrapper(this, name, options); + }; + /** + * Returns the current Span from the current context, if available. + */ + OpenCensusTracerWrapper.prototype.getCurrentSpan = function () { + return undefined; + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + OpenCensusTracerWrapper.prototype.withSpan = function (_span, _fn) { + throw new Error("Method not implemented."); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + OpenCensusTracerWrapper.prototype.bind = function (_target, _span) { + throw new Error("Method not implemented."); + }; + return OpenCensusTracerWrapper; +}()); + +/** + * A mock span useful for testing. + */ +var TestSpan = /** @class */ (function (_super) { + tslib.__extends(TestSpan, _super); + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + function TestSpan(parentTracer, name, context, kind, parentSpanId, startTime) { + if (startTime === void 0) { startTime = Date.now(); } + var _this = _super.call(this) || this; + _this._tracer = parentTracer; + _this.name = name; + _this.kind = kind; + _this.startTime = startTime; + _this.parentSpanId = parentSpanId; + _this.status = { + code: api.CanonicalCode.OK + }; + _this.endCalled = false; + _this._context = context; + _this.attributes = {}; + return _this; + } + /** + * Returns the Tracer that created this Span + */ + TestSpan.prototype.tracer = function () { + return this._tracer; + }; + /** + * Returns the SpanContext associated with this Span. + */ + TestSpan.prototype.context = function () { + return this._context; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + TestSpan.prototype.end = function (_endTime) { + this.endCalled = true; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + TestSpan.prototype.setStatus = function (status) { + this.status = status; + return this; + }; + /** + * Returns whether this span will be recorded + */ + TestSpan.prototype.isRecording = function () { + return true; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + TestSpan.prototype.setAttribute = function (key, value) { + this.attributes[key] = value; + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + TestSpan.prototype.setAttributes = function (attributes) { + for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) { + var key = _a[_i]; + this.attributes[key] = attributes[key]; + } + return this; + }; + return TestSpan; +}(NoOpSpan)); + +/** + * A mock tracer useful for testing + */ +var TestTracer = /** @class */ (function (_super) { + tslib.__extends(TestTracer, _super); + function TestTracer() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.traceIdCounter = 0; + _this.spanIdCounter = 0; + _this.rootSpans = []; + _this.knownSpans = []; + return _this; + } + TestTracer.prototype.getNextTraceId = function () { + this.traceIdCounter++; + return String(this.traceIdCounter); + }; + TestTracer.prototype.getNextSpanId = function () { + this.spanIdCounter++; + return String(this.spanIdCounter); + }; + /** + * Returns all Spans that were created without a parent + */ + TestTracer.prototype.getRootSpans = function () { + return this.rootSpans; + }; + /** + * Returns all Spans this Tracer knows about + */ + TestTracer.prototype.getKnownSpans = function () { + return this.knownSpans; + }; + /** + * Returns all Spans where end() has not been called + */ + TestTracer.prototype.getActiveSpans = function () { + return this.knownSpans.filter(function (span) { + return !span.endCalled; + }); + }; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + TestTracer.prototype.getSpanGraph = function (traceId) { + var traceSpans = this.knownSpans.filter(function (span) { + return span.context().traceId === traceId; + }); + var roots = []; + var nodeMap = new Map(); + for (var _i = 0, traceSpans_1 = traceSpans; _i < traceSpans_1.length; _i++) { + var span = traceSpans_1[_i]; + var spanId = span.context().spanId; + var node = { + name: span.name, + children: [] + }; + nodeMap.set(spanId, node); + if (span.parentSpanId) { + var parent = nodeMap.get(span.parentSpanId); + if (!parent) { + throw new Error("Span with name " + node.name + " has an unknown parentSpan with id " + span.parentSpanId); + } + parent.children.push(node); + } + else { + roots.push(node); + } + } + return { + roots: roots + }; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + TestTracer.prototype.startSpan = function (name, options) { + if (options === void 0) { options = {}; } + var parentContext = this._getParentContext(options); + var traceId; + var isRootSpan = false; + if (parentContext && parentContext.traceId) { + traceId = parentContext.traceId; + } + else { + traceId = this.getNextTraceId(); + isRootSpan = true; + } + var context = { + traceId: traceId, + spanId: this.getNextSpanId(), + traceFlags: api.TraceFlags.NONE + }; + var span = new TestSpan(this, name, context, options.kind || api.SpanKind.INTERNAL, parentContext ? parentContext.spanId : undefined, options.startTime); + this.knownSpans.push(span); + if (isRootSpan) { + this.rootSpans.push(span); + } + return span; + }; + TestTracer.prototype._getParentContext = function (options) { + var parent = options.parent; + var result; + if (parent) { + if ("traceId" in parent) { + result = parent; + } + else { + result = parent.context(); + } + } + return result; + }; + return TestTracer; +}(NoOpTracer)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +var VERSION = "00"; +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +function extractSpanContextFromTraceParentHeader(traceParentHeader) { + var parts = traceParentHeader.split("-"); + if (parts.length !== 4) { + return; + } + var version = parts[0], traceId = parts[1], spanId = parts[2], traceOptions = parts[3]; + if (version !== VERSION) { + return; + } + var traceFlags = parseInt(traceOptions, 16); + var spanContext = { + spanId: spanId, + traceId: traceId, + traceFlags: traceFlags + }; + return spanContext; +} +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +function getTraceParentHeader(spanContext) { + var missingFields = []; + if (!spanContext.traceId) { + missingFields.push("traceId"); + } + if (!spanContext.spanId) { + missingFields.push("spanId"); + } + if (missingFields.length) { + return; + } + var flags = spanContext.traceFlags || 0 /* NONE */; + var hexFlags = flags.toString(16); + var traceFlags = hexFlags.length === 1 ? "0" + hexFlags : hexFlags; + // https://www.w3.org/TR/trace-context/#traceparent-header-field-values + return VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-" + traceFlags; +} + +exports.NoOpSpan = NoOpSpan; +exports.NoOpTracer = NoOpTracer; +exports.OpenCensusSpanWrapper = OpenCensusSpanWrapper; +exports.OpenCensusTracerWrapper = OpenCensusTracerWrapper; +exports.TestSpan = TestSpan; +exports.TestTracer = TestTracer; +exports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader; +exports.getTraceParentHeader = getTraceParentHeader; +exports.getTracer = getTracer; +exports.setTracer = setTracer; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js.map b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js.map new file mode 100644 index 000000000..7ccf186ca --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/tracers/noop/noOpSpan.ts","../src/tracers/noop/noOpTracer.ts","../src/utils/global.ts","../src/utils/cache.ts","../src/tracerProxy.ts","../src/tracers/opencensus/openCensusTraceStateWrapper.ts","../src/tracers/opencensus/openCensusSpanWrapper.ts","../src/tracers/opencensus/openCensusTracerWrapper.ts","../src/tracers/test/testSpan.ts","../src/tracers/test/testTracer.ts","../src/utils/traceParentHeader.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Span, SpanContext, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Span that can safely be used without side-effects.\n */\nexport class NoOpSpan implements Span {\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return {\n spanId: \"\",\n traceId: \"\",\n traceFlags: TraceFlags.NONE\n };\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n /* Noop */\n }\n\n /**\n * Sets an attribute on the Span\n * @param _key the attribute key\n * @param _value the attribute value\n */\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param _attributes the attributes to add\n */\n setAttributes(_attributes: Attributes): this {\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param _name The name of the event\n * @param _attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n return this;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param _status The status to set.\n */\n setStatus(_status: Status): this {\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param _name the new Span name\n */\n updateName(_name: string): this {\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return false;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { NoOpSpan } from \"./noOpSpan\";\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Tracer that can be used when tracing\n * is disabled.\n */\nexport class NoOpTracer implements Tracer {\n /**\n * Starts a new Span.\n * @param _name The name of the span.\n * @param _options The SpanOptions used during Span creation.\n */\n startSpan(_name: string, _options?: SpanOptions): Span {\n return new NoOpSpan();\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span {\n return new NoOpSpan();\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param fn The function to be executed.\n */\n withSpan ReturnType>(_span: Span, fn: T): ReturnType {\n return fn();\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(target: T, _span?: Span): T {\n return target;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport function getGlobalObject(): any {\n return global;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getGlobalObject } from \"./global\";\n\n// V1 = OpenTelemetry 0.1\n// V2 = OpenTelemetry 0.2\n// V3 = OpenTelemetry 0.6.1\nconst GLOBAL_TRACER_VERSION = 3;\n// preview5 shipped with @azure/core-tracing.tracerCache\n// and didn't have smart detection for collisions\nconst GLOBAL_TRACER_SYMBOL = Symbol.for(\"@azure/core-tracing.tracerCache2\");\n\nexport interface TracerCache {\n version: number;\n tracer?: Tracer;\n}\n\nlet cache: TracerCache;\n\nfunction loadTracerCache(): void {\n const globalObj = getGlobalObject();\n const existingCache: TracerCache = globalObj[GLOBAL_TRACER_SYMBOL];\n let setGlobalCache = true;\n if (existingCache) {\n if (existingCache.version === GLOBAL_TRACER_VERSION) {\n cache = existingCache;\n } else {\n setGlobalCache = false;\n if (existingCache.tracer) {\n throw new Error(\n `Two incompatible versions of @azure/core-tracing have been loaded.\n This library is ${GLOBAL_TRACER_VERSION}, existing is ${existingCache.version}.`\n );\n }\n }\n }\n\n if (!cache) {\n cache = {\n tracer: undefined,\n version: GLOBAL_TRACER_VERSION\n };\n }\n if (setGlobalCache) {\n globalObj[GLOBAL_TRACER_SYMBOL] = cache;\n }\n}\n\nexport function getCache(): TracerCache {\n if (!cache) {\n loadTracerCache();\n }\n return cache;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getCache } from \"./utils/cache\";\n\nlet defaultTracer: Tracer;\n\nfunction getDefaultTracer(): Tracer {\n if (!defaultTracer) {\n defaultTracer = new NoOpTracer();\n }\n return defaultTracer;\n}\n\n/**\n * Sets the global tracer, enabling tracing for the Azure SDK.\n * @param tracer An OpenTelemetry Tracer instance.\n */\nexport function setTracer(tracer: Tracer) {\n const cache = getCache();\n cache.tracer = tracer;\n}\n\n/**\n * Retrieves the active tracer, or returns a\n * no-op implementation if one is not set.\n */\nexport function getTracer() {\n const cache = getCache();\n if (!cache.tracer) {\n return getDefaultTracer();\n }\n return cache.tracer;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { TraceState } from \"@opentelemetry/api\";\n\n/**\n * @ignore\n * @internal\n */\nexport class OpenCensusTraceStateWrapper implements TraceState {\n private readonly _state?: string;\n\n constructor(state?: string) {\n this._state = state;\n }\n\n get(_key: string): string | undefined {\n throw new Error(\"Method not implemented.\");\n }\n\n set(_key: string, _value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n\n unset(_key: string): void {\n throw new Error(\"Method not implemented\");\n }\n\n serialize(): string {\n return this._state || \"\";\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { SpanContext, Span, SpanOptions, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\nimport { OpenCensusTraceStateWrapper } from \"./openCensusTraceStateWrapper\";\nimport { OpenCensusTracerWrapper } from \"./openCensusTracerWrapper\";\nimport { Attributes as OpenCensusAttributes, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nfunction isWrappedSpan(span?: Span | SpanContext | null): span is OpenCensusSpanWrapper {\n return !!span && (span as OpenCensusSpanWrapper).getWrappedSpan !== undefined;\n}\n\nfunction isTracer(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan\n): tracerOrSpan is OpenCensusTracerWrapper {\n return (tracerOrSpan as OpenCensusTracerWrapper).getWrappedTracer !== undefined;\n}\n\n/**\n * An implementation of OpenTelemetry Span that wraps an OpenCensus Span.\n */\nexport class OpenCensusSpanWrapper implements Span {\n private _span: OpenCensusSpan;\n\n /**\n * The underlying OpenCensus Span\n */\n public getWrappedSpan() {\n return this._span;\n }\n\n /**\n * Wraps an existing OpenCensus Span\n * @param span A Span or RootSpan from OpenCensus\n */\n constructor(span: OpenCensusSpan);\n /**\n * Create a new OpenCensus Span and wrap it.\n * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper\n * @param name The name of the Span\n * @param options Options for the Span\n */\n constructor(tracer: OpenCensusTracerWrapper, name: string, options?: SpanOptions);\n constructor(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan,\n name: string = \"\",\n options: SpanOptions = {}\n ) {\n if (isTracer(tracerOrSpan)) {\n const parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined;\n this._span = tracerOrSpan.getWrappedTracer().startChildSpan({\n name,\n childOf: parent\n });\n this._span.start();\n if (options.links) {\n for (const link of options.links) {\n // Since there is no way to set the link relationship, leave it as Unspecified.\n this._span.addLink(\n link.context.traceId,\n link.context.spanId,\n 0 /* LinkType.UNSPECIFIED */,\n link.attributes as OpenCensusAttributes\n );\n }\n }\n } else {\n this._span = tracerOrSpan;\n }\n }\n\n /**\n * Marks the end of Span execution.\n * @param endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this._span.end();\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n const openCensusSpanContext = this._span.spanContext;\n\n return {\n spanId: openCensusSpanContext.spanId,\n traceId: openCensusSpanContext.traceId,\n traceFlags: openCensusSpanContext.options as TraceFlags,\n traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState)\n };\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this._span.addAttribute(key, value as any);\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n this._span.attributes = attributes as OpenCensusAttributes;\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param name The name of the event\n * @param attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this._span.setStatus(status.code, status.message);\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param name the new Span name\n */\n updateName(name: string): this {\n this._span.name = name;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n // NoRecordSpans have an empty traceId\n return !!this._span.traceId;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\nimport { OpenCensusSpanWrapper } from \"./openCensusSpanWrapper\";\nimport { TracerBase as OpenCensusTracer } from \"@opencensus/web-types\";\n\n/**\n * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer.\n */\nexport class OpenCensusTracerWrapper implements Tracer {\n private _tracer: OpenCensusTracer;\n\n /**\n * The wrapped OpenCensus Tracer\n */\n public getWrappedTracer() {\n return this._tracer;\n }\n\n /**\n * Create a new wrapper around a given OpenCensus Tracer.\n * @param tracer The OpenCensus Tracer to wrap.\n */\n public constructor(tracer: OpenCensusTracer) {\n this._tracer = tracer;\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options?: SpanOptions): Span {\n return new OpenCensusSpanWrapper(this, name, options);\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span | undefined {\n return undefined;\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param _fn The function to be executed.\n */\n withSpan unknown>(_span: Span, _fn: T): ReturnType {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(_target: T, _span?: Span): T {\n throw new Error(\"Method not implemented.\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport {\n TimeInput,\n Tracer,\n SpanKind,\n Status,\n SpanContext,\n CanonicalCode,\n Attributes\n} from \"@opentelemetry/api\";\nimport { NoOpSpan } from \"../noop/noOpSpan\";\nimport { TestTracer } from \"./testTracer\";\n\n/**\n * A mock span useful for testing.\n */\nexport class TestSpan extends NoOpSpan {\n /**\n * The Span's current name\n */\n name: string;\n\n /**\n * The Span's current status\n */\n status: Status;\n\n /**\n * The Span's kind\n */\n kind: SpanKind;\n\n /**\n * True if end() has been called on the Span\n */\n endCalled: boolean;\n\n /**\n * The start time of the Span\n */\n readonly startTime: TimeInput;\n\n /**\n * The id of the parent Span, if any.\n */\n readonly parentSpanId?: string;\n\n /**\n * Known attributes, if any.\n */\n readonly attributes: Attributes;\n\n private _context: SpanContext;\n private readonly _tracer: Tracer;\n\n /**\n * Starts a new Span.\n * @param parentTracer The tracer that created this Span\n * @param name The name of the span.\n * @param context The SpanContext this span belongs to\n * @param kind The SpanKind of this Span\n * @param parentSpanId The identifier of the parent Span\n * @param startTime The startTime of the event (defaults to now)\n */\n constructor(\n parentTracer: TestTracer,\n name: string,\n context: SpanContext,\n kind: SpanKind,\n parentSpanId?: string,\n startTime: TimeInput = Date.now()\n ) {\n super();\n this._tracer = parentTracer;\n this.name = name;\n this.kind = kind;\n this.startTime = startTime;\n this.parentSpanId = parentSpanId;\n this.status = {\n code: CanonicalCode.OK\n };\n this.endCalled = false;\n this._context = context;\n this.attributes = {};\n }\n\n /**\n * Returns the Tracer that created this Span\n */\n tracer(): Tracer {\n return this._tracer;\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return this._context;\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this.endCalled = true;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this.status = status;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return true;\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this.attributes[key] = value;\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n for (const key of Object.keys(attributes)) {\n this.attributes[key] = attributes[key];\n }\n return this;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { TestSpan } from \"./testSpan\";\nimport { NoOpTracer } from \"../noop/noOpTracer\";\nimport { SpanContext, SpanKind, SpanOptions, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * Simple representation of a Span that only has name and child relationships.\n * Children should be arranged in the order they were created.\n */\nexport interface SpanGraphNode {\n /**\n * The Span name\n */\n name: string;\n /**\n * All child Spans of this Span\n */\n children: SpanGraphNode[];\n}\n\n/**\n * Contains all the spans for a particular TraceID\n * starting at unparented roots\n */\nexport interface SpanGraph {\n /**\n * All Spans without a parentSpanId\n */\n roots: SpanGraphNode[];\n}\n\n/**\n * A mock tracer useful for testing\n */\nexport class TestTracer extends NoOpTracer {\n private traceIdCounter = 0;\n private getNextTraceId(): string {\n this.traceIdCounter++;\n return String(this.traceIdCounter);\n }\n\n private spanIdCounter = 0;\n private getNextSpanId(): string {\n this.spanIdCounter++;\n return String(this.spanIdCounter);\n }\n\n private rootSpans: TestSpan[] = [];\n private knownSpans: TestSpan[] = [];\n\n /**\n * Returns all Spans that were created without a parent\n */\n getRootSpans(): TestSpan[] {\n return this.rootSpans;\n }\n\n /**\n * Returns all Spans this Tracer knows about\n */\n getKnownSpans(): TestSpan[] {\n return this.knownSpans;\n }\n\n /**\n * Returns all Spans where end() has not been called\n */\n getActiveSpans(): TestSpan[] {\n return this.knownSpans.filter((span) => {\n return !span.endCalled;\n });\n }\n\n /**\n * Return all Spans for a particular trace, grouped by their\n * parent Span in a tree-like structure\n * @param traceId The traceId to return the graph for\n */\n getSpanGraph(traceId: string): SpanGraph {\n const traceSpans = this.knownSpans.filter((span) => {\n return span.context().traceId === traceId;\n });\n\n const roots: SpanGraphNode[] = [];\n const nodeMap: Map = new Map();\n\n for (const span of traceSpans) {\n const spanId = span.context().spanId;\n const node: SpanGraphNode = {\n name: span.name,\n children: []\n };\n nodeMap.set(spanId, node);\n if (span.parentSpanId) {\n const parent = nodeMap.get(span.parentSpanId);\n if (!parent) {\n throw new Error(\n `Span with name ${node.name} has an unknown parentSpan with id ${span.parentSpanId}`\n );\n }\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n return {\n roots\n };\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options: SpanOptions = {}): TestSpan {\n const parentContext = this._getParentContext(options);\n\n let traceId: string;\n let isRootSpan = false;\n\n if (parentContext && parentContext.traceId) {\n traceId = parentContext.traceId;\n } else {\n traceId = this.getNextTraceId();\n isRootSpan = true;\n }\n\n const context: SpanContext = {\n traceId,\n spanId: this.getNextSpanId(),\n traceFlags: TraceFlags.NONE\n };\n const span = new TestSpan(\n this,\n name,\n context,\n options.kind || SpanKind.INTERNAL,\n parentContext ? parentContext.spanId : undefined,\n options.startTime\n );\n this.knownSpans.push(span);\n if (isRootSpan) {\n this.rootSpans.push(span);\n }\n return span;\n }\n\n private _getParentContext(options: SpanOptions): SpanContext | undefined {\n const parent = options.parent;\n let result: SpanContext | undefined;\n if (parent) {\n if (\"traceId\" in parent) {\n result = parent;\n } else {\n result = parent.context();\n }\n }\n return result;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { SpanContext, TraceFlags } from \"../interfaces\";\n\nconst VERSION = \"00\";\n\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nexport function extractSpanContextFromTraceParentHeader(\n traceParentHeader: string\n): SpanContext | undefined {\n const parts = traceParentHeader.split(\"-\");\n\n if (parts.length !== 4) {\n return;\n }\n\n const [version, traceId, spanId, traceOptions] = parts;\n\n if (version !== VERSION) {\n return;\n }\n\n const traceFlags = parseInt(traceOptions, 16);\n\n const spanContext: SpanContext = {\n spanId,\n traceId,\n traceFlags\n };\n\n return spanContext;\n}\n\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nexport function getTraceParentHeader(spanContext: SpanContext): string | undefined {\n const missingFields: string[] = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n\n if (missingFields.length) {\n return;\n }\n\n const flags = spanContext.traceFlags || TraceFlags.NONE;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n"],"names":["TraceFlags","__extends","CanonicalCode","SpanKind"],"mappings":";;;;;;;AAAA;AAIA;;;;IAGA;KAqEC;;;;IAjEC,0BAAO,GAAP;QACE,OAAO;YACL,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,UAAU,EAAEA,cAAU,CAAC,IAAI;SAC5B,CAAC;KACH;;;;;;IAOD,sBAAG,GAAH,UAAI,QAAiB;;KAEpB;;;;;;IAOD,+BAAY,GAAZ,UAAa,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;KACb;;;;;IAMD,gCAAa,GAAb,UAAc,WAAuB;QACnC,OAAO,IAAI,CAAC;KACb;;;;;;IAOD,2BAAQ,GAAR,UAAS,KAAa,EAAE,WAAwB;QAC9C,OAAO,IAAI,CAAC;KACb;;;;;IAMD,4BAAS,GAAT,UAAU,OAAe;QACvB,OAAO,IAAI,CAAC;KACb;;;;;IAMD,6BAAU,GA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tslib/CopyrightNotice.txt b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 000000000..3d4c82348 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt new file mode 100644 index 000000000..bfe6430cb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/README.md b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/README.md new file mode 100644 index 000000000..a5b2692c8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/README.md @@ -0,0 +1,142 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 2.3.3 or later +npm install tslib + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 2.3.3 or later +yarn add tslib + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 2.3.3 or later +bower install tslib + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 2.3.3 or later +jspm install tslib + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js new file mode 100644 index 000000000..d241d0422 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json new file mode 100644 index 000000000..aafa0e4b4 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/package.json b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/package.json new file mode 100644 index 000000000..0c3f6d047 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/package.json @@ -0,0 +1,64 @@ +{ + "_from": "tslib@^1.10.0", + "_id": "tslib@1.14.1", + "_inBundle": false, + "_integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "_location": "/@azure/core-auth/@azure/core-tracing/tslib", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tslib@^1.10.0", + "name": "tslib", + "escapedName": "tslib", + "rawSpec": "^1.10.0", + "saveSpec": null, + "fetchSpec": "^1.10.0" + }, + "_requiredBy": [ + "/@azure/core-auth/@azure/core-tracing" + ], + "_resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "_shasum": "cf2d38bdc34a134bcaf1091c41f6619e2f672d00", + "_spec": "tslib@^1.10.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth/node_modules/@azure/core-tracing", + "author": { + "name": "Microsoft Corp." + }, + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Runtime library for TypeScript helper functions", + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + }, + "homepage": "https://www.typescriptlang.org/", + "jsnext:main": "tslib.es6.js", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "license": "0BSD", + "main": "tslib.js", + "module": "tslib.es6.js", + "name": "tslib", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/tslib.git" + }, + "sideEffects": false, + "typings": "tslib.d.ts", + "version": "1.14.1" +} diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js new file mode 100644 index 000000000..0c1b613d8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js @@ -0,0 +1,23 @@ +// When on node 14, it validates that all of the commonjs exports +// are correctly re-exported for es modules importers. + +const nodeMajor = Number(process.version.split(".")[0].slice(1)) +if (nodeMajor < 14) { + console.log("Skipping because node does not support module exports.") + process.exit(0) +} + +// ES Modules import via the ./modules folder +import * as esTSLib from "../../modules/index.js" + +// Force a commonjs resolve +import { createRequire } from "module"; +const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); + +for (const key in commonJSTSLib) { + if (commonJSTSLib.hasOwnProperty(key)) { + if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) + } +} + +console.log("All exports in commonjs are available for es module consumers.") diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json new file mode 100644 index 000000000..166e5095e --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "scripts": { + "test": "node index.js" + } +} diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts new file mode 100644 index 000000000..0756b28e7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, exports: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html new file mode 100644 index 000000000..b122e41b0 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js new file mode 100644 index 000000000..0e0d8d079 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html new file mode 100644 index 000000000..44c9ba51e --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js new file mode 100644 index 000000000..e5b7c9b80 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/package.json b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/package.json new file mode 100644 index 000000000..1135390cf --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/package.json @@ -0,0 +1,127 @@ +{ + "_from": "@azure/core-tracing@1.0.0-preview.8", + "_id": "@azure/core-tracing@1.0.0-preview.8", + "_inBundle": false, + "_integrity": "sha512-ZKUpCd7Dlyfn7bdc+/zC/sf0aRIaNQMDuSj2RhYRFe3p70hVAnYGp3TX4cnG2yoEALp/LTj/XnZGQ8Xzf6Ja/Q==", + "_location": "/@azure/core-auth/@azure/core-tracing", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@azure/core-tracing@1.0.0-preview.8", + "name": "@azure/core-tracing", + "escapedName": "@azure%2fcore-tracing", + "scope": "@azure", + "rawSpec": "1.0.0-preview.8", + "saveSpec": null, + "fetchSpec": "1.0.0-preview.8" + }, + "_requiredBy": [ + "/@azure/core-auth" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.8.tgz", + "_shasum": "1e0ff857e855edb774ffd33476003c27b5bb2705", + "_spec": "@azure/core-tracing@1.0.0-preview.8", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth", + "author": { + "name": "Microsoft Corporation" + }, + "browser": { + "./dist-esm/src/utils/global.js": "./dist-esm/src/utils/global.browser.js" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@opencensus/web-types": "0.0.7", + "@opentelemetry/api": "^0.6.1", + "tslib": "^1.10.0" + }, + "deprecated": false, + "description": "Provides low-level interfaces and helper methods for tracing in Azure SDK", + "devDependencies": { + "@azure/eslint-plugin-azure-sdk": "^2.0.1", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^6.0.3", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "inherits": "^2.0.3", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^3.1.1", + "typescript": "~3.7.5", + "util": "^0.12.1" + }, + "engine": { + "node": ">=8.0.0" + }, + "files": [ + "dist/", + "dist-esm/src/", + "types/core-tracing.d.ts", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/core/core-tracing", + "keywords": [ + "azure", + "tracing" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "dist-esm/src/index.js", + "name": "@azure/core-tracing", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local", + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "cd samples && tsc -p .", + "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json tsconfig.json src --ext .ts -f html -o template-lintReport.html || exit 0", + "lint:fix": "eslint package.json tsconfig.json \"src/**/*.ts\" \"test/**/*.ts\" --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "mocha test-dist/**/*.js --reporter ../../../common/tools/mocha-multi-reporter.js" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "types/core-tracing.d.ts", + "version": "1.0.0-preview.8" +} diff --git a/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/types/core-tracing.d.ts b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/types/core-tracing.d.ts new file mode 100644 index 000000000..d313e8550 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@azure/core-tracing/types/core-tracing.d.ts @@ -0,0 +1,420 @@ +import { Attributes } from '@opentelemetry/api'; +import { Span as OpenCensusSpan } from '@opencensus/web-types'; +import { Tracer as OpenCensusTracer } from '@opencensus/web-types'; +import { SpanContext as OTSpanContext } from '@opentelemetry/api'; +import { SpanOptions as OTSpanOptions } from '@opentelemetry/api'; +import { Span } from '@opentelemetry/api'; +import { SpanKind } from '@opentelemetry/api'; +import { Status } from '@opentelemetry/api'; +import { TimeInput } from '@opentelemetry/api'; +import { Tracer } from '@opentelemetry/api'; +import { TracerBase } from '@opencensus/web-types'; + +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +export declare function extractSpanContextFromTraceParentHeader(traceParentHeader: string): SpanContext | undefined; + +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +export declare function getTraceParentHeader(spanContext: SpanContext): string | undefined; + +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +export declare function getTracer(): Tracer; + +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +export declare class NoOpSpan implements Span { + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + setAttribute(_key: string, _value: unknown): this; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + setAttributes(_attributes: Attributes): this; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + addEvent(_name: string, _attributes?: Attributes): this; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + setStatus(_status: Status): this; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + updateName(_name: string): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; +} + +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +export declare class NoOpTracer implements Tracer { + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + startSpan(_name: string, _options?: OTSpanOptions): Span; + /** + * Returns the current Span from the current context, if available. + */ + getCurrentSpan(): Span; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + withSpan ReturnType>(_span: Span, fn: T): ReturnType; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + bind(target: T, _span?: Span): T; +} +export { OpenCensusSpan } + +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +export declare class OpenCensusSpanWrapper implements Span { + private _span; + /** + * The underlying OpenCensus Span + */ + getWrappedSpan(): OpenCensusSpan; + /** + * Wraps an existing OpenCensus Span + * @param span A Span or RootSpan from OpenCensus + */ + constructor(span: OpenCensusSpan); + /** + * Create a new OpenCensus Span and wrap it. + * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper + * @param name The name of the Span + * @param options Options for the Span + */ + constructor(tracer: OpenCensusTracerWrapper, name: string, options?: OTSpanOptions); + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + setAttributes(attributes: Attributes): this; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + addEvent(_name: string, _attributes?: Attributes): this; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + setStatus(status: Status): this; + /** + * Updates the name of the Span + * @param name the new Span name + */ + updateName(name: string): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; +} +export { OpenCensusTracer } + +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +export declare class OpenCensusTracerWrapper implements Tracer { + private _tracer; + /** + * The wrapped OpenCensus Tracer + */ + getWrappedTracer(): TracerBase; + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + constructor(tracer: TracerBase); + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + startSpan(name: string, options?: OTSpanOptions): Span; + /** + * Returns the current Span from the current context, if available. + */ + getCurrentSpan(): Span | undefined; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + withSpan unknown>(_span: Span, _fn: T): ReturnType; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + bind(_target: T, _span?: Span): T; +} + +/** + * Tracing options to set on an operation. + */ +export declare interface OperationTracingOptions { + /** + * OpenTelemetry SpanOptions used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; +} +export { OTSpanContext } +export { OTSpanOptions } + +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +export declare function setTracer(tracer: Tracer): void; + +/** + * A light interface that tries to be structurally compatible with OpenTelemetry + */ +export declare interface SpanContext { + /** + * UUID of a trace. + */ + traceId: string; + /** + * UUID of a Span. + */ + spanId: string; + /** + * https://www.w3.org/TR/trace-context/#trace-flags + */ + traceFlags: number; +} + +/** + * Contains all the spans for a particular TraceID + * starting at unparented roots + */ +export declare interface SpanGraph { + /** + * All Spans without a parentSpanId + */ + roots: SpanGraphNode[]; +} + +/** + * Simple representation of a Span that only has name and child relationships. + * Children should be arranged in the order they were created. + */ +export declare interface SpanGraphNode { + /** + * The Span name + */ + name: string; + /** + * All child Spans of this Span + */ + children: SpanGraphNode[]; +} + +/** + * An interface that enables manual propagation of Spans + */ +export declare interface SpanOptions { + /** + * The SpanContext that refers to a parent span, if any. + * A null value indicates that this should be a new root span, + * rather than potentially detecting a span via a context manager. + */ + parent?: SpanContext | null; + /** + * Attributes to set on the Span + */ + attributes?: { + [key: string]: unknown; + }; +} + +/** + * A mock span useful for testing. + */ +export declare class TestSpan extends NoOpSpan { + /** + * The Span's current name + */ + name: string; + /** + * The Span's current status + */ + status: Status; + /** + * The Span's kind + */ + kind: SpanKind; + /** + * True if end() has been called on the Span + */ + endCalled: boolean; + /** + * The start time of the Span + */ + readonly startTime: TimeInput; + /** + * The id of the parent Span, if any. + */ + readonly parentSpanId?: string; + /** + * Known attributes, if any. + */ + readonly attributes: Attributes; + private _context; + private readonly _tracer; + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + constructor(parentTracer: TestTracer, name: string, context: OTSpanContext, kind: SpanKind, parentSpanId?: string, startTime?: TimeInput); + /** + * Returns the Tracer that created this Span + */ + tracer(): Tracer; + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + setStatus(status: Status): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + setAttributes(attributes: Attributes): this; +} + +/** + * A mock tracer useful for testing + */ +export declare class TestTracer extends NoOpTracer { + private traceIdCounter; + private getNextTraceId; + private spanIdCounter; + private getNextSpanId; + private rootSpans; + private knownSpans; + /** + * Returns all Spans that were created without a parent + */ + getRootSpans(): TestSpan[]; + /** + * Returns all Spans this Tracer knows about + */ + getKnownSpans(): TestSpan[]; + /** + * Returns all Spans where end() has not been called + */ + getActiveSpans(): TestSpan[]; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + getSpanGraph(traceId: string): SpanGraph; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + startSpan(name: string, options?: OTSpanOptions): TestSpan; + private _getParentContext; +} + +/** + * Shorthand enum for common traceFlags values inside SpanContext + */ +export declare const enum TraceFlags { + /** No flag set. */ + NONE = 0, + /** Caller is collecting trace information. */ + SAMPLED = 1 +} + +export { } diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/LICENSE b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/README.md b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/README.md new file mode 100644 index 000000000..07593a637 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/README.md @@ -0,0 +1,202 @@ +# OpenTelemetry API for JavaScript +[![Gitter chat][gitter-image]][gitter-url] +[![NPM Published Version][npm-img]][npm-url] +[![dependencies][dependencies-image]][dependencies-url] +[![devDependencies][devDependencies-image]][devDependencies-url] +[![Apache License][license-image]][license-image] + +This package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser. + +## Quick Start + +To get started tracing you need to install the SDK and plugins, create a TracerProvider, and register it with the API. + +### Install Dependencies + +```sh +$ # Install tracing dependencies +$ npm install \ + @opentelemetry/core \ + @opentelemetry/node \ + @opentelemetry/tracing \ + @opentelemetry/exporter-jaeger \ # add exporters as needed + @opentelemetry/plugin-http # add plugins as needed + +$ # Install metrics dependencies +$ npm install \ + @opentelemetry/metrics \ + @opentelemetry/exporter-prometheus # add exporters as needed +``` + +### Initialize the SDK + +Before any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API. + +To collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider. + +#### Tracing + +```javascript +const { NodeTracerProvider } = require("@opentelemetry/node"); +const { SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { JaegerExporter } = require("@opentelemetry/exporter-jaeger"); + +const tracerProvider = new NodeTracerProvider(); + +/** + * The SimpleSpanProcessor does no batching and exports spans + * immediately when they end. For most production use cases, + * OpenTelemetry recommends use of the BatchSpanProcessor. + */ +tracerProvider.addSpanProcessor( + new SimpleSpanProcessor( + new JaegerExporter( + /* export options */ + ) + ) +); + +/** + * Registering the provider with the API allows it to be discovered + * and used by instrumentation libraries. The OpenTelemetry API provides + * methods to set global SDK implementations, but the default SDK provides + * a convenience method named `register` which registers same defaults + * for you. + * + * By default the NodeTracerProvider uses Trace Context for propagation + * and AsyncHooksScopeManager for context management. To learn about + * customizing this behavior, see API Registration Options below. + */ +tracerProvider.register(); +``` + +#### Metrics + +```javascript +const api = require("@opentelemetry/api"); +const { MeterProvider } = require("@opentelemetry/metrics"); +const { PrometheusExporter } = require("@opentelemetry/exporter-prometheus"); + +const meterProvider = new MeterProvider({ + // The Prometheus exporter runs an HTTP server which + // the Prometheus backend scrapes to collect metrics. + exporter: new PrometheusExporter({ startServer: true }), + interval: 1000, +}); + +/** + * Registering the provider with the API allows it to be discovered + * and used by instrumentation libraries. + */ +api.metrics.setGlobalMeterProvider(meterProvider); +``` + +## Advanced Use +### API Registration Options + +If you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped. + +```javascript +const { B3Propagator } = require("@opentelemetry/core"); + +tracerProvider.register({ + // Use B3 Propagation + propagator: new B3Propagator(), + + // Skip registering a default context manager + contextManager: null, +}) +``` + +### API Methods + +If you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API. + +- [Trace API Documentation][trace-api-docs] +- [Metrics API Documentation][metrics-api-docs] +- [Propagation API Documentation][propagation-api-docs] +- [Context API Documentation][context-api-docs] + +```javascript +const api = require("@opentelemetry/api") + +/* Initialize TraceProvider */ +api.trace.setGlobalTracerProvider(traceProvider); +/* returns traceProvider (no-op if a working provider has not been initialized) */ +api.trace.getTracerProvider(); +/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized); */ +api.trace.getTracer(name, version); + +/* Initialize MeterProvider */ +api.metrics.setGlobalMeterProvider(meterProvider); +/* returns meterProvider (no-op if a working provider has not been initialized) */ +api.metrics.getMeterProvider(); +/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized); */ +api.metrics.getMeter(name, version); + +/* Initialize Propagator */ +api.propagation.setGlobalPropagator(httpTraceContextPropagator) + +/* Initialize Context Manager */ +api.context.setGlobalContextManager(asyncHooksContextManager); +``` + +### Library Authors + +Library authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK. + +```javascript +const api = require("@opentelemetry/api"); + +const tracer = api.trace.getTracer("my-library-name", "0.2.3"); + +async function doSomething() { + const span = tracer.startSpan("doSomething", { parent: tracer.getCurrentSpan() }); + try { + const result = await doSomethingElse(); + span.end(); + return result; + } catch (err) { + span.setStatus({ + // use an appropriate status code here + code: api.CanonicalCode.INTERNAL, + message: err.message, + }); + span.end(); + return null; + } +} +``` + + +## Useful links +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us on [gitter][gitter-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg +[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api +[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/api +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg + +[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html +[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html +[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html +[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html + +[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web +[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing +[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node +[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics + +[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.d.ts new file mode 100644 index 000000000..6f51107a8 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.d.ts @@ -0,0 +1,49 @@ +/*! + * Copyright 2020, 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. + */ +import { ContextManager, Context } from '@opentelemetry/context-base'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Context API + */ +export declare class ContextAPI { + private static _instance?; + private _contextManager; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Context API */ + static getInstance(): ContextAPI; + /** + * Set the current context manager. Returns the initialized context manager + */ + setGlobalContextManager(contextManager: ContextManager): ContextManager; + /** + * Get the currently active context + */ + active(): Context; + /** + * Execute a function with an active context + * + * @param context context to be active during function execution + * @param fn function to execute in a context + */ + with ReturnType>(context: Context, fn: T): ReturnType; + /** + * Bind a context to a target function or event emitter + * + * @param target function or event emitter to bind + * @param context context to bind to the event emitter or function. Defaults to the currently active context + */ + bind(target: T, context?: Context): T; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.js new file mode 100644 index 000000000..d974f5081 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/context.js @@ -0,0 +1,67 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +const context_base_1 = require("@opentelemetry/context-base"); +/** + * Singleton object which represents the entry point to the OpenTelemetry Context API + */ +class ContextAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { + this._contextManager = new context_base_1.NoopContextManager(); + } + /** Get the singleton instance of the Context API */ + static getInstance() { + if (!this._instance) { + this._instance = new ContextAPI(); + } + return this._instance; + } + /** + * Set the current context manager. Returns the initialized context manager + */ + setGlobalContextManager(contextManager) { + this._contextManager = contextManager; + return contextManager; + } + /** + * Get the currently active context + */ + active() { + return this._contextManager.active(); + } + /** + * Execute a function with an active context + * + * @param context context to be active during function execution + * @param fn function to execute in a context + */ + with(context, fn) { + return this._contextManager.with(context, fn); + } + /** + * Bind a context to a target function or event emitter + * + * @param target function or event emitter to bind + * @param context context to bind to the event emitter or function. Defaults to the currently active context + */ + bind(target, context = this.active()) { + return this._contextManager.bind(target, context); + } +} +exports.ContextAPI = ContextAPI; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts new file mode 100644 index 000000000..1f28aa39a --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts @@ -0,0 +1,40 @@ +/*! + * Copyright 2020, 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. + */ +import { Meter } from '../metrics/Meter'; +import { MeterProvider } from '../metrics/MeterProvider'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Metrics API + */ +export declare class MetricsAPI { + private static _instance?; + private _meterProvider; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Metrics API */ + static getInstance(): MetricsAPI; + /** + * Set the current global meter. Returns the initialized global meter provider. + */ + setGlobalMeterProvider(provider: MeterProvider): MeterProvider; + /** + * Returns the global meter provider. + */ + getMeterProvider(): MeterProvider; + /** + * Returns a meter from the global meter provider. + */ + getMeter(name: string, version?: string): Meter; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.js new file mode 100644 index 000000000..0e32832e6 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/metrics.js @@ -0,0 +1,55 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +const NoopMeterProvider_1 = require("../metrics/NoopMeterProvider"); +/** + * 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() { + this._meterProvider = NoopMeterProvider_1.NOOP_METER_PROVIDER; + } + /** 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. Returns the initialized global meter provider. + */ + setGlobalMeterProvider(provider) { + this._meterProvider = provider; + return provider; + } + /** + * Returns the global meter provider. + */ + getMeterProvider() { + return this._meterProvider; + } + /** + * Returns a meter from the global meter provider. + */ + getMeter(name, version) { + return this.getMeterProvider().getMeter(name, version); + } +} +exports.MetricsAPI = MetricsAPI; +//# sourceMappingURL=metrics.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts new file mode 100644 index 000000000..23e17b34c --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts @@ -0,0 +1,50 @@ +/*! + * Copyright 2020, 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. + */ +import { Context } from '@opentelemetry/context-base'; +import { GetterFunction } from '../context/propagation/getter'; +import { HttpTextPropagator } from '../context/propagation/HttpTextPropagator'; +import { SetterFunction } from '../context/propagation/setter'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Propagation API + */ +export declare class PropagationAPI { + private static _instance?; + private _propagator; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Propagator API */ + static getInstance(): PropagationAPI; + /** + * Set the current propagator. Returns the initialized propagator + */ + setGlobalPropagator(propagator: HttpTextPropagator): HttpTextPropagator; + /** + * Inject context into a carrier to be propagated inter-process + * + * @param carrier carrier to inject context into + * @param setter Function used to set values on the carrier + * @param context Context carrying tracing data to inject. Defaults to the currently active context. + */ + inject(carrier: Carrier, setter?: SetterFunction, context?: Context): void; + /** + * Extract context from a carrier + * + * @param carrier Carrier to extract context from + * @param getter Function used to extract keys from a carrier + * @param context Context which the newly created context will inherit from. Defaults to the currently active context. + */ + extract(carrier: Carrier, getter?: GetterFunction, context?: Context): Context; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.js new file mode 100644 index 000000000..2eae5f005 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/propagation.js @@ -0,0 +1,67 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +const getter_1 = require("../context/propagation/getter"); +const NoopHttpTextPropagator_1 = require("../context/propagation/NoopHttpTextPropagator"); +const setter_1 = require("../context/propagation/setter"); +const context_1 = require("./context"); +const contextApi = context_1.ContextAPI.getInstance(); +/** + * Singleton object which represents the entry point to the OpenTelemetry Propagation API + */ +class PropagationAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { + this._propagator = NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR; + } + /** Get the singleton instance of the Propagator API */ + static getInstance() { + if (!this._instance) { + this._instance = new PropagationAPI(); + } + return this._instance; + } + /** + * Set the current propagator. Returns the initialized propagator + */ + setGlobalPropagator(propagator) { + this._propagator = propagator; + return propagator; + } + /** + * Inject context into a carrier to be propagated inter-process + * + * @param carrier carrier to inject context into + * @param setter Function used to set values on the carrier + * @param context Context carrying tracing data to inject. Defaults to the currently active context. + */ + inject(carrier, setter = setter_1.defaultSetter, context = contextApi.active()) { + return this._propagator.inject(context, carrier, setter); + } + /** + * Extract context from a carrier + * + * @param carrier Carrier to extract context from + * @param getter Function used to extract keys from a carrier + * @param context Context which the newly created context will inherit from. Defaults to the currently active context. + */ + extract(carrier, getter = getter_1.defaultGetter, context = contextApi.active()) { + return this._propagator.extract(context, carrier, getter); + } +} +exports.PropagationAPI = PropagationAPI; +//# sourceMappingURL=propagation.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.d.ts new file mode 100644 index 000000000..cbe2e6e53 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.d.ts @@ -0,0 +1,40 @@ +/*! + * Copyright 2020, 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. + */ +import { TracerProvider } from '../trace/tracer_provider'; +import { Tracer } from '../trace/tracer'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Tracing API + */ +export declare class TraceAPI { + private static _instance?; + private _tracerProvider; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Trace API */ + static getInstance(): TraceAPI; + /** + * Set the current global tracer. Returns the initialized global tracer provider + */ + setGlobalTracerProvider(provider: TracerProvider): TracerProvider; + /** + * Returns the global tracer provider. + */ + getTracerProvider(): TracerProvider; + /** + * Returns a tracer from the global tracer provider. + */ + getTracer(name: string, version?: string): Tracer; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.js new file mode 100644 index 000000000..a6ea99bdb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/api/trace.js @@ -0,0 +1,55 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +const NoopTracerProvider_1 = require("../trace/NoopTracerProvider"); +/** + * Singleton object which represents the entry point to the OpenTelemetry Tracing API + */ +class TraceAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { + this._tracerProvider = NoopTracerProvider_1.NOOP_TRACER_PROVIDER; + } + /** Get the singleton instance of the Trace API */ + static getInstance() { + if (!this._instance) { + this._instance = new TraceAPI(); + } + return this._instance; + } + /** + * Set the current global tracer. Returns the initialized global tracer provider + */ + setGlobalTracerProvider(provider) { + this._tracerProvider = provider; + return provider; + } + /** + * Returns the global tracer provider. + */ + getTracerProvider() { + return this._tracerProvider; + } + /** + * Returns a tracer from the global tracer provider. + */ + getTracer(name, version) { + return this.getTracerProvider().getTracer(name, version); + } +} +exports.TraceAPI = TraceAPI; +//# sourceMappingURL=trace.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts new file mode 100644 index 000000000..d123ea597 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright 2019, 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. + */ +export declare type LogFunction = (message: string, ...args: unknown[]) => void; +/** Defines a logger interface. */ +export interface Logger { + error: LogFunction; + warn: LogFunction; + info: LogFunction; + debug: LogFunction; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.js new file mode 100644 index 000000000..9d863ff76 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Logger.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=Logger.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.d.ts new file mode 100644 index 000000000..b42995b0f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright 2019, 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. + */ +/** High resolution HrTime: [seconds: number, nanoseconds: number] */ +export declare type HrTime = [number, number]; +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +export declare type TimeInput = HrTime | number | Date; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.js new file mode 100644 index 000000000..c74a9a51f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/common/Time.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=Time.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts new file mode 100644 index 000000000..f91f39cd7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts @@ -0,0 +1,56 @@ +/*! + * Copyright 2019, 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. + */ +import { Context } from '@opentelemetry/context-base'; +import { SetterFunction } from './setter'; +import { GetterFunction } from './getter'; +/** + * Injects {@link Context} into and extracts it from carriers that travel + * in-band across process boundaries. Encoding is expected to conform to the + * HTTP Header Field semantics. Values are often encoded as RPC/HTTP request + * headers. + * + * The carrier of propagated data on both the client (injector) and server + * (extractor) side is usually an object such as http headers. + */ +export interface HttpTextPropagator { + /** + * Injects values from a given {@link Context} into a carrier. + * + * OpenTelemetry defines a common set of format values (HttpTextPropagator), and + * each has an expected `carrier` type. + * + * @param context the Context from which to extract values to transmit over + * the wire. + * @param carrier the carrier of propagation fields, such as http request + * headers. + * @param setter a function which accepts a carrier, key, and value, which + * sets the key on the carrier to the value. + */ + inject(context: Context, carrier: unknown, setter: SetterFunction): void; + /** + * Given a {@link Context} and a carrier, extract context values from a + * carrier and return a new context, created from the old context, with the + * extracted values. + * + * @param context the Context from which to extract values to transmit over + * the wire. + * @param carrier the carrier of propagation fields, such as http request + * headers. + * @param getter a function which accepts a carrier and a key, and returns + * the value from the carrier identified by the key. + */ + extract(context: Context, carrier: unknown, getter: GetterFunction): Context; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js new file mode 100644 index 000000000..191430180 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=HttpTextPropagator.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts new file mode 100644 index 000000000..9c298a2ae --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts @@ -0,0 +1,27 @@ +/*! + * Copyright 2019, 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. + */ +import { Context } from '@opentelemetry/context-base'; +import { HttpTextPropagator } from './HttpTextPropagator'; +/** + * No-op implementations of {@link HttpTextPropagator}. + */ +export declare class NoopHttpTextPropagator implements HttpTextPropagator { + /** Noop inject function does nothing */ + inject(context: Context, carrier: unknown, setter: Function): void; + /** Noop extract function does nothing and returns the input context */ + extract(context: Context, carrier: unknown, getter: Function): Context; +} +export declare const NOOP_HTTP_TEXT_PROPAGATOR: NoopHttpTextPropagator; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js new file mode 100644 index 000000000..ca1a17d6f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js @@ -0,0 +1,31 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * No-op implementations of {@link HttpTextPropagator}. + */ +class NoopHttpTextPropagator { + /** Noop inject function does nothing */ + inject(context, carrier, setter) { } + /** Noop extract function does nothing and returns the input context */ + extract(context, carrier, getter) { + return context; + } +} +exports.NoopHttpTextPropagator = NoopHttpTextPropagator; +exports.NOOP_HTTP_TEXT_PROPAGATOR = new NoopHttpTextPropagator(); +//# sourceMappingURL=NoopHttpTextPropagator.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts new file mode 100644 index 000000000..88e43e309 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts @@ -0,0 +1,24 @@ +/*! + * Copyright 2020, 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. + */ +export declare type GetterFunction = (carrier: Carrier, key: string) => unknown; +/** + * Default getter which just does a simple property access. Returns + * undefined if the key is not set. + * + * @param carrier + * @param key + */ +export declare function defaultGetter(carrier: any, key: string): unknown; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js new file mode 100644 index 000000000..186d97f32 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js @@ -0,0 +1,29 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +/** + * Default getter which just does a simple property access. Returns + * undefined if the key is not set. + * + * @param carrier + * @param key + */ +function defaultGetter(carrier, key) { + return carrier[key]; +} +exports.defaultGetter = defaultGetter; +//# sourceMappingURL=getter.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts new file mode 100644 index 000000000..5226ef9f4 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright 2020, 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. + */ +export declare type SetterFunction = (carrier: Carrier, key: string, value: unknown) => void; +/** + * Default setter which sets value via direct property access + * + * @param carrier + * @param key + */ +export declare function defaultSetter(carrier: any, key: string, value: unknown): void; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js new file mode 100644 index 000000000..d661c752f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js @@ -0,0 +1,28 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +/** + * Default setter which sets value via direct property access + * + * @param carrier + * @param key + */ +function defaultSetter(carrier, key, value) { + carrier[key] = value; +} +exports.defaultSetter = defaultSetter; +//# sourceMappingURL=setter.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts new file mode 100644 index 000000000..ac5aa305f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts @@ -0,0 +1,27 @@ +/*! + * Copyright 2019, 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. + */ +import { EntryValue } from './EntryValue'; +/** + * CorrelationContext represents collection of entries. Each key of + * CorrelationContext is associated with exactly one value. CorrelationContext + * is serializable, to facilitate propagating it not only inside the process + * but also across process boundaries. CorrelationContext is used to annotate + * telemetry with the name:value pair Entry. Those values can be used to add + * dimension to the metric or additional contest properties to logs and traces. + */ +export interface CorrelationContext { + [entryKey: string]: EntryValue; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js new file mode 100644 index 000000000..a4fac5ceb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=CorrelationContext.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts new file mode 100644 index 000000000..b3e055a42 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts @@ -0,0 +1,42 @@ +/*! + * Copyright 2019, 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. + */ +/** + * {@link EntryValue} contains properties associated with a {@link + * CorrelationContext}. + */ +export interface EntryValue { + /** `String` value of the `EntryValue`. */ + value: string; + /** + * ttl is an integer that represents number of hops an entry can + * propagate. + */ + ttl?: EntryTtl; +} +/** + * EntryTtl is an integer that represents number of hops an entry can propagate. + * + * For now, ONLY special values (0 and -1) are supported. + */ +export declare enum EntryTtl { + /** + * NO_PROPAGATION is considered to have local context and is used within the + * process it created. + */ + NO_PROPAGATION = 0, + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + UNLIMITED_PROPAGATION = -1 +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js new file mode 100644 index 000000000..4d0a729b2 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js @@ -0,0 +1,33 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * EntryTtl is an integer that represents number of hops an entry can propagate. + * + * For now, ONLY special values (0 and -1) are supported. + */ +var EntryTtl; +(function (EntryTtl) { + /** + * NO_PROPAGATION is considered to have local context and is used within the + * process it created. + */ + EntryTtl[EntryTtl["NO_PROPAGATION"] = 0] = "NO_PROPAGATION"; + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + EntryTtl[EntryTtl["UNLIMITED_PROPAGATION"] = -1] = "UNLIMITED_PROPAGATION"; +})(EntryTtl = exports.EntryTtl || (exports.EntryTtl = {})); +//# sourceMappingURL=EntryValue.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.d.ts new file mode 100644 index 000000000..10f5527fb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.d.ts @@ -0,0 +1,69 @@ +/*! + * Copyright 2019, 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. + */ +export * from './common/Logger'; +export * from './common/Time'; +export * from './context/propagation/getter'; +export * from './context/propagation/HttpTextPropagator'; +export * from './context/propagation/NoopHttpTextPropagator'; +export * from './context/propagation/setter'; +export * from './correlation_context/CorrelationContext'; +export * from './correlation_context/EntryValue'; +export * from './metrics/BoundInstrument'; +export * from './metrics/Meter'; +export * from './metrics/MeterProvider'; +export * from './metrics/Metric'; +export * from './metrics/NoopMeter'; +export * from './metrics/NoopMeterProvider'; +export * from './metrics/ObserverResult'; +export * from './trace/attributes'; +export * from './trace/Event'; +export * from './trace/instrumentation/Plugin'; +export * from './trace/link_context'; +export * from './trace/link'; +export * from './trace/NoopSpan'; +export * from './trace/NoopTracer'; +export * from './trace/NoopTracerProvider'; +export * from './trace/Sampler'; +export * from './trace/span_context'; +export * from './trace/span_kind'; +export * from './trace/span'; +export * from './trace/SpanOptions'; +export * from './trace/status'; +export * from './trace/TimedEvent'; +export * from './trace/trace_flags'; +export * from './trace/trace_state'; +export * from './trace/tracer_provider'; +export * from './trace/tracer'; +export { Context } from '@opentelemetry/context-base'; +import { ContextAPI } from './api/context'; +/** Entrypoint for context API */ +export declare const context: ContextAPI; +import { TraceAPI } from './api/trace'; +/** Entrypoint for trace API */ +export declare const trace: TraceAPI; +import { MetricsAPI } from './api/metrics'; +/** Entrypoint for metrics API */ +export declare const metrics: MetricsAPI; +import { PropagationAPI } from './api/propagation'; +/** Entrypoint for propagation API */ +export declare const propagation: PropagationAPI; +declare const _default: { + trace: TraceAPI; + metrics: MetricsAPI; + context: ContextAPI; + propagation: PropagationAPI; +}; +export default _default; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.js new file mode 100644 index 000000000..e911d250f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/index.js @@ -0,0 +1,54 @@ +"use strict"; +/*! + * Copyright 2019, 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. + */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./context/propagation/getter")); +__export(require("./context/propagation/NoopHttpTextPropagator")); +__export(require("./context/propagation/setter")); +__export(require("./correlation_context/EntryValue")); +__export(require("./metrics/Metric")); +__export(require("./metrics/NoopMeter")); +__export(require("./metrics/NoopMeterProvider")); +__export(require("./trace/NoopSpan")); +__export(require("./trace/NoopTracer")); +__export(require("./trace/NoopTracerProvider")); +__export(require("./trace/span_kind")); +__export(require("./trace/status")); +__export(require("./trace/trace_flags")); +var context_base_1 = require("@opentelemetry/context-base"); +exports.Context = context_base_1.Context; +const context_1 = require("./api/context"); +/** Entrypoint for context API */ +exports.context = context_1.ContextAPI.getInstance(); +const trace_1 = require("./api/trace"); +/** Entrypoint for trace API */ +exports.trace = trace_1.TraceAPI.getInstance(); +const metrics_1 = require("./api/metrics"); +/** Entrypoint for metrics API */ +exports.metrics = metrics_1.MetricsAPI.getInstance(); +const propagation_1 = require("./api/propagation"); +/** Entrypoint for propagation API */ +exports.propagation = propagation_1.PropagationAPI.getInstance(); +exports.default = { + trace: exports.trace, + metrics: exports.metrics, + context: exports.context, + propagation: exports.propagation, +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts new file mode 100644 index 000000000..1cdab9d34 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts @@ -0,0 +1,50 @@ +/*! + * Copyright 2019, 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. + */ +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +import { ObserverResult } from './ObserverResult'; +/** An Instrument for Counter Metric. */ +export interface BoundCounter { + /** + * Adds the given value to the current value. Values cannot be negative. + * @param value the value to add. + */ + add(value: number): void; +} +/** Measure to report instantaneous measurement of a value. */ +export interface BoundMeasure { + /** + * Records the given value to this measure. + * @param value the measurement to record. + * @param correlationContext the correlationContext associated with the + * measurements. + * @param spanContext the {@link SpanContext} that identifies the {@link Span} + * for which the measurements are associated with. + */ + record(value: number): void; + record(value: number, correlationContext: CorrelationContext): void; + record(value: number, correlationContext: CorrelationContext, spanContext: SpanContext): void; +} +/** Base interface for the Observer metrics. */ +export interface BoundObserver { + /** + * Sets callback for the observer. The callback is called once and then it + * sets observers for values. The observers are called periodically to + * retrieve the value. + * @param callback + */ + setCallback(callback: (observerResult: ObserverResult) => void): void; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js new file mode 100644 index 000000000..e821b681f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=BoundInstrument.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts new file mode 100644 index 000000000..3e3cfd5c7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts @@ -0,0 +1,46 @@ +/*! + * Copyright 2019, 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. + */ +import { Metric, MetricOptions } from './Metric'; +import { BoundCounter, BoundMeasure, BoundObserver } from './BoundInstrument'; +/** + * An interface to allow the recording metrics. + * + * {@link Metric}s are used for recording pre-defined aggregation (`Counter`), + * or raw values (`Measure`) in which the aggregation and labels + * for the exported metric are deferred. + */ +export interface Meter { + /** + * Creates and returns a new `Measure`. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createMeasure(name: string, options?: MetricOptions): Metric; + /** + * Creates a new `Counter` metric. Generally, this kind of metric when the + * value is a quantity, the sum is of primary interest, and the event count + * and value distribution are not of primary interest. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createCounter(name: string, options?: MetricOptions): Metric; + /** + * Creates a new `Observer` metric. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createObserver(name: string, options?: MetricOptions): Metric; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.js new file mode 100644 index 000000000..4c8d7d459 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Meter.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=Meter.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts new file mode 100644 index 000000000..ad9083d1d --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts @@ -0,0 +1,30 @@ +/*! + * Copyright 2019, 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. + */ +import { Meter } from './Meter'; +/** + * MeterProvider provides an interface for creating {@link Meter}s + */ +export interface MeterProvider { + /** + * Returns a Meter, creating one if one with the given name and version is + * not already created. + * + * @param name The name of the meter or instrumentation library. + * @param version The version of the meter or instrumentation library. + * @returns Meter A Meter with the given name and version + */ + getMeter(name: string, version?: string): Meter; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js new file mode 100644 index 000000000..918273488 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=MeterProvider.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts new file mode 100644 index 000000000..044410ec9 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts @@ -0,0 +1,114 @@ +/*! + * Copyright 2019, 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. + */ +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +import { ObserverResult } from './ObserverResult'; +/** + * Options needed for metric creation + */ +export interface MetricOptions { + /** The name of the component that reports the Metric. */ + component?: string; + /** + * The description of the Metric. + * @default '' + */ + description?: string; + /** + * The unit of the Metric values. + * @default '1' + */ + unit?: string; + /** The list of label keys for the Metric. */ + labelKeys?: string[]; + /** The map of constant labels for the Metric. */ + constantLabels?: Map; + /** + * Indicates the metric is a verbose metric that is disabled by default + * @default false + */ + disabled?: boolean; + /** + * Asserts that this metric may only increase (e.g. time spent). + */ + monotonic?: boolean; + /** + * (Measure only, default true) Asserts that this metric will only accept + * non-negative values (e.g. disk usage). + */ + absolute?: boolean; + /** + * Indicates the type of the recorded value. + * @default {@link ValueType.DOUBLE} + */ + valueType?: ValueType; +} +/** The Type of value. It describes how the data is reported. */ +export declare enum ValueType { + INT = 0, + DOUBLE = 1 +} +/** + * Metric represents a base class for different types of metric + * pre aggregations. + */ +export interface Metric { + /** + * Returns a Instrument associated with specified Labels. + * It is recommended to keep a reference to the Instrument instead of always + * calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + bind(labels: Labels): T; + /** + * Removes the Instrument from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + unbind(labels: Labels): void; + /** + * Clears all timeseries from the Metric. + */ + clear(): void; +} +export interface MetricUtils { + /** + * Adds the given value to the current value. Values cannot be negative. + */ + add(value: number, labels: Labels): void; + /** + * Sets a callback where user can observe value for certain labels + * @param callback a function that will be called once to set observers + * for values + */ + setCallback(callback: (observerResult: ObserverResult) => void): void; + /** + * Sets the given value. Values can be negative. + */ + set(value: number, labels: Labels): void; + /** + * Records the given value to this measure. + */ + record(value: number, labels: Labels): void; + record(value: number, labels: Labels, correlationContext: CorrelationContext): void; + record(value: number, labels: Labels, correlationContext: CorrelationContext, spanContext: SpanContext): void; +} +/** + * key-value pairs passed by the user. + */ +export declare type Labels = { + [key: string]: string; +}; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.js new file mode 100644 index 000000000..c04d8aef3 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/Metric.js @@ -0,0 +1,24 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts new file mode 100644 index 000000000..16e782729 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts @@ -0,0 +1,92 @@ +/*! + * Copyright 2019, 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. + */ +import { Meter } from './Meter'; +import { MetricOptions, Metric, Labels, MetricUtils } from './Metric'; +import { BoundMeasure, BoundCounter, BoundObserver } from './BoundInstrument'; +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +import { ObserverResult } from './ObserverResult'; +/** + * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses + * constant NoopMetrics for all of its methods. + */ +export declare class NoopMeter implements Meter { + constructor(); + /** + * Returns constant noop measure. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createMeasure(name: string, options?: MetricOptions): Metric; + /** + * Returns a constant noop counter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createCounter(name: string, options?: MetricOptions): Metric; + /** + * Returns constant noop observer. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createObserver(name: string, options?: MetricOptions): Metric; +} +export declare class NoopMetric implements Metric { + private readonly _instrument; + constructor(instrument: T); + /** + * Returns a Bound Instrument associated with specified Labels. + * It is recommended to keep a reference to the Bound Instrument instead of + * always calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + bind(labels: Labels): T; + /** + * Removes the Binding from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + unbind(labels: Labels): void; + /** + * Clears all timeseries from the Metric. + */ + clear(): void; +} +export declare class NoopCounterMetric extends NoopMetric implements Pick { + add(value: number, labels: Labels): void; +} +export declare class NoopMeasureMetric extends NoopMetric implements Pick { + record(value: number, labels: Labels, correlationContext?: CorrelationContext, spanContext?: SpanContext): void; +} +export declare class NoopObserverMetric extends NoopMetric implements Pick { + setCallback(callback: (observerResult: ObserverResult) => void): void; +} +export declare class NoopBoundCounter implements BoundCounter { + add(value: number): void; +} +export declare class NoopBoundMeasure implements BoundMeasure { + record(value: number, correlationContext?: CorrelationContext, spanContext?: SpanContext): void; +} +export declare class NoopBoundObserver implements BoundObserver { + setCallback(callback: (observerResult: ObserverResult) => void): void; +} +export declare const NOOP_METER: NoopMeter; +export declare const NOOP_BOUND_COUNTER: NoopBoundCounter; +export declare const NOOP_COUNTER_METRIC: NoopCounterMetric; +export declare const NOOP_BOUND_MEASURE: NoopBoundMeasure; +export declare const NOOP_MEASURE_METRIC: NoopMeasureMetric; +export declare const NOOP_BOUND_OBSERVER: NoopBoundObserver; +export declare const NOOP_OBSERVER_METRIC: NoopObserverMetric; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js new file mode 100644 index 000000000..b2193faca --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js @@ -0,0 +1,126 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses + * constant NoopMetrics for all of its methods. + */ +class NoopMeter { + constructor() { } + /** + * Returns constant noop measure. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createMeasure(name, options) { + return exports.NOOP_MEASURE_METRIC; + } + /** + * Returns a constant noop counter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createCounter(name, options) { + return exports.NOOP_COUNTER_METRIC; + } + /** + * Returns constant noop observer. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createObserver(name, options) { + return exports.NOOP_OBSERVER_METRIC; + } +} +exports.NoopMeter = NoopMeter; +class NoopMetric { + constructor(instrument) { + this._instrument = instrument; + } + /** + * Returns a Bound Instrument associated with specified Labels. + * It is recommended to keep a reference to the Bound Instrument instead of + * always calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + bind(labels) { + return this._instrument; + } + /** + * Removes the Binding from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + unbind(labels) { + return; + } + /** + * Clears all timeseries from the Metric. + */ + clear() { + return; + } +} +exports.NoopMetric = NoopMetric; +class NoopCounterMetric extends NoopMetric { + add(value, labels) { + this.bind(labels).add(value); + } +} +exports.NoopCounterMetric = NoopCounterMetric; +class NoopMeasureMetric extends NoopMetric { + record(value, labels, correlationContext, spanContext) { + if (typeof correlationContext === 'undefined') { + this.bind(labels).record(value); + } + else if (typeof spanContext === 'undefined') { + this.bind(labels).record(value, correlationContext); + } + else { + this.bind(labels).record(value, correlationContext, spanContext); + } + } +} +exports.NoopMeasureMetric = NoopMeasureMetric; +class NoopObserverMetric extends NoopMetric { + setCallback(callback) { } +} +exports.NoopObserverMetric = NoopObserverMetric; +class NoopBoundCounter { + add(value) { + return; + } +} +exports.NoopBoundCounter = NoopBoundCounter; +class NoopBoundMeasure { + record(value, correlationContext, spanContext) { + return; + } +} +exports.NoopBoundMeasure = NoopBoundMeasure; +class NoopBoundObserver { + setCallback(callback) { } +} +exports.NoopBoundObserver = NoopBoundObserver; +exports.NOOP_METER = new NoopMeter(); +exports.NOOP_BOUND_COUNTER = new NoopBoundCounter(); +exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(exports.NOOP_BOUND_COUNTER); +exports.NOOP_BOUND_MEASURE = new NoopBoundMeasure(); +exports.NOOP_MEASURE_METRIC = new NoopMeasureMetric(exports.NOOP_BOUND_MEASURE); +exports.NOOP_BOUND_OBSERVER = new NoopBoundObserver(); +exports.NOOP_OBSERVER_METRIC = new NoopObserverMetric(exports.NOOP_BOUND_OBSERVER); +//# sourceMappingURL=NoopMeter.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts new file mode 100644 index 000000000..274332d55 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts @@ -0,0 +1,25 @@ +/*! + * Copyright 2019, 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. + */ +import { Meter } from './Meter'; +import { MeterProvider } from './MeterProvider'; +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +export declare class NoopMeterProvider implements MeterProvider { + getMeter(_name?: string, _version?: string): Meter; +} +export declare const NOOP_METER_PROVIDER: NoopMeterProvider; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js new file mode 100644 index 000000000..b217ceadf --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js @@ -0,0 +1,30 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +const NoopMeter_1 = require("./NoopMeter"); +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +class NoopMeterProvider { + getMeter(_name, _version) { + return NoopMeter_1.NOOP_METER; + } +} +exports.NoopMeterProvider = NoopMeterProvider; +exports.NOOP_METER_PROVIDER = new NoopMeterProvider(); +//# sourceMappingURL=NoopMeterProvider.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts new file mode 100644 index 000000000..500ef85f4 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright 2020, 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. + */ +import { Labels } from './Metric'; +/** + * Interface that is being used in function setCallback for Observer Metric + */ +export interface ObserverResult { + observers: Map; + observe(callback: Function, labels: Labels): void; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js new file mode 100644 index 000000000..e718295ee --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2020, 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=ObserverResult.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts new file mode 100644 index 000000000..a7cabb30d --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts @@ -0,0 +1,23 @@ +/*! + * Copyright 2019, 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. + */ +import { Attributes } from './attributes'; +/** A text annotation with a set of attributes. */ +export interface Event { + /** The name of the event. */ + name: string; + /** The attributes of the event. */ + attributes?: Attributes; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.js new file mode 100644 index 000000000..49eed3641 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Event.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=Event.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts new file mode 100644 index 000000000..faa7ed214 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts @@ -0,0 +1,40 @@ +/*! + * Copyright 2019, 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. + */ +import { TimeInput } from '../common/Time'; +import { Attributes } from './attributes'; +import { Span } from './span'; +import { SpanContext } from './span_context'; +import { Status } from './status'; +export declare const INVALID_TRACE_ID = "0"; +export declare const INVALID_SPAN_ID = "0"; +/** + * The NoopSpan is the default {@link Span} that is used when no Span + * implementation is available. All operations are no-op including context + * propagation. + */ +export declare class NoopSpan implements Span { + private readonly _spanContext; + constructor(_spanContext?: SpanContext); + context(): SpanContext; + setAttribute(key: string, value: unknown): this; + setAttributes(attributes: Attributes): this; + addEvent(name: string, attributes?: Attributes): this; + setStatus(status: Status): this; + updateName(name: string): this; + end(endTime?: TimeInput): void; + isRecording(): boolean; +} +export declare const NOOP_SPAN: NoopSpan; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js new file mode 100644 index 000000000..a3aef0be7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js @@ -0,0 +1,68 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +const trace_flags_1 = require("./trace_flags"); +exports.INVALID_TRACE_ID = '0'; +exports.INVALID_SPAN_ID = '0'; +const INVALID_SPAN_CONTEXT = { + traceId: exports.INVALID_TRACE_ID, + spanId: exports.INVALID_SPAN_ID, + traceFlags: trace_flags_1.TraceFlags.NONE, +}; +/** + * The NoopSpan is the default {@link Span} that is used when no Span + * implementation is available. All operations are no-op including context + * propagation. + */ +class NoopSpan { + constructor(_spanContext = INVALID_SPAN_CONTEXT) { + this._spanContext = _spanContext; + } + // Returns a SpanContext. + context() { + return this._spanContext; + } + // By default does nothing + setAttribute(key, value) { + return this; + } + // By default does nothing + setAttributes(attributes) { + return this; + } + // By default does nothing + addEvent(name, attributes) { + return this; + } + // By default does nothing + setStatus(status) { + return this; + } + // By default does nothing + updateName(name) { + return this; + } + // By default does nothing + end(endTime) { } + // isRecording always returns false for noopSpan. + isRecording() { + return false; + } +} +exports.NoopSpan = NoopSpan; +exports.NOOP_SPAN = new NoopSpan(); +//# sourceMappingURL=NoopSpan.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts new file mode 100644 index 000000000..02ee4720f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts @@ -0,0 +1,26 @@ +/*! + * Copyright 2020, 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. + */ +import { Span, SpanOptions, Tracer } from '..'; +/** + * No-op implementations of {@link Tracer}. + */ +export declare class NoopTracer implements Tracer { + getCurrentSpan(): Span; + startSpan(name: string, options?: SpanOptions): Span; + withSpan ReturnType>(span: Span, fn: T): ReturnType; + bind(target: T, span?: Span): T; +} +export declare const NOOP_TRACER: NoopTracer; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js new file mode 100644 index 000000000..7bdb17cce --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js @@ -0,0 +1,39 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +const NoopSpan_1 = require("./NoopSpan"); +/** + * No-op implementations of {@link Tracer}. + */ +class NoopTracer { + getCurrentSpan() { + return NoopSpan_1.NOOP_SPAN; + } + // startSpan starts a noop span. + startSpan(name, options) { + return NoopSpan_1.NOOP_SPAN; + } + withSpan(span, fn) { + return fn(); + } + bind(target, span) { + return target; + } +} +exports.NoopTracer = NoopTracer; +exports.NOOP_TRACER = new NoopTracer(); +//# sourceMappingURL=NoopTracer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts new file mode 100644 index 000000000..e38665daa --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts @@ -0,0 +1,25 @@ +/*! + * Copyright 2019, 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. + */ +import { Tracer } from './tracer'; +import { TracerProvider } from './tracer_provider'; +/** + * An implementation of the {@link TracerProvider} which returns an impotent Tracer + * for all calls to `getTracer` + */ +export declare class NoopTracerProvider implements TracerProvider { + getTracer(_name?: string, _version?: string): Tracer; +} +export declare const NOOP_TRACER_PROVIDER: NoopTracerProvider; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js new file mode 100644 index 000000000..fa1e616a7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js @@ -0,0 +1,30 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +const NoopTracer_1 = require("./NoopTracer"); +/** + * An implementation of the {@link TracerProvider} which returns an impotent Tracer + * for all calls to `getTracer` + */ +class NoopTracerProvider { + getTracer(_name, _version) { + return NoopTracer_1.NOOP_TRACER; + } +} +exports.NoopTracerProvider = NoopTracerProvider; +exports.NOOP_TRACER_PROVIDER = new NoopTracerProvider(); +//# sourceMappingURL=NoopTracerProvider.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts new file mode 100644 index 000000000..7805fd229 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts @@ -0,0 +1,34 @@ +/*! + * Copyright 2019, 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. + */ +import { SpanContext } from './span_context'; +/** + * This interface represent a sampler. Sampling is a mechanism to control the + * noise and overhead introduced by OpenTelemetry by reducing the number of + * samples of traces collected and sent to the backend. + */ +export interface Sampler { + /** + * Checks whether span needs to be created and tracked. + * + * TODO: Consider to add required arguments https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sampling-api.md#shouldsample + * @param [parentContext] Parent span context. Typically taken from the wire. + * Can be null. + * @returns whether span should be sampled or not. + */ + shouldSample(parentContext?: SpanContext): boolean; + /** Returns the sampler name or short description with the configuration. */ + toString(): string; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.js new file mode 100644 index 000000000..516799583 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/Sampler.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts new file mode 100644 index 000000000..d3968fffa --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts @@ -0,0 +1,49 @@ +/*! + * Copyright 2019, 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. + */ +import { Attributes } from './attributes'; +import { Link } from './link'; +import { SpanKind } from './span_kind'; +import { Span } from './span'; +import { SpanContext } from './span_context'; +/** + * Options needed for span creation + */ +export interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A spans attributes */ + attributes?: Attributes; + /** A spans links */ + links?: Link[]; + /** + * This option is NOT RECOMMENDED for normal use and should ONLY be used + * if your application manages context manually without the global context + * manager, or you are trying to override the parent extracted from context. + * + * A parent `SpanContext` (or `Span`, for convenience) that the newly-started + * span will be the child of. This overrides the parent span extracted from + * the currently active context. + * + * A null value here should prevent the SDK from extracting a parent from + * the current context, forcing the new span to be a root span. + */ + parent?: Span | SpanContext | null; + /** A manually specified start time for the created `Span` object. */ + startTime?: number; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js new file mode 100644 index 000000000..81d0daf23 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts new file mode 100644 index 000000000..6a41aeb1f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts @@ -0,0 +1,24 @@ +/*! + * Copyright 2019, 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. + */ +import { Event } from './Event'; +import { HrTime } from '../common/Time'; +/** + * Represents a timed event. + * A timed event is an event with a timestamp. + */ +export interface TimedEvent extends Event { + time: HrTime; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js new file mode 100644 index 000000000..62492de41 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=TimedEvent.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts new file mode 100644 index 000000000..ea24a6b23 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts @@ -0,0 +1,19 @@ +/*! + * Copyright 2019, 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. + */ +/** Defines a attributes interface. */ +export interface Attributes { + [attributeKey: string]: unknown; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.js new file mode 100644 index 000000000..3c4f9bdac --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/attributes.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts new file mode 100644 index 000000000..de62dd6ca --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts @@ -0,0 +1,85 @@ +/*! + * Copyright 2019, 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. + */ +import { Logger } from '../../common/Logger'; +import { TracerProvider } from '../tracer_provider'; +/** Interface Plugin to apply patch. */ +export interface Plugin { + /** + * Contains all supported versions. + * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format. + * If the version is not supported, we won't apply instrumentation patch (see `enable` method). + * If omitted, all versions of the module will be patched. + */ + supportedVersions?: string[]; + /** + * Name of the module that the plugin instrument. + */ + moduleName: string; + /** + * Method that enables the instrumentation patch. + * @param moduleExports The value of the `module.exports` property that would + * normally be exposed by the required module. ex: `http`, `https` etc. + * @param TracerProvider a tracer provider. + * @param logger a logger instance. + * @param [config] an object to configure the plugin. + */ + enable(moduleExports: T, TracerProvider: TracerProvider, logger: Logger, config?: PluginConfig): T; + /** Method to disable the instrumentation */ + disable(): void; +} +export interface PluginConfig { + /** + * Whether to enable the plugin. + * @default true + */ + enabled?: boolean; + /** + * Path of the trace plugin to load. + * @default '@opentelemetry/plugin-http' in case of http. + */ + path?: string; + /** + * Request methods that match any string in ignoreMethods will not be traced. + */ + ignoreMethods?: string[]; + /** + * URLs that partially match any regex in ignoreUrls will not be traced. + * In addition, URLs that are _exact matches_ of strings in ignoreUrls will + * also not be traced. + */ + ignoreUrls?: Array; + /** + * List of internal files that need patch and are not exported by + * default. + */ + internalFilesExports?: PluginInternalFiles; + /** + * If true, additional information about query parameters and + * results will be attached (as `attributes`) to spans representing + * database operations. + */ + enhancedDatabaseReporting?: boolean; +} +export interface PluginInternalFilesVersion { + [pluginName: string]: string; +} +/** + * Each key should be the name of the module to trace, and its value + * a mapping of a property name to a internal plugin file name. + */ +export interface PluginInternalFiles { + [versions: string]: PluginInternalFilesVersion; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js new file mode 100644 index 000000000..b96bc9225 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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=Plugin.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.d.ts new file mode 100644 index 000000000..62470d6ea --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.d.ts @@ -0,0 +1,28 @@ +/*! + * Copyright 2019, 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. + */ +import { Attributes } from './attributes'; +import { LinkContext } from './link_context'; +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. Used (for example) in batching operations, where a + * single batch handler processes multiple requests from different traces. + */ +export interface Link { + /** The {@link LinkContext} of a linked span. */ + context: LinkContext; + /** A set of {@link Attributes} on the link. */ + attributes?: Attributes; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.js new file mode 100644 index 000000000..7255049a7 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts new file mode 100644 index 000000000..847a6fafc --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts @@ -0,0 +1,20 @@ +/*! + * Copyright 2020, 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. + */ +import { SpanContext } from './span_context'; +/** + * A pointer to another span. + */ +export declare type LinkContext = Pick; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.js new file mode 100644 index 000000000..29e63cf0d --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/link_context.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2020, 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_context.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.d.ts new file mode 100644 index 000000000..13653647f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.d.ts @@ -0,0 +1,90 @@ +/*! + * Copyright 2019, 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. + */ +import { Attributes } from './attributes'; +import { SpanContext } from './span_context'; +import { Status } from './status'; +import { TimeInput } from '../common/Time'; +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + */ +export interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * @returns the SpanContext object associated with this Span. + */ + context(): SpanContext; + /** + * Sets an attribute to the span. + * + * @param key the key for this attribute. + * @param value the value for this attribute. + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + */ + setAttributes(attributes: Attributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: Attributes | TimeInput, startTime?: TimeInput): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link CanonicalCode.OK}. + * + * @param status the Status to set. + */ + setStatus(status: Status): this; + /** + * Updates the Span name. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the AddEvent operation and attributes using setAttributes. + */ + isRecording(): boolean; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.js new file mode 100644 index 000000000..3ea9a8d32 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts new file mode 100644 index 000000000..e27bb4554 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts @@ -0,0 +1,68 @@ +/*! + * Copyright 2019, 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. + */ +import { TraceFlags } from './trace_flags'; +import { TraceState } from './trace_state'; +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link CorrelationContext}. + */ +export interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * SAMPLED = 0x1 and NONE = 0x0; + */ + traceFlags: TraceFlags; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.js new file mode 100644 index 000000000..56a4816fb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_context.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts new file mode 100644 index 000000000..452e07f11 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts @@ -0,0 +1,45 @@ +/*! + * Copyright 2019, 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. + */ +/** + * Type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +export declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.js new file mode 100644 index 000000000..79a05d495 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/span_kind.js @@ -0,0 +1,49 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * Type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +var SpanKind; +(function (SpanKind) { + /** Default value. Indicates that the span is used internally. */ + SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; +})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); +//# sourceMappingURL=span_kind.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.d.ts new file mode 100644 index 000000000..f0710ba82 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.d.ts @@ -0,0 +1,161 @@ +/*! + * Copyright 2019, 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. + */ +/** + * The status of a Span by providing a standard CanonicalCode in conjunction + * with an optional descriptive message. + */ +export interface Status { + /** The canonical code of this message. */ + code: CanonicalCode; + /** A developer-facing error message. */ + message?: string; +} +/** + * An enumeration of canonical status codes. + */ +export declare enum CanonicalCode { + /** + * Not an error; returned on success + */ + OK = 0, + /** + * The operation was cancelled (typically by the caller). + */ + CANCELLED = 1, + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + UNKNOWN = 2, + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + INVALID_ARGUMENT = 3, + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + DEADLINE_EXCEEDED = 4, + /** + * Some requested entity (e.g., file or directory) was not found. + */ + NOT_FOUND = 5, + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + ALREADY_EXISTS = 6, + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + PERMISSION_DENIED = 7, + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + RESOURCE_EXHAUSTED = 8, + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + FAILED_PRECONDITION = 9, + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + ABORTED = 10, + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + OUT_OF_RANGE = 11, + /** + * Operation is not implemented or not supported/enabled in this service. + */ + UNIMPLEMENTED = 12, + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + INTERNAL = 13, + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + UNAVAILABLE = 14, + /** + * Unrecoverable data loss or corruption. + */ + DATA_LOSS = 15, + /** + * The request does not have valid authentication credentials for the + * operation. + */ + UNAUTHENTICATED = 16 +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.js new file mode 100644 index 000000000..e46a06b42 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/status.js @@ -0,0 +1,155 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * An enumeration of canonical status codes. + */ +var CanonicalCode; +(function (CanonicalCode) { + /** + * Not an error; returned on success + */ + CanonicalCode[CanonicalCode["OK"] = 0] = "OK"; + /** + * The operation was cancelled (typically by the caller). + */ + CanonicalCode[CanonicalCode["CANCELLED"] = 1] = "CANCELLED"; + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + CanonicalCode[CanonicalCode["UNKNOWN"] = 2] = "UNKNOWN"; + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT"; + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED"; + /** + * Some requested entity (e.g., file or directory) was not found. + */ + CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND"; + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS"; + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED"; + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED"; + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION"; + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED"; + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + CanonicalCode[CanonicalCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE"; + /** + * Operation is not implemented or not supported/enabled in this service. + */ + CanonicalCode[CanonicalCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED"; + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + CanonicalCode[CanonicalCode["INTERNAL"] = 13] = "INTERNAL"; + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["UNAVAILABLE"] = 14] = "UNAVAILABLE"; + /** + * Unrecoverable data loss or corruption. + */ + CanonicalCode[CanonicalCode["DATA_LOSS"] = 15] = "DATA_LOSS"; + /** + * The request does not have valid authentication credentials for the + * operation. + */ + CanonicalCode[CanonicalCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED"; +})(CanonicalCode = exports.CanonicalCode || (exports.CanonicalCode = {})); +//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts new file mode 100644 index 000000000..f9ba988e1 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts @@ -0,0 +1,26 @@ +/*! + * Copyright 2019, 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. + */ +/** + * An enumeration that represents global trace flags. These flags are + * propagated to all child {@link Span}. These determine features such as + * whether a Span should be traced. It is implemented as a bitmask. + */ +export declare enum TraceFlags { + /** Represents no flag set. */ + NONE = 0, + /** Bit to represent whether trace is sampled in trace flags. */ + SAMPLED = 1 +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js new file mode 100644 index 000000000..383549904 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js @@ -0,0 +1,30 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +/** + * An enumeration that represents global trace flags. These flags are + * propagated to all child {@link Span}. These determine features such as + * whether a Span should be traced. It is implemented as a bitmask. + */ +var TraceFlags; +(function (TraceFlags) { + /** Represents no flag set. */ + TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; + /** Bit to represent whether trace is sampled in trace flags. */ + TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; +})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); +//# sourceMappingURL=trace_flags.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts new file mode 100644 index 000000000..03b3de042 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts @@ -0,0 +1,56 @@ +/*! + * Copyright 2019, 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. + */ +/** + * Tracestate carries system-specific configuration data, represented as a list + * of key-value pairs. TraceState allows multiple tracing systems to + * participate in the same trace. + */ +export interface TraceState { + /** + * Adds or updates the TraceState that has the given `key` if it is + * present. The new State will always be added in the front of the + * list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): void; + /** + * Removes the TraceState Entry that has the given `key` if it is present. + * + * @param key the key for the TraceState Entry to be removed. + */ + unset(key: string): void; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.js new file mode 100644 index 000000000..00e7a4833 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/trace_state.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts new file mode 100644 index 000000000..f55c8dbca --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts @@ -0,0 +1,59 @@ +/*! + * Copyright 2019, 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. + */ +import { Context } from '@opentelemetry/context-base'; +import { Span } from './span'; +import { SpanOptions } from './SpanOptions'; +/** + * Tracer provides an interface for creating {@link Span}s and propagating + * context in-process. + * + * Users may choose to use manual or automatic Context propagation. Because of + * that this class offers APIs to facilitate both usages. + */ +export interface Tracer { + /** + * Returns the current Span from the current context if available. + * + * If there is no Span associated with the current context, null is returned. + * + * @returns Span The currently active Span + */ + getCurrentSpan(): Span | undefined; + /** + * Starts a new {@link Span}. + * @param name The name of the span + * @param [options] SpanOptions used for span creation + * @param [context] Context to use to extract parent + * @returns Span The newly created span + */ + startSpan(name: string, options?: SpanOptions, context?: Context): Span; + /** + * Executes the function given by fn within the context provided by Span + * + * @param span The span that provides the context + * @param fn The function to be executed inside the provided context + * @example + * tracer.withSpan(span, function() { ... }); + */ + withSpan ReturnType>(span: Span, fn: T): ReturnType; + /** + * Bind a span as the target's context or propagate the current one. + * + * @param target Any object to which a context need to be set + * @param [context] Optionally specify the context which you want to bind + */ + bind(target: T, context?: Span): T; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.js new file mode 100644 index 000000000..357065290 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts new file mode 100644 index 000000000..fb2401847 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts @@ -0,0 +1,33 @@ +/*! + * Copyright 2019, 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. + */ +import { Tracer } from './tracer'; +/** + * TracerProvider provides an interface for creating {@link Tracer}s + */ +export interface TracerProvider { + /** + * Returns a Tracer, creating one if one with the given name and version is + * not already created. + * + * If there is no Span associated with the current context, `null` is + * returned. + * + * @param name The name of the tracer or instrumentation library. + * @param version The version of the tracer or instrumentation library. + * @returns Tracer A Tracer with the given name and version + */ + getTracer(name: string, version?: string): Tracer; +} diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js new file mode 100644 index 000000000..1a541ba98 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.d.ts b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.d.ts new file mode 100644 index 000000000..ece496a1b --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.d.ts @@ -0,0 +1,16 @@ +/*! + * Copyright 2019, 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. + */ +export declare const VERSION = "0.6.1"; diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.js b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.js new file mode 100644 index 000000000..2230c1214 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/build/src/version.js @@ -0,0 +1,20 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.6.1'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/package.json b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/package.json new file mode 100644 index 000000000..ab41fba25 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/@opentelemetry/api/package.json @@ -0,0 +1,112 @@ +{ + "_from": "@opentelemetry/api@^0.6.1", + "_id": "@opentelemetry/api@0.6.1", + "_inBundle": false, + "_integrity": "sha512-wpufGZa7tTxw7eAsjXJtiyIQ42IWQdX9iUQp7ACJcKo1hCtuhLU+K2Nv1U6oRwT1oAlZTE6m4CgWKZBhOiau3Q==", + "_location": "/@azure/core-auth/@opentelemetry/api", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@opentelemetry/api@^0.6.1", + "name": "@opentelemetry/api", + "escapedName": "@opentelemetry%2fapi", + "scope": "@opentelemetry", + "rawSpec": "^0.6.1", + "saveSpec": null, + "fetchSpec": "^0.6.1" + }, + "_requiredBy": [ + "/@azure/core-auth", + "/@azure/core-auth/@azure/core-tracing" + ], + "_resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-0.6.1.tgz", + "_shasum": "a00b504801f408230b9ad719716fe91ad888c642", + "_spec": "@opentelemetry/api@^0.6.1", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth", + "author": { + "name": "OpenTelemetry Authors" + }, + "bugs": { + "url": "https://github.com/open-telemetry/opentelemetry-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@opentelemetry/context-base": "^0.6.1" + }, + "deprecated": false, + "description": "Public API for OpenTelemetry", + "devDependencies": { + "@types/mocha": "^7.0.0", + "@types/node": "^12.6.8", + "@types/webpack-env": "1.13.9", + "codecov": "^3.6.1", + "gts": "^1.1.0", + "istanbul-instrumenter-loader": "^3.0.1", + "karma": "^4.4.1", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage-istanbul-reporter": "^2.1.0", + "karma-mocha": "^1.3.0", + "karma-spec-reporter": "^0.0.32", + "karma-webpack": "^4.0.2", + "linkinator": "^2.0.3", + "mocha": "^6.1.0", + "nyc": "^15.0.0", + "ts-loader": "^6.0.4", + "ts-mocha": "^6.0.0", + "tslint-consistent-codestyle": "^1.16.0", + "tslint-microsoft-contrib": "^6.2.0", + "typedoc": "^0.15.0", + "typescript": "3.7.2", + "webpack": "^4.35.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.d.ts", + "doc", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", + "keywords": [ + "opentelemetry", + "nodejs", + "browser", + "tracing", + "profiling", + "metrics", + "stats", + "monitoring" + ], + "license": "Apache-2.0", + "main": "build/src/index.js", + "name": "@opentelemetry/api", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/open-telemetry/opentelemetry-js.git" + }, + "scripts": { + "build": "npm run compile", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "compile": "npm run version:update && tsc -p .", + "docs": "typedoc --tsconfig tsconfig.json --exclude test/**/*.ts", + "docs-test": "linkinator docs/out --silent --skip david-dm.org", + "lint": "gts check", + "lint:fix": "gts fix", + "precompile": "tsc --version", + "prepare": "npm run compile", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", + "test:browser": "nyc karma start --single-run", + "version:update": "node ../../scripts/version-update.js", + "watch": "tsc -w" + }, + "types": "build/src/index.d.ts", + "version": "0.6.1" +} diff --git a/node_modules/@azure/core-auth/node_modules/tslib/CopyrightNotice.txt b/node_modules/@azure/core-auth/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 000000000..3d4c82348 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@azure/core-auth/node_modules/tslib/LICENSE.txt b/node_modules/@azure/core-auth/node_modules/tslib/LICENSE.txt new file mode 100644 index 000000000..bfe6430cb --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/tslib/README.md b/node_modules/@azure/core-auth/node_modules/tslib/README.md new file mode 100644 index 000000000..49c001420 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/README.md @@ -0,0 +1,154 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 3.9.2 or later +npm install tslib + +# TypeScript 3.8.4 or earlier +npm install tslib@^1 + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 3.9.2 or later +yarn add tslib + +# TypeScript 3.8.4 or earlier +yarn add tslib@^1 + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 3.9.2 or later +bower install tslib + +# TypeScript 3.8.4 or earlier +bower install tslib@^1 + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 3.9.2 or later +jspm install tslib + +# TypeScript 3.8.4 or earlier +jspm install tslib@^1 + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@azure/core-auth/node_modules/tslib/modules/index.js b/node_modules/@azure/core-auth/node_modules/tslib/modules/index.js new file mode 100644 index 000000000..d241d0422 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@azure/core-auth/node_modules/tslib/modules/package.json b/node_modules/@azure/core-auth/node_modules/tslib/modules/package.json new file mode 100644 index 000000000..aafa0e4b4 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/tslib/package.json b/node_modules/@azure/core-auth/node_modules/tslib/package.json new file mode 100644 index 000000000..ac26aca73 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/package.json @@ -0,0 +1,64 @@ +{ + "_from": "tslib@^2.0.0", + "_id": "tslib@2.0.3", + "_inBundle": false, + "_integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "_location": "/@azure/core-auth/tslib", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tslib@^2.0.0", + "name": "tslib", + "escapedName": "tslib", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@azure/core-auth" + ], + "_resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "_shasum": "8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c", + "_spec": "tslib@^2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth", + "author": { + "name": "Microsoft Corp." + }, + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Runtime library for TypeScript helper functions", + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + }, + "homepage": "https://www.typescriptlang.org/", + "jsnext:main": "tslib.es6.js", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "license": "0BSD", + "main": "tslib.js", + "module": "tslib.es6.js", + "name": "tslib", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/tslib.git" + }, + "sideEffects": false, + "typings": "tslib.d.ts", + "version": "2.0.3" +} diff --git a/node_modules/@azure/core-auth/node_modules/tslib/tslib.d.ts b/node_modules/@azure/core-auth/node_modules/tslib/tslib.d.ts new file mode 100644 index 000000000..9e43edcda --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, o: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; diff --git a/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.html b/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.html new file mode 100644 index 000000000..b122e41b0 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.js b/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.js new file mode 100644 index 000000000..c60aa609f --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/tslib.es6.js @@ -0,0 +1,227 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __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]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@azure/core-auth/node_modules/tslib/tslib.html b/node_modules/@azure/core-auth/node_modules/tslib/tslib.html new file mode 100644 index 000000000..44c9ba51e --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-auth/node_modules/tslib/tslib.js b/node_modules/@azure/core-auth/node_modules/tslib/tslib.js new file mode 100644 index 000000000..fcf619a47 --- /dev/null +++ b/node_modules/@azure/core-auth/node_modules/tslib/tslib.js @@ -0,0 +1,292 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __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]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@azure/core-auth/package.json b/node_modules/@azure/core-auth/package.json new file mode 100644 index 000000000..a62e2336c --- /dev/null +++ b/node_modules/@azure/core-auth/package.json @@ -0,0 +1,140 @@ +{ + "_from": "@azure/core-auth@^1.1.3", + "_id": "@azure/core-auth@1.1.3", + "_inBundle": false, + "_integrity": "sha512-A4xigW0YZZpkj1zK7dKuzbBpGwnhEcRk6WWuIshdHC32raR3EQ1j6VA9XZqE+RFsUgH6OAmIK5BWIz+mZjnd6Q==", + "_location": "/@azure/core-auth", + "_phantomChildren": { + "@opencensus/web-types": "0.0.7", + "@opentelemetry/context-base": "0.6.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/core-auth@^1.1.3", + "name": "@azure/core-auth", + "escapedName": "@azure%2fcore-auth", + "scope": "@azure", + "rawSpec": "^1.1.3", + "saveSpec": null, + "fetchSpec": "^1.1.3" + }, + "_requiredBy": [ + "/@azure/core-http" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.1.3.tgz", + "_shasum": "94e7bbc207010e7a2fdba61565443e4e1cf1e131", + "_spec": "@azure/core-auth@^1.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-http", + "author": { + "name": "Microsoft Corporation" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.8", + "@opentelemetry/api": "^0.6.1", + "tslib": "^2.0.0" + }, + "deprecated": false, + "description": "Provides low-level interfaces and helper methods for authentication in Azure SDK", + "devDependencies": { + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^7.0.2", + "downlevel-dts": "~0.4.0", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "inherits": "^2.0.3", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", + "util": "^0.12.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "dist/", + "dist-esm/src/", + "types/latest/core-auth.d.ts", + "types/3.1", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/README.md", + "keywords": [ + "azure", + "authentication", + "Azure", + "cloud" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "dist-esm/src/index.js", + "name": "@azure/core-auth", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types", + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "cd samples && tsc -p .", + "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "build:types": "downlevel-dts types/latest types/3.1", + "check-format": "prettier --list-different --config ../../.prettierrc.json --ignore-path ../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json --ignore-path ../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o core-auth-lintReport.html", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "mocha test-dist/**/*.js --reporter ../../../common/tools/mocha-multi-reporter.js" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "./types/latest/core-auth.d.ts", + "typesVersions": { + "<3.6": { + "types/latest/*": [ + "types/3.1/*" + ] + } + }, + "version": "1.1.3" +} diff --git a/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts b/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts new file mode 100644 index 000000000..814f9dd14 --- /dev/null +++ b/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts @@ -0,0 +1,95 @@ +import { AbortSignalLike } from '@azure/abort-controller'; +import { SpanOptions } from '@azure/core-tracing'; +/** + * Represents an access token with an expiration time. + */ +export declare interface AccessToken { + /** + * The access token returned by the authentication service. + */ + token: string; + /** + * The access token's expiration timestamp in milliseconds, UNIX epoch time. + */ + expiresOnTimestamp: number; +} +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +export declare class AzureKeyCredential implements KeyCredential { + private _key; + readonly key: string; + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key the initial value of the key to use in authentication + */ + constructor(key: string); + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey the new key value to be used + */ + update(newKey: string): void; +} +/** + * Defines options for TokenCredential.getToken. + */ +export declare interface GetTokenOptions { + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * Options used when creating and sending HTTP requests for this operation. + */ + requestOptions?: { + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + }; + /** + * Options used when tracing is enabled. + */ + tracingOptions?: { + /** + * OpenTelemetry SpanOptions used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + }; +} +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential The assumed TokenCredential to be tested. + */ +export declare function isTokenCredential(credential: any): credential is TokenCredential; +/** + * Represents a credential defined by a static API key. + */ +export declare interface KeyCredential { + /** + * The value of the API key represented as a string + */ + readonly key: string; +} +/** + * Represents a credential capable of providing an authentication token. + */ +export declare interface TokenCredential { + /** + * Gets the token provided by this credential. + * + * @param scopes The list of scopes for which the token will have access. + * @param options The options used to configure any requests this + * TokenCredential implementation might make. + */ + getToken(scopes: string | string[], options?: GetTokenOptions): Promise; +} +export {}; diff --git a/node_modules/@azure/core-auth/types/latest/core-auth.d.ts b/node_modules/@azure/core-auth/types/latest/core-auth.d.ts new file mode 100644 index 000000000..eec4d3135 --- /dev/null +++ b/node_modules/@azure/core-auth/types/latest/core-auth.d.ts @@ -0,0 +1,105 @@ +import { AbortSignalLike } from '@azure/abort-controller'; +import { SpanOptions } from '@azure/core-tracing'; + +/** + * Represents an access token with an expiration time. + */ +export declare interface AccessToken { + /** + * The access token returned by the authentication service. + */ + token: string; + /** + * The access token's expiration timestamp in milliseconds, UNIX epoch time. + */ + expiresOnTimestamp: number; +} + +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +export declare class AzureKeyCredential implements KeyCredential { + private _key; + /** + * The value of the key to be used in authentication + */ + get key(): string; + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key the initial value of the key to use in authentication + */ + constructor(key: string); + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey the new key value to be used + */ + update(newKey: string): void; +} + +/** + * Defines options for TokenCredential.getToken. + */ +export declare interface GetTokenOptions { + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * Options used when creating and sending HTTP requests for this operation. + */ + requestOptions?: { + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + }; + /** + * Options used when tracing is enabled. + */ + tracingOptions?: { + /** + * OpenTelemetry SpanOptions used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + }; +} + +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential The assumed TokenCredential to be tested. + */ +export declare function isTokenCredential(credential: any): credential is TokenCredential; + +/** + * Represents a credential defined by a static API key. + */ +export declare interface KeyCredential { + /** + * The value of the API key represented as a string + */ + readonly key: string; +} + +/** + * Represents a credential capable of providing an authentication token. + */ +export declare interface TokenCredential { + /** + * Gets the token provided by this credential. + * + * @param scopes The list of scopes for which the token will have access. + * @param options The options used to configure any requests this + * TokenCredential implementation might make. + */ + getToken(scopes: string | string[], options?: GetTokenOptions): Promise; +} + +export { } diff --git a/node_modules/@azure/core-http/CHANGELOG.md b/node_modules/@azure/core-http/CHANGELOG.md new file mode 100644 index 000000000..38b15e3f4 --- /dev/null +++ b/node_modules/@azure/core-http/CHANGELOG.md @@ -0,0 +1,151 @@ +# Release History + +## 1.2.0 (2020-11-05) + +- Explicitly set `manual` redirect handling for node fetch. And fixing redirectPipeline [PR 11863](https://github.com/Azure/azure-sdk-for-js/pull/11863) +- Add support for multiple error response codes. [PR 11841](https://github.com/Azure/azure-sdk-for-js/) +- Allow customizing serializer behavior via optional `SerialzierOptions` parameters. Particularly allow using a different `XML_CHARKEY` than the default `_` when parsing XML [PR 12065](https://github.com/Azure/azure-sdk-for-js/pull/12065) +- Unexpected status code is now handled as an error if a mapper is not provided for it [PR 12153](https://github.com/Azure/azure-sdk-for-js/pull/12153) +- Empty collection is now serialized correctly for `multi` format query parameters [PR 12090](https://github.com/Azure/azure-sdk-for-js/pull/12090) +- De-serialize error from parsed object before trying to use its `code` and `message` properties [PR 12150](https://github.com/Azure/azure-sdk-for-js/pull/12150) +- Fix an error thrown on older versions of Safari [PR 11759](https://github.com/Azure/azure-sdk-for-js/pull/11759) + +## 1.1.9 (2020-09-30) + +- Add support for XML namespaces in deserialization [PR 11201](https://github.com/Azure/azure-sdk-for-js/pull/11201) + +- Add support for NDJSON format [PR 11325](https://github.com/Azure/azure-sdk-for-js/pull/11325) + +- Add support for `NO_PROXY` and `ALL_PROXY` environment variables [PR 7069](https://github.com/Azure/azure-sdk-for-js/pull/7069) + +- Serializer now resolves `additionalProperties` correctly from referenced mapper [PR 11473](https://github.com/Azure/azure-sdk-for-js/pull/11473) + +- Empty wrapped XML element lists are no properly de-serialized. This fixes [issue 11071](https://github.com/Azure/azure-sdk-for-js/issues/11071) + +## 1.1.8 (2020-09-08) + +- `URLQuery` parsing now accepts `=` in query parameter values and no longer drops such query parameter name/value pairs. This fixes [issue 11014](https://github.com/Azure/azure-sdk-for-js/issues/11014) + +## 1.1.7 (2020-09-02) + +- `BearerTokenAuthenticationPolicy` now starts trying to refresh the token 30 seconds before the token expires. It will only try to refresh said token on each request when refreshing is not in progress. In the mean time, requests will use the existing token. This fixes [issue 10084](https://github.com/Azure/azure-sdk-for-js/issues/10084). +- Un-export the `{...}Policy` classes that were meant to be internal to `@azure/core-http`. [PR 10738](https://github.com/Azure/azure-sdk-for-js/pull/10738) + +## 1.1.6 (2020-08-04) + +- Update dependencies `@azure/core-tracing` to version 1.0.0-preview.9 and `@opentelemetry/api` to version 0.10.2 [PR 10393](https://github.com/Azure/azure-sdk-for-js/pull/10393) + +## 1.1.5 (2020-08-04) + +- The global `fetch()` is no longer overridden by node-fetch. This fixed an issue impacting Electron render process. [PR #9880](https://github.com/Azure/azure-sdk-for-js/pull/9880) + +## 1.1.4 (2020-07-02) + +- Fix issue with flattened model serialization, where constant properties are being dropped [PR #8658](https://github.com/Azure/azure-sdk-for-js/pull/8658) +- Switch to use `x-ms-useragent` header key for passing user agent info in browsers [PR #9490](https://github.com/Azure/azure-sdk-for-js/pull/9490) +- Refactor `ExponentialRetryPolicy` and `SystemErrorRetryPolicy` to share common code [PR #9667](https://github.com/Azure/azure-sdk-for-js/pull/9490) + +## 1.1.3 (2020-06-03) + +- Fix issue of `SystemErrorRetryPolicy` didn't retry on errors [PR #8803](https://github.com/Azure/azure-sdk-for-js/pull/8803) +- Add support for serialization of text media type. [PR #8977](https://github.com/Azure/azure-sdk-for-js/pull/8977) +- Fix issue with URLBuilder incorrectly handling full URL in path. [PR #9245](https://github.com/Azure/azure-sdk-for-js/pull/9245) + +## 1.1.2 (2020-05-07) + +- Fix issue with null/undefined values in array and tabs/space delimiter arrays during sendOperationRequest. [PR #8604](https://github.com/Azure/azure-sdk-for-js/pull/8604) + +## 1.1.1 (2020-04-28) + +- Add support for `text/plain` endpoints. [PR #7963](https://github.com/Azure/azure-sdk-for-js/pull/7963) +- Updated to use OpenTelemetry 0.6.1 via `@azure/core-tracing`. + +## 1.1.0 (2020-03-31) + +- A new interface `WebResourceLike` was introduced to avoid a direct dependency on the class `WebResource` in public interfaces. `HttpHeadersLike` was also added to replace references to `HttpHeaders`. This should improve cross-version compatibility for core-http. [PR #7873](https://github.com/Azure/azure-sdk-for-js/pull/7873) + +- Add support to disable response decompression in `node-fetch` Http client. [PR #7878](https://github.com/Azure/azure-sdk-for-js/pull/7878) + +## 1.0.4 (2020-03-03) + +- When an operation times out based on the `timeout` configured in the `OperationRequestOptions`, it gets terminated with an error. In this update, the error that is thrown in browser for such cases is updated to match what is thrown in node i.e an `AbortError` is thrown instead of the previous `RestError`. [PR #7159](https://github.com/Azure/azure-sdk-for-js/pull/7159) +- Support for username and password in the proxy url [PR #7211](https://github.com/Azure/azure-sdk-for-js/pull/7211) +- Removed dependency on `lib.dom.d.ts` so TypeScript users no longer need `lib: ["dom"]` in their tsconfig.json file to use this library. [PR #7500](https://github.com/Azure/azure-sdk-for-js/pull/7500) + +## 1.0.3 (2020-01-02) + +- Added `x-ms-useragent` to the list of allowed headers in request logs. +- Fix issue of data being pushed twice when reporting progress ([PR #6427](https://github.com/Azure/azure-sdk-for-js/issues/6427)) +- Move `getDefaultProxySettings()` calls into `proxyPolicy` so that libraries that don't use the PipelineOptions or createDefaultRequestPolicyFactories from core-http can use this behavior without duplicating code. ([PR #6478](https://github.com/Azure/azure-sdk-for-js/issues/6478)) +- Fix tracingPolicy() to set standard span attributes ([PR #6565](https://github.com/Azure/azure-sdk-for-js/pull/6565)). Now the following are set correctly for the spans + - `http.method` + - `http.url` + - `http.user_agent` + - `http.status_code` + - `requestId` + - `serviceRequestId` + - `kind` = Client + - span name: URI path + +## 1.0.2 (2019-12-02) + +- Updated to use OpenTelemetry 0.2 via `@azure/core-tracing` + +## 1.0.0 (2019-10-29) + +- This release marks the general availability of the `@azure/core-http` package. +- Removed the browser bundle. A browser-compatible library can still be created through the use of a bundler such as Rollup, Webpack, or Parcel. + ([#5860](https://github.com/Azure/azure-sdk-for-js/pull/5860)) + +## 1.0.0-preview.6 (2019-10-22) + +- Introduced a HTTP pipeline configuration type, `PipelineOptions`, which makes it easier to configure common settings for API requests. This is now the options type used in the `@azure/keyvault-*` data plane libraries. +- Support for HTTP request logging has been redesigned to use `@azure/logger`; use`AZURE_LOG_LEVEL="info"` to see full request/response logs when running in Node.js. In the browser, you can import `setLogLevel` from `@azure/logger` to change the log level; logs will then be written to the browser console. +- Removed error type `ResponseBodyNotFoundError` that was introduced in the previous preview. Use cases for it were removed. +- Fixed an issue where error response details were not being deserialized correctly when the default mapper is used. +- In Node.js, HTTP agents configured for proxy or keepAlive are now reused across requests. This resolves a memory leak reported in [#4964](https://github.com/Azure/azure-sdk-for-js/issues/4964). +- Fixes a memory leak issue resulting from event listeners not being removed from abortSignals. +- Cancelling an operation using an `abortSignal` will now throw an `AbortError`. + The `name` property on the error will match "AbortError". + +## 1.0.0-preview.4 (2019-10-07) + +- No longer re-exports `@azure/core-tracing`. To enable tracing, call `setTracer` from `@azure/core-tracing` directly. + ([PR #5389](https://github.com/Azure/azure-sdk-for-js/pull/5389)) +- Report upload/download progress only after the first data chunk is received + ([PR #5298](https://github.com/Azure/azure-sdk-for-js/pull/5298)) +- Added new error type `ResponseBodyNotFoundError` for cases when the response body is unexpectedly empty. + ([PR #5369](https://github.com/Azure/azure-sdk-for-js/pull/5369)) +- Temporary fix for a memory leak issue resulting from creating new agents every time WebResource is cloned. + ([PR #5396](https://github.com/Azure/azure-sdk-for-js/pull/5396)) + +## 1.0.0-preview.3 (2019-09-09) + +- Syncs changes from `@azure/ms-rest-js` to `@azure/core-http`. + ([PR #4756](https://github.com/Azure/azure-sdk-for-js/pull/4756)). + - Updates HTTP clients to `fetch` and `node-fetch` for the browser and node.js respectively. +- Reintroduces `ServiceClientCredentials` type to `credentials` parameter of `ServiceClient` + ([PR #4773](https://github.com/Azure/azure-sdk-for-js/pull/4773)). +- Updates types for better compatibility with TypeScript 3.6.x. + ([PR #4928](https://github.com/Azure/azure-sdk-for-js/pull/4928)). +- Adds `TracingPolicy` to support setting `traceparent` and `tracestate` headers + when setting spans in operation as per the [trace context HTTP headers format](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format). + ([PR #4712](https://github.com/Azure/azure-sdk-for-js/pull/4712)). +- Adds `text/plain` as an accepted MIME type for JSON output. + ([PR #4975](https://github.com/Azure/azure-sdk-for-js/pull/4975)). +- Exposes `ProxySettings` type. ([PR #5043](https://github.com/Azure/azure-sdk-for-js/pull/5043)). +- Fixes bug where `WebResource.clone` would not copy `proxySettings` or `keepAlive` settings. + ([PR #5047](https://github.com/Azure/azure-sdk-for-js/pull/5047)). + +## 1.0.0-preview.2 (2019-08-05) + +- Removed `ServiceClientCredentials` type from `credentials` parameter of `ServiceClient` ([PR #4367](https://github.com/Azure/azure-sdk-for-js/pull/4367)). Credential implementations are now standardized on `@azure/core-auth`'s `TokenCredential` interface and provided by `@azure/identity`. +- Added an `AccessTokenCache` so that access tokens can be cached across pipeline instances ([PR #4174](https://github.com/Azure/azure-sdk-for-js/pull/4174)). +- Fixed the issue preventing `ServiceClient` from correctly setting the scope's resource URI when creating a `BearerTokenAuthenticationPolicy` ([PR #4335](https://github.com/Azure/azure-sdk-for-js/pull/4335)). +- Migrated over `AxiosHttpClient` fixes from `@azure/ms-rest-js` ([PR #4106](https://github.com/Azure/azure-sdk-for-js/pull/4106)). + +## 1.0.0-preview.1 (2019-06-25) + +- Forked `@azure/ms-rest-js` to `@azure/core-http` to form the base HTTP pipeline of the Azure SDK TypeScript/JavaScript libraries. +- Added `TokenCredential` to define a simple interface for credentials that provided bearer tokens +- Added `BearerTokenAuthenticationPolicy` which can use a `TokenCredential` implementation to perform bearer token authentication against Azure services diff --git a/node_modules/@azure/core-http/LICENSE b/node_modules/@azure/core-http/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-http/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-http/README.md b/node_modules/@azure/core-http/README.md new file mode 100644 index 000000000..f51dc17e3 --- /dev/null +++ b/node_modules/@azure/core-http/README.md @@ -0,0 +1,74 @@ +# Azure Core HTTP client library for JavaScript + +This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). + +## Getting started + +### Requirements + +- [Node.js](https://nodejs.org) version > 8.x +- Typescript compiler + +```shell +npm install -g typescript +``` + +### Installation + +This package is primarily used in generated code and not meant to be consumed directly by end users. + +## Key concepts + +You can find an explanation of how this repository's code works by going to our [architecture overview](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-http/docs/architectureOverview.md). + +## Examples + +Examples can be found in the `samples` folder. + +## Next steps + +- Build this library (`core-http`). For more information on how to build project in this repo, please refer to the [Contributing Guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md). + +- The code in `samples\node-sample.ts` shows how to create a `ServiceClient` instance with a test `TokenCredential` implementation and use the client instance to perform a `GET` operation from the Azure management service endpoint for subscriptions. To run the code, first obtain an access token to the Azure management service. + +One easy way to get an access token is using [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) + +1. Sign in +```shell +az login +``` +2. Select the subscription to use +```shell +az account set -s +``` +3. Obtain an access token +```shell +az account get-access-token --resource=https://management.azure.com +``` + +### NodeJS + +- Set values of `subscriptionId` and `token` variable in `samples/node-sample.ts` + +- Change directory to samples folder, compile the TypeScript code, then run the sample + +``` +cd samples +tsc node-sample.ts +node node-sample.js +``` + +### Browser + +- Set values of `subscriptionId` and `token` variable in `samples/index.js` +- Follow the instructions of [JavaScript Bundling Guide using Parcel](https://github.com/Azure/azure-sdk-for-js/blob/master/documentation/Bundling.md#using-parcel) to build and run the code in the browser. + +## Troubleshooting + +If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new). + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-http%2FREADME.png) diff --git a/node_modules/@azure/core-http/dist/index.js b/node_modules/@azure/core-http/dist/index.js new file mode 100644 index 000000000..2f7a51812 --- /dev/null +++ b/node_modules/@azure/core-http/dist/index.js @@ -0,0 +1,5271 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var tslib = require('tslib'); +var uuid = require('uuid'); +var tough = require('tough-cookie'); +var http = require('http'); +var https = require('https'); +var node_fetch = _interopDefault(require('node-fetch')); +var abortController = require('@azure/abort-controller'); +var FormData = _interopDefault(require('form-data')); +var util = require('util'); +var stream = require('stream'); +var tunnel = require('tunnel'); +var coreAuth = require('@azure/core-auth'); +var logger$1 = require('@azure/logger'); +var xml2js = require('xml2js'); +var os = require('os'); +var coreTracing = require('@azure/core-tracing'); +var api = require('@opentelemetry/api'); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName) { + return headerName.toLowerCase(); +} +function isHttpHeadersLike(object) { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function") { + return true; + } + return false; +} +/** + * A collection of HTTP header key/value pairs. + */ +var HttpHeaders = /** @class */ (function () { + function HttpHeaders(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (var headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + HttpHeaders.prototype.set = function (headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString() + }; + }; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + HttpHeaders.prototype.get = function (headerName) { + var header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + }; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + HttpHeaders.prototype.contains = function (headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + }; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + HttpHeaders.prototype.remove = function (headerName) { + var result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + }; + /** + * Get the headers that are contained this collection as an object. + */ + HttpHeaders.prototype.rawHeaders = function () { + var result = {}; + for (var headerKey in this._headersMap) { + var header = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + }; + /** + * Get the headers that are contained in this collection as an array. + */ + HttpHeaders.prototype.headersArray = function () { + var headers = []; + for (var headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerNames = function () { + var headerNames = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + }; + /** + * Get the header values that are contained in this collection. + */ + HttpHeaders.prototype.headerValues = function () { + var headerValues = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + }; + /** + * Get the JSON object representation of this HTTP header collection. + */ + HttpHeaders.prototype.toJson = function () { + return this.rawHeaders(); + }; + /** + * Get the string representation of this HTTP header collection. + */ + HttpHeaders.prototype.toString = function () { + return JSON.stringify(this.toJson()); + }; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + HttpHeaders.prototype.clone = function () { + return new HttpHeaders(this.rawHeaders()); + }; + return HttpHeaders; +}()); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +function encodeString(value) { + return Buffer.from(value).toString("base64"); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +function encodeByteArray(value) { + // Buffer.from accepts | -- the TypeScript definition is off here + // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length + var bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +function decodeString(value) { + return Buffer.from(value, "base64"); +} + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var Constants = { + /** + * The core-http version + * @const + * @type {string} + */ + coreHttpVersion: "1.2.0", + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + /** + * Specifies NO Proxy. + * + * @const + * @type {string} + */ + NO_PROXY: "NO_PROXY", + /** + * Specifies ALL Proxy. + * + * @const + * @type {string} + */ + ALL_PROXY: "ALL_PROXY", + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + StatusCodes: { + TooManyRequests: 429 + } + }, + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + AUTHORIZATION_SCHEME: "Bearer", + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } +}; + +// Copyright (c) Microsoft Corporation. +var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +var isNode = typeof process !== "undefined" && + !!process.version && + !!process.versions && + !!process.versions.node; +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +function encodeUri(uri) { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); +} +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +function stripResponse(response) { + var strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; +} +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResourceLike} request The Http Request object + * + * @return {WebResourceLike} The stripped version of Http Request. + */ +function stripRequest(request) { + var strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; +} +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +function isValidUuid(uuid) { + return validUuidRegex.test(uuid); +} +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +function generateUuid() { + return uuid.v4(); +} +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +function executePromisesSequentially(promiseFactories, kickstart) { + var result = Promise.resolve(kickstart); + promiseFactories.forEach(function (promiseFactory) { + result = result.then(promiseFactory); + }); + return result; +} +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +function delay(t, value) { + return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); }); +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +function promiseToCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise + .then(function (data) { + // eslint-disable-next-line promise/no-callback-in-promise + return cb(undefined, data); + }) + .catch(function (err) { + // eslint-disable-next-line promise/no-callback-in-promise + cb(err); + }); + }; +} +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +function promiseToServiceCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise + .then(function (data) { + return process.nextTick(cb, undefined, data.parsedBody, data.request, data); + }) + .catch(function (err) { + process.nextTick(cb, err); + }); + }; +} +function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + var _a, _b, _c; + if (!Array.isArray(obj)) { + obj = [obj]; + } + if (!xmlNamespaceKey || !xmlNamespace) { + return _a = {}, _a[elementName] = obj, _a; + } + return _b = {}, _b[elementName] = obj, _b.$ = (_c = {}, _c[xmlNamespaceKey] = xmlNamespace, _c), _b; +} +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +function applyMixins(targetCtor, sourceCtors) { + sourceCtors.forEach(function (sourceCtors) { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(function (name) { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); +} +var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +function isDuration(value) { + return validateISODuration.test(value); +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +/** + * Determines whether the given entity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param {any} value Any entity + * @return {boolean} - true is it is primitive type, false otherwise. + */ +function isPrimitiveType(value) { + return (typeof value !== "object" && typeof value !== "function") || value === null; +} +function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; + } + else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return undefined; +} + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * Default key used to access the XML attributes. + */ +var XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +var XML_CHARKEY = "_"; + +// Copyright (c) Microsoft Corporation. +var Serializer = /** @class */ (function () { + function Serializer(modelMappers, isXML) { + if (modelMappers === void 0) { modelMappers = {}; } + this.modelMappers = modelMappers; + this.isXML = isXML; + } + Serializer.prototype.validateConstraints = function (mapper, value, objectName) { + var failValidation = function (constraintName, constraintValue) { + throw new Error("\"" + objectName + "\" with value \"" + value + "\" should satisfy the constraint \"" + constraintName + "\": " + constraintValue + "."); + }; + if (mapper.constraints && value != undefined) { + var _a = mapper.constraints, ExclusiveMaximum = _a.ExclusiveMaximum, ExclusiveMinimum = _a.ExclusiveMinimum, InclusiveMaximum = _a.InclusiveMaximum, InclusiveMinimum = _a.InclusiveMinimum, MaxItems = _a.MaxItems, MaxLength = _a.MaxLength, MinItems = _a.MinItems, MinLength = _a.MinLength, MultipleOf = _a.MultipleOf, Pattern = _a.Pattern, UniqueItems = _a.UniqueItems; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + var pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && + value.some(function (item, i, ar) { return ar.indexOf(item) !== i; })) { + failValidation("UniqueItems", UniqueItems); + } + } + }; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @param {options} options additional options to deserialization + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + Serializer.prototype.serialize = function (mapper, object, objectName, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + var payload = {}; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/i) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + var required = mapper.required, nullable = mapper.nullable; + if (required && nullable && object === undefined) { + throw new Error(objectName + " cannot be undefined."); + } + if (required && !nullable && object == undefined) { + throw new Error(objectName + " cannot be null or undefined."); + } + if (!required && nullable === false && object === null) { + throw new Error(objectName + " cannot be null."); + } + if (object == undefined) { + payload = object; + } + else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/i) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/i) !== null) { + var enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Composite$/i) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + } + return payload; + }; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @param options Controls behavior of XML parser and builder. + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + Serializer.prototype.deserialize = function (mapper, responseBody, objectName, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + var payload; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/i) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + } + else { + if (this.isXML) { + var xmlCharKey = updatedOptions.xmlCharKey; + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, + * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. + */ + if (responseBody[XML_ATTRKEY] != undefined && responseBody[xmlCharKey] != undefined) { + responseBody = responseBody[xmlCharKey]; + } + } + if (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/i) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/i) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + }; + return Serializer; +}()); +function trimEnd(str, ch) { + var len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error("Please provide an input of type Uint8Array for converting to Base64Url."); + } + // Uint8Array to Base64. + var str = encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=") + .replace(/\+/g, "-") + .replace(/\//g, "_"); +} +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/-/g, "+").replace(/_/g, "/"); + // Base64 to Uint8Array. + return decodeString(str); +} +function splitSerializeName(prop) { + var classes = []; + var partialclass = ""; + if (prop) { + var subwords = prop.split("."); + for (var _i = 0, subwords_1 = subwords; _i < subwords_1.length; _i++) { + var item = subwords_1[_i]; + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; +} +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); +} +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") { + throw new Error(objectName + " with value " + value + " must be of type number."); + } + } + else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(objectName + " with value \"" + value + "\" must be of type string."); + } + } + else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && isValidUuid(value))) { + throw new Error(objectName + " with value \"" + value + "\" must be of type string and a valid uuid."); + } + } + else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") { + throw new Error(objectName + " with value " + value + " must be of type boolean."); + } + } + else if (typeName.match(/^Stream$/i) !== null) { + var objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob)) { + throw new Error(objectName + " must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."); + } + } + } + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error("Please provide a set of allowedValues to validate " + objectName + " as an Enum Type."); + } + var isPresent = allowedValues.some(function (item) { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(value + " is not a valid value for " + objectName + ". The valid values are: " + JSON.stringify(allowedValues) + "."); + } + return value; +} +function serializeByteArrayType(objectName, value) { + var returnValue = ""; + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + returnValue = encodeByteArray(value); + } + return returnValue; +} +function serializeBase64UrlType(objectName, value) { + var returnValue = ""; + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + returnValue = bufferToBase64Url(value) || ""; + } + return returnValue; +} +function serializeDateTypes(typeName, value, objectName) { + if (value != undefined) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = + value instanceof Date + ? value.toISOString().substring(0, 10) + : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123 format."); + } + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123/ISO8601 format " + + "for it to be serialized in UnixTime/Epoch format."); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!isDuration(value)) { + throw new Error(objectName + " must be a string in ISO 8601 format. Instead was \"" + value + "\"."); + } + } + } + return value; +} +function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + var _a, _b; + if (!Array.isArray(object)) { + throw new Error(objectName + " must be of type Array."); + } + var elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempArray = []; + for (var i = 0; i < object.length; i++) { + var serializedValue = serializer.serialize(elementType, object[i], objectName, options); + if (isXml && elementType.xmlNamespace) { + var xmlnsKey = elementType.xmlNamespacePrefix + ? "xmlns:" + elementType.xmlNamespacePrefix + : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = tslib.__assign({}, serializedValue); + tempArray[i][XML_ATTRKEY] = (_a = {}, _a[xmlnsKey] = elementType.xmlNamespace, _a); + } + else { + tempArray[i] = {}; + tempArray[i][options.xmlCharKey] = serializedValue; + tempArray[i][XML_ATTRKEY] = (_b = {}, _b[xmlnsKey] = elementType.xmlNamespace, _b); + } + } + else { + tempArray[i] = serializedValue; + } + } + return tempArray; +} +function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { + var _a; + if (typeof object !== "object") { + throw new Error(objectName + " must be of type object."); + } + var valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempDictionary = {}; + for (var _i = 0, _b = Object.keys(object); _i < _b.length; _i++) { + var key = _b[_i]; + var serializedValue = serializer.serialize(valueType, object[key], objectName, options); + // If the element needs an XML namespace we need to add it within the $ property + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); + } + // Add the namespace to the root element if needed + if (isXml && mapper.xmlNamespace) { + var xmlnsKey = mapper.xmlNamespacePrefix ? "xmlns:" + mapper.xmlNamespacePrefix : "xmlns"; + return tslib.__assign(tslib.__assign({}, tempDictionary), { $: (_a = {}, _a[xmlnsKey] = mapper.xmlNamespace, _a) }); + } + return tempDictionary; +} +/** + * Resolves the additionalProperties property from a referenced mapper + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + * @param objectName name of the object being serialized + */ +function resolveAdditionalProperties(serializer, mapper, objectName) { + var additionalProperties = mapper.type.additionalProperties; + if (!additionalProperties && mapper.type.className) { + var modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + } + return additionalProperties; +} +/** + * Finds the mapper referenced by className + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + * @param objectName name of the object being serialized + */ +function resolveReferencedMapper(serializer, mapper, objectName) { + var className = mapper.type.className; + if (!className) { + throw new Error("Class name for model \"" + objectName + "\" is not provided in the mapper \"" + JSON.stringify(mapper, undefined, 2) + "\"."); + } + return serializer.modelMappers[className]; +} +/** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ +function resolveModelProperties(serializer, mapper, objectName) { + var modelProps = mapper.type.modelProperties; + if (!modelProps) { + var modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) { + throw new Error("mapper() cannot be null or undefined for model \"" + mapper.type.className + "\"."); + } + modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error("modelProperties cannot be null or undefined in the " + + ("mapper \"" + JSON.stringify(modelMapper) + "\" of type \"" + mapper.type.className + "\" for object \"" + objectName + "\".")); + } + } + return modelProps; +} +function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + var _a, _b; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object != undefined) { + var payload = {}; + var modelProps = resolveModelProperties(serializer, mapper, objectName); + for (var _i = 0, _c = Object.keys(modelProps); _i < _c.length; _i++) { + var key = _c[_i]; + var propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + var propName = void 0; + var parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + var paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (var _d = 0, paths_1 = paths; _d < paths_1.length; _d++) { + var pathName = paths_1[_d]; + var childObject = parentObject[pathName]; + if (childObject == undefined && + (object[key] != undefined || propertyMapper.defaultValue !== undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject != undefined) { + if (isXml && mapper.xmlNamespace) { + var xmlnsKey = mapper.xmlNamespacePrefix + ? "xmlns:" + mapper.xmlNamespacePrefix + : "xmlns"; + parentObject[XML_ATTRKEY] = tslib.__assign(tslib.__assign({}, parentObject[XML_ATTRKEY]), (_a = {}, _a[xmlnsKey] = mapper.xmlNamespace, _a)); + } + var propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + var toSerialize = object[key]; + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && + polymorphicDiscriminator.clientName === key && + toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + var serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); + if (serializedValue !== undefined && propName != undefined) { + var value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); + if (isXml && propertyMapper.xmlIsAttribute) { + // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {}; + parentObject[XML_ATTRKEY][propName] = serializedValue; + } + else if (isXml && propertyMapper.xmlIsWrapped) { + parentObject[propName] = (_b = {}, _b[propertyMapper.xmlElementName] = value, _b); + } + else { + parentObject[propName] = value; + } + } + } + } + var additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + var propNames = Object.keys(modelProps); + var _loop_1 = function (clientPropName) { + var isAdditionalProperty = propNames.every(function (pn) { return pn !== clientPropName; }); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + } + }; + for (var clientPropName in object) { + _loop_1(clientPropName); + } + } + return payload; + } + return object; +} +function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { + var _a; + if (!isXml || !propertyMapper.xmlNamespace) { + return serializedValue; + } + var xmlnsKey = propertyMapper.xmlNamespacePrefix + ? "xmlns:" + propertyMapper.xmlNamespacePrefix + : "xmlns"; + var xmlNamespace = (_a = {}, _a[xmlnsKey] = propertyMapper.xmlNamespace, _a); + if (["Composite"].includes(propertyMapper.type.name)) { + if (serializedValue[XML_ATTRKEY]) { + return serializedValue; + } + else { + var result_1 = tslib.__assign({}, serializedValue); + result_1[XML_ATTRKEY] = xmlNamespace; + return result_1; + } + } + var result = {}; + result[options.xmlCharKey] = serializedValue; + result[XML_ATTRKEY] = xmlNamespace; + return result; +} +function isSpecialXmlProperty(propertyName, options) { + return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName); +} +function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { + var _a; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + var modelProps = resolveModelProperties(serializer, mapper, objectName); + var instance = {}; + var handledPropertyNames = []; + for (var _i = 0, _b = Object.keys(modelProps); _i < _b.length; _i++) { + var key = _b[_i]; + var propertyMapper = modelProps[key]; + var paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + var serializedName = propertyMapper.serializedName, xmlName = propertyMapper.xmlName, xmlElementName = propertyMapper.xmlElementName; + var propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + var headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + var dictionary = {}; + for (var _c = 0, _d = Object.keys(responseBody); _c < _d.length; _c++) { + var headerKey = _d[_c]; + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) { + instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options); + } + else { + var propertyName = xmlElementName || xmlName || serializedName; + if (propertyMapper.xmlIsWrapped) { + /* a list of wrapped by + For the xml example below + + ... + ... + + the responseBody has + { + Cors: { + CorsRule: [{...}, {...}] + } + } + xmlName is "Cors" and xmlElementName is"CorsRule". + */ + var wrapped = responseBody[xmlName]; + var elementList = (_a = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _a !== void 0 ? _a : []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + } + else { + var property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); + } + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + var propertyInstance = void 0; + var res = responseBody; + // traversing the object step by step. + for (var _e = 0, paths_2 = paths; _e < paths_2.length; _e++) { + var item = paths_2[_e]; + if (!res) + break; + res = res[item]; + } + propertyInstance = res; + var polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && + key === polymorphicDiscriminator.clientName && + propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + var serializedValue = void 0; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + instance[key] = serializedValue; + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var isAdditionalProperty = function (responsePropName) { + for (var clientPropName in modelProps) { + var paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (var responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + } + } + } + else if (responseBody) { + for (var _f = 0, _g = Object.keys(responseBody); _f < _g.length; _f++) { + var key = _g[_f]; + if (instance[key] === undefined && + !handledPropertyNames.includes(key) && + !isSpecialXmlProperty(key, options)) { + instance[key] = responseBody[key]; + } + } + } + return instance; +} +function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { + var value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(responseBody); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + } + return tempDictionary; + } + return responseBody; +} +function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + var element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + var tempArray = []; + for (var i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], objectName + "[" + i + "]", options); + } + return tempArray; + } + return responseBody; +} +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + var discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + var discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + var typeName = mapper.type.uberParent || mapper.type.className; + var indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + var polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return (mapper.type.polymorphicDiscriminator || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && + serializer.modelMappers[typeName] && + serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +// TODO: why is this here? +function serializeObject(toSerialize) { + if (toSerialize == undefined) + return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + var array = []; + for (var i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } + else if (typeof toSerialize === "object") { + var dictionary = {}; + for (var property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; +} +/** + * Utility function to create a K:V from a list of strings + */ +function strEnum(o) { + var result = {}; + for (var _i = 0, o_1 = o; _i < o_1.length; _i++) { + var key = o_1[_i]; + result[key] = key; + } + return result; +} +var MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" +]); + +// Copyright (c) Microsoft Corporation. +function isWebResourceLike(object) { + if (typeof object !== "object") { + return false; + } + if (typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function") { + return true; + } + return false; +} +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +var WebResource = /** @class */ (function () { + function WebResource(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, decompressResponse) { + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.decompressResponse = decompressResponse; + this.requestId = this.headers.get("x-ms-client-request-id") || generateUuid(); + } + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + WebResource.prototype.validateRequestProperties = function () { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + }; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + WebResource.prototype.prepare = function (options) { + if (!options) { + throw new Error("options object is required"); + } + if (options.method === undefined || + options.method === null || + typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + if ((options.pathTemplate === undefined || + options.pathTemplate === null || + typeof options.pathTemplate.valueOf() !== "string") && + (options.url === undefined || + options.url === null || + typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error('options.url must be of type "string".'); + } + this.url = options.url; + } + // set the method + if (options.method) { + var validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error('The provided method "' + + options.method + + '" is invalid. Supported HTTP methods are: ' + + JSON.stringify(validMethods)); + } + } + this.method = options.method.toUpperCase(); + // construct the url if path template is provided + if (options.pathTemplate) { + var pathTemplate_1 = options.pathTemplate, pathParameters_1 = options.pathParameters; + if (typeof pathTemplate_1 !== "string") { + throw new Error('options.pathTemplate must be of type "string".'); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + var baseUrl = options.baseUrl; + var url_1 = baseUrl + + (baseUrl.endsWith("/") ? "" : "/") + + (pathTemplate_1.startsWith("/") ? pathTemplate_1.slice(1) : pathTemplate_1); + var segments = url_1.match(/({[\w-]*\s*[\w-]*})/gi); + if (segments && segments.length) { + if (!pathParameters_1) { + throw new Error("pathTemplate: " + pathTemplate_1 + " has been provided. Hence, options.pathParameters must also be provided."); + } + segments.forEach(function (item) { + var pathParamName = item.slice(1, -1); + var pathParam = pathParameters_1[pathParamName]; + if (pathParam === null || + pathParam === undefined || + !(typeof pathParam === "string" || typeof pathParam === "object")) { + var stringifiedPathParameters = JSON.stringify(pathParameters_1, undefined, 2); + throw new Error("pathTemplate: " + pathTemplate_1 + " contains the path parameter " + pathParamName + + (" however, it is not present in parameters: " + stringifiedPathParameters + ".") + + ("The value of the path parameter can either be a \"string\" of the form { " + pathParamName + ": \"some sample value\" } or ") + + ("it can be an \"object\" of the form { \"" + pathParamName + "\": { value: \"some sample value\", skipUrlEncoding: true } }.")); + } + if (typeof pathParam.valueOf() === "string") { + url_1 = url_1.replace(item, encodeURIComponent(pathParam)); + } + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error("options.pathParameters[" + pathParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (pathParam.skipUrlEncoding) { + url_1 = url_1.replace(item, pathParam.value); + } + else { + url_1 = url_1.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url_1; + } + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + var queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error("options.queryParameters must be of type object. It should be a JSON object " + + "of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. " + + "The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }."); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + var queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (var queryParamName in queryParameters) { + var queryParam = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error("options.queryParameters[" + queryParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } + else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + } // end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + // add headers to the request if they are provided + if (options.headers) { + var headers = options.headers; + for (var _i = 0, _a = Object.keys(options.headers); _i < _a.length; _i++) { + var headerName = _a[_i]; + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", this.requestId); + } + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body !== undefined && options.body !== null) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } + else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + if (options.spanOptions) { + this.spanOptions = options.spanOptions; + } + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + return this; + }; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + WebResource.prototype.clone = function () { + var result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.decompressResponse); + if (this.formData) { + result.formData = this.formData; + } + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + return result; + }; + return WebResource; +}()); + +// Copyright (c) Microsoft Corporation. +var custom = util.inspect.custom; + +// Copyright (c) Microsoft Corporation. +/** + * A class that handles the query portion of a URLBuilder. + */ +var URLQuery = /** @class */ (function () { + function URLQuery() { + this._rawQuery = {}; + } + /** + * Get whether or not there any query parameters in this URLQuery. + */ + URLQuery.prototype.any = function () { + return Object.keys(this._rawQuery).length > 0; + }; + /** + * Get the keys of the query string. + */ + URLQuery.prototype.keys = function () { + return Object.keys(this._rawQuery); + }; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + URLQuery.prototype.set = function (parameterName, parameterValue) { + if (parameterName) { + if (parameterValue !== undefined && parameterValue !== null) { + var newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } + else { + delete this._rawQuery[parameterName]; + } + } + }; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + URLQuery.prototype.get = function (parameterName) { + return parameterName ? this._rawQuery[parameterName] : undefined; + }; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + URLQuery.prototype.toString = function () { + var result = ""; + for (var parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + var parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + var parameterStrings = []; + for (var _i = 0, parameterValue_1 = parameterValue; _i < parameterValue_1.length; _i++) { + var parameterValueElement = parameterValue_1[_i]; + parameterStrings.push(parameterName + "=" + parameterValueElement); + } + result += parameterStrings.join("&"); + } + else { + result += parameterName + "=" + parameterValue; + } + } + return result; + }; + /** + * Parse a URLQuery from the provided text. + */ + URLQuery.parse = function (text) { + var result = new URLQuery(); + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + var currentState = "ParameterName"; + var parameterName = ""; + var parameterValue = ""; + for (var i = 0; i < text.length; ++i) { + var currentCharacter = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + case "&": + parameterName = ""; + parameterValue = ""; + break; + default: + parameterName += currentCharacter; + break; + } + break; + case "ParameterValue": + switch (currentCharacter) { + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + default: + parameterValue += currentCharacter; + break; + } + break; + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + return result; + }; + return URLQuery; +}()); +/** + * A class that handles creating, modifying, and parsing URLs. + */ +var URLBuilder = /** @class */ (function () { + function URLBuilder() { + } + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setScheme = function (scheme) { + if (!scheme) { + this._scheme = undefined; + } + else { + this.set(scheme, "SCHEME"); + } + }; + /** + * Get the scheme that has been set in this URL. + */ + URLBuilder.prototype.getScheme = function () { + return this._scheme; + }; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setHost = function (host) { + if (!host) { + this._host = undefined; + } + else { + this.set(host, "SCHEME_OR_HOST"); + } + }; + /** + * Get the host that has been set in this URL. + */ + URLBuilder.prototype.getHost = function () { + return this._host; + }; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setPort = function (port) { + if (port === undefined || port === null || port === "") { + this._port = undefined; + } + else { + this.set(port.toString(), "PORT"); + } + }; + /** + * Get the port that has been set in this URL. + */ + URLBuilder.prototype.getPort = function () { + return this._port; + }; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + URLBuilder.prototype.setPath = function (path) { + if (!path) { + this._path = undefined; + } + else { + var schemeIndex = path.indexOf("://"); + if (schemeIndex !== -1) { + var schemeStart = path.lastIndexOf("/", schemeIndex); + // Make sure to only grab the URL part of the path before setting the state back to SCHEME + // this will handle cases such as "/a/b/c/https://microsoft.com" => "https://microsoft.com" + this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), "SCHEME"); + } + else { + this.set(path, "PATH"); + } + } + }; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + URLBuilder.prototype.appendPath = function (path) { + if (path) { + var currentPath = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + if (path.startsWith("/")) { + path = path.substring(1); + } + path = currentPath + path; + } + this.set(path, "PATH"); + } + }; + /** + * Get the path that has been set in this URL. + */ + URLBuilder.prototype.getPath = function () { + return this._path; + }; + /** + * Set the query in this URL. + */ + URLBuilder.prototype.setQuery = function (query) { + if (!query) { + this._query = undefined; + } + else { + this._query = URLQuery.parse(query); + } + }; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + URLBuilder.prototype.setQueryParameter = function (queryParameterName, queryParameterValue) { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + }; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + URLBuilder.prototype.getQueryParameterValue = function (queryParameterName) { + return this._query ? this._query.get(queryParameterName) : undefined; + }; + /** + * Get the query in this URL. + */ + URLBuilder.prototype.getQuery = function () { + return this._query ? this._query.toString() : undefined; + }; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + URLBuilder.prototype.set = function (text, startState) { + var tokenizer = new URLTokenizer(text, startState); + while (tokenizer.next()) { + var token = tokenizer.current(); + var tokenPath = void 0; + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + case "HOST": + this._host = token.text || undefined; + break; + case "PORT": + this._port = token.text || undefined; + break; + case "PATH": + tokenPath = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + default: + throw new Error("Unrecognized URLTokenType: " + token.type); + } + } + } + }; + URLBuilder.prototype.toString = function () { + var result = ""; + if (this._scheme) { + result += this._scheme + "://"; + } + if (this._host) { + result += this._host; + } + if (this._port) { + result += ":" + this._port; + } + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + if (this._query && this._query.any()) { + result += "?" + this._query.toString(); + } + return result; + }; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + URLBuilder.prototype.replaceAll = function (searchValue, replaceValue) { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + }; + URLBuilder.parse = function (text) { + var result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + }; + return URLBuilder; +}()); +var URLToken = /** @class */ (function () { + function URLToken(text, type) { + this.text = text; + this.type = type; + } + URLToken.scheme = function (text) { + return new URLToken(text, "SCHEME"); + }; + URLToken.host = function (text) { + return new URLToken(text, "HOST"); + }; + URLToken.port = function (text) { + return new URLToken(text, "PORT"); + }; + URLToken.path = function (text) { + return new URLToken(text, "PATH"); + }; + URLToken.query = function (text) { + return new URLToken(text, "QUERY"); + }; + return URLToken; +}()); +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +function isAlphaNumericCharacter(character) { + var characterCode = character.charCodeAt(0); + return ((48 /* '0' */ <= characterCode && characterCode <= 57) /* '9' */ || + (65 /* 'A' */ <= characterCode && characterCode <= 90) /* 'Z' */ || + (97 /* 'a' */ <= characterCode && characterCode <= 122) /* 'z' */); +} +/** + * A class that tokenizes URL strings. + */ +var URLTokenizer = /** @class */ (function () { + function URLTokenizer(_text, state) { + this._text = _text; + this._textLength = _text ? _text.length : 0; + this._currentState = state !== undefined && state !== null ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + URLTokenizer.prototype.current = function () { + return this._currentToken; + }; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + URLTokenizer.prototype.next = function () { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } + else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + case "HOST": + nextHost(this); + break; + case "PORT": + nextPort(this); + break; + case "PATH": + nextPath(this); + break; + case "QUERY": + nextQuery(this); + break; + default: + throw new Error("Unrecognized URLTokenizerState: " + this._currentState); + } + } + return !!this._currentToken; + }; + return URLTokenizer; +}()); +/** + * Read the remaining characters from this Tokenizer's character stream. + */ +function readRemaining(tokenizer) { + var result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; +} +/** + * Whether or not this URLTokenizer has a current character. + */ +function hasCurrentCharacter(tokenizer) { + return tokenizer._currentIndex < tokenizer._textLength; +} +/** + * Get the character in the text string at the current index. + */ +function getCurrentCharacter(tokenizer) { + return tokenizer._text[tokenizer._currentIndex]; +} +/** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ +function nextCharacter(tokenizer, step) { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } +} +/** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ +function peekCharacters(tokenizer, charactersToPeek) { + var endIndex = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); +} +/** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ +function readWhile(tokenizer, condition) { + var result = ""; + while (hasCurrentCharacter(tokenizer)) { + var currentCharacter = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } + else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + return result; +} +/** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ +function readWhileLetterOrDigit(tokenizer) { + return readWhile(tokenizer, function (character) { return isAlphaNumericCharacter(character); }); +} +/** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ +function readUntilCharacter(tokenizer) { + var terminatingCharacters = []; + for (var _i = 1; _i < arguments.length; _i++) { + terminatingCharacters[_i - 1] = arguments[_i]; + } + return readWhile(tokenizer, function (character) { return terminatingCharacters.indexOf(character) === -1; }); +} +function nextScheme(tokenizer) { + var scheme = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "HOST"; + } +} +function nextSchemeOrHost(tokenizer) { + var schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } +} +function nextHost(tokenizer) { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + var host = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPort(tokenizer) { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + var port = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPath(tokenizer) { + var path = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextQuery(tokenizer) { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + var query = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; +} + +// Copyright (c) Microsoft Corporation. +var RedactedString = "REDACTED"; +var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent" +]; +var defaultAllowedQueryParameters = ["api-version"]; +var Sanitizer = /** @class */ (function () { + function Sanitizer(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.allowedHeaderNames, allowedHeaderNames = _c === void 0 ? [] : _c, _d = _b.allowedQueryParameters, allowedQueryParameters = _d === void 0 ? [] : _d; + allowedHeaderNames = Array.isArray(allowedHeaderNames) + ? defaultAllowedHeaderNames.concat(allowedHeaderNames) + : defaultAllowedHeaderNames; + allowedQueryParameters = Array.isArray(allowedQueryParameters) + ? defaultAllowedQueryParameters.concat(allowedQueryParameters) + : defaultAllowedQueryParameters; + this.allowedHeaderNames = new Set(allowedHeaderNames.map(function (n) { return n.toLowerCase(); })); + this.allowedQueryParameters = new Set(allowedQueryParameters.map(function (p) { return p.toLowerCase(); })); + } + Sanitizer.prototype.sanitize = function (obj) { + return JSON.stringify(obj, this.replacer.bind(this), 2); + }; + Sanitizer.prototype.replacer = function (key, value) { + // Ensure Errors include their interesting non-enumerable members + if (value instanceof Error) { + return tslib.__assign(tslib.__assign({}, value), { name: value.name, message: value.message }); + } + if (key === "_headersMap") { + return this.sanitizeHeaders(key, value); + } + else if (key === "url") { + return this.sanitizeUrl(value); + } + else if (key === "query") { + return this.sanitizeQuery(value); + } + else if (key === "body") { + // Don't log the request body + return undefined; + } + else if (key === "response") { + // Don't log response again + return undefined; + } + else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + return value; + }; + Sanitizer.prototype.sanitizeHeaders = function (_, value) { + return this.sanitizeObject(value, this.allowedHeaderNames, function (v, k) { return v[k].value; }); + }; + Sanitizer.prototype.sanitizeQuery = function (value) { + return this.sanitizeObject(value, this.allowedQueryParameters, function (v, k) { return v[k]; }); + }; + Sanitizer.prototype.sanitizeObject = function (value, allowedKeys, accessor) { + if (typeof value !== "object" || value === null) { + return value; + } + var sanitized = {}; + for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) { + var k = _a[_i]; + if (allowedKeys.has(k.toLowerCase())) { + sanitized[k] = accessor(value, k); + } + else { + sanitized[k] = RedactedString; + } + } + return sanitized; + }; + Sanitizer.prototype.sanitizeUrl = function (value) { + if (typeof value !== "string" || value === null) { + return value; + } + var urlBuilder = URLBuilder.parse(value); + var queryString = urlBuilder.getQuery(); + if (!queryString) { + return value; + } + var query = URLQuery.parse(queryString); + for (var _i = 0, _a = query.keys(); _i < _a.length; _i++) { + var k = _a[_i]; + if (!this.allowedQueryParameters.has(k.toLowerCase())) { + query.set(k, RedactedString); + } + } + urlBuilder.setQuery(query.toString()); + return urlBuilder.toString(); + }; + return Sanitizer; +}()); + +// Copyright (c) Microsoft Corporation. +var errorSanitizer = new Sanitizer(); +var RestError = /** @class */ (function (_super) { + tslib.__extends(RestError, _super); + function RestError(message, code, statusCode, request, response) { + var _this = _super.call(this, message) || this; + _this.name = "RestError"; + _this.code = code; + _this.statusCode = statusCode; + _this.request = request; + _this.response = response; + Object.setPrototypeOf(_this, RestError.prototype); + return _this; + } + /** + * Logging method for util.inspect in Node + */ + RestError.prototype[custom] = function () { + return "RestError: " + this.message + " \n " + errorSanitizer.sanitize(this); + }; + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + return RestError; +}(Error)); + +// Copyright (c) Microsoft Corporation. +var ReportTransform = /** @class */ (function (_super) { + tslib.__extends(ReportTransform, _super); + function ReportTransform(progressCallback) { + var _this = _super.call(this) || this; + _this.progressCallback = progressCallback; + _this.loadedBytes = 0; + return _this; + } + ReportTransform.prototype._transform = function (chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(undefined); + }; + return ReportTransform; +}(stream.Transform)); +var FetchHttpClient = /** @class */ (function () { + function FetchHttpClient() { + } + FetchHttpClient.prototype.sendRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var abortController$1, abortListener, formData, requestForm_1, appendFormValue, _i, _a, formKey, formValue, j, contentType, body, onUploadProgress, uploadReportStream, platformSpecificRequestInit, requestInit, response, headers, operationResponse, _b, _c, onDownloadProgress, responseBody, downloadReportStream, length_1, error_1, fetchError; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + if (!httpRequest && typeof httpRequest !== "object") { + throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object."); + } + abortController$1 = new abortController.AbortController(); + if (httpRequest.abortSignal) { + if (httpRequest.abortSignal.aborted) { + throw new abortController.AbortError("The operation was aborted."); + } + abortListener = function (event) { + if (event.type === "abort") { + abortController$1.abort(); + } + }; + httpRequest.abortSignal.addEventListener("abort", abortListener); + } + if (httpRequest.timeout) { + setTimeout(function () { + abortController$1.abort(); + }, httpRequest.timeout); + } + if (httpRequest.formData) { + formData = httpRequest.formData; + requestForm_1 = new FormData(); + appendFormValue = function (key, value) { + // value function probably returns a stream so we can provide a fresh stream on each retry + if (typeof value === "function") { + value = value(); + } + // eslint-disable-next-line no-prototype-builtins + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (_i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + formKey = _a[_i]; + formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + httpRequest.body = requestForm_1; + httpRequest.formData = undefined; + contentType = httpRequest.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + if (typeof requestForm_1.getBoundary === "function") { + httpRequest.headers.set("Content-Type", "multipart/form-data; boundary=" + requestForm_1.getBoundary()); + } + else { + // browser will automatically apply a suitable content-type header + httpRequest.headers.remove("Content-Type"); + } + } + } + body = httpRequest.body + ? typeof httpRequest.body === "function" + ? httpRequest.body() + : httpRequest.body + : undefined; + if (httpRequest.onUploadProgress && httpRequest.body) { + onUploadProgress = httpRequest.onUploadProgress; + uploadReportStream = new ReportTransform(onUploadProgress); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + return [4 /*yield*/, this.prepareRequest(httpRequest)]; + case 1: + platformSpecificRequestInit = _d.sent(); + requestInit = tslib.__assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, signal: abortController$1.signal, redirect: "manual" }, platformSpecificRequestInit); + _d.label = 2; + case 2: + _d.trys.push([2, 8, 9, 10]); + return [4 /*yield*/, this.fetch(httpRequest.url, requestInit)]; + case 3: + response = _d.sent(); + headers = parseHeaders(response.headers); + _b = { + headers: headers, + request: httpRequest, + status: response.status, + readableStreamBody: httpRequest.streamResponseBody + ? response.body + : undefined + }; + if (!!httpRequest.streamResponseBody) return [3 /*break*/, 5]; + return [4 /*yield*/, response.text()]; + case 4: + _c = _d.sent(); + return [3 /*break*/, 6]; + case 5: + _c = undefined; + _d.label = 6; + case 6: + operationResponse = (_b.bodyAsText = _c, + _b); + onDownloadProgress = httpRequest.onDownloadProgress; + if (onDownloadProgress) { + responseBody = response.body || undefined; + if (isReadableStream(responseBody)) { + downloadReportStream = new ReportTransform(onDownloadProgress); + responseBody.pipe(downloadReportStream); + operationResponse.readableStreamBody = downloadReportStream; + } + else { + length_1 = parseInt(headers.get("Content-Length")) || undefined; + if (length_1) { + // Calling callback for non-stream response for consistency with browser + onDownloadProgress({ loadedBytes: length_1 }); + } + } + } + return [4 /*yield*/, this.processRequest(operationResponse)]; + case 7: + _d.sent(); + return [2 /*return*/, operationResponse]; + case 8: + error_1 = _d.sent(); + fetchError = error_1; + if (fetchError.code === "ENOTFOUND") { + throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest); + } + else if (fetchError.type === "aborted") { + throw new abortController.AbortError("The operation was aborted."); + } + throw fetchError; + case 9: + // clean up event listener + if (httpRequest.abortSignal && abortListener) { + httpRequest.abortSignal.removeEventListener("abort", abortListener); + } + return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }); + }; + return FetchHttpClient; +}()); +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +function parseHeaders(headers) { + var httpHeaders = new HttpHeaders(); + headers.forEach(function (value, key) { + httpHeaders.set(key, value); + }); + return httpHeaders; +} + +// Copyright (c) Microsoft Corporation. +function createProxyAgent(requestUrl, proxySettings, headers) { + var host = URLBuilder.parse(proxySettings.host).getHost(); + if (!host) { + throw new Error("Expecting a non-empty host in proxy settings."); + } + if (!isValidPort(proxySettings.port)) { + throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings."); + } + var tunnelOptions = { + proxy: { + host: host, + port: proxySettings.port, + headers: (headers && headers.rawHeaders()) || {} + } + }; + if (proxySettings.username && proxySettings.password) { + tunnelOptions.proxy.proxyAuth = proxySettings.username + ":" + proxySettings.password; + } + var isRequestHttps = isUrlHttps(requestUrl); + var isProxyHttps = isUrlHttps(proxySettings.host); + var proxyAgent = { + isHttps: isRequestHttps, + agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) + }; + return proxyAgent; +} +function isUrlHttps(url) { + var urlScheme = URLBuilder.parse(url).getScheme() || ""; + return urlScheme.toLowerCase() === "https"; +} +function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) { + if (isRequestHttps && isProxyHttps) { + return tunnel.httpsOverHttps(tunnelOptions); + } + else if (isRequestHttps && !isProxyHttps) { + return tunnel.httpsOverHttp(tunnelOptions); + } + else if (!isRequestHttps && isProxyHttps) { + return tunnel.httpOverHttps(tunnelOptions); + } + else { + return tunnel.httpOverHttp(tunnelOptions); + } +} +function isValidPort(port) { + // any port in 0-65535 range is valid (RFC 793) even though almost all implementations + // will reserve 0 for a specific purpose, and a range of numbers for ephemeral ports + return 0 <= port && port <= 65535; +} + +// Copyright (c) Microsoft Corporation. +function getCachedAgent(isHttps, agentCache) { + return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; +} +var NodeFetchHttpClient = /** @class */ (function (_super) { + tslib.__extends(NodeFetchHttpClient, _super); + function NodeFetchHttpClient() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.proxyAgents = {}; + _this.keepAliveAgents = {}; + _this.cookieJar = new tough.CookieJar(undefined, { looseMode: true }); + return _this; + } + NodeFetchHttpClient.prototype.getOrCreateAgent = function (httpRequest) { + var isHttps = isUrlHttps(httpRequest.url); + // At the moment, proxy settings and keepAlive are mutually + // exclusive because the 'tunnel' library currently lacks the + // ability to create a proxy with keepAlive turned on. + if (httpRequest.proxySettings) { + var agent = getCachedAgent(isHttps, this.proxyAgents); + if (agent) { + return agent; + } + var tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers); + agent = tunnel.agent; + if (tunnel.isHttps) { + this.proxyAgents.httpsAgent = tunnel.agent; + } + else { + this.proxyAgents.httpAgent = tunnel.agent; + } + return agent; + } + else if (httpRequest.keepAlive) { + var agent = getCachedAgent(isHttps, this.keepAliveAgents); + if (agent) { + return agent; + } + var agentOptions = { + keepAlive: httpRequest.keepAlive + }; + if (isHttps) { + agent = this.keepAliveAgents.httpsAgent = new https.Agent(agentOptions); + } + else { + agent = this.keepAliveAgents.httpAgent = new http.Agent(agentOptions); + } + return agent; + } + else { + return isHttps ? https.globalAgent : http.globalAgent; + } + }; + // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs + NodeFetchHttpClient.prototype.fetch = function (input, init) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, node_fetch(input, init)]; + }); + }); + }; + NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var requestInit, cookieString; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + requestInit = {}; + if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) { + if (err) { + reject(err); + } + else { + resolve(cookie); + } + }); + })]; + case 1: + cookieString = _a.sent(); + httpRequest.headers.set("Cookie", cookieString); + _a.label = 2; + case 2: + // Set the http(s) agent + requestInit.agent = this.getOrCreateAgent(httpRequest); + requestInit.compress = httpRequest.decompressResponse; + return [2 /*return*/, requestInit]; + } + }); + }); + }; + NodeFetchHttpClient.prototype.processRequest = function (operationResponse) { + return tslib.__awaiter(this, void 0, void 0, function () { + var setCookieHeader_1; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.cookieJar) return [3 /*break*/, 2]; + setCookieHeader_1 = operationResponse.headers.get("Set-Cookie"); + if (!(setCookieHeader_1 !== undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + })]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + return NodeFetchHttpClient; +}(FetchHttpClient)); + +// Copyright (c) Microsoft Corporation. +(function (HttpPipelineLogLevel) { + /** + * A log level that indicates that no logs will be logged. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + /** + * An error log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + /** + * A warning log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; + /** + * An information log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; +})(exports.HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = {})); + +/** + * Converts an OperationOptions to a RequestOptionsBase + * + * @param opts OperationOptions object to convert to RequestOptionsBase + */ +function operationOptionsToRequestOptionsBase(opts) { + var requestOptions = opts.requestOptions, tracingOptions = opts.tracingOptions, additionalOptions = tslib.__rest(opts, ["requestOptions", "tracingOptions"]); + var result = additionalOptions; + if (requestOptions) { + result = tslib.__assign(tslib.__assign({}, result), requestOptions); + } + if (tracingOptions) { + result.spanOptions = tracingOptions.spanOptions; + } + return result; +} + +// Copyright (c) Microsoft Corporation. +var BaseRequestPolicy = /** @class */ (function () { + function BaseRequestPolicy(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + BaseRequestPolicy.prototype.shouldLog = function (logLevel) { + return this._options.shouldLog(logLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + BaseRequestPolicy.prototype.log = function (logLevel, message) { + this._options.log(logLevel, message); + }; + return BaseRequestPolicy; +}()); +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +var RequestPolicyOptions = /** @class */ (function () { + function RequestPolicyOptions(_logger) { + this._logger = _logger; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + RequestPolicyOptions.prototype.shouldLog = function (logLevel) { + return (!!this._logger && + logLevel !== exports.HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + RequestPolicyOptions.prototype.log = function (logLevel, message) { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + }; + return RequestPolicyOptions; +}()); + +// Copyright (c) Microsoft Corporation. +var logger = logger$1.createClientLogger("core-http"); + +// Copyright (c) Microsoft Corporation. +function logPolicy(loggingOptions) { + if (loggingOptions === void 0) { loggingOptions = {}; } + return { + create: function (nextPolicy, options) { + return new LogPolicy(nextPolicy, options, loggingOptions); + } + }; +} +var LogPolicy = /** @class */ (function (_super) { + tslib.__extends(LogPolicy, _super); + function LogPolicy(nextPolicy, options, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.logger, logger$1 = _c === void 0 ? logger.info : _c, _d = _b.allowedHeaderNames, allowedHeaderNames = _d === void 0 ? [] : _d, _e = _b.allowedQueryParameters, allowedQueryParameters = _e === void 0 ? [] : _e; + var _this = _super.call(this, nextPolicy, options) || this; + _this.logger = logger$1; + _this.sanitizer = new Sanitizer({ allowedHeaderNames: allowedHeaderNames, allowedQueryParameters: allowedQueryParameters }); + return _this; + } + Object.defineProperty(LogPolicy.prototype, "allowedHeaderNames", { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + get: function () { + return this.sanitizer.allowedHeaderNames; + }, + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + set: function (allowedHeaderNames) { + this.sanitizer.allowedHeaderNames = allowedHeaderNames; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(LogPolicy.prototype, "allowedQueryParameters", { + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + get: function () { + return this.sanitizer.allowedQueryParameters; + }, + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + set: function (allowedQueryParameters) { + this.sanitizer.allowedQueryParameters = allowedQueryParameters; + }, + enumerable: false, + configurable: true + }); + LogPolicy.prototype.sendRequest = function (request) { + var _this = this; + if (!this.logger.enabled) + return this._nextPolicy.sendRequest(request); + this.logRequest(request); + return this._nextPolicy.sendRequest(request).then(function (response) { return _this.logResponse(response); }); + }; + LogPolicy.prototype.logRequest = function (request) { + this.logger("Request: " + this.sanitizer.sanitize(request)); + }; + LogPolicy.prototype.logResponse = function (response) { + this.logger("Response status code: " + response.status); + this.logger("Headers: " + this.sanitizer.sanitize(response.headers)); + return response; + }; + return LogPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +function getPathStringFromParameter(parameter) { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); +} +function getPathStringFromParameterPath(parameterPath, mapper) { + var result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; +} + +// Copyright (c) Microsoft Corporation. +function isStreamOperation(operationSpec) { + var result = false; + for (var statusCode in operationSpec.responses) { + var operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && + operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; +} + +// Copyright (c) Microsoft Corporation. +// Note: The reason we re-define all of the xml2js default settings (version 2.0) here is because the default settings object exposed +// by the xm2js library is mutable. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/536 +// By creating a new copy of the settings each time we instantiate the parser, +// we are safeguarding against the possibility of the default settings being mutated elsewhere unintentionally. +var xml2jsDefaultOptionsV2 = { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: XML_ATTRKEY, + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: undefined, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: "$$", + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: undefined, + attrValueProcessors: undefined, + tagNameProcessors: undefined, + valueProcessors: undefined, + rootName: "root", + xmldec: { + version: "1.0", + encoding: "UTF-8", + standalone: true + }, + doctype: undefined, + renderOpts: { + pretty: true, + indent: " ", + newline: "\n" + }, + headless: false, + chunkSize: 10000, + emptyTag: "", + cdata: false +}; +// The xml2js settings for general XML parsing operations. +var xml2jsParserSettings = Object.assign({}, xml2jsDefaultOptionsV2); +xml2jsParserSettings.explicitArray = false; +// The xml2js settings for general XML building operations. +var xml2jsBuilderSettings = Object.assign({}, xml2jsDefaultOptionsV2); +xml2jsBuilderSettings.explicitArray = false; +xml2jsBuilderSettings.renderOpts = { + pretty: false +}; +/** + * Converts given JSON object to XML string + * @param obj JSON object to be converted into XML string + * @param opts Options that govern the parsing of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ +function stringifyXML(obj, opts) { + var _a; + if (opts === void 0) { opts = {}; } + xml2jsBuilderSettings.rootName = opts.rootName; + xml2jsBuilderSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + var builder = new xml2js.Builder(xml2jsBuilderSettings); + return builder.buildObject(obj); +} +/** + * Converts given XML string into JSON + * @param str String containing the XML content to be parsed into JSON + * @param opts Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +function parseXML(str, opts) { + var _a; + if (opts === void 0) { opts = {}; } + xml2jsParserSettings.explicitRoot = !!opts.includeRoot; + xml2jsParserSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + var xmlParser = new xml2js.Parser(xml2jsParserSettings); + return new Promise(function (resolve, reject) { + if (!str) { + reject(new Error("Document is empty")); + } + else { + xmlParser.parseString(str, function (err, res) { + if (err) { + reject(err); + } + else { + resolve(res); + } + }); + } + }); +} + +// Copyright (c) Microsoft Corporation. +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +function deserializationPolicy(deserializationContentTypes, parsingOptions) { + return { + create: function (nextPolicy, options) { + return new DeserializationPolicy(nextPolicy, options, deserializationContentTypes, parsingOptions); + } + }; +} +var defaultJsonContentTypes = ["application/json", "text/json"]; +var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +var DefaultDeserializationOptions = { + expectedContentTypes: { + json: defaultJsonContentTypes, + xml: defaultXmlContentTypes + } +}; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +var DeserializationPolicy = /** @class */ (function (_super) { + tslib.__extends(DeserializationPolicy, _super); + function DeserializationPolicy(nextPolicy, requestPolicyOptions, deserializationContentTypes, parsingOptions) { + if (parsingOptions === void 0) { parsingOptions = {}; } + var _a; + var _this = _super.call(this, nextPolicy, requestPolicyOptions) || this; + _this.jsonContentTypes = + (deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes; + _this.xmlContentTypes = + (deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes; + _this.xmlCharKey = (_a = parsingOptions.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + return _this; + } + DeserializationPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(request).then(function (response) { + return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response, { + xmlCharKey: _this.xmlCharKey + }); + })]; + }); + }); + }; + return DeserializationPolicy; +}(BaseRequestPolicy)); +function getOperationResponse(parsedResponse) { + var result; + var request = parsedResponse.request; + var operationSpec = request.operationSpec; + if (operationSpec) { + var operationResponseGetter = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; +} +function shouldDeserializeResponse(parsedResponse) { + var shouldDeserialize = parsedResponse.request.shouldDeserialize; + var result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + return parse(jsonContentTypes, xmlContentTypes, response, updatedOptions).then(function (parsedResponse) { + if (!shouldDeserializeResponse(parsedResponse)) { + return parsedResponse; + } + var operationSpec = parsedResponse.request.operationSpec; + if (!operationSpec || !operationSpec.responses) { + return parsedResponse; + } + var responseSpec = getOperationResponse(parsedResponse); + var _a = handleErrorResponse(parsedResponse, operationSpec, responseSpec), error = _a.error, shouldReturnResponse = _a.shouldReturnResponse; + if (error) { + throw error; + } + else if (shouldReturnResponse) { + return parsedResponse; + } + // An operation response spec does exist for current status code, so + // use it to deserialize the response. + if (responseSpec) { + if (responseSpec.bodyMapper) { + var valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = + typeof valueToDeserialize === "object" + ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] + : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); + } + catch (error) { + var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText, undefined, parsedResponse.status, parsedResponse.request, parsedResponse); + throw restError; + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders", options); + } + } + return parsedResponse; + }); +} +function isOperationSpecEmpty(operationSpec) { + var expectedStatusCodes = Object.keys(operationSpec.responses); + return (expectedStatusCodes.length === 0 || + (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); +} +function handleErrorResponse(parsedResponse, operationSpec, responseSpec) { + var isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + var isExpectedStatusCode = isOperationSpecEmpty(operationSpec) + ? isSuccessByStatus + : !!responseSpec; + if (isExpectedStatusCode) { + if (responseSpec) { + if (!responseSpec.isError) { + return { error: null, shouldReturnResponse: false }; + } + } + else { + return { error: null, shouldReturnResponse: false }; + } + } + var errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; + var initialErrorMessage = isStreamOperation(operationSpec) + ? "Unexpected status code: " + parsedResponse.status + : parsedResponse.bodyAsText; + var error = new RestError(initialErrorMessage, undefined, parsedResponse.status, parsedResponse.request, parsedResponse); + // If the item failed but there's no error spec or default spec to deserialize the error, + // we should fail so we just throw the parsed response + if (!errorResponseSpec) { + throw error; + } + var defaultBodyMapper = errorResponseSpec.bodyMapper; + var defaultHeadersMapper = errorResponseSpec.headersMapper; + try { + // If error response has a body, try to deserialize it using default body mapper. + // Then try to extract error code & message from it + if (parsedResponse.parsedBody) { + var parsedBody = parsedResponse.parsedBody; + var parsedError = void 0; + if (defaultBodyMapper) { + var valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = + typeof parsedBody === "object" ? parsedBody[defaultBodyMapper.xmlElementName] : []; + } + parsedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody"); + } + var internalError = parsedBody.error || parsedError || parsedBody; + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + if (defaultBodyMapper) { + error.response.parsedBody = parsedError; + } + } + // If error response has headers, try to deserialize it using default header mapper + if (parsedResponse.headers && defaultHeadersMapper) { + error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + catch (defaultError) { + error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response."; + } + return { error: error, shouldReturnResponse: false }; +} +function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts) { + var errorHandler = function (err) { + var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + "."; + var errCode = err.code || RestError.PARSE_ERROR; + var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse); + return Promise.reject(e); + }; + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + var text_1 = operationResponse.bodyAsText; + var contentType = operationResponse.headers.get("Content-Type") || ""; + var contentComponents = !contentType + ? [] + : contentType.split(";").map(function (component) { return component.toLowerCase(); }); + if (contentComponents.length === 0 || + contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) { + return new Promise(function (resolve) { + operationResponse.parsedBody = JSON.parse(text_1); + resolve(operationResponse); + }).catch(errorHandler); + } + else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) { + return parseXML(text_1, opts) + .then(function (body) { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + return Promise.resolve(operationResponse); +} + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var DEFAULT_CLIENT_RETRY_COUNT = 3; +// intervals are in ms +var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; +var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; +var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; +function isNumber(n) { + return typeof n === "number"; +} +/** + * @internal + * Determines if the operation should be retried. + * + * @param {number} retryLimit Specifies the max number of retries. + * @param {(response?: HttpOperationResponse, error?: RetryError) => boolean} predicate Initial chekck on whether to retry based on given responses or errors + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(retryLimit, predicate, retryData, response, error) { + if (!predicate(response, error)) { + return false; + } + return retryData.retryCount < retryLimit; +} +/** + * @internal + * Updates the retry data for the next attempt. + * + * @param {RetryPolicyOptions} retryOptions specifies retry interval, and its lower bound and upper bound. + * @param {RetryData} [retryData] The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +function updateRetryData(retryOptions, retryData, err) { + if (retryData === void 0) { retryData = { retryCount: 0, retryInterval: 0 }; } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount - 1) - 1; + var boundedRandDelta = retryOptions.retryInterval * 0.8 + + Math.floor(Math.random() * (retryOptions.retryInterval * 0.4)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(retryOptions.minRetryInterval + incrementDelta, retryOptions.maxRetryInterval); + return retryData; +} + +// Copyright (c) Microsoft Corporation. +function exponentialRetryPolicy(retryCount, retryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval); + } + }; +} +(function (RetryMode) { + RetryMode[RetryMode["Exponential"] = 0] = "Exponential"; +})(exports.RetryMode || (exports.RetryMode = {})); +var DefaultRetryOptions = { + maxRetries: DEFAULT_CLIENT_RETRY_COUNT, + retryDelayInMs: DEFAULT_CLIENT_RETRY_INTERVAL, + maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL +}; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +var ExponentialRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(ExponentialRetryPolicy, _super); + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptions} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) + ? maxRetryInterval + : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + ExponentialRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .then(function (response) { return retry(_this, request, response); }) + .catch(function (error) { return retry(_this, request, error.response, undefined, error); }); + }; + return ExponentialRetryPolicy; +}(BaseRequestPolicy)); +function retry(policy, request, response, retryData, requestError) { + return tslib.__awaiter(this, void 0, void 0, function () { + function shouldPolicyRetry(response) { + var statusCode = response === null || response === void 0 ? void 0 : response.status; + if (statusCode === undefined || + (statusCode < 500 && statusCode !== 408) || + statusCode === 501 || + statusCode === 505) { + return false; + } + return true; + } + var isAborted, res, err_1, err; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + retryData = updateRetryData({ + retryInterval: policy.retryInterval, + minRetryInterval: 0, + maxRetryInterval: policy.maxRetryInterval + }, retryData, requestError); + isAborted = request.abortSignal && request.abortSignal.aborted; + if (!(!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response))) return [3 /*break*/, 6]; + logger.info("Retrying request in " + retryData.retryInterval); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + return [4 /*yield*/, delay(retryData.retryInterval)]; + case 2: + _a.sent(); + return [4 /*yield*/, policy._nextPolicy.sendRequest(request.clone())]; + case 3: + res = _a.sent(); + return [2 /*return*/, retry(policy, request, res, retryData)]; + case 4: + err_1 = _a.sent(); + return [2 /*return*/, retry(policy, request, response, retryData, err_1)]; + case 5: return [3 /*break*/, 7]; + case 6: + if (isAborted || requestError || !response) { + err = retryData.error || + new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response); + throw err; + } + else { + return [2 /*return*/, response]; + } + case 7: return [2 /*return*/]; + } + }); + }); +} + +// Copyright (c) Microsoft Corporation. +function generateClientRequestIdPolicy(requestIdHeaderName) { + if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; } + return { + create: function (nextPolicy, options) { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; +} +var GenerateClientRequestIdPolicy = /** @class */ (function (_super) { + tslib.__extends(GenerateClientRequestIdPolicy, _super); + function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._requestIdHeaderName = _requestIdHeaderName; + return _this; + } + GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, request.requestId); + } + return this._nextPolicy.sendRequest(request); + }; + return GenerateClientRequestIdPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +function getDefaultUserAgentKey() { + return Constants.HeaderConstants.USER_AGENT; +} +function getPlatformSpecificData() { + var runtimeInfo = { + key: "Node", + value: process.version + }; + var osInfo = { + key: "OS", + value: "(" + os.arch() + "-" + os.type() + "-" + os.release() + ")" + }; + return [runtimeInfo, osInfo]; +} + +// Copyright (c) Microsoft Corporation. +function getRuntimeInfo() { + var msRestRuntime = { + key: "core-http", + value: Constants.coreHttpVersion + }; + return [msRestRuntime]; +} +function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) { + if (keySeparator === void 0) { keySeparator = " "; } + if (valueSeparator === void 0) { valueSeparator = "/"; } + return telemetryInfo + .map(function (info) { + var value = info.value ? "" + valueSeparator + info.value : ""; + return "" + info.key + value; + }) + .join(keySeparator); +} +var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; +function getDefaultUserAgentValue() { + var runtimeInfo = getRuntimeInfo(); + var platformSpecificData = getPlatformSpecificData(); + var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; +} +function userAgentPolicy(userAgentData) { + var key = !userAgentData || userAgentData.key === undefined || userAgentData.key === null + ? getDefaultUserAgentKey() + : userAgentData.key; + var value = !userAgentData || userAgentData.value === undefined || userAgentData.value === null + ? getDefaultUserAgentValue() + : userAgentData.value; + return { + create: function (nextPolicy, options) { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; +} +var UserAgentPolicy = /** @class */ (function (_super) { + tslib.__extends(UserAgentPolicy, _super); + function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) { + var _this = _super.call(this, _nextPolicy, _options) || this; + _this._nextPolicy = _nextPolicy; + _this._options = _options; + _this.headerKey = headerKey; + _this.headerValue = headerValue; + return _this; + } + UserAgentPolicy.prototype.sendRequest = function (request) { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + }; + UserAgentPolicy.prototype.addUserAgentHeader = function (request) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + }; + return UserAgentPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +/** + * Methods that are allowed to follow redirects 301 and 302 + */ +var allowedRedirect = ["GET", "HEAD"]; +var DefaultRedirectOptions = { + handleRedirects: true, + maxRetries: 20 +}; +function redirectPolicy(maximumRetries) { + if (maximumRetries === void 0) { maximumRetries = 20; } + return { + create: function (nextPolicy, options) { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; +} +var RedirectPolicy = /** @class */ (function (_super) { + tslib.__extends(RedirectPolicy, _super); + function RedirectPolicy(nextPolicy, options, maxRetries) { + if (maxRetries === void 0) { maxRetries = 20; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.maxRetries = maxRetries; + return _this; + } + RedirectPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request) + .then(function (response) { return handleRedirect(_this, response, 0); }); + }; + return RedirectPolicy; +}(BaseRequestPolicy)); +function handleRedirect(policy, response, currentRetries) { + var request = response.request, status = response.status; + var locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + var builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + delete request.body; + } + return policy._nextPolicy + .sendRequest(request) + .then(function (res) { return handleRedirect(policy, res, currentRetries + 1); }); + } + return Promise.resolve(response); +} + +// Copyright (c) Microsoft Corporation. +function rpRegistrationPolicy(retryTimeout) { + if (retryTimeout === void 0) { retryTimeout = 30; } + return { + create: function (nextPolicy, options) { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; +} +var RPRegistrationPolicy = /** @class */ (function (_super) { + tslib.__extends(RPRegistrationPolicy, _super); + function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) { + if (_retryTimeout === void 0) { _retryTimeout = 30; } + var _this = _super.call(this, nextPolicy, options) || this; + _this._retryTimeout = _retryTimeout; + return _this; + } + RPRegistrationPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .then(function (response) { return registerIfNeeded(_this, request, response); }); + }; + return RPRegistrationPolicy; +}(BaseRequestPolicy)); +function registerIfNeeded(policy, request, response) { + if (response.status === 409) { + var rpName = checkRPNotRegisteredError(response.bodyAsText); + if (rpName) { + var urlPrefix = extractSubscriptionUrl(request.url); + return (registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(function () { return false; }) + .then(function (registrationStatus) { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + })); + } + } + return Promise.resolve(response); +} +/** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ +function getRequestEssentials(originalRequest, reuseUrlToo) { + if (reuseUrlToo === void 0) { reuseUrlToo = false; } + var reqOptions = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", generateUuid()); + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + return reqOptions; +} +/** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ +function checkRPNotRegisteredError(body) { + var result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } + catch (err) { + // do nothing; + } + if (responseBody && + responseBody.error && + responseBody.error.message && + responseBody.error.code && + responseBody.error.code === "MissingSubscriptionRegistration") { + var matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; +} +/** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ +function extractSubscriptionUrl(url) { + var result; + var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//gi); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } + else { + throw new Error("Unable to extract subscriptionId from the given url - " + url + "."); + } + return result; +} +/** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ +function registerRP(policy, urlPrefix, provider, originalRequest) { + var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01"; + var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01"; + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + return policy._nextPolicy.sendRequest(reqOptions).then(function (response) { + if (response.status !== 200) { + throw new Error("Autoregistration of " + provider + " failed. Please try registering manually."); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); +} +/** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ +function getRegistrationStatus(policy, url, originalRequest) { + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + return policy._nextPolicy.sendRequest(reqOptions).then(function (res) { + var obj = res.parsedBody; + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } + else { + return delay(policy._retryTimeout * 1000) + .then(function () { return getRegistrationStatus(policy, url, originalRequest); }); + } + }); +} + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Defines the default token refresh buffer duration. + */ +var TokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes +/** + * Provides an {@link AccessTokenCache} implementation which clears + * the cached {@link AccessToken}'s after the expiresOnTimestamp has + * passed. + */ +var ExpiringAccessTokenCache = /** @class */ (function () { + /** + * Constructs an instance of {@link ExpiringAccessTokenCache} with + * an optional expiration buffer time. + */ + function ExpiringAccessTokenCache(tokenRefreshBufferMs) { + if (tokenRefreshBufferMs === void 0) { tokenRefreshBufferMs = TokenRefreshBufferMs; } + this.cachedToken = undefined; + this.tokenRefreshBufferMs = tokenRefreshBufferMs; + } + ExpiringAccessTokenCache.prototype.setCachedToken = function (accessToken) { + this.cachedToken = accessToken; + }; + ExpiringAccessTokenCache.prototype.getCachedToken = function () { + if (this.cachedToken && + Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) { + this.cachedToken = undefined; + } + return this.cachedToken; + }; + return ExpiringAccessTokenCache; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token. + */ +var AccessTokenRefresher = /** @class */ (function () { + function AccessTokenRefresher(credential, scopes, requiredMillisecondsBeforeNewRefresh) { + if (requiredMillisecondsBeforeNewRefresh === void 0) { requiredMillisecondsBeforeNewRefresh = 30000; } + this.credential = credential; + this.scopes = scopes; + this.requiredMillisecondsBeforeNewRefresh = requiredMillisecondsBeforeNewRefresh; + this.lastCalled = 0; + } + /** + * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying + * that we are ready for a new refresh. + * + * @returns {boolean} + */ + AccessTokenRefresher.prototype.isReady = function () { + // We're only ready for a new refresh if the required milliseconds have passed. + return (!this.lastCalled || Date.now() - this.lastCalled > this.requiredMillisecondsBeforeNewRefresh); + }; + /** + * Stores the time in which it is called, + * then requests a new token, + * then sets this.promise to undefined, + * then returns the token. + * @param options getToken options + */ + AccessTokenRefresher.prototype.getToken = function (options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var token; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + this.lastCalled = Date.now(); + return [4 /*yield*/, this.credential.getToken(this.scopes, options)]; + case 1: + token = _a.sent(); + this.promise = undefined; + return [2 /*return*/, token || undefined]; + } + }); + }); + }; + /** + * Requests a new token if we're not currently waiting for a new token. + * Returns null if the required time between each call hasn't been reached. + * @param options getToken options + */ + AccessTokenRefresher.prototype.refresh = function (options) { + if (!this.promise) { + this.promise = this.getToken(options); + } + return this.promise; + }; + return AccessTokenRefresher; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * Creates a new BearerTokenAuthenticationPolicy factory. + * + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + */ +function bearerTokenAuthenticationPolicy(credential, scopes) { + var tokenCache = new ExpiringAccessTokenCache(); + var tokenRefresher = new AccessTokenRefresher(credential, scopes, timeBetweenRefreshAttemptsInMs); + return { + create: function (nextPolicy, options) { + return new BearerTokenAuthenticationPolicy(nextPolicy, options, tokenCache, tokenRefresher); + } + }; +} +/** + * The automated token refresh will only start to happen at the + * expiration date minus the value of timeBetweenRefreshAttemptsInMs, + * which is by default 30 seconds. + */ +var timeBetweenRefreshAttemptsInMs = 30000; +/** + * + * Provides a RequestPolicy that can request a token from a TokenCredential + * implementation and then apply it to the Authorization header of a request + * as a Bearer token. + * + */ +var BearerTokenAuthenticationPolicy = /** @class */ (function (_super) { + tslib.__extends(BearerTokenAuthenticationPolicy, _super); + /** + * Creates a new BearerTokenAuthenticationPolicy object. + * + * @param nextPolicy The next RequestPolicy in the request pipeline. + * @param options Options for this RequestPolicy. + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + * @param tokenCache The cache for the most recent AccessToken returned from the TokenCredential. + */ + function BearerTokenAuthenticationPolicy(nextPolicy, options, tokenCache, tokenRefresher) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.tokenCache = tokenCache; + _this.tokenRefresher = tokenRefresher; + return _this; + } + /** + * Applies the Bearer token to the request through the Authorization header. + * @param webResource + */ + BearerTokenAuthenticationPolicy.prototype.sendRequest = function (webResource) { + return tslib.__awaiter(this, void 0, void 0, function () { + var token; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + return [4 /*yield*/, this.getToken({ + abortSignal: webResource.abortSignal, + tracingOptions: { + spanOptions: webResource.spanOptions + } + })]; + case 1: + token = _a.sent(); + webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, "Bearer " + token); + return [2 /*return*/, this._nextPolicy.sendRequest(webResource)]; + } + }); + }); + }; + /** + * Attempts a token update if any other time related conditionals have been reached based on the tokenRefresher class. + */ + BearerTokenAuthenticationPolicy.prototype.updateTokenIfNeeded = function (options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var accessToken; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.tokenRefresher.isReady()) return [3 /*break*/, 2]; + return [4 /*yield*/, this.tokenRefresher.refresh(options)]; + case 1: + accessToken = _a.sent(); + this.tokenCache.setCachedToken(accessToken); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + BearerTokenAuthenticationPolicy.prototype.getToken = function (options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var accessToken; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + accessToken = this.tokenCache.getCachedToken(); + if (!(accessToken === undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.tokenRefresher.refresh(options)]; + case 1: + // Waiting for the next refresh only if the cache is unable to retrieve the access token, + // which means that it has expired, or it has never been set. + accessToken = _a.sent(); + this.tokenCache.setCachedToken(accessToken); + return [3 /*break*/, 3]; + case 2: + // If we still have a cached access token, + // And any other time related conditionals have been reached based on the tokenRefresher class, + // then attempt to refresh without waiting. + this.updateTokenIfNeeded(options); + _a.label = 3; + case 3: return [2 /*return*/, accessToken ? accessToken.token : undefined]; + } + }); + }); + }; + return BearerTokenAuthenticationPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +var SystemErrorRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(SystemErrorRetryPolicy, _super); + function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = isNumber(minRetryInterval) + ? minRetryInterval + : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) + ? maxRetryInterval + : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + SystemErrorRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .catch(function (error) { return retry$1(_this, request, error.response, error); }); + }; + return SystemErrorRetryPolicy; +}(BaseRequestPolicy)); +function retry$1(policy, request, operationResponse, err, retryData) { + return tslib.__awaiter(this, void 0, void 0, function () { + function shouldPolicyRetry(_response, error) { + if (error && + error.code && + (error.code === "ETIMEDOUT" || + error.code === "ESOCKETTIMEDOUT" || + error.code === "ECONNREFUSED" || + error.code === "ECONNRESET" || + error.code === "ENOENT")) { + return true; + } + return false; + } + var err_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + retryData = updateRetryData(policy, retryData, err); + if (!shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) return [3 /*break*/, 5]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, delay(retryData.retryInterval)]; + case 2: + _a.sent(); + return [2 /*return*/, policy._nextPolicy.sendRequest(request.clone())]; + case 3: + err_1 = _a.sent(); + return [2 /*return*/, retry$1(policy, request, operationResponse, err_1, retryData)]; + case 4: return [3 /*break*/, 6]; + case 5: + if (err) { + // If the operation failed in the end, return all errors instead of just the last one + return [2 /*return*/, Promise.reject(retryData.error)]; + } + return [2 /*return*/, operationResponse]; + case 6: return [2 /*return*/]; + } + }); + }); +} + +// Copyright (c) Microsoft Corporation. +(function (QueryCollectionFormat) { + QueryCollectionFormat["Csv"] = ","; + QueryCollectionFormat["Ssv"] = " "; + QueryCollectionFormat["Tsv"] = "\t"; + QueryCollectionFormat["Pipes"] = "|"; + QueryCollectionFormat["Multi"] = "Multi"; +})(exports.QueryCollectionFormat || (exports.QueryCollectionFormat = {})); + +// Copyright (c) Microsoft Corporation. +var noProxyList = []; +var isNoProxyInitalized = false; +var byPassedList = new Map(); +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + var httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY); + var allProxy = getEnvironmentValue(Constants.ALL_PROXY); + var httpProxy = getEnvironmentValue(Constants.HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; +} +// Check whether the given `uri` matches the noProxyList. If it matches, any request sent to that same `uri` won't set the proxy settings. +function isBypassed(uri) { + if (byPassedList.has(uri)) { + return byPassedList.get(uri); + } + loadNoProxy(); + var isBypassed = false; + var host = URLBuilder.parse(uri).getHost(); + for (var _i = 0, noProxyList_1 = noProxyList; _i < noProxyList_1.length; _i++) { + var proxyString = noProxyList_1[_i]; + if (proxyString[0] === ".") { + if (uri.endsWith(proxyString)) { + isBypassed = true; + } + else { + if (host === proxyString.slice(1) && host.length === proxyString.length - 1) { + isBypassed = true; + } + } + } + else { + if (host === proxyString) { + isBypassed = true; + } + } + } + byPassedList.set(uri, isBypassed); + return isBypassed; +} +function loadNoProxy() { + if (isNoProxyInitalized) { + return; + } + var noProxy = getEnvironmentValue(Constants.NO_PROXY); + if (noProxy) { + var list = noProxy.split(","); + noProxyList = list.map(function (item) { return item.trim(); }).filter(function (item) { return item.length; }); + } + isNoProxyInitalized = true; +} +function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + var _a = extractAuthFromUrl(proxyUrl), username = _a.username, password = _a.password, urlWithoutAuth = _a.urlWithoutAuth; + var parsedUrl = URLBuilder.parse(urlWithoutAuth); + var schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + "://" : ""; + return { + host: schema + parsedUrl.getHost(), + port: Number.parseInt(parsedUrl.getPort() || "80"), + username: username, + password: password + }; +} +function proxyPolicy(proxySettings) { + if (!proxySettings) { + proxySettings = getDefaultProxySettings(); + } + return { + create: function (nextPolicy, options) { + return new ProxyPolicy(nextPolicy, options, proxySettings); + } + }; +} +function extractAuthFromUrl(url) { + var atIndex = url.indexOf("@"); + if (atIndex === -1) { + return { urlWithoutAuth: url }; + } + var schemeIndex = url.indexOf("://"); + var authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0; + var auth = url.substring(authStart, atIndex); + var colonIndex = auth.indexOf(":"); + var hasPassword = colonIndex !== -1; + var username = hasPassword ? auth.substring(0, colonIndex) : auth; + var password = hasPassword ? auth.substring(colonIndex + 1) : undefined; + var urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1); + return { + username: username, + password: password, + urlWithoutAuth: urlWithoutAuth + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + tslib.__extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options, proxySettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.proxySettings = proxySettings; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (request) { + if (!request.proxySettings && !isBypassed(request.url)) { + request.proxySettings = this.proxySettings; + } + return this._nextPolicy.sendRequest(request); + }; + return ProxyPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +var StatusCodes = Constants.HttpConstants.StatusCodes; +function throttlingRetryPolicy() { + return { + create: function (nextPolicy, options) { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; +} +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +var ThrottlingRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(ThrottlingRetryPolicy, _super); + function ThrottlingRetryPolicy(nextPolicy, options, _handleResponse) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._handleResponse = _handleResponse || _this._defaultResponseHandler; + return _this; + } + ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } + else { + return _this._handleResponse(httpRequest, response); + } + })]; + }); + }); + }; + ThrottlingRetryPolicy.prototype._defaultResponseHandler = function (httpRequest, httpResponse) { + return tslib.__awaiter(this, void 0, void 0, function () { + var retryAfterHeader, delayInMs; + var _this = this; + return tslib.__generator(this, function (_a) { + retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + if (retryAfterHeader) { + delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return [2 /*return*/, delay(delayInMs).then(function (_) { return _this._nextPolicy.sendRequest(httpRequest); })]; + } + } + return [2 /*return*/, httpResponse]; + }); + }); + }; + ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) { + var retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } + else { + return retryAfterInSeconds * 1000; + } + }; + ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) { + try { + var now = Date.now(); + var date = Date.parse(headerValue); + var diff = date - now; + return Number.isNaN(diff) ? undefined : diff; + } + catch (error) { + return undefined; + } + }; + return ThrottlingRetryPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +function signingPolicy(authenticationProvider) { + return { + create: function (nextPolicy, options) { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; +} +var SigningPolicy = /** @class */ (function (_super) { + tslib.__extends(SigningPolicy, _super); + function SigningPolicy(nextPolicy, options, authenticationProvider) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.authenticationProvider = authenticationProvider; + return _this; + } + SigningPolicy.prototype.signRequest = function (request) { + return this.authenticationProvider.signRequest(request); + }; + SigningPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this.signRequest(request).then(function (nextRequest) { + return _this._nextPolicy.sendRequest(nextRequest); + }); + }; + return SigningPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +var DefaultKeepAliveOptions = { + enable: true +}; +function keepAlivePolicy(keepAliveOptions) { + return { + create: function (nextPolicy, options) { + return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions); + } + }; +} +/** + * KeepAlivePolicy is a policy used to control keep alive settings for every request. + */ +var KeepAlivePolicy = /** @class */ (function (_super) { + tslib.__extends(KeepAlivePolicy, _super); + /** + * Creates an instance of KeepAlivePolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {KeepAliveOptions} [keepAliveOptions] + */ + function KeepAlivePolicy(nextPolicy, options, keepAliveOptions) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.keepAliveOptions = keepAliveOptions; + return _this; + } + /** + * Sends out request. + * + * @param {WebResourceLike} request + * @returns {Promise} + * @memberof KeepAlivePolicy + */ + KeepAlivePolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + request.keepAlive = this.keepAliveOptions.enable; + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return KeepAlivePolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +function tracingPolicy(tracingOptions) { + if (tracingOptions === void 0) { tracingOptions = {}; } + return { + create: function (nextPolicy, options) { + return new TracingPolicy(nextPolicy, options, tracingOptions); + } + }; +} +var TracingPolicy = /** @class */ (function (_super) { + tslib.__extends(TracingPolicy, _super); + function TracingPolicy(nextPolicy, options, tracingOptions) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.userAgent = tracingOptions.userAgent; + return _this; + } + TracingPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + var tracer, spanOptions, path, span, spanContext, traceParentHeader, traceState, response, serviceRequestId, err_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!request.spanOptions || !request.spanOptions.parent) { + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + } + tracer = coreTracing.getTracer(); + spanOptions = tslib.__assign(tslib.__assign({}, request.spanOptions), { kind: api.SpanKind.CLIENT }); + path = URLBuilder.parse(request.url).getPath() || "/"; + span = tracer.startSpan(path, spanOptions); + span.setAttributes({ + "http.method": request.method, + "http.url": request.url, + requestId: request.requestId + }); + if (this.userAgent) { + span.setAttribute("http.user_agent", this.userAgent); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + spanContext = span.context(); + traceParentHeader = coreTracing.getTraceParentHeader(spanContext); + if (traceParentHeader) { + request.headers.set("traceparent", traceParentHeader); + traceState = spanContext.traceState && spanContext.traceState.serialize(); + // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent + if (traceState) { + request.headers.set("tracestate", traceState); + } + } + return [4 /*yield*/, this._nextPolicy.sendRequest(request)]; + case 2: + response = _a.sent(); + span.setAttribute("http.status_code", response.status); + serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); + } + span.end(); + return [2 /*return*/, response]; + case 3: + err_1 = _a.sent(); + span.end(); + throw err_1; + case 4: return [2 /*return*/]; + } + }); + }); + }; + return TracingPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +/** + * Returns a request policy factory that can be used to create an instance of + * {@link DisableResponseDecompressionPolicy}. + */ +function disableResponseDecompressionPolicy() { + return { + create: function (nextPolicy, options) { + return new DisableResponseDecompressionPolicy(nextPolicy, options); + } + }; +} +/** + * A policy to disable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +var DisableResponseDecompressionPolicy = /** @class */ (function (_super) { + tslib.__extends(DisableResponseDecompressionPolicy, _super); + /** + * Creates an instance of DisableResponseDecompressionPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + */ + // The parent constructor is protected. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor */ + function DisableResponseDecompressionPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + */ + DisableResponseDecompressionPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + request.decompressResponse = false; + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return DisableResponseDecompressionPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +function ndJsonPolicy() { + return { + create: function (nextPolicy, options) { + return new NdJsonPolicy(nextPolicy, options); + } + }; +} +/** + * NdJsonPolicy that formats a JSON array as newline-delimited JSON + */ +var NdJsonPolicy = /** @class */ (function (_super) { + tslib.__extends(NdJsonPolicy, _super); + /** + * Creates an instance of KeepAlivePolicy. + * + * @param nextPolicy + * @param options + */ + function NdJsonPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends a request. + * + * @param request + */ + NdJsonPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + var body; + return tslib.__generator(this, function (_a) { + // There currently isn't a good way to bypass the serializer + if (typeof request.body === "string" && request.body.startsWith("[")) { + body = JSON.parse(request.body); + if (Array.isArray(body)) { + request.body = body.map(function (item) { return JSON.stringify(item) + "\n"; }).join(""); + } + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return NdJsonPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +var ServiceClient = /** @class */ (function () { + /** + * The ServiceClient constructor + * @constructor + * @param credentials The credentials used for authentication with the service. + * @param options The service client options that govern the behavior of the client. + */ + function ServiceClient(credentials, + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */ + options) { + var _this = this; + if (!options) { + options = {}; + } + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new NodeFetchHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + var requestPolicyFactories; + if (Array.isArray(options.requestPolicyFactories)) { + logger.info("ServiceClient: using custom request policies"); + requestPolicyFactories = options.requestPolicyFactories; + } + else { + var authPolicyFactory = undefined; + if (coreAuth.isTokenCredential(credentials)) { + logger.info("ServiceClient: creating bearer token authentication policy from provided credentials"); + // Create a wrapped RequestPolicyFactory here so that we can provide the + // correct scope to the BearerTokenAuthenticationPolicy at the first time + // one is requested. This is needed because generated ServiceClient + // implementations do not set baseUri until after ServiceClient's constructor + // is finished, leaving baseUri empty at the time when it is needed to + // build the correct scope name. + var wrappedPolicyFactory = function () { + var bearerTokenPolicyFactory = undefined; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var serviceClient = _this; + return { + create: function (nextPolicy, options) { + if (bearerTokenPolicyFactory === undefined || bearerTokenPolicyFactory === null) { + bearerTokenPolicyFactory = bearerTokenAuthenticationPolicy(credentials, (serviceClient.baseUri || "") + "/.default"); + } + return bearerTokenPolicyFactory.create(nextPolicy, options); + } + }; + }; + authPolicyFactory = wrappedPolicyFactory(); + } + else if (credentials && typeof credentials.signRequest === "function") { + logger.info("ServiceClient: creating signing policy from provided credentials"); + authPolicyFactory = signingPolicy(credentials); + } + else if (credentials !== undefined && credentials !== null) { + throw new Error("The credentials argument must implement the TokenCredential interface"); + } + logger.info("ServiceClient: using default request policies"); + requestPolicyFactories = createDefaultRequestPolicyFactories(authPolicyFactory, options); + if (options.requestPolicyFactories) { + // options.requestPolicyFactories can also be a function that manipulates + // the default requestPolicyFactories array + var newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + /** + * Send the provided httpRequest. + */ + ServiceClient.prototype.sendRequest = function (options) { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + var httpRequest; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } + else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } + catch (error) { + return Promise.reject(error); + } + var httpPipeline = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (var i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + }; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + ServiceClient.prototype.sendOperationRequest = function (operationArguments, operationSpec, callback) { + var _a; + return tslib.__awaiter(this, void 0, void 0, function () { + var serializerOptions, httpRequest, result, baseUri, requestUrl, _i, _b, urlParameter, urlParameterValue, _c, _d, queryParameter, queryParameterValue, index, item, index, contentType, _e, _f, headerParameter, headerValue, headerCollectionPrefix, _g, _h, key, options, customHeaderName, rawResponse, sendRequestError, error_1, error_2, cb; + return tslib.__generator(this, function (_j) { + switch (_j.label) { + case 0: + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + httpRequest = new WebResource(); + _j.label = 1; + case 1: + _j.trys.push([1, 6, , 7]); + baseUri = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + requestUrl = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (_i = 0, _b = operationSpec.urlParameters; _i < _b.length; _i++) { + urlParameter = _b[_i]; + urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter), serializerOptions); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll("{" + (urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)) + "}", urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (_c = 0, _d = operationSpec.queryParameters; _c < _d.length; _c++) { + queryParameter = _d[_c]; + queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue !== undefined && queryParameterValue !== null) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter), serializerOptions); + if (queryParameter.collectionFormat !== undefined && + queryParameter.collectionFormat !== null) { + if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + // The collection is empty, no need to try serializing the current queryParam + continue; + } + else { + for (index in queryParameterValue) { + item = queryParameterValue[index]; + queryParameterValue[index] = + item === undefined || item === null ? "" : item.toString(); + } + } + } + else if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Ssv || + queryParameter.collectionFormat === exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && + queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat !== undefined && + queryParameter.collectionFormat !== null && + queryParameter.collectionFormat !== exports.QueryCollectionFormat.Multi && + queryParameter.collectionFormat !== exports.QueryCollectionFormat.Ssv && + queryParameter.collectionFormat !== exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + if (operationSpec.headerParameters) { + for (_e = 0, _f = operationSpec.headerParameters; _e < _f.length; _e++) { + headerParameter = _f[_e]; + headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue !== undefined && headerValue !== null) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter), serializerOptions); + headerCollectionPrefix = headerParameter.mapper + .headerCollectionPrefix; + if (headerCollectionPrefix) { + for (_g = 0, _h = Object.keys(headerValue); _g < _h.length; _g++) { + key = _h[_g]; + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + httpRequest.headers.set(headerParameter.mapper.serializedName || + getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + options = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + if (options.spanOptions) { + httpRequest.spanOptions = options.spanOptions; + } + if (options.shouldDeserialize !== undefined && options.shouldDeserialize !== null) { + httpRequest.shouldDeserialize = options.shouldDeserialize; + } + } + httpRequest.withCredentials = this._withCredentials; + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + if (httpRequest.streamResponseBody === undefined || httpRequest.streamResponseBody === null) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + rawResponse = void 0; + sendRequestError = void 0; + _j.label = 2; + case 2: + _j.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.sendRequest(httpRequest)]; + case 3: + rawResponse = _j.sent(); + return [3 /*break*/, 5]; + case 4: + error_1 = _j.sent(); + sendRequestError = error_1; + return [3 /*break*/, 5]; + case 5: + if (sendRequestError) { + if (sendRequestError.response) { + sendRequestError.details = flattenResponse(sendRequestError.response, operationSpec.responses[sendRequestError.statusCode] || + operationSpec.responses["default"]); + } + result = Promise.reject(sendRequestError); + } + else { + result = Promise.resolve(flattenResponse(rawResponse, operationSpec.responses[rawResponse.status])); + } + return [3 /*break*/, 7]; + case 6: + error_2 = _j.sent(); + result = Promise.reject(error_2); + return [3 /*break*/, 7]; + case 7: + cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(function (res) { return cb(null, res._response.parsedBody, res._response.request, res._response); }) + .catch(function (err) { return cb(err); }); + } + return [2 /*return*/, result]; + } + }); + }); + }; + return ServiceClient; +}()); +function serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) { + var _a, _b, _c, _d, _e, _f; + var serializerOptions = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions) !== null && _b !== void 0 ? _b : {}; + var updatedOptions = { + rootName: (_c = serializerOptions.rootName) !== null && _c !== void 0 ? _c : "", + includeRoot: (_d = serializerOptions.includeRoot) !== null && _d !== void 0 ? _d : false, + xmlCharKey: (_e = serializerOptions.xmlCharKey) !== null && _e !== void 0 ? _e : XML_CHARKEY + }; + var xmlCharKey = serializerOptions.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + var bodyMapper = operationSpec.requestBody.mapper; + var required = bodyMapper.required, xmlName = bodyMapper.xmlName, xmlElementName = bodyMapper.xmlElementName, serializedName = bodyMapper.serializedName, xmlNamespace = bodyMapper.xmlNamespace, xmlNamespacePrefix = bodyMapper.xmlNamespacePrefix; + var typeName = bodyMapper.type.name; + try { + if ((httpRequest.body !== undefined && httpRequest.body !== null) || required) { + var requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString, updatedOptions); + var isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + var xmlnsKey = xmlNamespacePrefix ? "xmlns:" + xmlNamespacePrefix : "xmlns"; + var value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, httpRequest.body, updatedOptions); + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { + rootName: xmlName || serializedName, + xmlCharKey: xmlCharKey + }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(value, { + rootName: xmlName || serializedName, + xmlCharKey: xmlCharKey + }); + } + } + else if (typeName === MapperType.String && + (((_f = operationSpec.contentType) === null || _f === void 0 ? void 0 : _f.match("text/plain")) || operationSpec.mediaType === "text")) { + // the String serializer has validated that request body is a string + // so just send the string. + return; + } + else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } + catch (error) { + throw new Error("Error \"" + error.message + "\" occurred in serializing the payload - " + JSON.stringify(serializedName, undefined, " ") + "."); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (var _i = 0, _g = operationSpec.formDataParameters; _i < _g.length; _i++) { + var formDataParameter = _g[_i]; + var formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue !== undefined && formDataParameterValue !== null) { + var formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions); + } + } + } +} +/** + * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself + */ +function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { + var _a; + // Composite and Sequence schemas already got their root namespace set during serialization + // We just need to add xmlns to the other schema types + if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { + var result = {}; + result[options.xmlCharKey] = serializedValue; + result[XML_ATTRKEY] = (_a = {}, _a[xmlnsKey] = xmlNamespace, _a); + return result; + } + return serializedValue; +} +function getValueOrFunctionResult(value, defaultValueCreator) { + var result; + if (typeof value === "string") { + result = value; + } + else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; +} +function createDefaultRequestPolicyFactories(authPolicyFactory, options) { + var factories = []; + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + if (authPolicyFactory) { + factories.push(authPolicyFactory); + } + var userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + var userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + factories.push(deserializationPolicy(options.deserializationContentTypes)); + { + factories.push(proxyPolicy(options.proxySettings)); + } + factories.push(logPolicy({ logger: logger.info })); + return factories; +} +function createPipelineFromOptions(pipelineOptions, authPolicyFactory) { + var requestPolicyFactories = []; + if (pipelineOptions.sendStreamingJson) { + requestPolicyFactories.push(ndJsonPolicy()); + } + var userAgentValue = undefined; + if (pipelineOptions.userAgentOptions && pipelineOptions.userAgentOptions.userAgentPrefix) { + var userAgentInfo = []; + userAgentInfo.push(pipelineOptions.userAgentOptions.userAgentPrefix); + // Add the default user agent value if it isn't already specified + // by the userAgentPrefix option. + var defaultUserAgentInfo = getDefaultUserAgentValue(); + if (userAgentInfo.indexOf(defaultUserAgentInfo) === -1) { + userAgentInfo.push(defaultUserAgentInfo); + } + userAgentValue = userAgentInfo.join(" "); + } + var keepAliveOptions = tslib.__assign(tslib.__assign({}, DefaultKeepAliveOptions), pipelineOptions.keepAliveOptions); + var retryOptions = tslib.__assign(tslib.__assign({}, DefaultRetryOptions), pipelineOptions.retryOptions); + var redirectOptions = tslib.__assign(tslib.__assign({}, DefaultRedirectOptions), pipelineOptions.redirectOptions); + { + requestPolicyFactories.push(proxyPolicy(pipelineOptions.proxyOptions)); + } + var deserializationOptions = tslib.__assign(tslib.__assign({}, DefaultDeserializationOptions), pipelineOptions.deserializationOptions); + var loggingOptions = tslib.__assign({}, pipelineOptions.loggingOptions); + requestPolicyFactories.push(tracingPolicy({ userAgent: userAgentValue }), keepAlivePolicy(keepAliveOptions), userAgentPolicy({ value: userAgentValue }), generateClientRequestIdPolicy(), deserializationPolicy(deserializationOptions.expectedContentTypes), throttlingRetryPolicy(), systemErrorRetryPolicy(), exponentialRetryPolicy(retryOptions.maxRetries, retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs)); + if (redirectOptions.handleRedirects) { + requestPolicyFactories.push(redirectPolicy(redirectOptions.maxRetries)); + } + if (authPolicyFactory) { + requestPolicyFactories.push(authPolicyFactory); + } + requestPolicyFactories.push(logPolicy(loggingOptions)); + if (isNode && pipelineOptions.decompressResponse === false) { + requestPolicyFactories.push(disableResponseDecompressionPolicy()); + } + return { + httpClient: pipelineOptions.httpClient, + requestPolicyFactories: requestPolicyFactories + }; +} +function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); +} +function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { + var _a; + var value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + var serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + var propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + var useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = + parameterMapper.required || + (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + // Serialize just for validation purposes. + var parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString, serializerOptions); + } + } + else { + if (parameterMapper.required) { + value = {}; + } + for (var propertyName in parameterPath) { + var propertyMapper = parameterMapper.type.modelProperties[propertyName]; + var propertyPath = parameterPath[propertyName]; + var propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + var propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString, serializerOptions); + if (propertyValue !== undefined && propertyValue !== null) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + var result = { propertyFound: false }; + var i = 0; + for (; i < parameterPath.length; ++i) { + var parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent !== undefined && parent !== null && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} +function flattenResponse(_response, responseSpec) { + var parsedHeaders = _response.parsedHeaders; + var bodyMapper = responseSpec && responseSpec.bodyMapper; + var addOperationResponse = function (obj) { + return Object.defineProperty(obj, "_response", { + value: _response + }); + }; + if (bodyMapper) { + var typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody })); + } + var modelProperties_1 = (typeName === "Composite" && bodyMapper.type.modelProperties) || {}; + var isPageableResponse = Object.keys(modelProperties_1).some(function (k) { return modelProperties_1[k].serializedName === ""; }); + if (typeName === "Sequence" || isPageableResponse) { + var arrayResponse = tslib.__spreadArrays((_response.parsedBody || [])); + for (var _i = 0, _a = Object.keys(modelProperties_1); _i < _a.length; _i++) { + var key = _a[_i]; + if (modelProperties_1[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + if (parsedHeaders) { + for (var _b = 0, _c = Object.keys(parsedHeaders); _b < _c.length; _b++) { + var key = _c[_b]; + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), _response.parsedBody)); + } + } + if (bodyMapper || + _response.request.method === "HEAD" || + isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), { body: _response.parsedBody })); + } + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), _response.parsedBody)); +} + +// Copyright (c) Microsoft Corporation. +var HeaderConstants = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME = "Basic"; +var BasicAuthenticationCredentials = /** @class */ (function () { + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function BasicAuthenticationCredentials(userName, password, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + BasicAuthenticationCredentials.prototype.signRequest = function (webResource) { + var credentials = this.userName + ":" + this.password; + var encodedCredentials = this.authorizationScheme + " " + encodeString(credentials); + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + }; + return BasicAuthenticationCredentials; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * Authenticates to a service using an API key. + */ +var ApiKeyCredentials = /** @class */ (function () { + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + function ApiKeyCredentials(options) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error("options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided."); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + ApiKeyCredentials.prototype.signRequest = function (webResource) { + if (!webResource) { + return Promise.reject(new Error("webResource cannot be null or undefined and must be of type \"object\".")); + } + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (var headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error("url cannot be null in the request object.")); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (var key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += key + "=" + this.inQuery[key]; + } + } + return Promise.resolve(webResource); + }; + return ApiKeyCredentials; +}()); + +// Copyright (c) Microsoft Corporation. +var TopicCredentials = /** @class */ (function (_super) { + tslib.__extends(TopicCredentials, _super); + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + function TopicCredentials(topicKey) { + var _this = this; + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return TopicCredentials; +}(ApiKeyCredentials)); + +Object.defineProperty(exports, 'isTokenCredential', { + enumerable: true, + get: function () { + return coreAuth.isTokenCredential; + } +}); +exports.AccessTokenRefresher = AccessTokenRefresher; +exports.ApiKeyCredentials = ApiKeyCredentials; +exports.BaseRequestPolicy = BaseRequestPolicy; +exports.BasicAuthenticationCredentials = BasicAuthenticationCredentials; +exports.Constants = Constants; +exports.DefaultHttpClient = NodeFetchHttpClient; +exports.ExpiringAccessTokenCache = ExpiringAccessTokenCache; +exports.HttpHeaders = HttpHeaders; +exports.MapperType = MapperType; +exports.RequestPolicyOptions = RequestPolicyOptions; +exports.RestError = RestError; +exports.Serializer = Serializer; +exports.ServiceClient = ServiceClient; +exports.TopicCredentials = TopicCredentials; +exports.URLBuilder = URLBuilder; +exports.URLQuery = URLQuery; +exports.WebResource = WebResource; +exports.XML_ATTRKEY = XML_ATTRKEY; +exports.XML_CHARKEY = XML_CHARKEY; +exports.applyMixins = applyMixins; +exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; +exports.createPipelineFromOptions = createPipelineFromOptions; +exports.delay = delay; +exports.deserializationPolicy = deserializationPolicy; +exports.deserializeResponseBody = deserializeResponseBody; +exports.disableResponseDecompressionPolicy = disableResponseDecompressionPolicy; +exports.encodeUri = encodeUri; +exports.executePromisesSequentially = executePromisesSequentially; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +exports.flattenResponse = flattenResponse; +exports.generateClientRequestIdPolicy = generateClientRequestIdPolicy; +exports.generateUuid = generateUuid; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.getDefaultUserAgentValue = getDefaultUserAgentValue; +exports.isDuration = isDuration; +exports.isNode = isNode; +exports.isValidUuid = isValidUuid; +exports.keepAlivePolicy = keepAlivePolicy; +exports.logPolicy = logPolicy; +exports.operationOptionsToRequestOptionsBase = operationOptionsToRequestOptionsBase; +exports.parseXML = parseXML; +exports.promiseToCallback = promiseToCallback; +exports.promiseToServiceCallback = promiseToServiceCallback; +exports.proxyPolicy = proxyPolicy; +exports.redirectPolicy = redirectPolicy; +exports.serializeObject = serializeObject; +exports.signingPolicy = signingPolicy; +exports.stringifyXML = stringifyXML; +exports.stripRequest = stripRequest; +exports.stripResponse = stripResponse; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +exports.tracingPolicy = tracingPolicy; +exports.userAgentPolicy = userAgentPolicy; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/core-http/dom-shim.d.ts b/node_modules/@azure/core-http/dom-shim.d.ts new file mode 100644 index 000000000..cb4ac4d93 --- /dev/null +++ b/node_modules/@azure/core-http/dom-shim.d.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +// d.ts shims provide types for things we use internally but are not part +// of this package's surface area. + +interface Request {} +interface RequestInit {} +interface Response {} +interface Headers {} diff --git a/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js b/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js new file mode 100644 index 000000000..e798c4f8b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { FetchHttpClient } from "./fetchHttpClient"; +var BrowserFetchHttpClient = /** @class */ (function (_super) { + __extends(BrowserFetchHttpClient, _super); + function BrowserFetchHttpClient() { + return _super !== null && _super.apply(this, arguments) || this; + } + BrowserFetchHttpClient.prototype.prepareRequest = function (_httpRequest) { + return Promise.resolve({}); + }; + BrowserFetchHttpClient.prototype.processRequest = function (_operationResponse) { + return Promise.resolve(); + }; + // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs + BrowserFetchHttpClient.prototype.fetch = function (input, init) { + return fetch(input, init); + }; + return BrowserFetchHttpClient; +}(FetchHttpClient)); +export { BrowserFetchHttpClient }; +//# sourceMappingURL=browserFetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js.map b/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js.map new file mode 100644 index 000000000..a1467f973 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/browserFetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browserFetchHttpClient.js","sourceRoot":"","sources":["../../src/browserFetchHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EACL,eAAe,EAIhB,MAAM,mBAAmB,CAAC;AAI3B;IAA4C,0CAAe;IAA3D;;IAaA,CAAC;IAZC,+CAAc,GAAd,UAAe,YAA6B;QAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAED,+CAAc,GAAd,UAAe,kBAAyC;QACtD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,6EAA6E;IAC7E,sCAAK,GAAL,UAAM,KAAwB,EAAE,IAAwB;QACtD,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,6BAAC;AAAD,CAAC,AAbD,CAA4C,eAAe,GAa1D","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FetchHttpClient,\n CommonRequestInfo,\n CommonResponse,\n CommonRequestInit\n} from \"./fetchHttpClient\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\n\nexport class BrowserFetchHttpClient extends FetchHttpClient {\n prepareRequest(_httpRequest: WebResourceLike): Promise> {\n return Promise.resolve({});\n }\n\n processRequest(_operationResponse: HttpOperationResponse): Promise {\n return Promise.resolve();\n }\n\n // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs\n fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise {\n return fetch(input, init);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/coreHttp.js b/node_modules/@azure/core-http/es/src/coreHttp.js new file mode 100644 index 000000000..c2b61e730 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/coreHttp.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/* eslint-disable-next-line @typescript-eslint/triple-slash-reference */ +/// +export { WebResource } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpHeaders } from "./httpHeaders"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { operationOptionsToRequestOptionsBase } from "./operationOptions"; +export { ServiceClient, flattenResponse, createPipelineFromOptions } from "./serviceClient"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { bearerTokenAuthenticationPolicy } from "./policies/bearerTokenAuthenticationPolicy"; +export { logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicyOptions } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy, RetryMode } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy } from "./policies/redirectPolicy"; +export { keepAlivePolicy } from "./policies/keepAlivePolicy"; +export { disableResponseDecompressionPolicy } from "./policies/disableResponseDecompressionPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy"; +export { tracingPolicy } from "./policies/tracingPolicy"; +export { MapperType, Serializer, serializeObject } from "./serializer"; +export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration } from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; +// Credentials +export { isTokenCredential } from "@azure/core-auth"; +export { ExpiringAccessTokenCache } from "./credentials/accessTokenCache"; +export { AccessTokenRefresher } from "./credentials/accessTokenRefresher"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials } from "./credentials/apiKeyCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { parseXML, stringifyXML } from "./util/xml"; +export { XML_ATTRKEY, XML_CHARKEY } from "./util/serializer.common"; +//# sourceMappingURL=coreHttp.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/coreHttp.js.map b/node_modules/@azure/core-http/es/src/coreHttp.js.map new file mode 100644 index 000000000..26a560fe0 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/coreHttp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"coreHttp.js","sourceRoot":"","sources":["../../src/coreHttp.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wEAAwE;AACxE,yCAAyC;AAEzC,OAAO,EACL,WAAW,EAQZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAc,WAAW,EAAmC,MAAM,eAAe,CAAC;AAGzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAGL,oCAAoC,EACrC,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EACL,aAAa,EAEb,eAAe,EACf,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAoB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACL,iBAAiB,EAGjB,oBAAoB,EAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAgB,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAA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AC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAqB,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* eslint-disable-next-line @typescript-eslint/triple-slash-reference */\n/// \n\nexport {\n WebResource,\n WebResourceLike,\n HttpRequestBody,\n RequestPrepareOptions,\n HttpMethods,\n ParameterValue,\n RequestOptionsBase,\n TransferProgressEvent\n} from \"./webResource\";\nexport { DefaultHttpClient } from \"./defaultHttpClient\";\nexport { HttpClient } from \"./httpClient\";\nexport { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from \"./httpHeaders\";\nexport { HttpOperationResponse, HttpResponse, RestResponse } from \"./httpOperationResponse\";\nexport { HttpPipelineLogger } from \"./httpPipelineLogger\";\nexport { HttpPipelineLogLevel } from \"./httpPipelineLogLevel\";\nexport { RestError } from \"./restError\";\nexport { OperationArguments } from \"./operationArguments\";\nexport {\n OperationOptions,\n OperationRequestOptions,\n operationOptionsToRequestOptionsBase\n} from \"./operationOptions\";\nexport {\n OperationParameter,\n OperationQueryParameter,\n OperationURLParameter,\n ParameterPath\n} from \"./operationParameter\";\nexport { OperationResponse } from \"./operationResponse\";\nexport { OperationSpec } from \"./operationSpec\";\nexport {\n ServiceClient,\n ServiceClientOptions,\n flattenResponse,\n createPipelineFromOptions,\n ProxySettings,\n ProxyOptions\n} from \"./serviceClient\";\nexport { PipelineOptions, InternalPipelineOptions } from \"./pipelineOptions\";\nexport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nexport { Constants } from \"./util/constants\";\nexport { bearerTokenAuthenticationPolicy } from \"./policies/bearerTokenAuthenticationPolicy\";\nexport { LogPolicyOptions, logPolicy } from \"./policies/logPolicy\";\nexport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n RequestPolicyOptionsLike\n} from \"./policies/requestPolicy\";\nexport { generateClientRequestIdPolicy } from \"./policies/generateClientRequestIdPolicy\";\nexport { exponentialRetryPolicy, RetryOptions, RetryMode } from \"./policies/exponentialRetryPolicy\";\nexport { systemErrorRetryPolicy } from \"./policies/systemErrorRetryPolicy\";\nexport { throttlingRetryPolicy } from \"./policies/throttlingRetryPolicy\";\nexport { getDefaultProxySettings, proxyPolicy } from \"./policies/proxyPolicy\";\nexport { redirectPolicy, RedirectOptions } from \"./policies/redirectPolicy\";\nexport { keepAlivePolicy, KeepAliveOptions } from \"./policies/keepAlivePolicy\";\nexport { disableResponseDecompressionPolicy } from \"./policies/disableResponseDecompressionPolicy\";\nexport { signingPolicy } from \"./policies/signingPolicy\";\nexport {\n userAgentPolicy,\n getDefaultUserAgentValue,\n UserAgentOptions,\n TelemetryInfo\n} from \"./policies/userAgentPolicy\";\nexport {\n deserializationPolicy,\n DeserializationOptions,\n deserializeResponseBody,\n DeserializationContentTypes\n} from \"./policies/deserializationPolicy\";\nexport { tracingPolicy, TracingPolicyOptions } from \"./policies/tracingPolicy\";\nexport {\n MapperType,\n SimpleMapperType,\n CompositeMapperType,\n DictionaryMapperType,\n SequenceMapperType,\n EnumMapperType,\n Mapper,\n BaseMapper,\n CompositeMapper,\n SequenceMapper,\n DictionaryMapper,\n EnumMapper,\n MapperConstraints,\n PolymorphicDiscriminator,\n Serializer,\n UrlParameterValue,\n serializeObject\n} from \"./serializer\";\nexport {\n stripRequest,\n stripResponse,\n delay,\n executePromisesSequentially,\n generateUuid,\n encodeUri,\n ServiceCallback,\n promiseToCallback,\n promiseToServiceCallback,\n isValidUuid,\n applyMixins,\n isNode,\n isDuration\n} from \"./util/utils\";\nexport { URLBuilder, URLQuery } from \"./url\";\nexport { AbortSignalLike } from \"@azure/abort-controller\";\n\n// Credentials\nexport { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from \"@azure/core-auth\";\nexport { AccessTokenCache, ExpiringAccessTokenCache } from \"./credentials/accessTokenCache\";\nexport { AccessTokenRefresher } from \"./credentials/accessTokenRefresher\";\nexport { BasicAuthenticationCredentials } from \"./credentials/basicAuthenticationCredentials\";\nexport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./credentials/apiKeyCredentials\";\nexport { ServiceClientCredentials } from \"./credentials/serviceClientCredentials\";\nexport { TopicCredentials } from \"./credentials/topicCredentials\";\nexport { Authenticator } from \"./credentials/credentials\";\n\nexport { parseXML, stringifyXML } from \"./util/xml\";\nexport { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from \"./util/serializer.common\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js b/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js new file mode 100644 index 000000000..7dc3c917f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Defines the default token refresh buffer duration. + */ +export var TokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes +/** + * Provides an {@link AccessTokenCache} implementation which clears + * the cached {@link AccessToken}'s after the expiresOnTimestamp has + * passed. + */ +var ExpiringAccessTokenCache = /** @class */ (function () { + /** + * Constructs an instance of {@link ExpiringAccessTokenCache} with + * an optional expiration buffer time. + */ + function ExpiringAccessTokenCache(tokenRefreshBufferMs) { + if (tokenRefreshBufferMs === void 0) { tokenRefreshBufferMs = TokenRefreshBufferMs; } + this.cachedToken = undefined; + this.tokenRefreshBufferMs = tokenRefreshBufferMs; + } + ExpiringAccessTokenCache.prototype.setCachedToken = function (accessToken) { + this.cachedToken = accessToken; + }; + ExpiringAccessTokenCache.prototype.getCachedToken = function () { + if (this.cachedToken && + Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) { + this.cachedToken = undefined; + } + return this.cachedToken; + }; + return ExpiringAccessTokenCache; +}()); +export { ExpiringAccessTokenCache }; +//# sourceMappingURL=accessTokenCache.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js.map b/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js.map new file mode 100644 index 000000000..b50ae8275 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/accessTokenCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"accessTokenCache.js","sourceRoot":"","sources":["../../../src/credentials/accessTokenCache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAqB/D;;;;GAIG;AACH;IAIE;;;OAGG;IACH,kCAAY,oBAAmD;QAAnD,qCAAA,EAAA,2CAAmD;QANvD,gBAAW,GAAiB,SAAS,CAAC;QAO5C,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED,iDAAc,GAAd,UAAe,WAAoC;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,iDAAc,GAAd;QACE,IACE,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAC7E;YACA,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;SAC9B;QAED,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACH,+BAAC;AAAD,CAAC,AA1BD,IA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken } from \"@azure/core-auth\";\n\n/**\n * Defines the default token refresh buffer duration.\n */\nexport const TokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes\n\n/**\n * Provides a cache for an AccessToken that was that\n * was returned from a TokenCredential.\n */\nexport interface AccessTokenCache {\n /**\n * Sets the cached token.\n *\n * @param The {@link AccessToken} to be cached or null to\n * clear the cached token.\n */\n setCachedToken(accessToken: AccessToken | undefined): void;\n\n /**\n * Returns the cached {@link AccessToken} or undefined if nothing is cached.\n */\n getCachedToken(): AccessToken | undefined;\n}\n\n/**\n * Provides an {@link AccessTokenCache} implementation which clears\n * the cached {@link AccessToken}'s after the expiresOnTimestamp has\n * passed.\n */\nexport class ExpiringAccessTokenCache implements AccessTokenCache {\n private tokenRefreshBufferMs: number;\n private cachedToken?: AccessToken = undefined;\n\n /**\n * Constructs an instance of {@link ExpiringAccessTokenCache} with\n * an optional expiration buffer time.\n */\n constructor(tokenRefreshBufferMs: number = TokenRefreshBufferMs) {\n this.tokenRefreshBufferMs = tokenRefreshBufferMs;\n }\n\n setCachedToken(accessToken: AccessToken | undefined): void {\n this.cachedToken = accessToken;\n }\n\n getCachedToken(): AccessToken | undefined {\n if (\n this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp\n ) {\n this.cachedToken = undefined;\n }\n\n return this.cachedToken;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js b/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js new file mode 100644 index 000000000..9a82eb861 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __generator } from "tslib"; +/** + * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token. + */ +var AccessTokenRefresher = /** @class */ (function () { + function AccessTokenRefresher(credential, scopes, requiredMillisecondsBeforeNewRefresh) { + if (requiredMillisecondsBeforeNewRefresh === void 0) { requiredMillisecondsBeforeNewRefresh = 30000; } + this.credential = credential; + this.scopes = scopes; + this.requiredMillisecondsBeforeNewRefresh = requiredMillisecondsBeforeNewRefresh; + this.lastCalled = 0; + } + /** + * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying + * that we are ready for a new refresh. + * + * @returns {boolean} + */ + AccessTokenRefresher.prototype.isReady = function () { + // We're only ready for a new refresh if the required milliseconds have passed. + return (!this.lastCalled || Date.now() - this.lastCalled > this.requiredMillisecondsBeforeNewRefresh); + }; + /** + * Stores the time in which it is called, + * then requests a new token, + * then sets this.promise to undefined, + * then returns the token. + * @param options getToken options + */ + AccessTokenRefresher.prototype.getToken = function (options) { + return __awaiter(this, void 0, void 0, function () { + var token; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.lastCalled = Date.now(); + return [4 /*yield*/, this.credential.getToken(this.scopes, options)]; + case 1: + token = _a.sent(); + this.promise = undefined; + return [2 /*return*/, token || undefined]; + } + }); + }); + }; + /** + * Requests a new token if we're not currently waiting for a new token. + * Returns null if the required time between each call hasn't been reached. + * @param options getToken options + */ + AccessTokenRefresher.prototype.refresh = function (options) { + if (!this.promise) { + this.promise = this.getToken(options); + } + return this.promise; + }; + return AccessTokenRefresher; +}()); +export { AccessTokenRefresher }; +//# sourceMappingURL=accessTokenRefresher.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js.map b/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js.map new file mode 100644 index 000000000..0ae7ce20f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/accessTokenRefresher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"accessTokenRefresher.js","sourceRoot":"","sources":["../../../src/credentials/accessTokenRefresher.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC;;GAEG;AACH;IAIE,8BACU,UAA2B,EAC3B,MAAyB,EACzB,oCAAoD;QAApD,qDAAA,EAAA,4CAAoD;QAFpD,eAAU,GAAV,UAAU,CAAiB;QAC3B,WAAM,GAAN,MAAM,CAAmB;QACzB,yCAAoC,GAApC,oCAAoC,CAAgB;QALtD,eAAU,GAAG,CAAC,CAAC;IAMpB,CAAC;IAEJ;;;;;OAKG;IACI,sCAAO,GAAd;QACE,+EAA+E;QAC/E,OAAO,CACL,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,oCAAoC,CAC7F,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACW,uCAAQ,GAAtB,UAAuB,OAAwB;;;;;;wBAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;wBACf,qBAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAA;;wBAA5D,KAAK,GAAG,SAAoD;wBAClE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;wBACzB,sBAAO,KAAK,IAAI,SAAS,EAAC;;;;KAC3B;IAED;;;;OAIG;IACI,sCAAO,GAAd,UAAe,OAAwB;QACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACvC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACH,2BAAC;AAAD,CAAC,AAjDD,IAiDC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AccessToken, TokenCredential, GetTokenOptions } from \"@azure/core-auth\";\n\n/**\n * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token.\n */\nexport class AccessTokenRefresher {\n private promise: Promise | undefined;\n private lastCalled = 0;\n\n constructor(\n private credential: TokenCredential,\n private scopes: string | string[],\n private requiredMillisecondsBeforeNewRefresh: number = 30000\n ) {}\n\n /**\n * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying\n * that we are ready for a new refresh.\n *\n * @returns {boolean}\n */\n public isReady(): boolean {\n // We're only ready for a new refresh if the required milliseconds have passed.\n return (\n !this.lastCalled || Date.now() - this.lastCalled > this.requiredMillisecondsBeforeNewRefresh\n );\n }\n\n /**\n * Stores the time in which it is called,\n * then requests a new token,\n * then sets this.promise to undefined,\n * then returns the token.\n * @param options getToken options\n */\n private async getToken(options: GetTokenOptions): Promise {\n this.lastCalled = Date.now();\n const token = await this.credential.getToken(this.scopes, options);\n this.promise = undefined;\n return token || undefined;\n }\n\n /**\n * Requests a new token if we're not currently waiting for a new token.\n * Returns null if the required time between each call hasn't been reached.\n * @param options getToken options\n */\n public refresh(options: GetTokenOptions): Promise {\n if (!this.promise) {\n this.promise = this.getToken(options);\n }\n\n return this.promise;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js b/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js new file mode 100644 index 000000000..664807763 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { HttpHeaders } from "../httpHeaders"; +/** + * Authenticates to a service using an API key. + */ +var ApiKeyCredentials = /** @class */ (function () { + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + function ApiKeyCredentials(options) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error("options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided."); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + ApiKeyCredentials.prototype.signRequest = function (webResource) { + if (!webResource) { + return Promise.reject(new Error("webResource cannot be null or undefined and must be of type \"object\".")); + } + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (var headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error("url cannot be null in the request object.")); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (var key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += key + "=" + this.inQuery[key]; + } + } + return Promise.resolve(webResource); + }; + return ApiKeyCredentials; +}()); +export { ApiKeyCredentials }; +//# sourceMappingURL=apiKeyCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js.map b/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js.map new file mode 100644 index 000000000..bc72c72d0 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/apiKeyCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apiKeyCredentials.js","sourceRoot":"","sources":["../../../src/credentials/apiKeyCredentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmB7C;;GAEG;AACH;IAUE;;;OAGG;IACH,2BAAY,OAAgC;QAC1C,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAClE,MAAM,IAAI,KAAK,CACb,8HAA0H,CAC3H,CAAC;SACH;QACD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,uCAAW,GAAX,UAAY,WAA4B;QACtC,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CAAC,yEAAuE,CAAC,CACnF,CAAC;SACH;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;gBACxB,WAAW,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;aACzC;YACD,KAAK,IAAM,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACtC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;aAChE;SACF;QAED,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;gBACpB,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC,CAAC;aAC/E;YACD,IAAI,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACpC,WAAW,CAAC,GAAG,IAAI,GAAG,CAAC;aACxB;YACD,KAAK,IAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE;gBAC9B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBAClC,WAAW,CAAC,GAAG,IAAI,GAAG,CAAC;iBACxB;gBACD,WAAW,CAAC,GAAG,IAAO,GAAG,SAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAG,CAAC;aAClD;SACF;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IACH,wBAAC;AAAD,CAAC,AA/DD,IA+DC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\n/**\n * @interface ApiKeyCredentialOptions\n * Describes the options to be provided while creating an instance of ApiKeyCredentials\n */\nexport interface ApiKeyCredentialOptions {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n inQuery?: { [x: string]: any };\n}\n\n/**\n * Authenticates to a service using an API key.\n */\nexport class ApiKeyCredentials implements ServiceClientCredentials {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n private readonly inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n private readonly inQuery?: { [x: string]: any };\n\n /**\n * @constructor\n * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options: ApiKeyCredentialOptions) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(\n `options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`\n );\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike): Promise {\n if (!webResource) {\n return Promise.reject(\n new Error(`webResource cannot be null or undefined and must be of type \"object\".`)\n );\n }\n\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n\n return Promise.resolve(webResource);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js b/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js new file mode 100644 index 000000000..1c0df56b3 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { HttpHeaders } from "../httpHeaders"; +import * as base64 from "../util/base64"; +import { Constants } from "../util/constants"; +var HeaderConstants = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME = "Basic"; +var BasicAuthenticationCredentials = /** @class */ (function () { + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function BasicAuthenticationCredentials(userName, password, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + BasicAuthenticationCredentials.prototype.signRequest = function (webResource) { + var credentials = this.userName + ":" + this.password; + var encodedCredentials = this.authorizationScheme + " " + base64.encodeString(credentials); + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + }; + return BasicAuthenticationCredentials; +}()); +export { BasicAuthenticationCredentials }; +//# sourceMappingURL=basicAuthenticationCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js.map b/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js.map new file mode 100644 index 000000000..71611f37c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/basicAuthenticationCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"basicAuthenticationCredentials.js","sourceRoot":"","sources":["../../../src/credentials/basicAuthenticationCredentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAA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CAAC;IACH,qCAAC;AAAD,CAAC,AA1CD,IA0CC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport * as base64 from \"../util/base64\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n\nexport class BasicAuthenticationCredentials implements ServiceClientCredentials {\n userName: string;\n password: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @constructor\n * @param {string} userName User name.\n * @param {string} password Password.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(\n userName: string,\n password: string,\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME\n ) {\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike): Promise {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${base64.encodeString(credentials)}`;\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/credentials.js b/node_modules/@azure/core-http/es/src/credentials/credentials.js new file mode 100644 index 000000000..1c322be93 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/credentials.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=credentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/credentials.js.map b/node_modules/@azure/core-http/es/src/credentials/credentials.js.map new file mode 100644 index 000000000..0cb09c21b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/credentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/credentials/credentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport type Authenticator = (challenge: object) => Promise;\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js b/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js new file mode 100644 index 000000000..814290269 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=serviceClientCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js.map b/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js.map new file mode 100644 index 000000000..3ffb55257 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/serviceClientCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClientCredentials.js","sourceRoot":"","sources":["../../../src/credentials/serviceClientCredentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { WebResourceLike } from \"../webResource\";\n\nexport interface ServiceClientCredentials {\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike/request to be signed.\n * @returns {Promise} The signed request object;\n */\n signRequest(webResource: WebResourceLike): Promise;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js b/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js new file mode 100644 index 000000000..0ebdcda5d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { ApiKeyCredentials } from "./apiKeyCredentials"; +var TopicCredentials = /** @class */ (function (_super) { + __extends(TopicCredentials, _super); + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + function TopicCredentials(topicKey) { + var _this = this; + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return TopicCredentials; +}(ApiKeyCredentials)); +export { TopicCredentials }; +//# sourceMappingURL=topicCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js.map b/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js.map new file mode 100644 index 000000000..c137273d4 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/credentials/topicCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"topicCredentials.js","sourceRoot":"","sources":["../../../src/credentials/topicCredentials.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF;IAAsC,oCAAiB;IACrD;;;;;OAKG;IACH,0BAAY,QAAgB;QAA5B,iBAUC;QATC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,EAAE;YAC3D,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;SACrF;QACD,IAAM,OAAO,GAA4B;YACvC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,QAAA,kBAAM,OAAO,CAAC,SAAC;;IACjB,CAAC;IACH,uBAAC;AAAD,CAAC,AAlBD,CAAsC,iBAAiB,GAkBtD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @constructor\n * @param {string} topicKey The EventGrid topic key\n */\n constructor(topicKey: string) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": topicKey\n }\n };\n super(options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js b/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js new file mode 100644 index 000000000..1f5e7fafb --- /dev/null +++ b/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; +//# sourceMappingURL=defaultHttpClient.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js.map b/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js.map new file mode 100644 index 000000000..99be6d9a2 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/defaultHttpClient.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.browser.js","sourceRoot":"","sources":["../../src/defaultHttpClient.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { XhrHttpClient as DefaultHttpClient } from \"./xhrHttpClient\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/defaultHttpClient.js b/node_modules/@azure/core-http/es/src/defaultHttpClient.js new file mode 100644 index 000000000..79177d54d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/defaultHttpClient.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; +//# sourceMappingURL=defaultHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/defaultHttpClient.js.map b/node_modules/@azure/core-http/es/src/defaultHttpClient.js.map new file mode 100644 index 000000000..4e2660b21 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/defaultHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.js","sourceRoot":"","sources":["../../src/defaultHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { NodeFetchHttpClient as DefaultHttpClient } from \"./nodeFetchHttpClient\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/fetchHttpClient.js b/node_modules/@azure/core-http/es/src/fetchHttpClient.js new file mode 100644 index 000000000..9a63fd792 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/fetchHttpClient.js @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { AbortController, AbortError } from "@azure/abort-controller"; +import FormData from "form-data"; +import { HttpHeaders } from "./httpHeaders"; +import { RestError } from "./restError"; +import { Transform } from "stream"; +var ReportTransform = /** @class */ (function (_super) { + __extends(ReportTransform, _super); + function ReportTransform(progressCallback) { + var _this = _super.call(this) || this; + _this.progressCallback = progressCallback; + _this.loadedBytes = 0; + return _this; + } + ReportTransform.prototype._transform = function (chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(undefined); + }; + return ReportTransform; +}(Transform)); +export { ReportTransform }; +var FetchHttpClient = /** @class */ (function () { + function FetchHttpClient() { + } + FetchHttpClient.prototype.sendRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var abortController, abortListener, formData, requestForm_1, appendFormValue, _i, _a, formKey, formValue, j, contentType, body, onUploadProgress, uploadReportStream, platformSpecificRequestInit, requestInit, response, headers, operationResponse, _b, _c, onDownloadProgress, responseBody, downloadReportStream, length_1, error_1, fetchError; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + if (!httpRequest && typeof httpRequest !== "object") { + throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object."); + } + abortController = new AbortController(); + if (httpRequest.abortSignal) { + if (httpRequest.abortSignal.aborted) { + throw new AbortError("The operation was aborted."); + } + abortListener = function (event) { + if (event.type === "abort") { + abortController.abort(); + } + }; + httpRequest.abortSignal.addEventListener("abort", abortListener); + } + if (httpRequest.timeout) { + setTimeout(function () { + abortController.abort(); + }, httpRequest.timeout); + } + if (httpRequest.formData) { + formData = httpRequest.formData; + requestForm_1 = new FormData(); + appendFormValue = function (key, value) { + // value function probably returns a stream so we can provide a fresh stream on each retry + if (typeof value === "function") { + value = value(); + } + // eslint-disable-next-line no-prototype-builtins + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (_i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + formKey = _a[_i]; + formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + httpRequest.body = requestForm_1; + httpRequest.formData = undefined; + contentType = httpRequest.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + if (typeof requestForm_1.getBoundary === "function") { + httpRequest.headers.set("Content-Type", "multipart/form-data; boundary=" + requestForm_1.getBoundary()); + } + else { + // browser will automatically apply a suitable content-type header + httpRequest.headers.remove("Content-Type"); + } + } + } + body = httpRequest.body + ? typeof httpRequest.body === "function" + ? httpRequest.body() + : httpRequest.body + : undefined; + if (httpRequest.onUploadProgress && httpRequest.body) { + onUploadProgress = httpRequest.onUploadProgress; + uploadReportStream = new ReportTransform(onUploadProgress); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + return [4 /*yield*/, this.prepareRequest(httpRequest)]; + case 1: + platformSpecificRequestInit = _d.sent(); + requestInit = __assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, signal: abortController.signal, redirect: "manual" }, platformSpecificRequestInit); + _d.label = 2; + case 2: + _d.trys.push([2, 8, 9, 10]); + return [4 /*yield*/, this.fetch(httpRequest.url, requestInit)]; + case 3: + response = _d.sent(); + headers = parseHeaders(response.headers); + _b = { + headers: headers, + request: httpRequest, + status: response.status, + readableStreamBody: httpRequest.streamResponseBody + ? response.body + : undefined + }; + if (!!httpRequest.streamResponseBody) return [3 /*break*/, 5]; + return [4 /*yield*/, response.text()]; + case 4: + _c = _d.sent(); + return [3 /*break*/, 6]; + case 5: + _c = undefined; + _d.label = 6; + case 6: + operationResponse = (_b.bodyAsText = _c, + _b); + onDownloadProgress = httpRequest.onDownloadProgress; + if (onDownloadProgress) { + responseBody = response.body || undefined; + if (isReadableStream(responseBody)) { + downloadReportStream = new ReportTransform(onDownloadProgress); + responseBody.pipe(downloadReportStream); + operationResponse.readableStreamBody = downloadReportStream; + } + else { + length_1 = parseInt(headers.get("Content-Length")) || undefined; + if (length_1) { + // Calling callback for non-stream response for consistency with browser + onDownloadProgress({ loadedBytes: length_1 }); + } + } + } + return [4 /*yield*/, this.processRequest(operationResponse)]; + case 7: + _d.sent(); + return [2 /*return*/, operationResponse]; + case 8: + error_1 = _d.sent(); + fetchError = error_1; + if (fetchError.code === "ENOTFOUND") { + throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest); + } + else if (fetchError.type === "aborted") { + throw new AbortError("The operation was aborted."); + } + throw fetchError; + case 9: + // clean up event listener + if (httpRequest.abortSignal && abortListener) { + httpRequest.abortSignal.removeEventListener("abort", abortListener); + } + return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }); + }; + return FetchHttpClient; +}()); +export { FetchHttpClient }; +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +export function parseHeaders(headers) { + var httpHeaders = new HttpHeaders(); + headers.forEach(function (value, key) { + httpHeaders.set(key, value); + }); + return httpHeaders; +} +//# sourceMappingURL=fetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/fetchHttpClient.js.map b/node_modules/@azure/core-http/es/src/fetchHttpClient.js.map new file mode 100644 index 000000000..bfa9dd5ff --- /dev/null +++ b/node_modules/@azure/core-http/es/src/fetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetchHttpClient.js","sourceRoot":"","sources":["../../src/fetchHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,QAAQ,MAAM,WAAW,CAAC;AAKjC,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAY,SAAS,EAAE,MAAM,QAAQ,CAAC;AAsB7C;IAAqC,mCAAS;IAS5C,yBAAoB,gBAA2D;QAA/E,YACE,iBAAO,SACR;QAFmB,s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OAAK,CAAC;wBACrC,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE;4BACnC,MAAM,IAAI,SAAS,CACjB,UAAU,CAAC,OAAO,EAClB,SAAS,CAAC,kBAAkB,EAC5B,SAAS,EACT,WAAW,CACZ,CAAC;yBACH;6BAAM,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;4BACxC,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;yBACpD;wBAED,MAAM,UAAU,CAAC;;wBAEjB,0BAA0B;wBAC1B,IAAI,WAAW,CAAC,WAAW,IAAI,aAAa,EAAE;4BAC5C,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;yBACrE;;;;;;KAEJ;IAKH,sBAAC;AAAD,CAAC,AAhKD,IAgKC;;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,IAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;IAEtC,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;QACzB,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortController, AbortError } from \"@azure/abort-controller\";\nimport FormData from \"form-data\";\n\nimport { HttpClient } from \"./httpClient\";\nimport { TransferProgressEvent, WebResourceLike } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { HttpHeaders, HttpHeadersLike } from \"./httpHeaders\";\nimport { RestError } from \"./restError\";\nimport { Readable, Transform } from \"stream\";\n\ninterface FetchError extends Error {\n code?: string;\n errno?: string;\n type?: string;\n}\n\nexport type CommonRequestInfo = string; // We only ever call fetch() on string urls.\n\nexport type CommonRequestInit = Omit & {\n body?: any;\n headers?: any;\n signal?: any;\n};\n\nexport type CommonResponse = Omit & {\n body: any;\n trailer: any;\n formData: any;\n};\n\nexport class ReportTransform extends Transform {\n private loadedBytes: number = 0;\n _transform(chunk: string | Buffer, _encoding: string, callback: Function): void {\n this.push(chunk);\n this.loadedBytes += chunk.length;\n this.progressCallback!({ loadedBytes: this.loadedBytes });\n callback(undefined);\n }\n\n constructor(private progressCallback: (progress: TransferProgressEvent) => void) {\n super();\n }\n}\n\nexport abstract class FetchHttpClient implements HttpClient {\n async sendRequest(httpRequest: WebResourceLike): Promise {\n if (!httpRequest && typeof httpRequest !== \"object\") {\n throw new Error(\n \"'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.\"\n );\n }\n\n const abortController = new AbortController();\n let abortListener: ((event: any) => void) | undefined;\n if (httpRequest.abortSignal) {\n if (httpRequest.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n abortListener = (event: Event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n httpRequest.abortSignal.addEventListener(\"abort\", abortListener);\n }\n\n if (httpRequest.timeout) {\n setTimeout(() => {\n abortController.abort();\n }, httpRequest.timeout);\n }\n\n if (httpRequest.formData) {\n const formData: any = httpRequest.formData;\n const requestForm = new FormData();\n const appendFormValue = (key: string, value: any): void => {\n // value function probably returns a stream so we can provide a fresh stream on each retry\n if (typeof value === \"function\") {\n value = value();\n }\n // eslint-disable-next-line no-prototype-builtins\n if (value && value.hasOwnProperty(\"value\") && value.hasOwnProperty(\"options\")) {\n requestForm.append(key, value.value, value.options);\n } else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n } else {\n appendFormValue(formKey, formValue);\n }\n }\n\n httpRequest.body = requestForm;\n httpRequest.formData = undefined;\n const contentType = httpRequest.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n if (typeof requestForm.getBoundary === \"function\") {\n httpRequest.headers.set(\n \"Content-Type\",\n `multipart/form-data; boundary=${requestForm.getBoundary()}`\n );\n } else {\n // browser will automatically apply a suitable content-type header\n httpRequest.headers.remove(\"Content-Type\");\n }\n }\n }\n\n let body = httpRequest.body\n ? typeof httpRequest.body === \"function\"\n ? httpRequest.body()\n : httpRequest.body\n : undefined;\n if (httpRequest.onUploadProgress && httpRequest.body) {\n const onUploadProgress = httpRequest.onUploadProgress;\n const uploadReportStream = new ReportTransform(onUploadProgress);\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n } else {\n uploadReportStream.end(body);\n }\n\n body = uploadReportStream;\n }\n\n const platformSpecificRequestInit: Partial = await this.prepareRequest(\n httpRequest\n );\n\n const requestInit: RequestInit = {\n body: body,\n headers: httpRequest.headers.rawHeaders(),\n method: httpRequest.method,\n signal: abortController.signal,\n redirect: \"manual\",\n ...platformSpecificRequestInit\n };\n\n try {\n const response: CommonResponse = await this.fetch(httpRequest.url, requestInit);\n\n const headers = parseHeaders(response.headers);\n const operationResponse: HttpOperationResponse = {\n headers: headers,\n request: httpRequest,\n status: response.status,\n readableStreamBody: httpRequest.streamResponseBody\n ? ((response.body as unknown) as NodeJS.ReadableStream)\n : undefined,\n bodyAsText: !httpRequest.streamResponseBody ? await response.text() : undefined\n };\n\n const onDownloadProgress = httpRequest.onDownloadProgress;\n if (onDownloadProgress) {\n const responseBody: ReadableStream | undefined = response.body || undefined;\n\n if (isReadableStream(responseBody)) {\n const downloadReportStream = new ReportTransform(onDownloadProgress);\n responseBody.pipe(downloadReportStream);\n operationResponse.readableStreamBody = downloadReportStream;\n } else {\n const length = parseInt(headers.get(\"Content-Length\")!) || undefined;\n if (length) {\n // Calling callback for non-stream response for consistency with browser\n onDownloadProgress({ loadedBytes: length });\n }\n }\n }\n\n await this.processRequest(operationResponse);\n\n return operationResponse;\n } catch (error) {\n const fetchError: FetchError = error;\n if (fetchError.code === \"ENOTFOUND\") {\n throw new RestError(\n fetchError.message,\n RestError.REQUEST_SEND_ERROR,\n undefined,\n httpRequest\n );\n } else if (fetchError.type === \"aborted\") {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n throw fetchError;\n } finally {\n // clean up event listener\n if (httpRequest.abortSignal && abortListener) {\n httpRequest.abortSignal.removeEventListener(\"abort\", abortListener);\n }\n }\n }\n\n abstract async prepareRequest(httpRequest: WebResourceLike): Promise>;\n abstract async processRequest(operationResponse: HttpOperationResponse): Promise;\n abstract async fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise;\n}\n\nfunction isReadableStream(body: any): body is Readable {\n return body && typeof body.pipe === \"function\";\n}\n\nexport function parseHeaders(headers: Headers): HttpHeadersLike {\n const httpHeaders = new HttpHeaders();\n\n headers.forEach((value, key) => {\n httpHeaders.set(key, value);\n });\n\n return httpHeaders;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpClient.js b/node_modules/@azure/core-http/es/src/httpClient.js new file mode 100644 index 000000000..ee00ba016 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpClient.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=httpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpClient.js.map b/node_modules/@azure/core-http/es/src/httpClient.js.map new file mode 100644 index 000000000..eeb169e52 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpClient.js","sourceRoot":"","sources":["../../src/httpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestPolicy } from \"./policies/requestPolicy\";\n\n/**\n * An interface that can send HttpRequests and receive promised HttpResponses.\n */\nexport interface HttpClient extends RequestPolicy {}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpHeaders.js b/node_modules/@azure/core-http/es/src/httpHeaders.js new file mode 100644 index 000000000..07ec81161 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpHeaders.js @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName) { + return headerName.toLowerCase(); +} +export function isHttpHeadersLike(object) { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function") { + return true; + } + return false; +} +/** + * A collection of HTTP header key/value pairs. + */ +var HttpHeaders = /** @class */ (function () { + function HttpHeaders(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (var headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + HttpHeaders.prototype.set = function (headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString() + }; + }; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + HttpHeaders.prototype.get = function (headerName) { + var header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + }; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + HttpHeaders.prototype.contains = function (headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + }; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + HttpHeaders.prototype.remove = function (headerName) { + var result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + }; + /** + * Get the headers that are contained this collection as an object. + */ + HttpHeaders.prototype.rawHeaders = function () { + var result = {}; + for (var headerKey in this._headersMap) { + var header = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + }; + /** + * Get the headers that are contained in this collection as an array. + */ + HttpHeaders.prototype.headersArray = function () { + var headers = []; + for (var headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerNames = function () { + var headerNames = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + }; + /** + * Get the header values that are contained in this collection. + */ + HttpHeaders.prototype.headerValues = function () { + var headerValues = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + }; + /** + * Get the JSON object representation of this HTTP header collection. + */ + HttpHeaders.prototype.toJson = function () { + return this.rawHeaders(); + }; + /** + * Get the string representation of this HTTP header collection. + */ + HttpHeaders.prototype.toString = function () { + return JSON.stringify(this.toJson()); + }; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + HttpHeaders.prototype.clone = function () { + return new HttpHeaders(this.rawHeaders()); + }; + return HttpHeaders; +}()); +export { HttpHeaders }; +//# sourceMappingURL=httpHeaders.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpHeaders.js.map b/node_modules/@azure/core-http/es/src/httpHeaders.js.map new file mode 100644 index 000000000..88d2a1ca8 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpHeaders.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpHeaders.js","sourceRoot":"","sources":["../../src/httpHeaders.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,UAAU,CAAC,WAAW,EAA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,EAAE,EAAE,CAAC,EAAE;YACvC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACnC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;OAEG;IACI,kCAAY,GAAnB;QACE,IAAM,YAAY,GAAa,EAAE,CAAC;QAClC,IAAM,OAAO,GAAiB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACvC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,4BAAM,GAAb;QACE,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,8BAAQ,GAAf;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,2BAAK,GAAZ;QACE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5C,CAAC;IACH,kBAAC;AAAD,CAAC,AAxHD,IAwHC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName: string): string {\n return headerName.toLowerCase();\n}\n\n/**\n * An individual header within a HttpHeaders collection.\n */\nexport interface HttpHeader {\n /**\n * The name of the header.\n */\n name: string;\n\n /**\n * The value of the header.\n */\n value: string;\n}\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport interface HttpHeadersLike {\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n set(headerName: string, headerValue: string | number): void;\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n get(headerName: string): string | undefined;\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n contains(headerName: string): boolean;\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n remove(headerName: string): boolean;\n /**\n * Get the headers that are contained this collection as an object.\n */\n rawHeaders(): RawHttpHeaders;\n /**\n * Get the headers that are contained in this collection as an array.\n */\n headersArray(): HttpHeader[];\n /**\n * Get the header names that are contained in this collection.\n */\n headerNames(): string[];\n /**\n * Get the header values that are contained in this collection.\n */\n headerValues(): string[];\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n clone(): HttpHeadersLike;\n /**\n * Get the JSON object representation of this HTTP header collection.\n * The result is the same as `rawHeaders()`.\n */\n toJson(): RawHttpHeaders;\n}\n\nexport function isHttpHeadersLike(object?: any): object is HttpHeadersLike {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n\n if (\n typeof object.rawHeaders === \"function\" &&\n typeof object.clone === \"function\" &&\n typeof object.get === \"function\" &&\n typeof object.set === \"function\" &&\n typeof object.contains === \"function\" &&\n typeof object.remove === \"function\" &&\n typeof object.headersArray === \"function\" &&\n typeof object.headerValues === \"function\" &&\n typeof object.headerNames === \"function\" &&\n typeof object.toJson === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport class HttpHeaders implements HttpHeadersLike {\n private readonly _headersMap: { [headerKey: string]: HttpHeader };\n\n constructor(rawHeaders?: RawHttpHeaders) {\n this._headersMap = {};\n if (rawHeaders) {\n for (const headerName in rawHeaders) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n public set(headerName: string, headerValue: string | number): void {\n this._headersMap[getHeaderKey(headerName)] = {\n name: headerName,\n value: headerValue.toString()\n };\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n public get(headerName: string): string | undefined {\n const header: HttpHeader = this._headersMap[getHeaderKey(headerName)];\n return !header ? undefined : header.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n public contains(headerName: string): boolean {\n return !!this._headersMap[getHeaderKey(headerName)];\n }\n\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n public remove(headerName: string): boolean {\n const result: boolean = this.contains(headerName);\n delete this._headersMap[getHeaderKey(headerName)];\n return result;\n }\n\n /**\n * Get the headers that are contained this collection as an object.\n */\n public rawHeaders(): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n for (const headerKey in this._headersMap) {\n const header: HttpHeader = this._headersMap[headerKey];\n result[header.name.toLowerCase()] = header.value;\n }\n return result;\n }\n\n /**\n * Get the headers that are contained in this collection as an array.\n */\n public headersArray(): HttpHeader[] {\n const headers: HttpHeader[] = [];\n for (const headerKey in this._headersMap) {\n headers.push(this._headersMap[headerKey]);\n }\n return headers;\n }\n\n /**\n * Get the header names that are contained in this collection.\n */\n public headerNames(): string[] {\n const headerNames: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerNames.push(headers[i].name);\n }\n return headerNames;\n }\n\n /**\n * Get the header values that are contained in this collection.\n */\n public headerValues(): string[] {\n const headerValues: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerValues.push(headers[i].value);\n }\n return headerValues;\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJson(): RawHttpHeaders {\n return this.rawHeaders();\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJson());\n }\n\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n public clone(): HttpHeaders {\n return new HttpHeaders(this.rawHeaders());\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpOperationResponse.js b/node_modules/@azure/core-http/es/src/httpOperationResponse.js new file mode 100644 index 000000000..64b6d5d0a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpOperationResponse.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=httpOperationResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpOperationResponse.js.map b/node_modules/@azure/core-http/es/src/httpOperationResponse.js.map new file mode 100644 index 000000000..8a087f559 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpOperationResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpOperationResponse.js","sourceRoot":"","sources":["../../src/httpOperationResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { WebResourceLike } from \"./webResource\";\nimport { HttpHeadersLike } from \"./httpHeaders\";\n\n/**\n * The properties on an HTTP response which will always be present.\n */\nexport interface HttpResponse {\n /**\n * The raw request\n */\n request: WebResourceLike;\n\n /**\n * The HTTP response status (e.g. 200)\n */\n status: number;\n\n /**\n * The HTTP response headers.\n */\n headers: HttpHeadersLike;\n}\n\n// eslint-disable-next-line @azure/azure-sdk/ts-no-namespaces\ndeclare global {\n /**\n * Stub declaration of the browser-only Blob type.\n * Full type information can be obtained by including \"lib\": [\"dom\"] in tsconfig.json.\n */\n interface Blob {}\n}\n\n/**\n * Wrapper object for http request and response. Deserialized object is stored in\n * the `parsedBody` property when the response body is received in JSON or XML.\n */\nexport interface HttpOperationResponse extends HttpResponse {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders?: { [key: string]: any };\n\n /**\n * The response body as text (string format)\n */\n bodyAsText?: string | null;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody?: any;\n\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n}\n\n/**\n * The flattened response to a REST call.\n * Contains the underlying HttpOperationResponse as well as\n * the merged properties of the parsedBody, parsedHeaders, etc.\n */\nexport interface RestResponse {\n /**\n * The underlying HTTP response containing both raw and deserialized response data.\n */\n _response: HttpOperationResponse;\n\n [key: string]: any;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js b/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js new file mode 100644 index 000000000..4e70194ea --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export var HttpPipelineLogLevel; +(function (HttpPipelineLogLevel) { + /** + * A log level that indicates that no logs will be logged. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + /** + * An error log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + /** + * A warning log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; + /** + * An information log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; +})(HttpPipelineLogLevel || (HttpPipelineLogLevel = {})); +//# sourceMappingURL=httpPipelineLogLevel.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js.map b/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js.map new file mode 100644 index 000000000..e980847c6 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpPipelineLogLevel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogLevel.js","sourceRoot":"","sources":["../../src/httpPipelineLogLevel.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAY,oBAoBX;AApBD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,6DAAG,CAAA;IAEH;;OAEG;IACH,iEAAK,CAAA;IAEL;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;AACN,CAAC,EApBW,oBAAoB,KAApB,oBAAoB,QAoB/B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexport enum HttpPipelineLogLevel {\n /**\n * A log level that indicates that no logs will be logged.\n */\n OFF,\n\n /**\n * An error log.\n */\n ERROR,\n\n /**\n * A warning log.\n */\n WARNING,\n\n /**\n * An information log.\n */\n INFO\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpPipelineLogger.js b/node_modules/@azure/core-http/es/src/httpPipelineLogger.js new file mode 100644 index 000000000..b04f5cac7 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpPipelineLogger.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +var ConsoleHttpPipelineLogger = /** @class */ (function () { + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + function ConsoleHttpPipelineLogger(minimumLogLevel) { + this.minimumLogLevel = minimumLogLevel; + } + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + ConsoleHttpPipelineLogger.prototype.log = function (logLevel, message) { + var logMessage = HttpPipelineLogLevel[logLevel] + ": " + message; + switch (logLevel) { + case HttpPipelineLogLevel.ERROR: + console.error(logMessage); + break; + case HttpPipelineLogLevel.WARNING: + console.warn(logMessage); + break; + case HttpPipelineLogLevel.INFO: + console.log(logMessage); + break; + } + }; + return ConsoleHttpPipelineLogger; +}()); +export { ConsoleHttpPipelineLogger }; +//# sourceMappingURL=httpPipelineLogger.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/httpPipelineLogger.js.map b/node_modules/@azure/core-http/es/src/httpPipelineLogger.js.map new file mode 100644 index 000000000..bda729c5f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/httpPipelineLogger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogger.js","sourceRoot":"","sources":["../../src/httpPipelineLogger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAoB9D;;GAEG;AACH;IACE;;;OAGG;IACH,mCAAmB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IAAG,CAAC;IAE5D;;;;OAIG;IACH,uCAAG,GAAH,UAAI,QAA8B,EAAE,OAAe;QACjD,IAAM,UAAU,GAAM,oBAAoB,CAAC,QAAQ,CAAC,UAAK,OAAS,CAAC;QACnE,QAAQ,QAAQ,EAAE;YAChB,KAAK,oBAAoB,CAAC,KAAK;gBAC7B,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBAC1B,MAAM;YAER,KAAK,oBAAoB,CAAC,OAAO;gBAC/B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACzB,MAAM;YAER,KAAK,oBAAoB,CAAC,IAAI;gBAC5B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxB,MAAM;SACT;IACH,CAAC;IACH,gCAAC;AAAD,CAAC,AA5BD,IA4BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpPipelineLogLevel } from \"./httpPipelineLogLevel\";\n\n/**\n * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages\n * that can be used for debugging purposes.\n */\nexport interface HttpPipelineLogger {\n /**\n * The log level threshold for what logs will be logged.\n */\n minimumLogLevel: HttpPipelineLogLevel;\n\n /**\n * Log the provided message.\n * @param logLevel The HttpLogDetailLevel associated with this message.\n * @param message The message to log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n}\n\n/**\n * A HttpPipelineLogger that will send its logs to the console.\n */\nexport class ConsoleHttpPipelineLogger implements HttpPipelineLogger {\n /**\n * Create a new ConsoleHttpPipelineLogger.\n * @param minimumLogLevel The log level threshold for what logs will be logged.\n */\n constructor(public minimumLogLevel: HttpPipelineLogLevel) {}\n\n /**\n * Log the provided message.\n * @param logLevel The HttpLogDetailLevel associated with this message.\n * @param message The message to log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void {\n const logMessage = `${HttpPipelineLogLevel[logLevel]}: ${message}`;\n switch (logLevel) {\n case HttpPipelineLogLevel.ERROR:\n console.error(logMessage);\n break;\n\n case HttpPipelineLogLevel.WARNING:\n console.warn(logMessage);\n break;\n\n case HttpPipelineLogLevel.INFO:\n console.log(logMessage);\n break;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/log.js b/node_modules/@azure/core-http/es/src/log.js new file mode 100644 index 000000000..a2564f131 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/log.js @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { createClientLogger } from "@azure/logger"; +export var logger = createClientLogger("core-http"); +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/log.js.map b/node_modules/@azure/core-http/es/src/log.js.map new file mode 100644 index 000000000..079227c6e --- /dev/null +++ b/node_modules/@azure/core-http/es/src/log.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,IAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-http\");\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js b/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js new file mode 100644 index 000000000..a3756acd8 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import * as tough from "tough-cookie"; +import * as http from "http"; +import * as https from "https"; +import node_fetch from "node-fetch"; +import { FetchHttpClient } from "./fetchHttpClient"; +import { createProxyAgent, isUrlHttps } from "./proxyAgent"; +function getCachedAgent(isHttps, agentCache) { + return isHttps ? agentCache.httpsAgent : agentCache.httpAgent; +} +var NodeFetchHttpClient = /** @class */ (function (_super) { + __extends(NodeFetchHttpClient, _super); + function NodeFetchHttpClient() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.proxyAgents = {}; + _this.keepAliveAgents = {}; + _this.cookieJar = new tough.CookieJar(undefined, { looseMode: true }); + return _this; + } + NodeFetchHttpClient.prototype.getOrCreateAgent = function (httpRequest) { + var isHttps = isUrlHttps(httpRequest.url); + // At the moment, proxy settings and keepAlive are mutually + // exclusive because the 'tunnel' library currently lacks the + // ability to create a proxy with keepAlive turned on. + if (httpRequest.proxySettings) { + var agent = getCachedAgent(isHttps, this.proxyAgents); + if (agent) { + return agent; + } + var tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers); + agent = tunnel.agent; + if (tunnel.isHttps) { + this.proxyAgents.httpsAgent = tunnel.agent; + } + else { + this.proxyAgents.httpAgent = tunnel.agent; + } + return agent; + } + else if (httpRequest.keepAlive) { + var agent = getCachedAgent(isHttps, this.keepAliveAgents); + if (agent) { + return agent; + } + var agentOptions = { + keepAlive: httpRequest.keepAlive + }; + if (isHttps) { + agent = this.keepAliveAgents.httpsAgent = new https.Agent(agentOptions); + } + else { + agent = this.keepAliveAgents.httpAgent = new http.Agent(agentOptions); + } + return agent; + } + else { + return isHttps ? https.globalAgent : http.globalAgent; + } + }; + // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs + NodeFetchHttpClient.prototype.fetch = function (input, init) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, node_fetch(input, init)]; + }); + }); + }; + NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var requestInit, cookieString; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + requestInit = {}; + if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) { + if (err) { + reject(err); + } + else { + resolve(cookie); + } + }); + })]; + case 1: + cookieString = _a.sent(); + httpRequest.headers.set("Cookie", cookieString); + _a.label = 2; + case 2: + // Set the http(s) agent + requestInit.agent = this.getOrCreateAgent(httpRequest); + requestInit.compress = httpRequest.decompressResponse; + return [2 /*return*/, requestInit]; + } + }); + }); + }; + NodeFetchHttpClient.prototype.processRequest = function (operationResponse) { + return __awaiter(this, void 0, void 0, function () { + var setCookieHeader_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.cookieJar) return [3 /*break*/, 2]; + setCookieHeader_1 = operationResponse.headers.get("Set-Cookie"); + if (!(setCookieHeader_1 !== undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + })]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + return NodeFetchHttpClient; +}(FetchHttpClient)); +export { NodeFetchHttpClient }; +//# sourceMappingURL=nodeFetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js.map b/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js.map new file mode 100644 index 000000000..577aef49e --- /dev/null +++ b/node_modules/@azure/core-http/es/src/nodeFetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFetchHttpClient.js","sourceRoot":"","sources":["../../src/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,eAAe,EAIhB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAc,UAAU,EAAE,MAAM,cAAc,CAAC;AAOxE,SAAS,cAAc,CACrB,OAAgB,EAChB,UAAsB;IAEtB,OAAO,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC;AAChE,CAAC;AAED;IAAyC,uCAAe;IAAxD;QAAA,qEAyGC;QAxGS,iBAAW,GAAe,EAAE,CAAC;QAC7B,qBAAe,GAAe,EAAE,CAAC;QAExB,eAAS,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;IAqGnF,CA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A6B;wBAC/B,qBAAM,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gCAChC,KAAI,CAAC,SAAU,CAAC,SAAS,CACvB,iBAAe,EACf,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAC7B,EAAE,WAAW,EAAE,IAAI,EAAE,EACrB,UAAC,GAAG;oCACF,IAAI,GAAG,EAAE;wCACP,MAAM,CAAC,GAAG,CAAC,CAAC;qCACb;yCAAM;wCACL,OAAO,EAAE,CAAC;qCACX;gCACH,CAAC,CACF,CAAC;4BACJ,CAAC,CAAC,EAAA;;wBAbF,SAaE,CAAC;;;;;;KAGR;IACH,0BAAC;AAAD,CAAC,AAzGD,CAAyC,eAAe,GAyGvD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as tough from \"tough-cookie\";\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport node_fetch from \"node-fetch\";\n\nimport {\n FetchHttpClient,\n CommonRequestInfo,\n CommonRequestInit,\n CommonResponse\n} from \"./fetchHttpClient\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\nimport { createProxyAgent, ProxyAgent, isUrlHttps } from \"./proxyAgent\";\n\ninterface AgentCache {\n httpAgent?: http.Agent;\n httpsAgent?: https.Agent;\n}\n\nfunction getCachedAgent(\n isHttps: boolean,\n agentCache: AgentCache\n): http.Agent | https.Agent | undefined {\n return isHttps ? agentCache.httpsAgent : agentCache.httpAgent;\n}\n\nexport class NodeFetchHttpClient extends FetchHttpClient {\n private proxyAgents: AgentCache = {};\n private keepAliveAgents: AgentCache = {};\n\n private readonly cookieJar = new tough.CookieJar(undefined, { looseMode: true });\n\n private getOrCreateAgent(httpRequest: WebResourceLike): http.Agent | https.Agent {\n const isHttps = isUrlHttps(httpRequest.url);\n\n // At the moment, proxy settings and keepAlive are mutually\n // exclusive because the 'tunnel' library currently lacks the\n // ability to create a proxy with keepAlive turned on.\n if (httpRequest.proxySettings) {\n let agent = getCachedAgent(isHttps, this.proxyAgents);\n if (agent) {\n return agent;\n }\n\n const tunnel: ProxyAgent = createProxyAgent(\n httpRequest.url,\n httpRequest.proxySettings,\n httpRequest.headers\n );\n\n agent = tunnel.agent;\n if (tunnel.isHttps) {\n this.proxyAgents.httpsAgent = tunnel.agent as https.Agent;\n } else {\n this.proxyAgents.httpAgent = tunnel.agent;\n }\n\n return agent;\n } else if (httpRequest.keepAlive) {\n let agent = getCachedAgent(isHttps, this.keepAliveAgents);\n if (agent) {\n return agent;\n }\n\n const agentOptions: http.AgentOptions | https.AgentOptions = {\n keepAlive: httpRequest.keepAlive\n };\n\n if (isHttps) {\n agent = this.keepAliveAgents.httpsAgent = new https.Agent(agentOptions);\n } else {\n agent = this.keepAliveAgents.httpAgent = new http.Agent(agentOptions);\n }\n\n return agent;\n } else {\n return isHttps ? https.globalAgent : http.globalAgent;\n }\n }\n\n // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs\n async fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise {\n return (node_fetch(input, init) as unknown) as Promise;\n }\n\n async prepareRequest(httpRequest: WebResourceLike): Promise> {\n const requestInit: Partial = {};\n\n if (this.cookieJar && !httpRequest.headers.get(\"Cookie\")) {\n const cookieString = await new Promise((resolve, reject) => {\n this.cookieJar!.getCookieString(httpRequest.url, (err, cookie) => {\n if (err) {\n reject(err);\n } else {\n resolve(cookie);\n }\n });\n });\n\n httpRequest.headers.set(\"Cookie\", cookieString);\n }\n\n // Set the http(s) agent\n requestInit.agent = this.getOrCreateAgent(httpRequest);\n\n requestInit.compress = httpRequest.decompressResponse;\n\n return requestInit;\n }\n\n async processRequest(operationResponse: HttpOperationResponse): Promise {\n if (this.cookieJar) {\n const setCookieHeader = operationResponse.headers.get(\"Set-Cookie\");\n if (setCookieHeader !== undefined) {\n await new Promise((resolve, reject) => {\n this.cookieJar!.setCookie(\n setCookieHeader,\n operationResponse.request.url,\n { ignoreError: true },\n (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n }\n );\n });\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationArguments.js b/node_modules/@azure/core-http/es/src/operationArguments.js new file mode 100644 index 000000000..ec81d1da4 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationArguments.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=operationArguments.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationArguments.js.map b/node_modules/@azure/core-http/es/src/operationArguments.js.map new file mode 100644 index 000000000..388d777dd --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationArguments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationArguments.js","sourceRoot":"","sources":["../../src/operationArguments.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestOptionsBase } from \"./webResource\";\n\n/**\n * A collection of properties that apply to a single invocation of an operation.\n */\nexport interface OperationArguments {\n /**\n * The parameters that were passed to the operation method.\n */\n [parameterName: string]: any;\n\n /**\n * The optional arugments that are provided to an operation.\n */\n options?: RequestOptionsBase;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationOptions.js b/node_modules/@azure/core-http/es/src/operationOptions.js new file mode 100644 index 000000000..ce2e6cc7b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationOptions.js @@ -0,0 +1,18 @@ +import { __assign, __rest } from "tslib"; +/** + * Converts an OperationOptions to a RequestOptionsBase + * + * @param opts OperationOptions object to convert to RequestOptionsBase + */ +export function operationOptionsToRequestOptionsBase(opts) { + var requestOptions = opts.requestOptions, tracingOptions = opts.tracingOptions, additionalOptions = __rest(opts, ["requestOptions", "tracingOptions"]); + var result = additionalOptions; + if (requestOptions) { + result = __assign(__assign({}, result), requestOptions); + } + if (tracingOptions) { + result.spanOptions = tracingOptions.spanOptions; + } + return result; +} +//# sourceMappingURL=operationOptions.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationOptions.js.map b/node_modules/@azure/core-http/es/src/operationOptions.js.map new file mode 100644 index 000000000..9e34d910d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationOptions.js","sourceRoot":"","sources":["../../src/operationOptions.ts"],"names":[],"mappings":";AAqDA;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAClD,IAAO;IAEC,IAAA,cAAc,GAA2C,IAAI,eAA/C,EAAE,cAAc,GAA2B,IAAI,eAA/B,EAAK,iBAAiB,UAAK,IAAI,EAA/D,oCAAwD,CAAF,CAAU;IAEtE,IAAI,MAAM,GAAuB,iBAAiB,CAAC;IAEnD,IAAI,cAAc,EAAE;QAClB,MAAM,yBAAQ,MAAM,GAAK,cAAc,CAAE,CAAC;KAC3C;IAED,IAAI,cAAc,EAAE;QAClB,MAAM,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;KACjD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\nimport { TransferProgressEvent, RequestOptionsBase } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\n\n/**\n * The base options type for all operations.\n */\nexport interface OperationOptions {\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Options used when creating and sending HTTP requests for this operation.\n */\n requestOptions?: OperationRequestOptions;\n /**\n * Options used when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\nexport interface OperationRequestOptions {\n /**\n * @property {object} [customHeaders] User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n}\n\n/**\n * Converts an OperationOptions to a RequestOptionsBase\n *\n * @param opts OperationOptions object to convert to RequestOptionsBase\n */\nexport function operationOptionsToRequestOptionsBase(\n opts: T\n): RequestOptionsBase {\n const { requestOptions, tracingOptions, ...additionalOptions } = opts;\n\n let result: RequestOptionsBase = additionalOptions;\n\n if (requestOptions) {\n result = { ...result, ...requestOptions };\n }\n\n if (tracingOptions) {\n result.spanOptions = tracingOptions.spanOptions;\n }\n\n return result;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationParameter.js b/node_modules/@azure/core-http/es/src/operationParameter.js new file mode 100644 index 000000000..f7552a0c0 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationParameter.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export function getPathStringFromParameter(parameter) { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); +} +export function getPathStringFromParameterPath(parameterPath, mapper) { + var result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; +} +//# sourceMappingURL=operationParameter.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationParameter.js.map b/node_modules/@azure/core-http/es/src/operationParameter.js.map new file mode 100644 index 000000000..12bded604 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationParameter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationParameter.js","sourceRoot":"","sources":["../../src/operationParameter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkDlC;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,SAA6B;IACtE,OAAO,8BAA8B,CAAC,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,aAA4B,EAC5B,MAAc;IAEd,IAAI,MAAc,CAAC;IACnB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACrC,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACvC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAClC;SAAM;QACL,MAAM,GAAG,MAAM,CAAC,cAAe,CAAC;KACjC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { Mapper } from \"./serializer\";\n\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nexport function getPathStringFromParameter(parameter: OperationParameter): string {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\n\nexport function getPathStringFromParameterPath(\n parameterPath: ParameterPath,\n mapper: Mapper\n): string {\n let result: string;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n } else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n } else {\n result = mapper.serializedName!;\n }\n return result;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationResponse.js b/node_modules/@azure/core-http/es/src/operationResponse.js new file mode 100644 index 000000000..07495e44c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationResponse.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=operationResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationResponse.js.map b/node_modules/@azure/core-http/es/src/operationResponse.js.map new file mode 100644 index 000000000..bd4a1398a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationResponse.js","sourceRoot":"","sources":["../../src/operationResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Mapper } from \"./serializer\";\n\n/**\n * An OperationResponse that can be returned from an operation request for a single status code.\n */\nexport interface OperationResponse {\n /**\n * The mapper that will be used to deserialize the response headers.\n */\n headersMapper?: Mapper;\n\n /**\n * The mapper that will be used to deserialize the response body.\n */\n bodyMapper?: Mapper;\n\n /**\n * Indicates if this is an error response\n */\n isError?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationSpec.js b/node_modules/@azure/core-http/es/src/operationSpec.js new file mode 100644 index 000000000..7d9c362ad --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationSpec.js @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { MapperType } from "./serializer"; +export function isStreamOperation(operationSpec) { + var result = false; + for (var statusCode in operationSpec.responses) { + var operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && + operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; +} +//# sourceMappingURL=operationSpec.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/operationSpec.js.map b/node_modules/@azure/core-http/es/src/operationSpec.js.map new file mode 100644 index 000000000..f97f04742 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/operationSpec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationSpec.js","sourceRoot":"","sources":["../../src/operationSpec.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,UAAU,EAAc,MAAM,cAAc,CAAC;AAwFtD,MAAM,UAAU,iBAAiB,CAAC,aAA4B;IAC5D,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,KAAK,IAAM,UAAU,IAAI,aAAa,CAAC,SAAS,EAAE;QAChD,IAAM,iBAAiB,GAAsB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACjF,IACE,iBAAiB,CAAC,UAAU;YAC5B,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM,EAC5D;YACA,MAAM,GAAG,IAAI,CAAC;YACd,MAAM;SACP;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n OperationParameter,\n OperationQueryParameter,\n OperationURLParameter\n} from \"./operationParameter\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { MapperType, Serializer } from \"./serializer\";\nimport { HttpMethods } from \"./webResource\";\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The media type of the request body.\n * This value can be used to aide in serialization if it is provided.\n */\n readonly mediaType?:\n | \"json\"\n | \"xml\"\n | \"form\"\n | \"binary\"\n | \"multipart\"\n | \"text\"\n | \"unknown\"\n | string;\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponse };\n}\n\nexport function isStreamOperation(operationSpec: OperationSpec): boolean {\n let result = false;\n for (const statusCode in operationSpec.responses) {\n const operationResponse: OperationResponse = operationSpec.responses[statusCode];\n if (\n operationResponse.bodyMapper &&\n operationResponse.bodyMapper.type.name === MapperType.Stream\n ) {\n result = true;\n break;\n }\n }\n return result;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/pipelineOptions.js b/node_modules/@azure/core-http/es/src/pipelineOptions.js new file mode 100644 index 000000000..dff1a4d34 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/pipelineOptions.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=pipelineOptions.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/pipelineOptions.js.map b/node_modules/@azure/core-http/es/src/pipelineOptions.js.map new file mode 100644 index 000000000..23e34f481 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/pipelineOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pipelineOptions.js","sourceRoot":"","sources":["../../src/pipelineOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpClient } from \"./httpClient\";\nimport { RetryOptions } from \"./policies/exponentialRetryPolicy\";\nimport { KeepAliveOptions } from \"./policies/keepAlivePolicy\";\nimport { RedirectOptions } from \"./policies/redirectPolicy\";\nimport { ProxyOptions } from \"./serviceClient\";\nimport { UserAgentOptions } from \"./policies/userAgentPolicy\";\nimport { DeserializationOptions } from \"./policies/deserializationPolicy\";\nimport { LogPolicyOptions } from \"./policies/logPolicy\";\n\n/**\n * Defines options that are used to configure the HTTP pipeline for\n * an SDK client.\n */\nexport interface PipelineOptions {\n /**\n * The HttpClient implementation to use for outgoing HTTP requests. Defaults\n * to DefaultHttpClient.\n */\n httpClient?: HttpClient;\n\n /**\n * Options that control how to retry failed requests.\n */\n retryOptions?: RetryOptions;\n\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n\n /*\n * Options for how HTTP connections should be maintained for future\n * requests.\n */\n keepAliveOptions?: KeepAliveOptions;\n\n /**\n * Options for how redirect responses are handled.\n */\n redirectOptions?: RedirectOptions;\n\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n}\n\n/**\n * Defines options that are used to configure internal options of\n * the HTTP pipeline for an SDK client.\n */\nexport interface InternalPipelineOptions extends PipelineOptions {\n /**\n * Options to configure API response deserialization.\n */\n deserializationOptions?: DeserializationOptions;\n\n /**\n * Options to configure request/response logging.\n */\n loggingOptions?: LogPolicyOptions;\n\n /**\n * Configure whether to decompress response according to Accept-Encoding header (node-fetch only)\n */\n decompressResponse?: boolean;\n\n /**\n * Send JSON Array payloads as NDJSON.\n */\n sendStreamingJson?: boolean;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js b/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js new file mode 100644 index 000000000..6267bfb1a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy } from "../policies/requestPolicy"; +import { Constants } from "../util/constants"; +import { HttpHeaders } from "../httpHeaders"; +import { ExpiringAccessTokenCache } from "../credentials/accessTokenCache"; +import { AccessTokenRefresher } from "../credentials/accessTokenRefresher"; +/** + * Creates a new BearerTokenAuthenticationPolicy factory. + * + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + */ +export function bearerTokenAuthenticationPolicy(credential, scopes) { + var tokenCache = new ExpiringAccessTokenCache(); + var tokenRefresher = new AccessTokenRefresher(credential, scopes, timeBetweenRefreshAttemptsInMs); + return { + create: function (nextPolicy, options) { + return new BearerTokenAuthenticationPolicy(nextPolicy, options, tokenCache, tokenRefresher); + } + }; +} +/** + * The automated token refresh will only start to happen at the + * expiration date minus the value of timeBetweenRefreshAttemptsInMs, + * which is by default 30 seconds. + */ +var timeBetweenRefreshAttemptsInMs = 30000; +/** + * + * Provides a RequestPolicy that can request a token from a TokenCredential + * implementation and then apply it to the Authorization header of a request + * as a Bearer token. + * + */ +var BearerTokenAuthenticationPolicy = /** @class */ (function (_super) { + __extends(BearerTokenAuthenticationPolicy, _super); + /** + * Creates a new BearerTokenAuthenticationPolicy object. + * + * @param nextPolicy The next RequestPolicy in the request pipeline. + * @param options Options for this RequestPolicy. + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + * @param tokenCache The cache for the most recent AccessToken returned from the TokenCredential. + */ + function BearerTokenAuthenticationPolicy(nextPolicy, options, tokenCache, tokenRefresher) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.tokenCache = tokenCache; + _this.tokenRefresher = tokenRefresher; + return _this; + } + /** + * Applies the Bearer token to the request through the Authorization header. + * @param webResource + */ + BearerTokenAuthenticationPolicy.prototype.sendRequest = function (webResource) { + return __awaiter(this, void 0, void 0, function () { + var token; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + return [4 /*yield*/, this.getToken({ + abortSignal: webResource.abortSignal, + tracingOptions: { + spanOptions: webResource.spanOptions + } + })]; + case 1: + token = _a.sent(); + webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, "Bearer " + token); + return [2 /*return*/, this._nextPolicy.sendRequest(webResource)]; + } + }); + }); + }; + /** + * Attempts a token update if any other time related conditionals have been reached based on the tokenRefresher class. + */ + BearerTokenAuthenticationPolicy.prototype.updateTokenIfNeeded = function (options) { + return __awaiter(this, void 0, void 0, function () { + var accessToken; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.tokenRefresher.isReady()) return [3 /*break*/, 2]; + return [4 /*yield*/, this.tokenRefresher.refresh(options)]; + case 1: + accessToken = _a.sent(); + this.tokenCache.setCachedToken(accessToken); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + BearerTokenAuthenticationPolicy.prototype.getToken = function (options) { + return __awaiter(this, void 0, void 0, function () { + var accessToken; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + accessToken = this.tokenCache.getCachedToken(); + if (!(accessToken === undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.tokenRefresher.refresh(options)]; + case 1: + // Waiting for the next refresh only if the cache is unable to retrieve the access token, + // which means that it has expired, or it has never been set. + accessToken = _a.sent(); + this.tokenCache.setCachedToken(accessToken); + return [3 /*break*/, 3]; + case 2: + // If we still have a cached access token, + // And any other time related conditionals have been reached based on the tokenRefresher class, + // then attempt to refresh without waiting. + this.updateTokenIfNeeded(options); + _a.label = 3; + case 3: return [2 /*return*/, accessToken ? accessToken.token : undefined]; + } + }); + }); + }; + return BearerTokenAuthenticationPolicy; +}(BaseRequestPolicy)); +export { BearerTokenAuthenticationPolicy }; +//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js.map new file mode 100644 index 000000000..52322716d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/bearerTokenAuthenticationPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bearerTokenAuthenticationPolicy.js","sourceRoot":"","sources":["../../../src/policies/bearerTokenAuthenticationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EACL,iBAAiB,EAIlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAoB,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E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,UAAkC,OAAwB;;;;;;6BACpD,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAA7B,wBAA6B;wBACX,qBAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;;wBAAxD,WAAW,GAAG,SAA0C;wBAC9D,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;;;;;;KAE/C;IAEa,kDAAQ,GAAtB,UAAuB,OAAwB;;;;;;wBACzC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;6BAC/C,CAAA,WAAW,KAAK,SAAS,CAAA,EAAzB,wBAAyB;wBAGb,qBAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;;wBAFxD,yFAAyF;wBACzF,6DAA6D;wBAC7D,WAAW,GAAG,SAA0C,CAAC;wBACzD,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;;;wBAE5C,0CAA0C;wBAC1C,+FAA+F;wBAC/F,2CAA2C;wBAC3C,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;;4BAGpC,sBAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAC;;;;KACpD;IACH,sCAAC;AAAD,CAAC,AA7DD,CAAqD,iBAAiB,GA6DrE","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TokenCredential, GetTokenOptions } from \"@azure/core-auth\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"../policies/requestPolicy\";\nimport { Constants } from \"../util/constants\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { WebResourceLike } from \"../webResource\";\nimport { AccessTokenCache, ExpiringAccessTokenCache } from \"../credentials/accessTokenCache\";\nimport { AccessTokenRefresher } from \"../credentials/accessTokenRefresher\";\n\n/**\n * Creates a new BearerTokenAuthenticationPolicy factory.\n *\n * @param credential The TokenCredential implementation that can supply the bearer token.\n * @param scopes The scopes for which the bearer token applies.\n */\nexport function bearerTokenAuthenticationPolicy(\n credential: TokenCredential,\n scopes: string | string[]\n): RequestPolicyFactory {\n const tokenCache: AccessTokenCache = new ExpiringAccessTokenCache();\n const tokenRefresher = new AccessTokenRefresher(\n credential,\n scopes,\n timeBetweenRefreshAttemptsInMs\n );\n\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new BearerTokenAuthenticationPolicy(nextPolicy, options, tokenCache, tokenRefresher);\n }\n };\n}\n\n/**\n * The automated token refresh will only start to happen at the\n * expiration date minus the value of timeBetweenRefreshAttemptsInMs,\n * which is by default 30 seconds.\n */\nconst timeBetweenRefreshAttemptsInMs = 30000;\n\n/**\n *\n * Provides a RequestPolicy that can request a token from a TokenCredential\n * implementation and then apply it to the Authorization header of a request\n * as a Bearer token.\n *\n */\nexport class BearerTokenAuthenticationPolicy extends BaseRequestPolicy {\n /**\n * Creates a new BearerTokenAuthenticationPolicy object.\n *\n * @param nextPolicy The next RequestPolicy in the request pipeline.\n * @param options Options for this RequestPolicy.\n * @param credential The TokenCredential implementation that can supply the bearer token.\n * @param scopes The scopes for which the bearer token applies.\n * @param tokenCache The cache for the most recent AccessToken returned from the TokenCredential.\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n private tokenCache: AccessTokenCache,\n private tokenRefresher: AccessTokenRefresher\n ) {\n super(nextPolicy, options);\n }\n\n /**\n * Applies the Bearer token to the request through the Authorization header.\n * @param webResource\n */\n public async sendRequest(webResource: WebResourceLike): Promise {\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n const token = await this.getToken({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n spanOptions: webResource.spanOptions\n }\n });\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);\n return this._nextPolicy.sendRequest(webResource);\n }\n\n /**\n * Attempts a token update if any other time related conditionals have been reached based on the tokenRefresher class.\n */\n private async updateTokenIfNeeded(options: GetTokenOptions): Promise {\n if (this.tokenRefresher.isReady()) {\n const accessToken = await this.tokenRefresher.refresh(options);\n this.tokenCache.setCachedToken(accessToken);\n }\n }\n\n private async getToken(options: GetTokenOptions): Promise {\n let accessToken = this.tokenCache.getCachedToken();\n if (accessToken === undefined) {\n // Waiting for the next refresh only if the cache is unable to retrieve the access token,\n // which means that it has expired, or it has never been set.\n accessToken = await this.tokenRefresher.refresh(options);\n this.tokenCache.setCachedToken(accessToken);\n } else {\n // If we still have a cached access token,\n // And any other time related conditionals have been reached based on the tokenRefresher class,\n // then attempt to refresh without waiting.\n this.updateTokenIfNeeded(options);\n }\n\n return accessToken ? accessToken.token : undefined;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js b/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js new file mode 100644 index 000000000..ce6bf5252 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { isStreamOperation } from "../operationSpec"; +import { RestError } from "../restError"; +import { MapperType } from "../serializer"; +import { parseXML } from "../util/xml"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { XML_CHARKEY } from "../util/serializer.common"; +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export function deserializationPolicy(deserializationContentTypes, parsingOptions) { + return { + create: function (nextPolicy, options) { + return new DeserializationPolicy(nextPolicy, options, deserializationContentTypes, parsingOptions); + } + }; +} +export var defaultJsonContentTypes = ["application/json", "text/json"]; +export var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +export var DefaultDeserializationOptions = { + expectedContentTypes: { + json: defaultJsonContentTypes, + xml: defaultXmlContentTypes + } +}; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +var DeserializationPolicy = /** @class */ (function (_super) { + __extends(DeserializationPolicy, _super); + function DeserializationPolicy(nextPolicy, requestPolicyOptions, deserializationContentTypes, parsingOptions) { + if (parsingOptions === void 0) { parsingOptions = {}; } + var _a; + var _this = _super.call(this, nextPolicy, requestPolicyOptions) || this; + _this.jsonContentTypes = + (deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes; + _this.xmlContentTypes = + (deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes; + _this.xmlCharKey = (_a = parsingOptions.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + return _this; + } + DeserializationPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(request).then(function (response) { + return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response, { + xmlCharKey: _this.xmlCharKey + }); + })]; + }); + }); + }; + return DeserializationPolicy; +}(BaseRequestPolicy)); +export { DeserializationPolicy }; +function getOperationResponse(parsedResponse) { + var result; + var request = parsedResponse.request; + var operationSpec = request.operationSpec; + if (operationSpec) { + var operationResponseGetter = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; +} +function shouldDeserializeResponse(parsedResponse) { + var shouldDeserialize = parsedResponse.request.shouldDeserialize; + var result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +export function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + return parse(jsonContentTypes, xmlContentTypes, response, updatedOptions).then(function (parsedResponse) { + if (!shouldDeserializeResponse(parsedResponse)) { + return parsedResponse; + } + var operationSpec = parsedResponse.request.operationSpec; + if (!operationSpec || !operationSpec.responses) { + return parsedResponse; + } + var responseSpec = getOperationResponse(parsedResponse); + var _a = handleErrorResponse(parsedResponse, operationSpec, responseSpec), error = _a.error, shouldReturnResponse = _a.shouldReturnResponse; + if (error) { + throw error; + } + else if (shouldReturnResponse) { + return parsedResponse; + } + // An operation response spec does exist for current status code, so + // use it to deserialize the response. + if (responseSpec) { + if (responseSpec.bodyMapper) { + var valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = + typeof valueToDeserialize === "object" + ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] + : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); + } + catch (error) { + var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText, undefined, parsedResponse.status, parsedResponse.request, parsedResponse); + throw restError; + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders", options); + } + } + return parsedResponse; + }); +} +function isOperationSpecEmpty(operationSpec) { + var expectedStatusCodes = Object.keys(operationSpec.responses); + return (expectedStatusCodes.length === 0 || + (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); +} +function handleErrorResponse(parsedResponse, operationSpec, responseSpec) { + var isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + var isExpectedStatusCode = isOperationSpecEmpty(operationSpec) + ? isSuccessByStatus + : !!responseSpec; + if (isExpectedStatusCode) { + if (responseSpec) { + if (!responseSpec.isError) { + return { error: null, shouldReturnResponse: false }; + } + } + else { + return { error: null, shouldReturnResponse: false }; + } + } + var errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; + var initialErrorMessage = isStreamOperation(operationSpec) + ? "Unexpected status code: " + parsedResponse.status + : parsedResponse.bodyAsText; + var error = new RestError(initialErrorMessage, undefined, parsedResponse.status, parsedResponse.request, parsedResponse); + // If the item failed but there's no error spec or default spec to deserialize the error, + // we should fail so we just throw the parsed response + if (!errorResponseSpec) { + throw error; + } + var defaultBodyMapper = errorResponseSpec.bodyMapper; + var defaultHeadersMapper = errorResponseSpec.headersMapper; + try { + // If error response has a body, try to deserialize it using default body mapper. + // Then try to extract error code & message from it + if (parsedResponse.parsedBody) { + var parsedBody = parsedResponse.parsedBody; + var parsedError = void 0; + if (defaultBodyMapper) { + var valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = + typeof parsedBody === "object" ? parsedBody[defaultBodyMapper.xmlElementName] : []; + } + parsedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody"); + } + var internalError = parsedBody.error || parsedError || parsedBody; + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + if (defaultBodyMapper) { + error.response.parsedBody = parsedError; + } + } + // If error response has headers, try to deserialize it using default header mapper + if (parsedResponse.headers && defaultHeadersMapper) { + error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + catch (defaultError) { + error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response."; + } + return { error: error, shouldReturnResponse: false }; +} +function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts) { + var errorHandler = function (err) { + var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + "."; + var errCode = err.code || RestError.PARSE_ERROR; + var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse); + return Promise.reject(e); + }; + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + var text_1 = operationResponse.bodyAsText; + var contentType = operationResponse.headers.get("Content-Type") || ""; + var contentComponents = !contentType + ? [] + : contentType.split(";").map(function (component) { return component.toLowerCase(); }); + if (contentComponents.length === 0 || + contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) { + return new Promise(function (resolve) { + operationResponse.parsedBody = JSON.parse(text_1); + resolve(operationResponse); + }).catch(errorHandler); + } + else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) { + return parseXML(text_1, opts) + .then(function (body) { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + return Promise.resolve(operationResponse); +} +//# sourceMappingURL=deserializationPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js.map new file mode 100644 index 000000000..62862e08b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/deserializationPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializationPolicy.js","sourceRoot":"","sources":["../../../src/policies/deserializationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC,OAAO,EAAiB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EACL,iBAAiB,EAIlB,MA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EAAE;YAC3F,OAAO,QAAQ,CAAC,MAAI,EAAE,IAAI,CAAC;iBACxB,IAAI,CAAC,UAAC,IAAI;gBACT,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC;gBACpC,OAAO,iBAAiB,CAAC;YAC3B,CAAC,CAAC;iBACD,KAAK,CAAC,YAAY,CAAC,CAAC;SACxB;KACF;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { OperationResponse } from \"../operationResponse\";\nimport { OperationSpec, isStreamOperation } from \"../operationSpec\";\nimport { RestError } from \"../restError\";\nimport { MapperType } from \"../serializer\";\nimport { parseXML } from \"../util/xml\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport { XML_CHARKEY, SerializerOptions } from \"../util/serializer.common\";\n\n/**\n * Options to configure API response deserialization.\n */\nexport interface DeserializationOptions {\n /**\n * Configures the expected content types for the deserialization of\n * JSON and XML response bodies.\n */\n expectedContentTypes: DeserializationContentTypes;\n}\n\n/**\n * The content-types that will indicate that an operation response should be deserialized in a\n * particular way.\n */\nexport interface DeserializationContentTypes {\n /**\n * The content-types that indicate that an operation response should be deserialized as JSON.\n * Defaults to [ \"application/json\", \"text/json\" ].\n */\n json?: string[];\n\n /**\n * The content-types that indicate that an operation response should be deserialized as XML.\n * Defaults to [ \"application/xml\", \"application/atom+xml\" ].\n */\n xml?: string[];\n}\n\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nexport function deserializationPolicy(\n deserializationContentTypes?: DeserializationContentTypes,\n parsingOptions?: SerializerOptions\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new DeserializationPolicy(\n nextPolicy,\n options,\n deserializationContentTypes,\n parsingOptions\n );\n }\n };\n}\n\nexport const defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nexport const defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n\nexport const DefaultDeserializationOptions: DeserializationOptions = {\n expectedContentTypes: {\n json: defaultJsonContentTypes,\n xml: defaultXmlContentTypes\n }\n};\n\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nexport class DeserializationPolicy extends BaseRequestPolicy {\n public readonly jsonContentTypes: string[];\n public readonly xmlContentTypes: string[];\n public readonly xmlCharKey: string;\n\n constructor(\n nextPolicy: RequestPolicy,\n requestPolicyOptions: RequestPolicyOptions,\n deserializationContentTypes?: DeserializationContentTypes,\n parsingOptions: SerializerOptions = {}\n ) {\n super(nextPolicy, requestPolicyOptions);\n\n this.jsonContentTypes =\n (deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes;\n this.xmlContentTypes =\n (deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes;\n this.xmlCharKey = parsingOptions.xmlCharKey ?? XML_CHARKEY;\n }\n\n public async sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then((response: HttpOperationResponse) =>\n deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response, {\n xmlCharKey: this.xmlCharKey\n })\n );\n }\n}\n\nfunction getOperationResponse(\n parsedResponse: HttpOperationResponse\n): undefined | OperationResponse {\n let result: OperationResponse | undefined;\n const request: WebResourceLike = parsedResponse.request;\n const operationSpec: OperationSpec | undefined = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter:\n | undefined\n | ((\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse) = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n } else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\n\nfunction shouldDeserializeResponse(parsedResponse: HttpOperationResponse): boolean {\n const shouldDeserialize: undefined | boolean | ((response: HttpOperationResponse) => boolean) =\n parsedResponse.request.shouldDeserialize;\n let result: boolean;\n if (shouldDeserialize === undefined) {\n result = true;\n } else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n } else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n\nexport function deserializeResponseBody(\n jsonContentTypes: string[],\n xmlContentTypes: string[],\n response: HttpOperationResponse,\n options: SerializerOptions = {}\n): Promise {\n const updatedOptions: Required = {\n rootName: options.rootName ?? \"\",\n includeRoot: options.includeRoot ?? false,\n xmlCharKey: options.xmlCharKey ?? XML_CHARKEY\n };\n return parse(jsonContentTypes, xmlContentTypes, response, updatedOptions).then(\n (parsedResponse) => {\n if (!shouldDeserializeResponse(parsedResponse)) {\n return parsedResponse;\n }\n\n const operationSpec = parsedResponse.request.operationSpec;\n if (!operationSpec || !operationSpec.responses) {\n return parsedResponse;\n }\n\n const responseSpec = getOperationResponse(parsedResponse);\n\n const { error, shouldReturnResponse } = handleErrorResponse(\n parsedResponse,\n operationSpec,\n responseSpec\n );\n if (error) {\n throw error;\n } else if (shouldReturnResponse) {\n return parsedResponse;\n }\n\n // An operation response spec does exist for current status code, so\n // use it to deserialize the response.\n if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize: any = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof valueToDeserialize === \"object\"\n ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName!]\n : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(\n responseSpec.bodyMapper,\n valueToDeserialize,\n \"operationRes.parsedBody\",\n options\n );\n } catch (error) {\n const restError = new RestError(\n `Error ${error} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`,\n undefined,\n parsedResponse.status,\n parsedResponse.request,\n parsedResponse\n );\n throw restError;\n }\n } else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(\n responseSpec.headersMapper,\n parsedResponse.headers.rawHeaders(),\n \"operationRes.parsedHeaders\",\n options\n );\n }\n }\n\n return parsedResponse;\n }\n );\n}\n\nfunction isOperationSpecEmpty(operationSpec: OperationSpec): boolean {\n const expectedStatusCodes = Object.keys(operationSpec.responses);\n return (\n expectedStatusCodes.length === 0 ||\n (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\")\n );\n}\n\nfunction handleErrorResponse(\n parsedResponse: HttpOperationResponse,\n operationSpec: OperationSpec,\n responseSpec: OperationResponse | undefined\n): { error: RestError | null; shouldReturnResponse: boolean } {\n const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300;\n const isExpectedStatusCode: boolean = isOperationSpecEmpty(operationSpec)\n ? isSuccessByStatus\n : !!responseSpec;\n\n if (isExpectedStatusCode) {\n if (responseSpec) {\n if (!responseSpec.isError) {\n return { error: null, shouldReturnResponse: false };\n }\n } else {\n return { error: null, shouldReturnResponse: false };\n }\n }\n\n const errorResponseSpec = responseSpec ?? operationSpec.responses.default;\n const initialErrorMessage = isStreamOperation(operationSpec)\n ? `Unexpected status code: ${parsedResponse.status}`\n : (parsedResponse.bodyAsText as string);\n\n const error = new RestError(\n initialErrorMessage,\n undefined,\n parsedResponse.status,\n parsedResponse.request,\n parsedResponse\n );\n\n // If the item failed but there's no error spec or default spec to deserialize the error,\n // we should fail so we just throw the parsed response\n if (!errorResponseSpec) {\n throw error;\n }\n\n const defaultBodyMapper = errorResponseSpec.bodyMapper;\n const defaultHeadersMapper = errorResponseSpec.headersMapper;\n\n try {\n // If error response has a body, try to deserialize it using default body mapper.\n // Then try to extract error code & message from it\n if (parsedResponse.parsedBody) {\n const parsedBody = parsedResponse.parsedBody;\n let parsedError;\n if (defaultBodyMapper) {\n let valueToDeserialize: any = parsedBody;\n if (operationSpec.isXML && defaultBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof parsedBody === \"object\" ? parsedBody[defaultBodyMapper.xmlElementName!] : [];\n }\n parsedError = operationSpec.serializer.deserialize(\n defaultBodyMapper,\n valueToDeserialize,\n \"error.response.parsedBody\"\n );\n }\n\n const internalError: any = parsedBody.error || parsedError || parsedBody;\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n\n if (defaultBodyMapper) {\n error.response!.parsedBody = parsedError;\n }\n }\n\n // If error response has headers, try to deserialize it using default header mapper\n if (parsedResponse.headers && defaultHeadersMapper) {\n error.response!.parsedHeaders = operationSpec.serializer.deserialize(\n defaultHeadersMapper,\n parsedResponse.headers.rawHeaders(),\n \"operationRes.parsedHeaders\"\n );\n }\n } catch (defaultError) {\n error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`;\n }\n\n return { error, shouldReturnResponse: false };\n}\n\nfunction parse(\n jsonContentTypes: string[],\n xmlContentTypes: string[],\n operationResponse: HttpOperationResponse,\n opts: Required\n): Promise {\n const errorHandler = (err: Error & { code: string }): Promise => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(\n msg,\n errCode,\n operationResponse.status,\n operationResponse.request,\n operationResponse\n );\n return Promise.reject(e);\n };\n\n if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType: string = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents: string[] = !contentType\n ? []\n : contentType.split(\";\").map((component) => component.toLowerCase());\n if (\n contentComponents.length === 0 ||\n contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)\n ) {\n return new Promise((resolve) => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n } else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text, opts)\n .then((body) => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n\n return Promise.resolve(operationResponse);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js new file mode 100644 index 000000000..24d4458ea --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +/* + * NOTE: When moving this file, please update "browser" section in package.json + */ +import { BaseRequestPolicy } from "./requestPolicy"; +var DisbleResponseDecompressionNotSupportedInBrowser = new Error("DisableResponseDecompressionPolicy is not supported in browser environment"); +/** + * {@link DisableResponseDecompressionPolicy} is not supported in browser and attempting + * to use it will results in error being thrown. + */ +export function disableResponseDecompressionPolicy() { + return { + create: function (_nextPolicy, _options) { + throw DisbleResponseDecompressionNotSupportedInBrowser; + } + }; +} +var DisableResponseDecompressionPolicy = /** @class */ (function (_super) { + __extends(DisableResponseDecompressionPolicy, _super); + function DisableResponseDecompressionPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw DisbleResponseDecompressionNotSupportedInBrowser; + return _this; + } + DisableResponseDecompressionPolicy.prototype.sendRequest = function (_request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + throw DisbleResponseDecompressionNotSupportedInBrowser; + }); + }); + }; + return DisableResponseDecompressionPolicy; +}(BaseRequestPolicy)); +export { DisableResponseDecompressionPolicy }; +//# sourceMappingURL=disableResponseDecompressionPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js.map b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js.map new file mode 100644 index 000000000..a728f565b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"disableResponseDecompressionPolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/disableResponseDecompressionPolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC;;GAEG;AACH,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAIzB,IAAM,gDAAgD,GAAG,IAAI,KAAK,CAChE,4EAA4E,CAC7E,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,kCAAkC;IAChD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAA8B;YACjE,MAAM,gDAAgD,CAAC;QACzD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAwD,sDAAiB;IACvE,4CAAY,UAAyB,EAAE,OAA6B;QAApE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,gDAAgD,CAAC;;IACzD,CAAC;IAEY,wDAAW,GAAxB,UAAyB,QAAqB;;;gBAC5C,MAAM,gDAAgD,CAAC;;;KACxD;IACH,yCAAC;AAAD,CAAC,AATD,CAAwD,iBAAiB,GASxE","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"./requestPolicy\";\nimport { WebResource } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\n\nconst DisbleResponseDecompressionNotSupportedInBrowser = new Error(\n \"DisableResponseDecompressionPolicy is not supported in browser environment\"\n);\n\n/**\n * {@link DisableResponseDecompressionPolicy} is not supported in browser and attempting\n * to use it will results in error being thrown.\n */\nexport function disableResponseDecompressionPolicy(): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptions) => {\n throw DisbleResponseDecompressionNotSupportedInBrowser;\n }\n };\n}\n\nexport class DisableResponseDecompressionPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n throw DisbleResponseDecompressionNotSupportedInBrowser;\n }\n\n public async sendRequest(_request: WebResource): Promise {\n throw DisbleResponseDecompressionNotSupportedInBrowser;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js new file mode 100644 index 000000000..ff8a2faf5 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +/** + * Returns a request policy factory that can be used to create an instance of + * {@link DisableResponseDecompressionPolicy}. + */ +export function disableResponseDecompressionPolicy() { + return { + create: function (nextPolicy, options) { + return new DisableResponseDecompressionPolicy(nextPolicy, options); + } + }; +} +/** + * A policy to disable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +var DisableResponseDecompressionPolicy = /** @class */ (function (_super) { + __extends(DisableResponseDecompressionPolicy, _super); + /** + * Creates an instance of DisableResponseDecompressionPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + */ + // The parent constructor is protected. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor */ + function DisableResponseDecompressionPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + */ + DisableResponseDecompressionPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + request.decompressResponse = false; + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return DisableResponseDecompressionPolicy; +}(BaseRequestPolicy)); +export { DisableResponseDecompressionPolicy }; +//# sourceMappingURL=disableResponseDecompressionPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js.map new file mode 100644 index 000000000..785375886 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/disableResponseDecompressionPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"disableResponseDecompressionPolicy.js","sourceRoot":"","sources":["../../../src/policies/disableResponseDecompressionPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAIzB;;;GAGG;AACH,MAAM,UAAU,kCAAkC;IAChD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,kCAAkC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH;IAAwD,sDAAiB;IACvE;;;;;OAKG;IACH,uCAAuC;IACvC,wEAAwE;IACxE,4CAAY,UAAyB,EAAE,OAA6B;eAClE,kBAAM,UAAU,EAAE,OAAO,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACU,wDAAW,GAAxB,UAAyB,OAAoB;;;gBAC3C,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC;gBACnC,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,yCAAC;AAAD,CAAC,AAvBD,CAAwD,iBAAiB,GAuBxE","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"./requestPolicy\";\nimport { WebResource } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\n\n/**\n * Returns a request policy factory that can be used to create an instance of\n * {@link DisableResponseDecompressionPolicy}.\n */\nexport function disableResponseDecompressionPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new DisableResponseDecompressionPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * A policy to disable response decompression according to Accept-Encoding header\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding\n */\nexport class DisableResponseDecompressionPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of DisableResponseDecompressionPolicy.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n */\n // The parent constructor is protected.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n */\n public async sendRequest(request: WebResource): Promise {\n request.decompressResponse = false;\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js b/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js new file mode 100644 index 000000000..be2847ab6 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { DEFAULT_CLIENT_MAX_RETRY_INTERVAL, DEFAULT_CLIENT_RETRY_COUNT, DEFAULT_CLIENT_RETRY_INTERVAL, isNumber, updateRetryData, shouldRetry } from "../util/exponentialBackoffStrategy"; +import { RestError } from "../restError"; +import { logger } from "../log"; +export function exponentialRetryPolicy(retryCount, retryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval); + } + }; +} +/** + * Describes the Retry Mode type. Currently supporting only Exponential. + * @enum RetryMode + */ +export var RetryMode; +(function (RetryMode) { + RetryMode[RetryMode["Exponential"] = 0] = "Exponential"; +})(RetryMode || (RetryMode = {})); +export var DefaultRetryOptions = { + maxRetries: DEFAULT_CLIENT_RETRY_COUNT, + retryDelayInMs: DEFAULT_CLIENT_RETRY_INTERVAL, + maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL +}; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +var ExponentialRetryPolicy = /** @class */ (function (_super) { + __extends(ExponentialRetryPolicy, _super); + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptions} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) + ? maxRetryInterval + : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + ExponentialRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .then(function (response) { return retry(_this, request, response); }) + .catch(function (error) { return retry(_this, request, error.response, undefined, error); }); + }; + return ExponentialRetryPolicy; +}(BaseRequestPolicy)); +export { ExponentialRetryPolicy }; +function retry(policy, request, response, retryData, requestError) { + return __awaiter(this, void 0, void 0, function () { + function shouldPolicyRetry(response) { + var statusCode = response === null || response === void 0 ? void 0 : response.status; + if (statusCode === undefined || + (statusCode < 500 && statusCode !== 408) || + statusCode === 501 || + statusCode === 505) { + return false; + } + return true; + } + var isAborted, res, err_1, err; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + retryData = updateRetryData({ + retryInterval: policy.retryInterval, + minRetryInterval: 0, + maxRetryInterval: policy.maxRetryInterval + }, retryData, requestError); + isAborted = request.abortSignal && request.abortSignal.aborted; + if (!(!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response))) return [3 /*break*/, 6]; + logger.info("Retrying request in " + retryData.retryInterval); + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + return [4 /*yield*/, utils.delay(retryData.retryInterval)]; + case 2: + _a.sent(); + return [4 /*yield*/, policy._nextPolicy.sendRequest(request.clone())]; + case 3: + res = _a.sent(); + return [2 /*return*/, retry(policy, request, res, retryData)]; + case 4: + err_1 = _a.sent(); + return [2 /*return*/, retry(policy, request, response, retryData, err_1)]; + case 5: return [3 /*break*/, 7]; + case 6: + if (isAborted || requestError || !response) { + err = retryData.error || + new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response); + throw err; + } + else { + return [2 /*return*/, response]; + } + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js.map new file mode 100644 index 000000000..4d7d6d001 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/exponentialRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialRetryPolicy.js","sour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AgB;qBAC1C,EACD,SAAS,EACT,YAAY,CACb,CAAC;oBAEI,SAAS,GAAwB,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;yBACtF,CAAA,CAAC,SAAS,IAAI,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA,EAApF,wBAAoF;oBACtF,MAAM,CAAC,IAAI,CAAC,yBAAuB,SAAS,CAAC,aAAe,CAAC,CAAC;;;;oBAE5D,qBAAM,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,EAAA;;oBAA1C,SAA0C,CAAC;oBAC/B,qBAAM,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAAA;;oBAA3D,GAAG,GAAG,SAAqD;oBACjE,sBAAO,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,EAAC;;;oBAE9C,sBAAO,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAG,CAAC,EAAC;;;oBAErD,IAAI,SAAS,IAAI,YAAY,IAAI,CAAC,QAAQ,EAAE;wBAE3C,GAAG,GACP,SAAS,CAAC,KAAK;4BACf,IAAI,SAAS,CACX,6BAA6B,EAC7B,SAAS,CAAC,kBAAkB,EAC5B,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAC3B,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAC5B,QAAQ,CACT,CAAC;wBACJ,MAAM,GAAG,CAAC;qBACX;yBAAM;wBACL,sBAAO,QAAQ,EAAC;qBACjB;;;;;;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport {\n RetryData,\n RetryError,\n DEFAULT_CLIENT_MAX_RETRY_INTERVAL,\n DEFAULT_CLIENT_RETRY_COUNT,\n DEFAULT_CLIENT_RETRY_INTERVAL,\n isNumber,\n updateRetryData,\n shouldRetry\n} from \"../util/exponentialBackoffStrategy\";\nimport { RestError } from \"../restError\";\nimport { logger } from \"../log\";\n\nexport function exponentialRetryPolicy(\n retryCount?: number,\n retryInterval?: number,\n maxRetryInterval?: number\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new ExponentialRetryPolicy(\n nextPolicy,\n options,\n retryCount,\n retryInterval,\n maxRetryInterval\n );\n }\n };\n}\n\n/**\n * Describes the Retry Mode type. Currently supporting only Exponential.\n * @enum RetryMode\n */\nexport enum RetryMode {\n Exponential\n}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The amount of delay in milliseconds between retry attempts. Defaults to 30000\n * (30 seconds). The delay increases exponentially with each retry up to a maximum\n * specified by maxRetryDelayInMs.\n */\n retryDelayInMs?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation. Defaults\n * to 90000 (90 seconds).\n */\n maxRetryDelayInMs?: number;\n\n /**\n * Currently supporting only Exponential mode.\n */\n mode?: RetryMode;\n}\n\nexport const DefaultRetryOptions: RetryOptions = {\n maxRetries: DEFAULT_CLIENT_RETRY_COUNT,\n retryDelayInMs: DEFAULT_CLIENT_RETRY_INTERVAL,\n maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL\n};\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nexport class ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * The client retry count.\n */\n retryCount: number;\n /**\n * The client retry interval in milliseconds.\n */\n retryInterval: number;\n /**\n * The maximum retry interval in milliseconds.\n */\n maxRetryInterval: number;\n\n /**\n * @constructor\n * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.\n * @param {RequestPolicyOptions} options The options for this RequestPolicy.\n * @param {number} [retryCount] The client retry count.\n * @param {number} [retryInterval] The client retry interval, in milliseconds.\n * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.\n * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n retryCount?: number,\n retryInterval?: number,\n maxRetryInterval?: number\n ) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => retry(this, request, response))\n .catch((error) => retry(this, request, error.response, undefined, error));\n }\n}\n\nasync function retry(\n policy: ExponentialRetryPolicy,\n request: WebResourceLike,\n response?: HttpOperationResponse,\n retryData?: RetryData,\n requestError?: RetryError\n): Promise {\n function shouldPolicyRetry(response?: HttpOperationResponse): boolean {\n const statusCode = response?.status;\n if (\n statusCode === undefined ||\n (statusCode < 500 && statusCode !== 408) ||\n statusCode === 501 ||\n statusCode === 505\n ) {\n return false;\n }\n return true;\n }\n\n retryData = updateRetryData(\n {\n retryInterval: policy.retryInterval,\n minRetryInterval: 0,\n maxRetryInterval: policy.maxRetryInterval\n },\n retryData,\n requestError\n );\n\n const isAborted: boolean | undefined = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response)) {\n logger.info(`Retrying request in ${retryData.retryInterval}`);\n try {\n await utils.delay(retryData.retryInterval);\n const res = await policy._nextPolicy.sendRequest(request.clone());\n return retry(policy, request, res, retryData);\n } catch (err) {\n return retry(policy, request, response, retryData, err);\n }\n } else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err =\n retryData.error ||\n new RestError(\n \"Failed to send the request.\",\n RestError.REQUEST_SEND_ERROR,\n response && response.status,\n response && response.request,\n response\n );\n throw err;\n } else {\n return response;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js b/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js new file mode 100644 index 000000000..001562df2 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function generateClientRequestIdPolicy(requestIdHeaderName) { + if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; } + return { + create: function (nextPolicy, options) { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; +} +var GenerateClientRequestIdPolicy = /** @class */ (function (_super) { + __extends(GenerateClientRequestIdPolicy, _super); + function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._requestIdHeaderName = _requestIdHeaderName; + return _this; + } + GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, request.requestId); + } + return this._nextPolicy.sendRequest(request); + }; + return GenerateClientRequestIdPolicy; +}(BaseRequestPolicy)); +export { GenerateClientRequestIdPolicy }; +//# sourceMappingURL=generateClientRequestIdPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js.map new file mode 100644 index 000000000..396a35663 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/generateClientRequestIdPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generateClientRequestIdPolicy.js","sourceRoot":"","sources":["../../../src/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,6BAA6B,CAC3C,mBAA8C;IAA9C,oCAAA,EAAA,8CAA8C;IAE9C,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;QACrF,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmD,iDAAiB;IAClE,uCACE,UAAyB,EACzB,OAA6B,EACrB,oBAA4B;QAHtC,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHS,0BAAoB,GAApB,oBAAoB,CAAQ;;IAGtC,CAAC;IAEM,mDAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE;YACxD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,oCAAC;AAAD,CAAC,AAfD,CAAmD,iBAAiB,GAenE","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\n\nexport function generateClientRequestIdPolicy(\n requestIdHeaderName = \"x-ms-client-request-id\"\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n }\n };\n}\n\nexport class GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n private _requestIdHeaderName: string\n ) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, request.requestId);\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js b/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js new file mode 100644 index 000000000..a43fec919 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export var DefaultKeepAliveOptions = { + enable: true +}; +export function keepAlivePolicy(keepAliveOptions) { + return { + create: function (nextPolicy, options) { + return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions); + } + }; +} +/** + * KeepAlivePolicy is a policy used to control keep alive settings for every request. + */ +var KeepAlivePolicy = /** @class */ (function (_super) { + __extends(KeepAlivePolicy, _super); + /** + * Creates an instance of KeepAlivePolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {KeepAliveOptions} [keepAliveOptions] + */ + function KeepAlivePolicy(nextPolicy, options, keepAliveOptions) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.keepAliveOptions = keepAliveOptions; + return _this; + } + /** + * Sends out request. + * + * @param {WebResourceLike} request + * @returns {Promise} + * @memberof KeepAlivePolicy + */ + KeepAlivePolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + request.keepAlive = this.keepAliveOptions.enable; + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return KeepAlivePolicy; +}(BaseRequestPolicy)); +export { KeepAlivePolicy }; +//# sourceMappingURL=keepAlivePolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js.map b/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js.map new file mode 100644 index 000000000..5b21884f9 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/keepAlivePolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keepAlivePolicy.js","sourceRoot":"","sources":["../../../src/policies/keepAlivePolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAgBzB,MAAM,CAAC,IAAM,uBAAuB,GAAqB;IACvD,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,gBAAmC;IACjE,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,CAAC,CAAC;QAC/F,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH;IAAqC,mCAAiB;IACpD;;;;;;OAMG;IACH,yBACE,UAAyB,EACzB,OAA6B,EACZ,gBAAkC;QAHrD,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHkB,sBAAgB,GAAhB,gBAAgB,CAAkB;;IAGrD,CAAC;IAED;;;;;;OAMG;IACU,qCAAW,GAAxB,UAAyB,OAAwB;;;gBAC/C,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;gBACjD,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,sBAAC;AAAD,CAAC,AA3BD,CAAqC,iBAAiB,GA2BrD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\n\n/**\n * Options for how HTTP connections should be maintained for future\n * requests.\n */\nexport interface KeepAliveOptions {\n /*\n * When true, connections will be kept alive for multiple requests.\n * Defaults to true.\n */\n enable: boolean;\n}\n\nexport const DefaultKeepAliveOptions: KeepAliveOptions = {\n enable: true\n};\n\nexport function keepAlivePolicy(keepAliveOptions?: KeepAliveOptions): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions);\n }\n };\n}\n\n/**\n * KeepAlivePolicy is a policy used to control keep alive settings for every request.\n */\nexport class KeepAlivePolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {KeepAliveOptions} [keepAliveOptions]\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n private readonly keepAliveOptions: KeepAliveOptions\n ) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResourceLike} request\n * @returns {Promise}\n * @memberof KeepAlivePolicy\n */\n public async sendRequest(request: WebResourceLike): Promise {\n request.keepAlive = this.keepAliveOptions.enable;\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/logPolicy.js b/node_modules/@azure/core-http/es/src/policies/logPolicy.js new file mode 100644 index 000000000..7955edb7a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/logPolicy.js @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { logger as coreLogger } from "../log"; +import { Sanitizer } from "../util/sanitizer"; +export function logPolicy(loggingOptions) { + if (loggingOptions === void 0) { loggingOptions = {}; } + return { + create: function (nextPolicy, options) { + return new LogPolicy(nextPolicy, options, loggingOptions); + } + }; +} +var LogPolicy = /** @class */ (function (_super) { + __extends(LogPolicy, _super); + function LogPolicy(nextPolicy, options, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.logger, logger = _c === void 0 ? coreLogger.info : _c, _d = _b.allowedHeaderNames, allowedHeaderNames = _d === void 0 ? [] : _d, _e = _b.allowedQueryParameters, allowedQueryParameters = _e === void 0 ? [] : _e; + var _this = _super.call(this, nextPolicy, options) || this; + _this.logger = logger; + _this.sanitizer = new Sanitizer({ allowedHeaderNames: allowedHeaderNames, allowedQueryParameters: allowedQueryParameters }); + return _this; + } + Object.defineProperty(LogPolicy.prototype, "allowedHeaderNames", { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + get: function () { + return this.sanitizer.allowedHeaderNames; + }, + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + set: function (allowedHeaderNames) { + this.sanitizer.allowedHeaderNames = allowedHeaderNames; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(LogPolicy.prototype, "allowedQueryParameters", { + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + get: function () { + return this.sanitizer.allowedQueryParameters; + }, + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + set: function (allowedQueryParameters) { + this.sanitizer.allowedQueryParameters = allowedQueryParameters; + }, + enumerable: false, + configurable: true + }); + LogPolicy.prototype.sendRequest = function (request) { + var _this = this; + if (!this.logger.enabled) + return this._nextPolicy.sendRequest(request); + this.logRequest(request); + return this._nextPolicy.sendRequest(request).then(function (response) { return _this.logResponse(response); }); + }; + LogPolicy.prototype.logRequest = function (request) { + this.logger("Request: " + this.sanitizer.sanitize(request)); + }; + LogPolicy.prototype.logResponse = function (response) { + this.logger("Response status code: " + response.status); + this.logger("Headers: " + this.sanitizer.sanitize(response.headers)); + return response; + }; + return LogPolicy; +}(BaseRequestPolicy)); +export { LogPolicy }; +//# sourceMappingURL=logPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/logPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/logPolicy.js.map new file mode 100644 index 000000000..3d06594b4 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/logPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logPolicy.js","sourceRoot":"","sources":["../../../src/policies/logPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAuB9C,MAAM,UAAU,SAAS,CAAC,cAAqC;IAArC,+BAAA,EAAA,mBAAqC;IAC7D,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC5D,CAAC;KACF,CAAC;AAC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IAAK,OAAA,KAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAA1B,CAA0B,CAAC,CAAC;IAC9F,CAAC;IAEO,8BAAU,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,MAAM,CAAC,cAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAG,CAAC,CAAC;IAC9D,CAAC;IAEO,+BAAW,GAAnB,UAAoB,QAA+B;QACjD,IAAI,CAAC,MAAM,CAAC,2BAAyB,QAAQ,CAAC,MAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,cAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAG,CAAC,CAAC;QACrE,OAAO,QAAQ,CAAC;IAClB,CAAC;IACH,gBAAC;AAAD,CAAC,AA1ED,CAA+B,iBAAiB,GA0E/C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport { Debugger } from \"@azure/logger\";\nimport { logger as coreLogger } from \"../log\";\nimport { Sanitizer } from \"../util/sanitizer\";\n\nexport interface LogPolicyOptions {\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n allowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n allowedQueryParameters?: string[];\n\n /**\n * The Debugger (logger) instance to use for writing pipeline logs.\n */\n logger?: Debugger;\n}\n\nexport function logPolicy(loggingOptions: LogPolicyOptions = {}): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new LogPolicy(nextPolicy, options, loggingOptions);\n }\n };\n}\n\nexport class LogPolicy extends BaseRequestPolicy {\n logger: Debugger;\n sanitizer: Sanitizer;\n\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n public get allowedHeaderNames(): Set {\n return this.sanitizer.allowedHeaderNames;\n }\n\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n public set allowedHeaderNames(allowedHeaderNames: Set) {\n this.sanitizer.allowedHeaderNames = allowedHeaderNames;\n }\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n public get allowedQueryParameters(): Set {\n return this.sanitizer.allowedQueryParameters;\n }\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n public set allowedQueryParameters(allowedQueryParameters: Set) {\n this.sanitizer.allowedQueryParameters = allowedQueryParameters;\n }\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n {\n logger = coreLogger.info,\n allowedHeaderNames = [],\n allowedQueryParameters = []\n }: LogPolicyOptions = {}\n ) {\n super(nextPolicy, options);\n this.logger = logger;\n this.sanitizer = new Sanitizer({ allowedHeaderNames, allowedQueryParameters });\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!this.logger.enabled) return this._nextPolicy.sendRequest(request);\n\n this.logRequest(request);\n return this._nextPolicy.sendRequest(request).then((response) => this.logResponse(response));\n }\n\n private logRequest(request: WebResourceLike): void {\n this.logger(`Request: ${this.sanitizer.sanitize(request)}`);\n }\n\n private logResponse(response: HttpOperationResponse): HttpOperationResponse {\n this.logger(`Response status code: ${response.status}`);\n this.logger(`Headers: ${this.sanitizer.sanitize(response.headers)}`);\n return response;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js new file mode 100644 index 000000000..f8d52b607 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export function getDefaultUserAgentKey() { + return "x-ms-useragent"; +} +export function getPlatformSpecificData() { + var navigator = window.navigator; + var osInfo = { + key: "OS", + value: (navigator.oscpu || navigator.platform).replace(" ", "") + }; + return [osInfo]; +} +//# sourceMappingURL=msRestUserAgentPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js.map b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js.map new file mode 100644 index 000000000..896fb01d7 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC,MAAM,UAAU,sBAAsB;IACpC,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,SAAS,GAAG,MAAM,CAAC,SAAwB,CAAC;IAClD,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;KAChE,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n * and \"plugins\" section in webpack.testconfig.ts.\n */\n\nimport { TelemetryInfo } from \"./userAgentPolicy\";\n\ninterface NavigatorEx extends Navigator {\n // oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2\n readonly oscpu: string;\n}\n\nexport function getDefaultUserAgentKey(): string {\n return \"x-ms-useragent\";\n}\n\nexport function getPlatformSpecificData(): TelemetryInfo[] {\n const navigator = window.navigator as NavigatorEx;\n const osInfo = {\n key: \"OS\",\n value: (navigator.oscpu || navigator.platform).replace(\" \", \"\")\n };\n\n return [osInfo];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js new file mode 100644 index 000000000..e2b93c8d2 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import * as os from "os"; +import { Constants } from "../util/constants"; +export function getDefaultUserAgentKey() { + return Constants.HeaderConstants.USER_AGENT; +} +export function getPlatformSpecificData() { + var runtimeInfo = { + key: "Node", + value: process.version + }; + var osInfo = { + key: "OS", + value: "(" + os.arch() + "-" + os.type() + "-" + os.release() + ")" + }; + return [runtimeInfo, osInfo]; +} +//# sourceMappingURL=msRestUserAgentPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js.map new file mode 100644 index 000000000..0aa3a934f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/msRestUserAgentPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.js","sourceRoot":"","sources":["../../../src/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,UAAU,sBAAsB;IACpC,OAAO,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,WAAW,GAAG;QAClB,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,OAAO,CAAC,OAAO;KACvB,CAAC;IAEF,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,MAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,OAAO,EAAE,MAAG;KACrD,CAAC;IAEF,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"os\";\nimport { TelemetryInfo } from \"./userAgentPolicy\";\nimport { Constants } from \"../util/constants\";\n\nexport function getDefaultUserAgentKey(): string {\n return Constants.HeaderConstants.USER_AGENT;\n}\n\nexport function getPlatformSpecificData(): TelemetryInfo[] {\n const runtimeInfo = {\n key: \"Node\",\n value: process.version\n };\n\n const osInfo = {\n key: \"OS\",\n value: `(${os.arch()}-${os.type()}-${os.release()})`\n };\n\n return [runtimeInfo, osInfo];\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js b/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js new file mode 100644 index 000000000..71a67be2c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +// BaseRequestPolicy has a protected constructor. +/* eslint-disable @typescript-eslint/no-useless-constructor */ +import { BaseRequestPolicy } from "./requestPolicy"; +export function ndJsonPolicy() { + return { + create: function (nextPolicy, options) { + return new NdJsonPolicy(nextPolicy, options); + } + }; +} +/** + * NdJsonPolicy that formats a JSON array as newline-delimited JSON + */ +var NdJsonPolicy = /** @class */ (function (_super) { + __extends(NdJsonPolicy, _super); + /** + * Creates an instance of KeepAlivePolicy. + * + * @param nextPolicy + * @param options + */ + function NdJsonPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends a request. + * + * @param request + */ + NdJsonPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var body; + return __generator(this, function (_a) { + // There currently isn't a good way to bypass the serializer + if (typeof request.body === "string" && request.body.startsWith("[")) { + body = JSON.parse(request.body); + if (Array.isArray(body)) { + request.body = body.map(function (item) { return JSON.stringify(item) + "\n"; }).join(""); + } + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return NdJsonPolicy; +}(BaseRequestPolicy)); +//# sourceMappingURL=ndJsonPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js.map new file mode 100644 index 000000000..e7a12721f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/ndJsonPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ndJsonPolicy.js","sourceRoot":"","sources":["../../../src/policies/ndJsonPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,iDAAiD;AACjD,8DAA8D;AAE9D,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH;IAA2B,gCAAiB;IAC1C;;;;;OAKG;IACH,sBAAY,UAAyB,EAAE,OAA6B;eAClE,kBAAM,UAAU,EAAE,OAAO,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACU,kCAAW,GAAxB,UAAyB,OAAwB;;;;gBAC/C,4DAA4D;gBAC5D,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;oBAC9D,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACtC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;wBACvB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,EAA3B,CAA2B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;qBACzE;iBACF;gBACD,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,mBAAC;AAAD,CAAC,AA1BD,CAA2B,iBAAiB,GA0B3C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// BaseRequestPolicy has a protected constructor.\n/* eslint-disable @typescript-eslint/no-useless-constructor */\n\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\n\nexport function ndJsonPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new NdJsonPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * NdJsonPolicy that formats a JSON array as newline-delimited JSON\n */\nclass NdJsonPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n *\n * @param nextPolicy\n * @param options\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends a request.\n *\n * @param request\n */\n public async sendRequest(request: WebResourceLike): Promise {\n // There currently isn't a good way to bypass the serializer\n if (typeof request.body === \"string\" && request.body.startsWith(\"[\")) {\n const body = JSON.parse(request.body);\n if (Array.isArray(body)) {\n request.body = body.map((item) => JSON.stringify(item) + \"\\n\").join(\"\");\n }\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js new file mode 100644 index 000000000..ddf7c79d8 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment"); +export function getDefaultProxySettings(_proxyUrl) { + return undefined; +} +export function proxyPolicy(_proxySettings) { + return { + create: function (_nextPolicy, _options) { + throw proxyNotSupportedInBrowser; + } + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + __extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw proxyNotSupportedInBrowser; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (_request) { + throw proxyNotSupportedInBrowser; + }; + return ProxyPolicy; +}(BaseRequestPolicy)); +export { ProxyPolicy }; +//# sourceMappingURL=proxyPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js.map b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js.map new file mode 100644 index 000000000..7a85d4c41 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.browser.js","sourceRoot":"","sources":["../../../src/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAIzB,IAAM,0BAA0B,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEpG,MAAM,UAAU,uBAAuB,CAAC,SAAkB;IACxD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,cAA8B;IACxD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAA8B;YACjE,MAAM,0BAA0B,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAChD,qBAAY,UAAyB,EAAE,OAA6B;QAApE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,0BAA0B,CAAC;;IACnC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,QAAyB;QAC1C,MAAM,0BAA0B,CAAC;IACnC,CAAC;IACH,kBAAC;AAAD,CAAC,AATD,CAAiC,iBAAiB,GASjD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ProxySettings } from \"../serviceClient\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nconst proxyNotSupportedInBrowser = new Error(\"ProxyPolicy is not supported in browser environment\");\n\nexport function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined {\n return undefined;\n}\n\nexport function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptions) => {\n throw proxyNotSupportedInBrowser;\n }\n };\n}\n\nexport class ProxyPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n throw proxyNotSupportedInBrowser;\n }\n\n public sendRequest(_request: WebResourceLike): Promise {\n throw proxyNotSupportedInBrowser;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js new file mode 100644 index 000000000..781af7bac --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { Constants } from "../util/constants"; +import { URLBuilder } from "../url"; +import { getEnvironmentValue } from "../util/utils"; +var noProxyList = []; +var isNoProxyInitalized = false; +var byPassedList = new Map(); +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + var httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY); + var allProxy = getEnvironmentValue(Constants.ALL_PROXY); + var httpProxy = getEnvironmentValue(Constants.HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; +} +// Check whether the given `uri` matches the noProxyList. If it matches, any request sent to that same `uri` won't set the proxy settings. +function isBypassed(uri) { + if (byPassedList.has(uri)) { + return byPassedList.get(uri); + } + loadNoProxy(); + var isBypassed = false; + var host = URLBuilder.parse(uri).getHost(); + for (var _i = 0, noProxyList_1 = noProxyList; _i < noProxyList_1.length; _i++) { + var proxyString = noProxyList_1[_i]; + if (proxyString[0] === ".") { + if (uri.endsWith(proxyString)) { + isBypassed = true; + } + else { + if (host === proxyString.slice(1) && host.length === proxyString.length - 1) { + isBypassed = true; + } + } + } + else { + if (host === proxyString) { + isBypassed = true; + } + } + } + byPassedList.set(uri, isBypassed); + return isBypassed; +} +function loadNoProxy() { + if (isNoProxyInitalized) { + return; + } + var noProxy = getEnvironmentValue(Constants.NO_PROXY); + if (noProxy) { + var list = noProxy.split(","); + noProxyList = list.map(function (item) { return item.trim(); }).filter(function (item) { return item.length; }); + } + isNoProxyInitalized = true; +} +export function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + var _a = extractAuthFromUrl(proxyUrl), username = _a.username, password = _a.password, urlWithoutAuth = _a.urlWithoutAuth; + var parsedUrl = URLBuilder.parse(urlWithoutAuth); + var schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + "://" : ""; + return { + host: schema + parsedUrl.getHost(), + port: Number.parseInt(parsedUrl.getPort() || "80"), + username: username, + password: password + }; +} +export function proxyPolicy(proxySettings) { + if (!proxySettings) { + proxySettings = getDefaultProxySettings(); + } + return { + create: function (nextPolicy, options) { + return new ProxyPolicy(nextPolicy, options, proxySettings); + } + }; +} +function extractAuthFromUrl(url) { + var atIndex = url.indexOf("@"); + if (atIndex === -1) { + return { urlWithoutAuth: url }; + } + var schemeIndex = url.indexOf("://"); + var authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0; + var auth = url.substring(authStart, atIndex); + var colonIndex = auth.indexOf(":"); + var hasPassword = colonIndex !== -1; + var username = hasPassword ? auth.substring(0, colonIndex) : auth; + var password = hasPassword ? auth.substring(colonIndex + 1) : undefined; + var urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1); + return { + username: username, + password: password, + urlWithoutAuth: urlWithoutAuth + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + __extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options, proxySettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.proxySettings = proxySettings; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (request) { + if (!request.proxySettings && !isBypassed(request.url)) { + request.proxySettings = this.proxySettings; + } + return this._nextPolicy.sendRequest(request); + }; + return ProxyPolicy; +}(BaseRequestPolicy)); +export { ProxyPolicy }; +//# sourceMappingURL=proxyPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js.map new file mode 100644 index 000000000..f7e159672 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/proxyPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.js","sourceRoot":"","sources":["../../../src/policies/proxyPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,IAAI,WAAW,GAAa,EAAE,CAAC;AAC/B,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAChC,IAAI,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;AAE7B,SAAS,yBAAyB;IAChC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;IAED,IAAM,UAAU,GAAG,mBAAmB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAM,QAAQ,GAAG,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1D,IAAM,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAE5D,OAAO,UAAU,IAAI,QAAQ,IAAI,SAAS,CAAC;AAC7C,CAAC;AAED,0IAA0I;AAC1I,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACzB,OAAO,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAC9B;IACD,WAAW,EAAE,CAAC;IACd,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,IAAI,GAAG,U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\n\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { ProxySettings } from \"../serviceClient\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"../util/constants\";\nimport { URLBuilder } from \"../url\";\nimport { getEnvironmentValue } from \"../util/utils\";\n\nlet noProxyList: string[] = [];\nlet isNoProxyInitalized = false;\nlet byPassedList = new Map();\n\nfunction loadEnvironmentProxyValue(): string | undefined {\n if (!process) {\n return undefined;\n }\n\n const httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY);\n const allProxy = getEnvironmentValue(Constants.ALL_PROXY);\n const httpProxy = getEnvironmentValue(Constants.HTTP_PROXY);\n\n return httpsProxy || allProxy || httpProxy;\n}\n\n// Check whether the given `uri` matches the noProxyList. If it matches, any request sent to that same `uri` won't set the proxy settings.\nfunction isBypassed(uri: string) {\n if (byPassedList.has(uri)) {\n return byPassedList.get(uri);\n }\n loadNoProxy();\n let isBypassed = false;\n let host = URLBuilder.parse(uri).getHost()!;\n for (const proxyString of noProxyList) {\n if (proxyString[0] === \".\") {\n if (uri.endsWith(proxyString)) {\n isBypassed = true;\n } else {\n if (host === proxyString.slice(1) && host.length === proxyString.length - 1) {\n isBypassed = true;\n }\n }\n } else {\n if (host === proxyString) {\n isBypassed = true;\n }\n }\n }\n byPassedList.set(uri, isBypassed);\n return isBypassed;\n}\n\nfunction loadNoProxy() {\n if (isNoProxyInitalized) {\n return;\n }\n const noProxy = getEnvironmentValue(Constants.NO_PROXY);\n if (noProxy) {\n let list = noProxy.split(\",\");\n noProxyList = list.map((item) => item.trim()).filter((item) => item.length);\n }\n isNoProxyInitalized = true;\n}\n\nexport function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n\n const { username, password, urlWithoutAuth } = extractAuthFromUrl(proxyUrl);\n const parsedUrl = URLBuilder.parse(urlWithoutAuth);\n const schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + \"://\" : \"\";\n return {\n host: schema + parsedUrl.getHost(),\n port: Number.parseInt(parsedUrl.getPort() || \"80\"),\n username,\n password\n };\n}\n\nexport function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory {\n if (!proxySettings) {\n proxySettings = getDefaultProxySettings();\n }\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new ProxyPolicy(nextPolicy, options, proxySettings!);\n }\n };\n}\n\nfunction extractAuthFromUrl(\n url: string\n): { username?: string; password?: string; urlWithoutAuth: string } {\n const atIndex = url.indexOf(\"@\");\n if (atIndex === -1) {\n return { urlWithoutAuth: url };\n }\n\n const schemeIndex = url.indexOf(\"://\");\n const authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0;\n const auth = url.substring(authStart, atIndex);\n const colonIndex = auth.indexOf(\":\");\n const hasPassword = colonIndex !== -1;\n const username = hasPassword ? auth.substring(0, colonIndex) : auth;\n const password = hasPassword ? auth.substring(colonIndex + 1) : undefined;\n const urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1);\n return {\n username,\n password,\n urlWithoutAuth\n };\n}\n\nexport class ProxyPolicy extends BaseRequestPolicy {\n proxySettings: ProxySettings;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n proxySettings: ProxySettings\n ) {\n super(nextPolicy, options);\n this.proxySettings = proxySettings;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.proxySettings && !isBypassed(request.url)) {\n request.proxySettings = this.proxySettings;\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js b/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js new file mode 100644 index 000000000..9e5ac4680 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { URLBuilder } from "../url"; +import { BaseRequestPolicy } from "./requestPolicy"; +/** + * Methods that are allowed to follow redirects 301 and 302 + */ +var allowedRedirect = ["GET", "HEAD"]; +export var DefaultRedirectOptions = { + handleRedirects: true, + maxRetries: 20 +}; +export function redirectPolicy(maximumRetries) { + if (maximumRetries === void 0) { maximumRetries = 20; } + return { + create: function (nextPolicy, options) { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; +} +var RedirectPolicy = /** @class */ (function (_super) { + __extends(RedirectPolicy, _super); + function RedirectPolicy(nextPolicy, options, maxRetries) { + if (maxRetries === void 0) { maxRetries = 20; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.maxRetries = maxRetries; + return _this; + } + RedirectPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request) + .then(function (response) { return handleRedirect(_this, response, 0); }); + }; + return RedirectPolicy; +}(BaseRequestPolicy)); +export { RedirectPolicy }; +function handleRedirect(policy, response, currentRetries) { + var request = response.request, status = response.status; + var locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + var builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + delete request.body; + } + return policy._nextPolicy + .sendRequest(request) + .then(function (res) { return handleRedirect(policy, res, currentRetries + 1); }); + } + return Promise.resolve(response); +} +//# sourceMappingURL=redirectPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js.map new file mode 100644 index 000000000..37e1599e4 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/redirectPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"redirectPolicy.js","sourceRoot":"","sources":["../../../src/policies/redirectPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,IAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAkBxC,MAAM,CAAC,IAAM,sBAAsB,GAAoB;IACrD,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,cAAmB;IAAnB,+BAAA,EAAA,mBAAmB;IAChD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAoC,kCAAiB;IACnD,wBAAY,UAAyB,EAAE,OAA6B,EAAW,UAAe;QAAf,2BAAA,EAAA,eAAe;QAA9F,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAF8E,gBAAU,GAAV,UAAU,CAAK;;IAE9F,CAAC;IAEM,oCAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAIC;QAHC,OAAO,IAAI,CAAC,WAAW;aACpB,WAAW,CAAC,OAAO,CAAC;aACpB,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,cAAc,CAAC,KAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAjC,CAAiC,CAAC,CAAC;IAC3D,CAAC;IACH,qBAAC;AAAD,CAAC,AAVD,CAAoC,iBAAiB,GAUpD;;AAED,SAAS,cAAc,CACrB,MAAsB,EACtB,QAA+B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IT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { URLBuilder } from \"../url\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\n\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n\n/**\n * Options for how redirect responses are handled.\n */\nexport interface RedirectOptions {\n /*\n * When true, redirect responses are followed. Defaults to true.\n */\n handleRedirects: boolean;\n\n /*\n * The maximum number of times the redirect URL will be tried before\n * failing. Defaults to 20.\n */\n maxRetries?: number;\n}\n\nexport const DefaultRedirectOptions: RedirectOptions = {\n handleRedirects: true,\n maxRetries: 20\n};\n\nexport function redirectPolicy(maximumRetries = 20): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n }\n };\n}\n\nexport class RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, readonly maxRetries = 20) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy\n .sendRequest(request)\n .then((response) => handleRedirect(this, response, 0));\n }\n}\n\nfunction handleRedirect(\n policy: RedirectPolicy,\n response: HttpOperationResponse,\n currentRetries: number\n): Promise {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (\n locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)\n ) {\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n delete request.body;\n }\n\n return policy._nextPolicy\n .sendRequest(request)\n .then((res) => handleRedirect(policy, res, currentRetries + 1));\n }\n\n return Promise.resolve(response);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/requestPolicy.js b/node_modules/@azure/core-http/es/src/policies/requestPolicy.js new file mode 100644 index 000000000..b7bed79e3 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/requestPolicy.js @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +var BaseRequestPolicy = /** @class */ (function () { + function BaseRequestPolicy(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + BaseRequestPolicy.prototype.shouldLog = function (logLevel) { + return this._options.shouldLog(logLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + BaseRequestPolicy.prototype.log = function (logLevel, message) { + this._options.log(logLevel, message); + }; + return BaseRequestPolicy; +}()); +export { BaseRequestPolicy }; +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +var RequestPolicyOptions = /** @class */ (function () { + function RequestPolicyOptions(_logger) { + this._logger = _logger; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + RequestPolicyOptions.prototype.shouldLog = function (logLevel) { + return (!!this._logger && + logLevel !== HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + RequestPolicyOptions.prototype.log = function (logLevel, message) { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + }; + return RequestPolicyOptions; +}()); +export { RequestPolicyOptions }; +//# sourceMappingURL=requestPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/requestPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/requestPolicy.js.map new file mode 100644 index 000000000..bb3e5ae43 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/requestPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"requestPolicy.js","sourceRoot":"","sources":["../../../src/policies/requestPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAc/D;IACE,2BACW,WAA0B,EAC1B,QAAkC;QADlC,gBAAW,GAAX,WAAW,CAAe;QAC1B,aAAQ,GAAR,QAAQ,CAA0B;IAC1C,CAAC;IAIJ;;;;OAIG;IACI,qCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,+BAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AA1BD,IA0BC;;AAsBD;;GAEG;AACH;IACE,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAAG,CAAC;IAEpD;;;;OAIG;IACI,wCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,OAAO;YACd,QAAQ,KAAK,oBAAoB,CAAC,GAAG;YACrC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CACzC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,kCAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACrC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AA3BD,IA2BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { HttpPipelineLogger } from \"../httpPipelineLogger\";\nimport { HttpPipelineLogLevel } from \"../httpPipelineLogLevel\";\nimport { WebResourceLike } from \"../webResource\";\n\n/**\n * Creates a new RequestPolicy per-request that uses the provided nextPolicy.\n */\nexport type RequestPolicyFactory = {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;\n};\n\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise;\n}\n\nexport abstract class BaseRequestPolicy implements RequestPolicy {\n protected constructor(\n readonly _nextPolicy: RequestPolicy,\n readonly _options: RequestPolicyOptionsLike\n ) {}\n\n public abstract sendRequest(webResource: WebResourceLike): Promise;\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return this._options.shouldLog(logLevel);\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n this._options.log(logLevel, message);\n }\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport interface RequestPolicyOptionsLike {\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport class RequestPolicyOptions {\n constructor(private _logger?: HttpPipelineLogger) {}\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return (\n !!this._logger &&\n logLevel !== HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel\n );\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js b/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js new file mode 100644 index 000000000..4bcc54b65 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function rpRegistrationPolicy(retryTimeout) { + if (retryTimeout === void 0) { retryTimeout = 30; } + return { + create: function (nextPolicy, options) { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; +} +var RPRegistrationPolicy = /** @class */ (function (_super) { + __extends(RPRegistrationPolicy, _super); + function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) { + if (_retryTimeout === void 0) { _retryTimeout = 30; } + var _this = _super.call(this, nextPolicy, options) || this; + _this._retryTimeout = _retryTimeout; + return _this; + } + RPRegistrationPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .then(function (response) { return registerIfNeeded(_this, request, response); }); + }; + return RPRegistrationPolicy; +}(BaseRequestPolicy)); +export { RPRegistrationPolicy }; +function registerIfNeeded(policy, request, response) { + if (response.status === 409) { + var rpName = checkRPNotRegisteredError(response.bodyAsText); + if (rpName) { + var urlPrefix = extractSubscriptionUrl(request.url); + return (registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(function () { return false; }) + .then(function (registrationStatus) { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", utils.generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + })); + } + } + return Promise.resolve(response); +} +/** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ +function getRequestEssentials(originalRequest, reuseUrlToo) { + if (reuseUrlToo === void 0) { reuseUrlToo = false; } + var reqOptions = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", utils.generateUuid()); + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + return reqOptions; +} +/** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ +function checkRPNotRegisteredError(body) { + var result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } + catch (err) { + // do nothing; + } + if (responseBody && + responseBody.error && + responseBody.error.message && + responseBody.error.code && + responseBody.error.code === "MissingSubscriptionRegistration") { + var matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; +} +/** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ +function extractSubscriptionUrl(url) { + var result; + var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//gi); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } + else { + throw new Error("Unable to extract subscriptionId from the given url - " + url + "."); + } + return result; +} +/** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ +function registerRP(policy, urlPrefix, provider, originalRequest) { + var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01"; + var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01"; + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + return policy._nextPolicy.sendRequest(reqOptions).then(function (response) { + if (response.status !== 200) { + throw new Error("Autoregistration of " + provider + " failed. Please try registering manually."); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); +} +/** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ +function getRegistrationStatus(policy, url, originalRequest) { + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + return policy._nextPolicy.sendRequest(reqOptions).then(function (res) { + var obj = res.parsedBody; + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } + else { + return utils + .delay(policy._retryTimeout * 1000) + .then(function () { return getRegistrationStatus(policy, url, originalRequest); }); + } + }); +} +//# sourceMappingURL=rpRegistrationPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js.map new file mode 100644 index 000000000..3c9fab0cd --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/rpRegistrationPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpRegistrationPolicy.js","sourceRoot":"","sources":["../../../src/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,oBAAoB,CAAC,YAAiB;IAAjB,6BAAA,EAAA,iBAAiB;IACpD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAA0C,wCAAiB;IACzD,8BACE,UAAyB,EACzB,OAA6B,EACpB,aAAkB;QAAlB,8BAAA,EAAA,kBAAkB;QAH7B,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHU,mBAAa,GAAb,aAAa,CAAK;;IAG7B,CAAC;IAEM,0CAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAIC;QAHC,OAAO,IAAI,CAAC,WAAW;aACpB,WAAW,CAAC,OAAO,CAAC,K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M;YACL,OAAO,KAAK;iBACT,KAAK,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;iBAClC,IAAI,CAAC,cAAM,OAAA,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,EAAnD,CAAmD,CAAC,CAAC;SACpE;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\n\nexport function rpRegistrationPolicy(retryTimeout = 30): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n }\n };\n}\n\nexport class RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n readonly _retryTimeout = 30\n ) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => registerIfNeeded(this, request, response));\n }\n}\n\nfunction registerIfNeeded(\n policy: RPRegistrationPolicy,\n request: WebResourceLike,\n response: HttpOperationResponse\n): Promise {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText as string);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return (\n registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then((registrationStatus) => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n })\n );\n }\n }\n\n return Promise.resolve(response);\n}\n\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param {WebResourceLike} originalRequest The original request\n * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false.\n * @returns {object} A new request object with desired headers.\n */\nfunction getRequestEssentials(\n originalRequest: WebResourceLike,\n reuseUrlToo = false\n): WebResourceLike {\n const reqOptions: WebResourceLike = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n\n return reqOptions;\n}\n\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param {string} body The response body received after making the original request.\n * @returns {string} The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body: string): string {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n } catch (err) {\n // do nothing;\n }\n if (\n responseBody &&\n responseBody.error &&\n responseBody.error.message &&\n responseBody.error.code &&\n responseBody.error.code === \"MissingSubscriptionRegistration\"\n ) {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} url The original request url\n * @returns {string} The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url: string): string {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//gi);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n } else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n\n/**\n * Registers the given provider.\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} provider The provider name to be registered.\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @param {registrationCallback} callback The callback that handles the RP registration\n */\nfunction registerRP(\n policy: RPRegistrationPolicy,\n urlPrefix: string,\n provider: string,\n originalRequest: WebResourceLike\n): Promise {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n\n return policy._nextPolicy.sendRequest(reqOptions).then((response) => {\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n });\n}\n\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} url The request url for polling\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns {Promise} True if RP Registration is successful.\n */\nfunction getRegistrationStatus(\n policy: RPRegistrationPolicy,\n url: string,\n originalRequest: WebResourceLike\n): Promise {\n const reqOptions: any = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n\n return policy._nextPolicy.sendRequest(reqOptions).then((res) => {\n const obj = res.parsedBody as any;\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n } else {\n return utils\n .delay(policy._retryTimeout * 1000)\n .then(() => getRegistrationStatus(policy, url, originalRequest));\n }\n });\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/signingPolicy.js b/node_modules/@azure/core-http/es/src/policies/signingPolicy.js new file mode 100644 index 000000000..0e9825b89 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/signingPolicy.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function signingPolicy(authenticationProvider) { + return { + create: function (nextPolicy, options) { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; +} +var SigningPolicy = /** @class */ (function (_super) { + __extends(SigningPolicy, _super); + function SigningPolicy(nextPolicy, options, authenticationProvider) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.authenticationProvider = authenticationProvider; + return _this; + } + SigningPolicy.prototype.signRequest = function (request) { + return this.authenticationProvider.signRequest(request); + }; + SigningPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this.signRequest(request).then(function (nextRequest) { + return _this._nextPolicy.sendRequest(nextRequest); + }); + }; + return SigningPolicy; +}(BaseRequestPolicy)); +export { SigningPolicy }; +//# sourceMappingURL=signingPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/signingPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/signingPolicy.js.map new file mode 100644 index 000000000..6e41f2e7d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/signingPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signingPolicy.js","sourceRoot":"","sources":["../../../src/policies/signingPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,UAAU,aAAa,CAC3B,sBAAgD;IAEhD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC;QACxE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmC,iCAAiB;IAClD,uBACE,UAAyB,EACzB,OAA6B,EACtB,sBAAgD;QAHzD,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAHQ,4BAAsB,GAAtB,sBAAsB,CAA0B;;IAGzD,CAAC;IAED,mCAAW,GAAX,UAAY,OAAwB;QAClC,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEM,mCAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAIC;QAHC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,WAAW;YAChD,OAAA,KAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC;QAAzC,CAAyC,CAC1C,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAlBD,CAAmC,iBAAiB,GAkBnD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ServiceClientCredentials } from \"../credentials/serviceClientCredentials\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions\n} from \"./requestPolicy\";\n\nexport function signingPolicy(\n authenticationProvider: ServiceClientCredentials\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n }\n };\n}\n\nexport class SigningPolicy extends BaseRequestPolicy {\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n public authenticationProvider: ServiceClientCredentials\n ) {\n super(nextPolicy, options);\n }\n\n signRequest(request: WebResourceLike): Promise {\n return this.authenticationProvider.signRequest(request);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this.signRequest(request).then((nextRequest) =>\n this._nextPolicy.sendRequest(nextRequest)\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js b/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js new file mode 100644 index 000000000..1214c5907 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { shouldRetry, updateRetryData, DEFAULT_CLIENT_MAX_RETRY_INTERVAL, DEFAULT_CLIENT_RETRY_COUNT, DEFAULT_CLIENT_RETRY_INTERVAL, DEFAULT_CLIENT_MIN_RETRY_INTERVAL, isNumber } from "../util/exponentialBackoffStrategy"; +export function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +var SystemErrorRetryPolicy = /** @class */ (function (_super) { + __extends(SystemErrorRetryPolicy, _super); + function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = isNumber(minRetryInterval) + ? minRetryInterval + : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) + ? maxRetryInterval + : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + SystemErrorRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy + .sendRequest(request.clone()) + .catch(function (error) { return retry(_this, request, error.response, error); }); + }; + return SystemErrorRetryPolicy; +}(BaseRequestPolicy)); +export { SystemErrorRetryPolicy }; +function retry(policy, request, operationResponse, err, retryData) { + return __awaiter(this, void 0, void 0, function () { + function shouldPolicyRetry(_response, error) { + if (error && + error.code && + (error.code === "ETIMEDOUT" || + error.code === "ESOCKETTIMEDOUT" || + error.code === "ECONNREFUSED" || + error.code === "ECONNRESET" || + error.code === "ENOENT")) { + return true; + } + return false; + } + var err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + retryData = updateRetryData(policy, retryData, err); + if (!shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) return [3 /*break*/, 5]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, utils.delay(retryData.retryInterval)]; + case 2: + _a.sent(); + return [2 /*return*/, policy._nextPolicy.sendRequest(request.clone())]; + case 3: + err_1 = _a.sent(); + return [2 /*return*/, retry(policy, request, operationResponse, err_1, retryData)]; + case 4: return [3 /*break*/, 6]; + case 5: + if (err) { + // If the operation failed in the end, return all errors instead of just the last one + return [2 /*return*/, Promise.reject(retryData.error)]; + } + return [2 /*return*/, operationResponse]; + case 6: return [2 /*return*/]; + } + }); + }); +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js.map new file mode 100644 index 000000000..593280154 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/systemErrorRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"systemErrorRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings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EAAC;;;oBAGnE,IAAI,GAAG,EAAE;wBACP,qFAAqF;wBACrF,sBAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAC;qBACxC;oBACD,sBAAO,iBAAiB,EAAC;;;;;CAE5B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\nimport {\n RetryData,\n RetryError,\n shouldRetry,\n updateRetryData,\n DEFAULT_CLIENT_MAX_RETRY_INTERVAL,\n DEFAULT_CLIENT_RETRY_COUNT,\n DEFAULT_CLIENT_RETRY_INTERVAL,\n DEFAULT_CLIENT_MIN_RETRY_INTERVAL,\n isNumber\n} from \"../util/exponentialBackoffStrategy\";\n\nexport function systemErrorRetryPolicy(\n retryCount?: number,\n retryInterval?: number,\n minRetryInterval?: number,\n maxRetryInterval?: number\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new SystemErrorRetryPolicy(\n nextPolicy,\n options,\n retryCount,\n retryInterval,\n minRetryInterval,\n maxRetryInterval\n );\n }\n };\n}\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n *\n * @constructor\n * @param {number} retryCount The client retry count.\n * @param {number} retryInterval The client retry interval, in milliseconds.\n * @param {number} minRetryInterval The minimum retry interval, in milliseconds.\n * @param {number} maxRetryInterval The maximum retry interval, in milliseconds.\n */\nexport class SystemErrorRetryPolicy extends BaseRequestPolicy {\n retryCount: number;\n retryInterval: number;\n minRetryInterval: number;\n maxRetryInterval: number;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n retryCount?: number,\n retryInterval?: number,\n minRetryInterval?: number,\n maxRetryInterval?: number\n ) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval)\n ? minRetryInterval\n : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy\n .sendRequest(request.clone())\n .catch((error) => retry(this, request, error.response, error));\n }\n}\n\nasync function retry(\n policy: SystemErrorRetryPolicy,\n request: WebResourceLike,\n operationResponse: HttpOperationResponse,\n err?: RetryError,\n retryData?: RetryData\n): Promise {\n retryData = updateRetryData(policy, retryData, err);\n\n function shouldPolicyRetry(_response?: HttpOperationResponse, error?: RetryError): boolean {\n if (\n error &&\n error.code &&\n (error.code === \"ETIMEDOUT\" ||\n error.code === \"ESOCKETTIMEDOUT\" ||\n error.code === \"ECONNREFUSED\" ||\n error.code === \"ECONNRESET\" ||\n error.code === \"ENOENT\")\n ) {\n return true;\n }\n return false;\n }\n\n if (shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) {\n // If previous operation ended with an error and the policy allows a retry, do that\n try {\n await utils.delay(retryData.retryInterval);\n return policy._nextPolicy.sendRequest(request.clone());\n } catch (err) {\n return retry(policy, request, operationResponse, err, retryData);\n }\n } else {\n if (err) {\n // If the operation failed in the end, return all errors instead of just the last one\n return Promise.reject(retryData.error);\n }\n return operationResponse;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js b/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js new file mode 100644 index 000000000..23687f398 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { Constants } from "../util/constants"; +import { delay } from "../util/utils"; +var StatusCodes = Constants.HttpConstants.StatusCodes; +export function throttlingRetryPolicy() { + return { + create: function (nextPolicy, options) { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; +} +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +var ThrottlingRetryPolicy = /** @class */ (function (_super) { + __extends(ThrottlingRetryPolicy, _super); + function ThrottlingRetryPolicy(nextPolicy, options, _handleResponse) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._handleResponse = _handleResponse || _this._defaultResponseHandler; + return _this; + } + ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } + else { + return _this._handleResponse(httpRequest, response); + } + })]; + }); + }); + }; + ThrottlingRetryPolicy.prototype._defaultResponseHandler = function (httpRequest, httpResponse) { + return __awaiter(this, void 0, void 0, function () { + var retryAfterHeader, delayInMs; + var _this = this; + return __generator(this, function (_a) { + retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + if (retryAfterHeader) { + delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return [2 /*return*/, delay(delayInMs).then(function (_) { return _this._nextPolicy.sendRequest(httpRequest); })]; + } + } + return [2 /*return*/, httpResponse]; + }); + }); + }; + ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) { + var retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } + else { + return retryAfterInSeconds * 1000; + } + }; + ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) { + try { + var now = Date.now(); + var date = Date.parse(headerValue); + var diff = date - now; + return Number.isNaN(diff) ? undefined : diff; + } + catch (error) { + return undefined; + } + }; + return ThrottlingRetryPolicy; +}(BaseRequestPolicy)); +export { ThrottlingRetryPolicy }; +//# sourceMappingURL=throttlingRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js.map new file mode 100644 index 000000000..3347e1454 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/throttlingRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttlingRetryPolicy.js","sourceRoot":"","sources":["../../../src/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAMtC,IAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;AAExD,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH;IAA2C,yCAAiB;IAG1D,+BACE,UAAyB,EACzB,OAA6B,EAC7B,eAAiC;QAHnC,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,eAAe,GAAG,eAAe,IAAI,KAAI,C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,EAAE,CAAC;YAC/B,IAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAC7C,IAAM,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;YAExB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AA9DD,CAA2C,iBAAiB,GA8D3D","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyOptions,\n RequestPolicyFactory\n} from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { delay } from \"../util/utils\";\n\ntype ResponseHandler = (\n httpRequest: WebResourceLike,\n response: HttpOperationResponse\n) => Promise;\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n\nexport function throttlingRetryPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nexport class ThrottlingRetryPolicy extends BaseRequestPolicy {\n private _handleResponse: ResponseHandler;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n _handleResponse?: ResponseHandler\n ) {\n super(nextPolicy, options);\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n\n public async sendRequest(httpRequest: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(httpRequest.clone()).then((response) => {\n if (response.status !== StatusCodes.TooManyRequests) {\n return response;\n } else {\n return this._handleResponse(httpRequest, response);\n }\n });\n }\n\n private async _defaultResponseHandler(\n httpRequest: WebResourceLike,\n httpResponse: HttpOperationResponse\n ): Promise {\n const retryAfterHeader: string | undefined = httpResponse.headers.get(\n Constants.HeaderConstants.RETRY_AFTER\n );\n\n if (retryAfterHeader) {\n const delayInMs: number | undefined = ThrottlingRetryPolicy.parseRetryAfterHeader(\n retryAfterHeader\n );\n if (delayInMs) {\n return delay(delayInMs).then((_: any) => this._nextPolicy.sendRequest(httpRequest));\n }\n }\n\n return httpResponse;\n }\n\n public static parseRetryAfterHeader(headerValue: string): number | undefined {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n } else {\n return retryAfterInSeconds * 1000;\n }\n }\n\n public static parseDateRetryAfterHeader(headerValue: string): number | undefined {\n try {\n const now: number = Date.now();\n const date: number = Date.parse(headerValue);\n const diff = date - now;\n\n return Number.isNaN(diff) ? undefined : diff;\n } catch (error) {\n return undefined;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js b/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js new file mode 100644 index 000000000..de6132d1b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { getTracer, getTraceParentHeader } from "@azure/core-tracing"; +import { SpanKind } from "@opentelemetry/api"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { URLBuilder } from "../url"; +export function tracingPolicy(tracingOptions) { + if (tracingOptions === void 0) { tracingOptions = {}; } + return { + create: function (nextPolicy, options) { + return new TracingPolicy(nextPolicy, options, tracingOptions); + } + }; +} +var TracingPolicy = /** @class */ (function (_super) { + __extends(TracingPolicy, _super); + function TracingPolicy(nextPolicy, options, tracingOptions) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.userAgent = tracingOptions.userAgent; + return _this; + } + TracingPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var tracer, spanOptions, path, span, spanContext, traceParentHeader, traceState, response, serviceRequestId, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!request.spanOptions || !request.spanOptions.parent) { + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + } + tracer = getTracer(); + spanOptions = __assign(__assign({}, request.spanOptions), { kind: SpanKind.CLIENT }); + path = URLBuilder.parse(request.url).getPath() || "/"; + span = tracer.startSpan(path, spanOptions); + span.setAttributes({ + "http.method": request.method, + "http.url": request.url, + requestId: request.requestId + }); + if (this.userAgent) { + span.setAttribute("http.user_agent", this.userAgent); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + spanContext = span.context(); + traceParentHeader = getTraceParentHeader(spanContext); + if (traceParentHeader) { + request.headers.set("traceparent", traceParentHeader); + traceState = spanContext.traceState && spanContext.traceState.serialize(); + // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent + if (traceState) { + request.headers.set("tracestate", traceState); + } + } + return [4 /*yield*/, this._nextPolicy.sendRequest(request)]; + case 2: + response = _a.sent(); + span.setAttribute("http.status_code", response.status); + serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); + } + span.end(); + return [2 /*return*/, response]; + case 3: + err_1 = _a.sent(); + span.end(); + throw err_1; + case 4: return [2 /*return*/]; + } + }); + }); + }; + return TracingPolicy; +}(BaseRequestPolicy)); +export { TracingPolicy }; +//# sourceMappingURL=tracingPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js.map new file mode 100644 index 000000000..9808e366c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/tracingPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracingPolicy.js","sourceRoot":"","sources":["../../../src/policies/tracingPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAe,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAIL,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAMpC,MAAM,UAAU,aAAa,CAAC,cAAyC;IAAzC,+BAAA,EAAA,mBAAyC;IACrE,OAAO;QACL,MAAM,EAAN,UAAO,UAAyB,EAAE,OAA6B;YAC7D,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmC,iCAAiB;IAGlD,uBACE,UAAyB,EACzB,OAA6B,EAC7B,cAAoC;QAHtC,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;;IAC5C,CAAC;IAEY,mCAAW,GAAxB,UAAyB,OAAwB;;;;;;wBAC/C,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE;4BACvD,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;yBAC9C;wBAGK,MAAM,GAAG,SAAS,EAAE,CAAC;wBACrB,WAAW,yBACZ,OAAO,CAAC,WAAW,KACtB,IAAI,EAAE,QAAQ,CAAC,MAAM,GACtB,CAAC;wBACI,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE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EhB,IAAI,CAAC,GAAG,EAAE,CAAC;wBACX,MAAM,KAAG,CAAC;;;;;KAEb;IACH,oBAAC;AAAD,CAAC,AA7DD,CAAmC,iBAAiB,GA6DnD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getTracer, getTraceParentHeader } from \"@azure/core-tracing\";\nimport { SpanOptions, SpanKind } from \"@opentelemetry/api\";\nimport {\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n BaseRequestPolicy\n} from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { URLBuilder } from \"../url\";\n\nexport interface TracingPolicyOptions {\n userAgent?: string;\n}\n\nexport function tracingPolicy(tracingOptions: TracingPolicyOptions = {}): RequestPolicyFactory {\n return {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n return new TracingPolicy(nextPolicy, options, tracingOptions);\n }\n };\n}\n\nexport class TracingPolicy extends BaseRequestPolicy {\n private userAgent?: string;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n tracingOptions: TracingPolicyOptions\n ) {\n super(nextPolicy, options);\n this.userAgent = tracingOptions.userAgent;\n }\n\n public async sendRequest(request: WebResourceLike): Promise {\n if (!request.spanOptions || !request.spanOptions.parent) {\n return this._nextPolicy.sendRequest(request);\n }\n\n // create a new span\n const tracer = getTracer();\n const spanOptions: SpanOptions = {\n ...request.spanOptions,\n kind: SpanKind.CLIENT\n };\n const path = URLBuilder.parse(request.url).getPath() || \"/\";\n const span = tracer.startSpan(path, spanOptions);\n span.setAttributes({\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId\n });\n\n if (this.userAgent) {\n span.setAttribute(\"http.user_agent\", this.userAgent);\n }\n\n try {\n // set headers\n const spanContext = span.context();\n const traceParentHeader = getTraceParentHeader(spanContext);\n if (traceParentHeader) {\n request.headers.set(\"traceparent\", traceParentHeader);\n const traceState = spanContext.traceState && spanContext.traceState.serialize();\n // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent\n if (traceState) {\n request.headers.set(\"tracestate\", traceState);\n }\n }\n\n const response = await this._nextPolicy.sendRequest(request);\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.end();\n return response;\n } catch (err) {\n span.end();\n throw err;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js b/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js new file mode 100644 index 000000000..bfde5a3cc --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { HttpHeaders } from "../httpHeaders"; +import { Constants } from "../util/constants"; +import { getDefaultUserAgentKey, getPlatformSpecificData } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy } from "./requestPolicy"; +function getRuntimeInfo() { + var msRestRuntime = { + key: "core-http", + value: Constants.coreHttpVersion + }; + return [msRestRuntime]; +} +function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) { + if (keySeparator === void 0) { keySeparator = " "; } + if (valueSeparator === void 0) { valueSeparator = "/"; } + return telemetryInfo + .map(function (info) { + var value = info.value ? "" + valueSeparator + info.value : ""; + return "" + info.key + value; + }) + .join(keySeparator); +} +export var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; +export function getDefaultUserAgentValue() { + var runtimeInfo = getRuntimeInfo(); + var platformSpecificData = getPlatformSpecificData(); + var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; +} +export function userAgentPolicy(userAgentData) { + var key = !userAgentData || userAgentData.key === undefined || userAgentData.key === null + ? getDefaultUserAgentKey() + : userAgentData.key; + var value = !userAgentData || userAgentData.value === undefined || userAgentData.value === null + ? getDefaultUserAgentValue() + : userAgentData.value; + return { + create: function (nextPolicy, options) { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; +} +var UserAgentPolicy = /** @class */ (function (_super) { + __extends(UserAgentPolicy, _super); + function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) { + var _this = _super.call(this, _nextPolicy, _options) || this; + _this._nextPolicy = _nextPolicy; + _this._options = _options; + _this.headerKey = headerKey; + _this.headerValue = headerValue; + return _this; + } + UserAgentPolicy.prototype.sendRequest = function (request) { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + }; + UserAgentPolicy.prototype.addUserAgentHeader = function (request) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + }; + return UserAgentPolicy; +}(BaseRequestPolicy)); +export { UserAgentPolicy }; +//# sourceMappingURL=userAgentPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js.map b/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js.map new file mode 100644 index 000000000..5ff6a4f3c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/policies/userAgentPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../src/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAezB,SAAS,cAAc;IACrB,IAAM,aAAa,GAAG;QACpB,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,SAAS,CAAC,eAAe;KACjC,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,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAqC,mCAAiB;IACpD,yBACW,WAA0B,EAC1B,QAA8B,EAC7B,SAAiB,EACjB,WAAmB;QAJ/B,YAME,kBAAM,WAAW,EAAE,QAAQ,CAAC,SAC7B;QANU,iBAAW,GAAX,WAAW,CAAe;QAC1B,cAAQ,GAAR,QAAQ,CAAsB;QAC7B,eAAS,GAAT,SAAS,CAAQ;QACjB,iBAAW,GAAX,WAAW,CAAQ;;IAG/B,CAAC;IAED,qCAAW,GAAX,UAAY,OAAwB;QAClC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED,4CAAkB,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,OAAO,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;SACrC;QAED,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE;YAC5D,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SACvD;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAxBD,CAAqC,iBAAiB,GAwBrD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { getDefaultUserAgentKey, getPlatformSpecificData } from \"./msRestUserAgentPolicy\";\nimport {\n BaseRequestPolicy,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./requestPolicy\";\n\nexport type TelemetryInfo = { key?: string; value?: string };\n\n/**\n * Options for adding user agent details to outgoing requests.\n */\nexport interface UserAgentOptions {\n /*\n * String prefix to add to the user agent for outgoing requests.\n * Defaults to an empty string.\n */\n userAgentPrefix?: string;\n}\n\nfunction getRuntimeInfo(): TelemetryInfo[] {\n const msRestRuntime = {\n key: \"core-http\",\n value: Constants.coreHttpVersion\n };\n\n return [msRestRuntime];\n}\n\nfunction getUserAgentString(\n telemetryInfo: TelemetryInfo[],\n keySeparator = \" \",\n valueSeparator = \"/\"\n): string {\n return telemetryInfo\n .map((info) => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n })\n .join(keySeparator);\n}\n\nexport const getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n\nexport function getDefaultUserAgentValue(): string {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n\nexport function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory {\n const key: string =\n !userAgentData || userAgentData.key === undefined || userAgentData.key === null\n ? getDefaultUserAgentKey()\n : userAgentData.key;\n const value: string =\n !userAgentData || userAgentData.value === undefined || userAgentData.value === null\n ? getDefaultUserAgentValue()\n : userAgentData.value;\n\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n }\n };\n}\n\nexport class UserAgentPolicy extends BaseRequestPolicy {\n constructor(\n readonly _nextPolicy: RequestPolicy,\n readonly _options: RequestPolicyOptions,\n protected headerKey: string,\n protected headerValue: string\n ) {\n super(_nextPolicy, _options);\n }\n\n sendRequest(request: WebResourceLike): Promise {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n\n addUserAgentHeader(request: WebResourceLike): void {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/proxyAgent.js b/node_modules/@azure/core-http/es/src/proxyAgent.js new file mode 100644 index 000000000..26f7be091 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/proxyAgent.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import * as tunnel from "tunnel"; +import { URLBuilder } from "./url"; +export function createProxyAgent(requestUrl, proxySettings, headers) { + var host = URLBuilder.parse(proxySettings.host).getHost(); + if (!host) { + throw new Error("Expecting a non-empty host in proxy settings."); + } + if (!isValidPort(proxySettings.port)) { + throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings."); + } + var tunnelOptions = { + proxy: { + host: host, + port: proxySettings.port, + headers: (headers && headers.rawHeaders()) || {} + } + }; + if (proxySettings.username && proxySettings.password) { + tunnelOptions.proxy.proxyAuth = proxySettings.username + ":" + proxySettings.password; + } + var isRequestHttps = isUrlHttps(requestUrl); + var isProxyHttps = isUrlHttps(proxySettings.host); + var proxyAgent = { + isHttps: isRequestHttps, + agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) + }; + return proxyAgent; +} +export function isUrlHttps(url) { + var urlScheme = URLBuilder.parse(url).getScheme() || ""; + return urlScheme.toLowerCase() === "https"; +} +export function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) { + if (isRequestHttps && isProxyHttps) { + return tunnel.httpsOverHttps(tunnelOptions); + } + else if (isRequestHttps && !isProxyHttps) { + return tunnel.httpsOverHttp(tunnelOptions); + } + else if (!isRequestHttps && isProxyHttps) { + return tunnel.httpOverHttps(tunnelOptions); + } + else { + return tunnel.httpOverHttp(tunnelOptions); + } +} +function isValidPort(port) { + // any port in 0-65535 range is valid (RFC 793) even though almost all implementations + // will reserve 0 for a specific purpose, and a range of numbers for ephemeral ports + return 0 <= port && port <= 65535; +} +//# sourceMappingURL=proxyAgent.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/proxyAgent.js.map b/node_modules/@azure/core-http/es/src/proxyAgent.js.map new file mode 100644 index 000000000..e43369436 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/proxyAgent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyAgent.js","sourceRoot":"","sources":["../../src/proxyAgent.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,MAAM,UAAU,gBAAgB,CAC9B,UAAkB,EAClB,aAA4B,EAC5B,OAAyB;IAEzB,IAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAY,CAAC;IACtE,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IACD,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;QACpC,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;KAChG;IACD,IAAM,aAAa,GAAiC;QAClD,KAAK,EAAE;YACL,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,OAAO,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE;SACjD;KACF,CAAC;IAEF,IAAI,aAAa,CAAC,QAAQ,IAAI,aAAa,CAAC,QAAQ,EAAE;QACpD,aAAa,CAAC,KAAM,CAAC,SAAS,GAAM,aAAa,CAAC,QAAQ,SAAI,aAAa,CAAC,QAAU,CAAC;KACxF;IAED,IAAM,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpD,IAAM,UAAU,GAAG;QACjB,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,YAAY,CAAC,cAAc,EAAE,YAAY,EAAE,aAAa,CAAC;KACjE,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;IAC1D,OAAO,SAAS,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,cAAuB,EACvB,YAAqB,EACrB,aAA2C;IAE3C,IAAI,cAAc,IAAI,YAAY,EAAE;QAClC,OAAO,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;KAC7C;SAAM,IAAI,cAAc,IAAI,CAAC,YAAY,EAAE;QAC1C,OAAO,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;KAC5C;SAAM,IAAI,CAAC,cAAc,IAAI,YAAY,EAAE;QAC1C,OAAO,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;KAC5C;SAAM;QACL,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;KAC3C;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,sFAAsF;IACtF,oFAAoF;IACpF,OAAO,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport * as tunnel from \"tunnel\";\n\nimport { ProxySettings } from \"./serviceClient\";\nimport { URLBuilder } from \"./url\";\nimport { HttpHeadersLike } from \"./httpHeaders\";\n\nexport type ProxyAgent = { isHttps: boolean; agent: http.Agent | https.Agent };\nexport function createProxyAgent(\n requestUrl: string,\n proxySettings: ProxySettings,\n headers?: HttpHeadersLike\n): ProxyAgent {\n const host = URLBuilder.parse(proxySettings.host).getHost() as string;\n if (!host) {\n throw new Error(\"Expecting a non-empty host in proxy settings.\");\n }\n if (!isValidPort(proxySettings.port)) {\n throw new Error(\"Expecting a valid port number in the range of [0, 65535] in proxy settings.\");\n }\n const tunnelOptions: tunnel.HttpsOverHttpsOptions = {\n proxy: {\n host: host,\n port: proxySettings.port,\n headers: (headers && headers.rawHeaders()) || {}\n }\n };\n\n if (proxySettings.username && proxySettings.password) {\n tunnelOptions.proxy!.proxyAuth = `${proxySettings.username}:${proxySettings.password}`;\n }\n\n const isRequestHttps = isUrlHttps(requestUrl);\n const isProxyHttps = isUrlHttps(proxySettings.host);\n\n const proxyAgent = {\n isHttps: isRequestHttps,\n agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions)\n };\n\n return proxyAgent;\n}\n\nexport function isUrlHttps(url: string): boolean {\n const urlScheme = URLBuilder.parse(url).getScheme() || \"\";\n return urlScheme.toLowerCase() === \"https\";\n}\n\nexport function createTunnel(\n isRequestHttps: boolean,\n isProxyHttps: boolean,\n tunnelOptions: tunnel.HttpsOverHttpsOptions\n): http.Agent | https.Agent {\n if (isRequestHttps && isProxyHttps) {\n return tunnel.httpsOverHttps(tunnelOptions);\n } else if (isRequestHttps && !isProxyHttps) {\n return tunnel.httpsOverHttp(tunnelOptions);\n } else if (!isRequestHttps && isProxyHttps) {\n return tunnel.httpOverHttps(tunnelOptions);\n } else {\n return tunnel.httpOverHttp(tunnelOptions);\n }\n}\n\nfunction isValidPort(port: number): boolean {\n // any port in 0-65535 range is valid (RFC 793) even though almost all implementations\n // will reserve 0 for a specific purpose, and a range of numbers for ephemeral ports\n return 0 <= port && port <= 65535;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/queryCollectionFormat.js b/node_modules/@azure/core-http/es/src/queryCollectionFormat.js new file mode 100644 index 000000000..8b850a797 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/queryCollectionFormat.js @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export var QueryCollectionFormat; +(function (QueryCollectionFormat) { + QueryCollectionFormat["Csv"] = ","; + QueryCollectionFormat["Ssv"] = " "; + QueryCollectionFormat["Tsv"] = "\t"; + QueryCollectionFormat["Pipes"] = "|"; + QueryCollectionFormat["Multi"] = "Multi"; +})(QueryCollectionFormat || (QueryCollectionFormat = {})); +//# sourceMappingURL=queryCollectionFormat.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/queryCollectionFormat.js.map b/node_modules/@azure/core-http/es/src/queryCollectionFormat.js.map new file mode 100644 index 000000000..a2b984cf2 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/queryCollectionFormat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"queryCollectionFormat.js","sourceRoot":"","sources":["../../src/queryCollectionFormat.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,mCAAU,CAAA;IACV,oCAAW,CAAA;IACX,wCAAe,CAAA;AACjB,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport enum QueryCollectionFormat {\n Csv = \",\",\n Ssv = \" \",\n Tsv = \"\\t\",\n Pipes = \"|\",\n Multi = \"Multi\"\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/restError.js b/node_modules/@azure/core-http/es/src/restError.js new file mode 100644 index 000000000..d4e9f6568 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/restError.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { custom } from "./util/inspect"; +import { Sanitizer } from "./util/sanitizer"; +var errorSanitizer = new Sanitizer(); +var RestError = /** @class */ (function (_super) { + __extends(RestError, _super); + function RestError(message, code, statusCode, request, response) { + var _this = _super.call(this, message) || this; + _this.name = "RestError"; + _this.code = code; + _this.statusCode = statusCode; + _this.request = request; + _this.response = response; + Object.setPrototypeOf(_this, RestError.prototype); + return _this; + } + /** + * Logging method for util.inspect in Node + */ + RestError.prototype[custom] = function () { + return "RestError: " + this.message + " \n " + errorSanitizer.sanitize(this); + }; + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + return RestError; +}(Error)); +export { RestError }; +//# sourceMappingURL=restError.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/restError.js.map b/node_modules/@azure/core-http/es/src/restError.js.map new file mode 100644 index 000000000..ddcd12106 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/restError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"restError.js","sourceRoot":"","sources":["../../src/restError.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,IAAM,cAAc,GAAG,IAAI,SAAS,EAAE,CAAC;AAEvC;IAA+B,6BAAK;IASlC,mBACE,OAAe,EACf,IAAa,EACb,UAAmB,EACnB,OAAyB,EACzB,QAAgC;QALlC,YAOE,kBAAM,OAAO,CAAC,SAQf;QAPC,KAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;;IACnD,CAAC;IAED;;OAEG;IACH,oBAAC,MAAM,CAAC,GAAR;QACE,OAAO,gBAAc,IAAI,CAAC,OAAO,YAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAG,CAAC;IAC1E,CAAC;IA9Be,4BAAkB,GAAW,oBAAoB,CAAC;IAClD,qBAAW,GAAW,aAAa,CAAC;IA8BtD,gBAAC;CAAA,AAhCD,CAA+B,KAAK,GAgCnC;SAhCY,SAAS","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\nimport { custom } from \"./util/inspect\";\nimport { Sanitizer } from \"./util/sanitizer\";\n\nconst errorSanitizer = new Sanitizer();\n\nexport class RestError extends Error {\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n code?: string;\n statusCode?: number;\n request?: WebResourceLike;\n response?: HttpOperationResponse;\n details?: unknown;\n constructor(\n message: string,\n code?: string,\n statusCode?: number,\n request?: WebResourceLike,\n response?: HttpOperationResponse\n ) {\n super(message);\n this.name = \"RestError\";\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n\n /**\n * Logging method for util.inspect in Node\n */\n [custom](): string {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/serializer.js b/node_modules/@azure/core-http/es/src/serializer.js new file mode 100644 index 000000000..dcd9d1ed1 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/serializer.js @@ -0,0 +1,898 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/* eslint-disable eqeqeq */ +import { __assign } from "tslib"; +import * as base64 from "./util/base64"; +import * as utils from "./util/utils"; +import { XML_ATTRKEY, XML_CHARKEY } from "./util/serializer.common"; +var Serializer = /** @class */ (function () { + function Serializer(modelMappers, isXML) { + if (modelMappers === void 0) { modelMappers = {}; } + this.modelMappers = modelMappers; + this.isXML = isXML; + } + Serializer.prototype.validateConstraints = function (mapper, value, objectName) { + var failValidation = function (constraintName, constraintValue) { + throw new Error("\"" + objectName + "\" with value \"" + value + "\" should satisfy the constraint \"" + constraintName + "\": " + constraintValue + "."); + }; + if (mapper.constraints && value != undefined) { + var _a = mapper.constraints, ExclusiveMaximum = _a.ExclusiveMaximum, ExclusiveMinimum = _a.ExclusiveMinimum, InclusiveMaximum = _a.InclusiveMaximum, InclusiveMinimum = _a.InclusiveMinimum, MaxItems = _a.MaxItems, MaxLength = _a.MaxLength, MinItems = _a.MinItems, MinLength = _a.MinLength, MultipleOf = _a.MultipleOf, Pattern = _a.Pattern, UniqueItems = _a.UniqueItems; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + var pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && + value.some(function (item, i, ar) { return ar.indexOf(item) !== i; })) { + failValidation("UniqueItems", UniqueItems); + } + } + }; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @param {options} options additional options to deserialization + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + Serializer.prototype.serialize = function (mapper, object, objectName, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + var payload = {}; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/i) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + var required = mapper.required, nullable = mapper.nullable; + if (required && nullable && object === undefined) { + throw new Error(objectName + " cannot be undefined."); + } + if (required && !nullable && object == undefined) { + throw new Error(objectName + " cannot be null or undefined."); + } + if (!required && nullable === false && object === null) { + throw new Error(objectName + " cannot be null."); + } + if (object == undefined) { + payload = object; + } + else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/i) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/i) !== null) { + var enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Composite$/i) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + } + return payload; + }; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @param options Controls behavior of XML parser and builder. + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + Serializer.prototype.deserialize = function (mapper, responseBody, objectName, options) { + var _a, _b, _c; + if (options === void 0) { options = {}; } + var updatedOptions = { + rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + var payload; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/i) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + } + else { + if (this.isXML) { + var xmlCharKey = updatedOptions.xmlCharKey; + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, + * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. + */ + if (responseBody[XML_ATTRKEY] != undefined && responseBody[xmlCharKey] != undefined) { + responseBody = responseBody[xmlCharKey]; + } + } + if (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/i) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/i) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = base64.decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + }; + return Serializer; +}()); +export { Serializer }; +function trimEnd(str, ch) { + var len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error("Please provide an input of type Uint8Array for converting to Base64Url."); + } + // Uint8Array to Base64. + var str = base64.encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=") + .replace(/\+/g, "-") + .replace(/\//g, "_"); +} +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/-/g, "+").replace(/_/g, "/"); + // Base64 to Uint8Array. + return base64.decodeString(str); +} +function splitSerializeName(prop) { + var classes = []; + var partialclass = ""; + if (prop) { + var subwords = prop.split("."); + for (var _i = 0, subwords_1 = subwords; _i < subwords_1.length; _i++) { + var item = subwords_1[_i]; + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; +} +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); +} +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") { + throw new Error(objectName + " with value " + value + " must be of type number."); + } + } + else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(objectName + " with value \"" + value + "\" must be of type string."); + } + } + else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && utils.isValidUuid(value))) { + throw new Error(objectName + " with value \"" + value + "\" must be of type string and a valid uuid."); + } + } + else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") { + throw new Error(objectName + " with value " + value + " must be of type boolean."); + } + } + else if (typeName.match(/^Stream$/i) !== null) { + var objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob)) { + throw new Error(objectName + " must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."); + } + } + } + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error("Please provide a set of allowedValues to validate " + objectName + " as an Enum Type."); + } + var isPresent = allowedValues.some(function (item) { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(value + " is not a valid value for " + objectName + ". The valid values are: " + JSON.stringify(allowedValues) + "."); + } + return value; +} +function serializeByteArrayType(objectName, value) { + var returnValue = ""; + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + returnValue = base64.encodeByteArray(value); + } + return returnValue; +} +function serializeBase64UrlType(objectName, value) { + var returnValue = ""; + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + returnValue = bufferToBase64Url(value) || ""; + } + return returnValue; +} +function serializeDateTypes(typeName, value, objectName) { + if (value != undefined) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = + value instanceof Date + ? value.toISOString().substring(0, 10) + : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123 format."); + } + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123/ISO8601 format " + + "for it to be serialized in UnixTime/Epoch format."); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!utils.isDuration(value)) { + throw new Error(objectName + " must be a string in ISO 8601 format. Instead was \"" + value + "\"."); + } + } + } + return value; +} +function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + var _a, _b; + if (!Array.isArray(object)) { + throw new Error(objectName + " must be of type Array."); + } + var elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempArray = []; + for (var i = 0; i < object.length; i++) { + var serializedValue = serializer.serialize(elementType, object[i], objectName, options); + if (isXml && elementType.xmlNamespace) { + var xmlnsKey = elementType.xmlNamespacePrefix + ? "xmlns:" + elementType.xmlNamespacePrefix + : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = __assign({}, serializedValue); + tempArray[i][XML_ATTRKEY] = (_a = {}, _a[xmlnsKey] = elementType.xmlNamespace, _a); + } + else { + tempArray[i] = {}; + tempArray[i][options.xmlCharKey] = serializedValue; + tempArray[i][XML_ATTRKEY] = (_b = {}, _b[xmlnsKey] = elementType.xmlNamespace, _b); + } + } + else { + tempArray[i] = serializedValue; + } + } + return tempArray; +} +function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { + var _a; + if (typeof object !== "object") { + throw new Error(objectName + " must be of type object."); + } + var valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempDictionary = {}; + for (var _i = 0, _b = Object.keys(object); _i < _b.length; _i++) { + var key = _b[_i]; + var serializedValue = serializer.serialize(valueType, object[key], objectName, options); + // If the element needs an XML namespace we need to add it within the $ property + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); + } + // Add the namespace to the root element if needed + if (isXml && mapper.xmlNamespace) { + var xmlnsKey = mapper.xmlNamespacePrefix ? "xmlns:" + mapper.xmlNamespacePrefix : "xmlns"; + return __assign(__assign({}, tempDictionary), { $: (_a = {}, _a[xmlnsKey] = mapper.xmlNamespace, _a) }); + } + return tempDictionary; +} +/** + * Resolves the additionalProperties property from a referenced mapper + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + * @param objectName name of the object being serialized + */ +function resolveAdditionalProperties(serializer, mapper, objectName) { + var additionalProperties = mapper.type.additionalProperties; + if (!additionalProperties && mapper.type.className) { + var modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + } + return additionalProperties; +} +/** + * Finds the mapper referenced by className + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + * @param objectName name of the object being serialized + */ +function resolveReferencedMapper(serializer, mapper, objectName) { + var className = mapper.type.className; + if (!className) { + throw new Error("Class name for model \"" + objectName + "\" is not provided in the mapper \"" + JSON.stringify(mapper, undefined, 2) + "\"."); + } + return serializer.modelMappers[className]; +} +/** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ +function resolveModelProperties(serializer, mapper, objectName) { + var modelProps = mapper.type.modelProperties; + if (!modelProps) { + var modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) { + throw new Error("mapper() cannot be null or undefined for model \"" + mapper.type.className + "\"."); + } + modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error("modelProperties cannot be null or undefined in the " + + ("mapper \"" + JSON.stringify(modelMapper) + "\" of type \"" + mapper.type.className + "\" for object \"" + objectName + "\".")); + } + } + return modelProps; +} +function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + var _a, _b; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object != undefined) { + var payload = {}; + var modelProps = resolveModelProperties(serializer, mapper, objectName); + for (var _i = 0, _c = Object.keys(modelProps); _i < _c.length; _i++) { + var key = _c[_i]; + var propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + var propName = void 0; + var parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + var paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (var _d = 0, paths_1 = paths; _d < paths_1.length; _d++) { + var pathName = paths_1[_d]; + var childObject = parentObject[pathName]; + if (childObject == undefined && + (object[key] != undefined || propertyMapper.defaultValue !== undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject != undefined) { + if (isXml && mapper.xmlNamespace) { + var xmlnsKey = mapper.xmlNamespacePrefix + ? "xmlns:" + mapper.xmlNamespacePrefix + : "xmlns"; + parentObject[XML_ATTRKEY] = __assign(__assign({}, parentObject[XML_ATTRKEY]), (_a = {}, _a[xmlnsKey] = mapper.xmlNamespace, _a)); + } + var propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + var toSerialize = object[key]; + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && + polymorphicDiscriminator.clientName === key && + toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + var serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); + if (serializedValue !== undefined && propName != undefined) { + var value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); + if (isXml && propertyMapper.xmlIsAttribute) { + // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {}; + parentObject[XML_ATTRKEY][propName] = serializedValue; + } + else if (isXml && propertyMapper.xmlIsWrapped) { + parentObject[propName] = (_b = {}, _b[propertyMapper.xmlElementName] = value, _b); + } + else { + parentObject[propName] = value; + } + } + } + } + var additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + var propNames = Object.keys(modelProps); + var _loop_1 = function (clientPropName) { + var isAdditionalProperty = propNames.every(function (pn) { return pn !== clientPropName; }); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + } + }; + for (var clientPropName in object) { + _loop_1(clientPropName); + } + } + return payload; + } + return object; +} +function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { + var _a; + if (!isXml || !propertyMapper.xmlNamespace) { + return serializedValue; + } + var xmlnsKey = propertyMapper.xmlNamespacePrefix + ? "xmlns:" + propertyMapper.xmlNamespacePrefix + : "xmlns"; + var xmlNamespace = (_a = {}, _a[xmlnsKey] = propertyMapper.xmlNamespace, _a); + if (["Composite"].includes(propertyMapper.type.name)) { + if (serializedValue[XML_ATTRKEY]) { + return serializedValue; + } + else { + var result_1 = __assign({}, serializedValue); + result_1[XML_ATTRKEY] = xmlNamespace; + return result_1; + } + } + var result = {}; + result[options.xmlCharKey] = serializedValue; + result[XML_ATTRKEY] = xmlNamespace; + return result; +} +function isSpecialXmlProperty(propertyName, options) { + return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName); +} +function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { + var _a; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + var modelProps = resolveModelProperties(serializer, mapper, objectName); + var instance = {}; + var handledPropertyNames = []; + for (var _i = 0, _b = Object.keys(modelProps); _i < _b.length; _i++) { + var key = _b[_i]; + var propertyMapper = modelProps[key]; + var paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + var serializedName = propertyMapper.serializedName, xmlName = propertyMapper.xmlName, xmlElementName = propertyMapper.xmlElementName; + var propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + var headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + var dictionary = {}; + for (var _c = 0, _d = Object.keys(responseBody); _c < _d.length; _c++) { + var headerKey = _d[_c]; + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) { + instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options); + } + else { + var propertyName = xmlElementName || xmlName || serializedName; + if (propertyMapper.xmlIsWrapped) { + /* a list of wrapped by + For the xml example below + + ... + ... + + the responseBody has + { + Cors: { + CorsRule: [{...}, {...}] + } + } + xmlName is "Cors" and xmlElementName is"CorsRule". + */ + var wrapped = responseBody[xmlName]; + var elementList = (_a = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _a !== void 0 ? _a : []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + } + else { + var property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); + } + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + var propertyInstance = void 0; + var res = responseBody; + // traversing the object step by step. + for (var _e = 0, paths_2 = paths; _e < paths_2.length; _e++) { + var item = paths_2[_e]; + if (!res) + break; + res = res[item]; + } + propertyInstance = res; + var polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && + key === polymorphicDiscriminator.clientName && + propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + var serializedValue = void 0; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + instance[key] = serializedValue; + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var isAdditionalProperty = function (responsePropName) { + for (var clientPropName in modelProps) { + var paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (var responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + } + } + } + else if (responseBody) { + for (var _f = 0, _g = Object.keys(responseBody); _f < _g.length; _f++) { + var key = _g[_f]; + if (instance[key] === undefined && + !handledPropertyNames.includes(key) && + !isSpecialXmlProperty(key, options)) { + instance[key] = responseBody[key]; + } + } + } + return instance; +} +function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { + var value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(responseBody); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + } + return tempDictionary; + } + return responseBody; +} +function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + var element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + var tempArray = []; + for (var i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], objectName + "[" + i + "]", options); + } + return tempArray; + } + return responseBody; +} +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + var discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + var discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + var typeName = mapper.type.uberParent || mapper.type.className; + var indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + var polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return (mapper.type.polymorphicDiscriminator || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && + serializer.modelMappers[typeName] && + serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +// TODO: why is this here? +export function serializeObject(toSerialize) { + if (toSerialize == undefined) + return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = base64.encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + var array = []; + for (var i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } + else if (typeof toSerialize === "object") { + var dictionary = {}; + for (var property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; +} +/** + * Utility function to create a K:V from a list of strings + */ +function strEnum(o) { + var result = {}; + for (var _i = 0, o_1 = o; _i < o_1.length; _i++) { + var key = o_1[_i]; + result[key] = key; + } + return result; +} +export var MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" +]); +//# sourceMappingURL=serializer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/serializer.js.map b/node_modules/@azure/core-http/es/src/serializer.js.map new file mode 100644 index 000000000..f6da4c801 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/serializer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../src/serializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2BAA2B;;AAE3B,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAqB,MAAM,0BAA0B,CAAC;AAEvF;IACE,oBACkB,YAAyC,EACzC,KAAe;QADf,6BAAA,EAAA,iBAAyC;QAAzC,iBAAY,GAAZ,YAAY,CAA6B;QACzC,UAAK,GAAL,KAAK,CAAU;IAC9B,CAAC;IAEJ,wCAAmB,GAAnB,UAAoB,MAAc,EAAE,KAAU,EAAE,UAAkB;QAChE,IAAM,cAAc,GAAG,UACrB,cAAuC,EACvC,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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7C;QACD,OAAO,KAAK,CAAC;KACd;SAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QAC1C,IAAM,UAAU,GAA2B,EAAE,CAAC;QAC9C,KAAK,IAAM,QAAQ,IAAI,WAAW,EAAE;YAClC,UAAU,CAAC,QAAQ,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC/D;QACD,OAAO,UAAU,CAAC;KACnB;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,OAAO,CAAmB,CAAW;IAC5C,IAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAkB,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,EAAE;QAAhB,IAAM,GAAG,UAAA;QACZ,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;KACnB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,OAAO,CAAC;IAChC,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,MAAM;IACN,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* eslint-disable eqeqeq */\n\nimport * as base64 from \"./util/base64\";\nimport * as utils from \"./util/utils\";\nimport { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from \"./util/serializer.common\";\n\nexport class Serializer {\n constructor(\n public readonly modelMappers: { [key: string]: any } = {},\n public readonly isXML?: boolean\n ) {}\n\n validateConstraints(mapper: Mapper, value: any, objectName: string): void {\n const failValidation = (\n constraintName: keyof MapperConstraints,\n constraintValue: any\n ): Error => {\n throw new Error(\n `\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`\n );\n };\n if (mapper.constraints && value != undefined) {\n const {\n ExclusiveMaximum,\n ExclusiveMinimum,\n InclusiveMaximum,\n InclusiveMinimum,\n MaxItems,\n MaxLength,\n MinItems,\n MinLength,\n MultipleOf,\n Pattern,\n UniqueItems\n } = mapper.constraints;\n if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && value > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && value < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n if (MaxItems != undefined && value.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && value.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && value.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && value.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && value % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern: RegExp = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if (typeof value !== \"string\" || value.match(pattern) === null) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (\n UniqueItems &&\n value.some((item: any, i: number, ar: Array) => ar.indexOf(item) !== i)\n ) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n\n /**\n * Serialize the given object based on its metadata defined in the mapper\n *\n * @param {Mapper} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized\n *\n * @param {string} objectName Name of the serialized object\n *\n * @param {options} options additional options to deserialization\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object\n */\n serialize(\n mapper: Mapper,\n object: any,\n objectName?: string,\n options: SerializerOptions = {}\n ): any {\n const updatedOptions: Required = {\n rootName: options.rootName ?? \"\",\n includeRoot: options.includeRoot ?? false,\n xmlCharKey: options.xmlCharKey ?? XML_CHARKEY\n };\n let payload: any = {};\n const mapperType = mapper.type.name as string;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n if (mapperType.match(/^Sequence$/i) !== null) {\n payload = [];\n }\n\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n\n const { required, nullable } = mapper;\n\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n\n if (object == undefined) {\n payload = object;\n } else {\n // Validate Constraints if any\n this.validateConstraints(mapper, object, objectName);\n if (mapperType.match(/^any$/i) !== null) {\n payload = object;\n } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n } else if (mapperType.match(/^Enum$/i) !== null) {\n const enumMapper: EnumMapper = mapper as EnumMapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n } else if (\n mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null\n ) {\n payload = serializeDateTypes(mapperType, object, objectName);\n } else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = serializeByteArrayType(objectName, object);\n } else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n } else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = serializeSequenceType(\n this,\n mapper as SequenceMapper,\n object,\n objectName,\n Boolean(this.isXML),\n updatedOptions\n );\n } else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = serializeDictionaryType(\n this,\n mapper as DictionaryMapper,\n object,\n objectName,\n Boolean(this.isXML),\n updatedOptions\n );\n } else if (mapperType.match(/^Composite$/i) !== null) {\n payload = serializeCompositeType(\n this,\n mapper as CompositeMapper,\n object,\n objectName,\n Boolean(this.isXML),\n updatedOptions\n );\n }\n }\n return payload;\n }\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper\n *\n * @param {object} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized\n *\n * @param {string} objectName Name of the deserialized object\n *\n * @param options Controls behavior of XML parser and builder.\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object\n */\n deserialize(\n mapper: Mapper,\n responseBody: any,\n objectName: string,\n options: SerializerOptions = {}\n ): any {\n const updatedOptions: Required = {\n rootName: options.rootName ?? \"\",\n includeRoot: options.includeRoot ?? false,\n xmlCharKey: options.xmlCharKey ?? XML_CHARKEY\n };\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n\n let payload: any;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n\n if (mapperType.match(/^Composite$/i) !== null) {\n payload = deserializeCompositeType(\n this,\n mapper as CompositeMapper,\n responseBody,\n objectName,\n updatedOptions\n );\n } else {\n if (this.isXML) {\n const xmlCharKey = updatedOptions.xmlCharKey;\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\" i.e., XML_ATTRKEY) and body (\"#\" i.e., XML_CHARKEY) properties,\n * then just reduce the responseBody value to the body (\"#\" i.e., XML_CHARKEY) property.\n */\n if (responseBody[XML_ATTRKEY] != undefined && responseBody[xmlCharKey] != undefined) {\n responseBody = responseBody[xmlCharKey];\n }\n }\n\n if (mapperType.match(/^Number$/i) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n } else if (mapperType.match(/^Boolean$/i) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n } else if (responseBody === \"false\") {\n payload = false;\n } else {\n payload = responseBody;\n }\n } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) {\n payload = responseBody;\n } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) {\n payload = new Date(responseBody);\n } else if (mapperType.match(/^UnixTime$/i) !== null) {\n payload = unixTimeToDate(responseBody);\n } else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = base64.decodeString(responseBody);\n } else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = base64UrlToByteArray(responseBody);\n } else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = deserializeSequenceType(\n this,\n mapper as SequenceMapper,\n responseBody,\n objectName,\n updatedOptions\n );\n } else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = deserializeDictionaryType(\n this,\n mapper as DictionaryMapper,\n responseBody,\n objectName,\n updatedOptions\n );\n }\n }\n\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n\n return payload;\n }\n}\n\nfunction trimEnd(str: string, ch: string): string {\n let len = str.length;\n while (len - 1 >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\n\nfunction bufferToBase64Url(buffer: any): string | undefined {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = base64.encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\");\n}\n\nfunction base64UrlToByteArray(str: string): Uint8Array | undefined {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Base64 to Uint8Array.\n return base64.decodeString(str);\n}\n\nfunction splitSerializeName(prop: string | undefined): string[] {\n const classes: string[] = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n } else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n\n return classes;\n}\n\nfunction dateToUnixTime(d: string | Date): number | undefined {\n if (!d) {\n return undefined;\n }\n\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d as string);\n }\n return Math.floor((d as Date).getTime() / 1000);\n}\n\nfunction unixTimeToDate(n: number): Date | undefined {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\n\nfunction serializeBasicTypes(typeName: string, objectName: string, value: any): any {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/i) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n } else if (typeName.match(/^String$/i) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n } else if (typeName.match(/^Uuid$/i) !== null) {\n if (!(typeof value.valueOf() === \"string\" && utils.isValidUuid(value))) {\n throw new Error(\n `${objectName} with value \"${value}\" must be of type string and a valid uuid.`\n );\n }\n } else if (typeName.match(/^Boolean$/i) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n } else if (typeName.match(/^Stream$/i) !== null) {\n const objectType = typeof value;\n if (\n objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !((typeof Blob === \"function\" || typeof Blob === \"object\") && value instanceof Blob)\n ) {\n throw new Error(\n `${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`\n );\n }\n }\n }\n\n return value;\n}\n\nfunction serializeEnumType(objectName: string, allowedValues: Array, value: any): any {\n if (!allowedValues) {\n throw new Error(\n `Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`\n );\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(\n `${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(\n allowedValues\n )}.`\n );\n }\n return value;\n}\n\nfunction serializeByteArrayType(objectName: string, value: Uint8Array): string {\n let returnValue: string = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = base64.encodeByteArray(value);\n }\n return returnValue;\n}\n\nfunction serializeBase64UrlType(objectName: string, value: Uint8Array): string {\n let returnValue: string = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = bufferToBase64Url(value) || \"\";\n }\n return returnValue;\n}\n\nfunction serializeDateTypes(typeName: string, value: any, objectName: string): any {\n if (value != undefined) {\n if (typeName.match(/^Date$/i) !== null) {\n if (\n !(\n value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value)))\n )\n ) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value =\n value instanceof Date\n ? value.toISOString().substring(0, 10)\n : new Date(value).toISOString().substring(0, 10);\n } else if (typeName.match(/^DateTime$/i) !== null) {\n if (\n !(\n value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value)))\n )\n ) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = value instanceof Date ? value.toISOString() : new Date(value).toISOString();\n } else if (typeName.match(/^DateTimeRfc1123$/i) !== null) {\n if (\n !(\n value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value)))\n )\n ) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString();\n } else if (typeName.match(/^UnixTime$/i) !== null) {\n if (\n !(\n value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value)))\n )\n ) {\n throw new Error(\n `${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`\n );\n }\n value = dateToUnixTime(value);\n } else if (typeName.match(/^TimeSpan$/i) !== null) {\n if (!utils.isDuration(value)) {\n throw new Error(\n `${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`\n );\n }\n }\n }\n return value;\n}\n\nfunction serializeSequenceType(\n serializer: Serializer,\n mapper: SequenceMapper,\n object: any,\n objectName: string,\n isXml: boolean,\n options: Required\n): any[] {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(\n `element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`\n );\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n const serializedValue = serializer.serialize(elementType, object[i], objectName, options);\n\n if (isXml && elementType.xmlNamespace) {\n const xmlnsKey = elementType.xmlNamespacePrefix\n ? `xmlns:${elementType.xmlNamespacePrefix}`\n : \"xmlns\";\n if (elementType.type.name === \"Composite\") {\n tempArray[i] = { ...serializedValue };\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n } else {\n tempArray[i] = {};\n tempArray[i][options.xmlCharKey] = serializedValue;\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n } else {\n tempArray[i] = serializedValue;\n }\n }\n return tempArray;\n}\n\nfunction serializeDictionaryType(\n serializer: Serializer,\n mapper: DictionaryMapper,\n object: any,\n objectName: string,\n isXml: boolean,\n options: Required\n): { [key: string]: any } {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(\n `\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`\n );\n }\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(object)) {\n const serializedValue = serializer.serialize(valueType, object[key], objectName, options);\n // If the element needs an XML namespace we need to add it within the $ property\n tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options);\n }\n\n // Add the namespace to the root element if needed\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : \"xmlns\";\n\n return { ...tempDictionary, $: { [xmlnsKey]: mapper.xmlNamespace } };\n }\n\n return tempDictionary;\n}\n\n/**\n * Resolves the additionalProperties property from a referenced mapper\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n * @param objectName name of the object being serialized\n */\nfunction resolveAdditionalProperties(\n serializer: Serializer,\n mapper: CompositeMapper,\n objectName: string\n): SequenceMapper | BaseMapper | CompositeMapper | DictionaryMapper | EnumMapper | undefined {\n const additionalProperties = mapper.type.additionalProperties;\n\n if (!additionalProperties && mapper.type.className) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n return modelMapper?.type.additionalProperties;\n }\n\n return additionalProperties;\n}\n\n/**\n * Finds the mapper referenced by className\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n * @param objectName name of the object being serialized\n */\nfunction resolveReferencedMapper(\n serializer: Serializer,\n mapper: CompositeMapper,\n objectName: string\n): CompositeMapper | undefined {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(\n `Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(\n mapper,\n undefined,\n 2\n )}\".`\n );\n }\n\n return serializer.modelMappers[className];\n}\n\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n */\nfunction resolveModelProperties(\n serializer: Serializer,\n mapper: CompositeMapper,\n objectName: string\n): { [propertyName: string]: Mapper } {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${mapper.type.className}\".`);\n }\n modelProps = modelMapper?.type.modelProperties;\n if (!modelProps) {\n throw new Error(\n `modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${\n mapper.type.className\n }\" for object \"${objectName}\".`\n );\n }\n }\n\n return modelProps;\n}\n\nfunction serializeCompositeType(\n serializer: Serializer,\n mapper: CompositeMapper,\n object: any,\n objectName: string,\n isXml: boolean,\n options: Required\n): any {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n\n if (object != undefined) {\n const payload: any = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n\n let propName: string | undefined;\n let parentObject: any = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n } else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n } else {\n const paths = splitSerializeName(propertyMapper.serializedName!);\n propName = paths.pop();\n\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if (\n childObject == undefined &&\n (object[key] != undefined || propertyMapper.defaultValue !== undefined)\n ) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n\n if (parentObject != undefined) {\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix\n ? `xmlns:${mapper.xmlNamespacePrefix}`\n : \"xmlns\";\n parentObject[XML_ATTRKEY] = {\n ...parentObject[XML_ATTRKEY],\n [xmlnsKey]: mapper.xmlNamespace\n };\n }\n const propertyObjectName =\n propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (\n polymorphicDiscriminator &&\n polymorphicDiscriminator.clientName === key &&\n toSerialize == undefined\n ) {\n toSerialize = mapper.serializedName;\n }\n\n const serializedValue = serializer.serialize(\n propertyMapper,\n toSerialize,\n propertyObjectName,\n options\n );\n\n if (serializedValue !== undefined && propName != undefined) {\n const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options);\n if (isXml && propertyMapper.xmlIsAttribute) {\n // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {};\n parentObject[XML_ATTRKEY][propName] = serializedValue;\n } else if (isXml && propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName!]: value };\n } else {\n parentObject[propName] = value;\n }\n }\n }\n }\n\n const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName);\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(\n additionalPropertiesMapper,\n object[clientPropName],\n objectName + '[\"' + clientPropName + '\"]',\n options\n );\n }\n }\n }\n\n return payload;\n }\n return object;\n}\n\nfunction getXmlObjectValue(\n propertyMapper: Mapper,\n serializedValue: any,\n isXml: boolean,\n options: Required\n) {\n if (!isXml || !propertyMapper.xmlNamespace) {\n return serializedValue;\n }\n\n const xmlnsKey = propertyMapper.xmlNamespacePrefix\n ? `xmlns:${propertyMapper.xmlNamespacePrefix}`\n : \"xmlns\";\n const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace };\n\n if ([\"Composite\"].includes(propertyMapper.type.name)) {\n if (serializedValue[XML_ATTRKEY]) {\n return serializedValue;\n } else {\n const result: any = { ...serializedValue };\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n }\n }\n const result: any = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n}\n\nfunction isSpecialXmlProperty(propertyName: string, options: Required): boolean {\n return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName);\n}\n\nfunction deserializeCompositeType(\n serializer: Serializer,\n mapper: CompositeMapper,\n responseBody: any,\n objectName: string,\n options: Required\n): any {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance: { [key: string]: any } = {};\n const handledPropertyNames: string[] = [];\n\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName!);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n\n const headerCollectionPrefix = (propertyMapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary: any = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(\n (propertyMapper as DictionaryMapper).type.value,\n responseBody[headerKey],\n propertyObjectName,\n options\n );\n }\n\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n } else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) {\n instance[key] = serializer.deserialize(\n propertyMapper,\n responseBody[XML_ATTRKEY][xmlName!],\n propertyObjectName,\n options\n );\n } else {\n const propertyName = xmlElementName || xmlName || serializedName;\n if (propertyMapper.xmlIsWrapped) {\n /* a list of wrapped by \n For the xml example below\n \n ...\n ...\n \n the responseBody has\n {\n Cors: {\n CorsRule: [{...}, {...}]\n }\n }\n xmlName is \"Cors\" and xmlElementName is\"CorsRule\".\n */\n const wrapped = responseBody[xmlName!];\n const elementList = wrapped?.[xmlElementName!] ?? [];\n instance[key] = serializer.deserialize(\n propertyMapper,\n elementList,\n propertyObjectName,\n options\n );\n } else {\n const property = responseBody[propertyName!];\n instance[key] = serializer.deserialize(\n propertyMapper,\n property,\n propertyObjectName,\n options\n );\n }\n }\n } else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res) break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (\n polymorphicDiscriminator &&\n key === polymorphicDiscriminator.clientName &&\n propertyInstance == undefined\n ) {\n propertyInstance = mapper.serializedName;\n }\n\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n instance = serializer.deserialize(\n propertyMapper,\n propertyInstance,\n propertyObjectName,\n options\n );\n } else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(\n propertyMapper,\n propertyInstance,\n propertyObjectName,\n options\n );\n instance[key] = serializedValue;\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName: string): boolean => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(\n additionalPropertiesMapper,\n responseBody[responsePropName],\n objectName + '[\"' + responsePropName + '\"]',\n options\n );\n }\n }\n } else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (\n instance[key] === undefined &&\n !handledPropertyNames.includes(key) &&\n !isSpecialXmlProperty(key, options)\n ) {\n instance[key] = responseBody[key];\n }\n }\n }\n\n return instance;\n}\n\nfunction deserializeDictionaryType(\n serializer: Serializer,\n mapper: DictionaryMapper,\n responseBody: any,\n objectName: string,\n options: Required\n): { [key: string]: any } {\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(\n `\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`\n );\n }\n if (responseBody) {\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options);\n }\n return tempDictionary;\n }\n return responseBody;\n}\n\nfunction deserializeSequenceType(\n serializer: Serializer,\n mapper: SequenceMapper,\n responseBody: any,\n objectName: string,\n options: Required\n): any[] {\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(\n `element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`\n );\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(\n element,\n responseBody[i],\n `${objectName}[${i}]`,\n options\n );\n }\n return tempArray;\n }\n return responseBody;\n}\n\nfunction getPolymorphicMapper(\n serializer: Serializer,\n mapper: CompositeMapper,\n object: any,\n polymorphicPropertyName: \"clientName\" | \"serializedName\"\n): CompositeMapper {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator =\n discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\n\nfunction getPolymorphicDiscriminatorRecursively(\n serializer: Serializer,\n mapper: CompositeMapper\n): PolymorphicDiscriminator | undefined {\n return (\n mapper.type.polymorphicDiscriminator ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)\n );\n}\n\nfunction getPolymorphicDiscriminatorSafely(serializer: Serializer, typeName?: string): any {\n return (\n typeName &&\n serializer.modelMappers[typeName] &&\n serializer.modelMappers[typeName].type.polymorphicDiscriminator\n );\n}\n\nexport interface MapperConstraints {\n InclusiveMaximum?: number;\n ExclusiveMaximum?: number;\n InclusiveMinimum?: number;\n ExclusiveMinimum?: number;\n MaxLength?: number;\n MinLength?: number;\n Pattern?: RegExp;\n MaxItems?: number;\n MinItems?: number;\n UniqueItems?: true;\n MultipleOf?: number;\n}\n\nexport type MapperType =\n | SimpleMapperType\n | CompositeMapperType\n | SequenceMapperType\n | DictionaryMapperType\n | EnumMapperType;\n\nexport interface SimpleMapperType {\n name:\n | \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\nexport interface CompositeMapperType {\n name: \"Composite\";\n\n // Only one of the two below properties should be present.\n // Use className to reference another type definition,\n // and use modelProperties/additionalProperties when the reference to the other type has been resolved.\n className?: string;\n\n modelProperties?: { [propertyName: string]: Mapper };\n additionalProperties?: Mapper;\n\n uberParent?: string;\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\nexport interface SequenceMapperType {\n name: \"Sequence\";\n element: Mapper;\n}\n\nexport interface DictionaryMapperType {\n name: \"Dictionary\";\n value: Mapper;\n}\n\nexport interface EnumMapperType {\n name: \"Enum\";\n allowedValues: any[];\n}\n\nexport interface BaseMapper {\n /**\n * Name for the xml element\n */\n xmlName?: string;\n /**\n * Xml element namespace\n */\n xmlNamespace?: string;\n /**\n * Xml element namespace prefix\n */\n xmlNamespacePrefix?: string;\n /**\n * Determines if the current property should be serialized as an attribute of the parent xml element\n */\n xmlIsAttribute?: boolean;\n /**\n * Name for the xml elements when serializing an array\n */\n xmlElementName?: string;\n /**\n * Whether or not the current propery should have a wrapping XML element\n */\n xmlIsWrapped?: boolean;\n /**\n * Whether or not the current propery is readonly\n */\n readOnly?: boolean;\n /**\n * Whether or not the current propery is a constant\n */\n isConstant?: boolean;\n /**\n * Whether or not the current propery is required\n */\n required?: boolean;\n /**\n * Whether or not the current propery allows mull as a value\n */\n nullable?: boolean;\n /**\n * The name to use when serializing\n */\n serializedName?: string;\n /**\n * Type of the mapper\n */\n type: MapperType;\n /**\n * Default value when one is not explicitly provided\n */\n defaultValue?: any;\n /**\n * Constraints to test the current value against\n */\n constraints?: MapperConstraints;\n}\n\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\nexport interface PolymorphicDiscriminator {\n serializedName: string;\n clientName: string;\n [key: string]: string;\n}\n\nexport interface CompositeMapper extends BaseMapper {\n type: CompositeMapperType;\n}\n\nexport interface SequenceMapper extends BaseMapper {\n type: SequenceMapperType;\n}\n\nexport interface DictionaryMapper extends BaseMapper {\n type: DictionaryMapperType;\n headerCollectionPrefix?: string;\n}\n\nexport interface EnumMapper extends BaseMapper {\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n// TODO: why is this here?\nexport function serializeObject(toSerialize: any): any {\n if (toSerialize == undefined) return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = base64.encodeByteArray(toSerialize);\n return toSerialize;\n } else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n } else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n } else if (typeof toSerialize === \"object\") {\n const dictionary: { [key: string]: any } = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(toSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o: Array): { [K in T]: K } {\n const result: any = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n\nexport const MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\"\n]);\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/serviceClient.js b/node_modules/@azure/core-http/es/src/serviceClient.js new file mode 100644 index 000000000..699e08eb9 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/serviceClient.js @@ -0,0 +1,621 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __generator, __spreadArrays } from "tslib"; +import { isTokenCredential } from "@azure/core-auth"; +import { DefaultHttpClient } from "./defaultHttpClient"; +import { logPolicy } from "./policies/logPolicy"; +import { getPathStringFromParameter, getPathStringFromParameterPath } from "./operationParameter"; +import { isStreamOperation } from "./operationSpec"; +import { deserializationPolicy, DefaultDeserializationOptions } from "./policies/deserializationPolicy"; +import { exponentialRetryPolicy, DefaultRetryOptions } from "./policies/exponentialRetryPolicy"; +import { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +import { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +import { redirectPolicy, DefaultRedirectOptions } from "./policies/redirectPolicy"; +import { RequestPolicyOptions } from "./policies/requestPolicy"; +import { rpRegistrationPolicy } from "./policies/rpRegistrationPolicy"; +import { bearerTokenAuthenticationPolicy } from "./policies/bearerTokenAuthenticationPolicy"; +import { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { MapperType } from "./serializer"; +import { URLBuilder } from "./url"; +import * as utils from "./util/utils"; +import { stringifyXML } from "./util/xml"; +import { WebResource, isWebResourceLike } from "./webResource"; +import { isNode } from "./util/utils"; +import { proxyPolicy } from "./policies/proxyPolicy"; +import { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +import { signingPolicy } from "./policies/signingPolicy"; +import { logger } from "./log"; +import { DefaultKeepAliveOptions, keepAlivePolicy } from "./policies/keepAlivePolicy"; +import { tracingPolicy } from "./policies/tracingPolicy"; +import { disableResponseDecompressionPolicy } from "./policies/disableResponseDecompressionPolicy"; +import { ndJsonPolicy } from "./policies/ndJsonPolicy"; +import { XML_ATTRKEY, XML_CHARKEY } from "./util/serializer.common"; +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +var ServiceClient = /** @class */ (function () { + /** + * The ServiceClient constructor + * @constructor + * @param credentials The credentials used for authentication with the service. + * @param options The service client options that govern the behavior of the client. + */ + function ServiceClient(credentials, + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */ + options) { + var _this = this; + if (!options) { + options = {}; + } + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new DefaultHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + var requestPolicyFactories; + if (Array.isArray(options.requestPolicyFactories)) { + logger.info("ServiceClient: using custom request policies"); + requestPolicyFactories = options.requestPolicyFactories; + } + else { + var authPolicyFactory = undefined; + if (isTokenCredential(credentials)) { + logger.info("ServiceClient: creating bearer token authentication policy from provided credentials"); + // Create a wrapped RequestPolicyFactory here so that we can provide the + // correct scope to the BearerTokenAuthenticationPolicy at the first time + // one is requested. This is needed because generated ServiceClient + // implementations do not set baseUri until after ServiceClient's constructor + // is finished, leaving baseUri empty at the time when it is needed to + // build the correct scope name. + var wrappedPolicyFactory = function () { + var bearerTokenPolicyFactory = undefined; + // eslint-disable-next-line @typescript-eslint/no-this-alias + var serviceClient = _this; + return { + create: function (nextPolicy, options) { + if (bearerTokenPolicyFactory === undefined || bearerTokenPolicyFactory === null) { + bearerTokenPolicyFactory = bearerTokenAuthenticationPolicy(credentials, (serviceClient.baseUri || "") + "/.default"); + } + return bearerTokenPolicyFactory.create(nextPolicy, options); + } + }; + }; + authPolicyFactory = wrappedPolicyFactory(); + } + else if (credentials && typeof credentials.signRequest === "function") { + logger.info("ServiceClient: creating signing policy from provided credentials"); + authPolicyFactory = signingPolicy(credentials); + } + else if (credentials !== undefined && credentials !== null) { + throw new Error("The credentials argument must implement the TokenCredential interface"); + } + logger.info("ServiceClient: using default request policies"); + requestPolicyFactories = createDefaultRequestPolicyFactories(authPolicyFactory, options); + if (options.requestPolicyFactories) { + // options.requestPolicyFactories can also be a function that manipulates + // the default requestPolicyFactories array + var newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + /** + * Send the provided httpRequest. + */ + ServiceClient.prototype.sendRequest = function (options) { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + var httpRequest; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } + else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } + catch (error) { + return Promise.reject(error); + } + var httpPipeline = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (var i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + }; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + ServiceClient.prototype.sendOperationRequest = function (operationArguments, operationSpec, callback) { + var _a; + return __awaiter(this, void 0, void 0, function () { + var serializerOptions, httpRequest, result, baseUri, requestUrl, _i, _b, urlParameter, urlParameterValue, _c, _d, queryParameter, queryParameterValue, index, item, index, contentType, _e, _f, headerParameter, headerValue, headerCollectionPrefix, _g, _h, key, options, customHeaderName, rawResponse, sendRequestError, error_1, error_2, cb; + return __generator(this, function (_j) { + switch (_j.label) { + case 0: + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + httpRequest = new WebResource(); + _j.label = 1; + case 1: + _j.trys.push([1, 6, , 7]); + baseUri = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + requestUrl = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (_i = 0, _b = operationSpec.urlParameters; _i < _b.length; _i++) { + urlParameter = _b[_i]; + urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter), serializerOptions); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll("{" + (urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)) + "}", urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (_c = 0, _d = operationSpec.queryParameters; _c < _d.length; _c++) { + queryParameter = _d[_c]; + queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue !== undefined && queryParameterValue !== null) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter), serializerOptions); + if (queryParameter.collectionFormat !== undefined && + queryParameter.collectionFormat !== null) { + if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + // The collection is empty, no need to try serializing the current queryParam + continue; + } + else { + for (index in queryParameterValue) { + item = queryParameterValue[index]; + queryParameterValue[index] = + item === undefined || item === null ? "" : item.toString(); + } + } + } + else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || + queryParameter.collectionFormat === QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && + queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat !== undefined && + queryParameter.collectionFormat !== null && + queryParameter.collectionFormat !== QueryCollectionFormat.Multi && + queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && + queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + if (operationSpec.headerParameters) { + for (_e = 0, _f = operationSpec.headerParameters; _e < _f.length; _e++) { + headerParameter = _f[_e]; + headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue !== undefined && headerValue !== null) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter), serializerOptions); + headerCollectionPrefix = headerParameter.mapper + .headerCollectionPrefix; + if (headerCollectionPrefix) { + for (_g = 0, _h = Object.keys(headerValue); _g < _h.length; _g++) { + key = _h[_g]; + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + httpRequest.headers.set(headerParameter.mapper.serializedName || + getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + options = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + if (options.spanOptions) { + httpRequest.spanOptions = options.spanOptions; + } + if (options.shouldDeserialize !== undefined && options.shouldDeserialize !== null) { + httpRequest.shouldDeserialize = options.shouldDeserialize; + } + } + httpRequest.withCredentials = this._withCredentials; + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + if (httpRequest.streamResponseBody === undefined || httpRequest.streamResponseBody === null) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + rawResponse = void 0; + sendRequestError = void 0; + _j.label = 2; + case 2: + _j.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.sendRequest(httpRequest)]; + case 3: + rawResponse = _j.sent(); + return [3 /*break*/, 5]; + case 4: + error_1 = _j.sent(); + sendRequestError = error_1; + return [3 /*break*/, 5]; + case 5: + if (sendRequestError) { + if (sendRequestError.response) { + sendRequestError.details = flattenResponse(sendRequestError.response, operationSpec.responses[sendRequestError.statusCode] || + operationSpec.responses["default"]); + } + result = Promise.reject(sendRequestError); + } + else { + result = Promise.resolve(flattenResponse(rawResponse, operationSpec.responses[rawResponse.status])); + } + return [3 /*break*/, 7]; + case 6: + error_2 = _j.sent(); + result = Promise.reject(error_2); + return [3 /*break*/, 7]; + case 7: + cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(function (res) { return cb(null, res._response.parsedBody, res._response.request, res._response); }) + .catch(function (err) { return cb(err); }); + } + return [2 /*return*/, result]; + } + }); + }); + }; + return ServiceClient; +}()); +export { ServiceClient }; +export function serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) { + var _a, _b, _c, _d, _e, _f; + var serializerOptions = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions) !== null && _b !== void 0 ? _b : {}; + var updatedOptions = { + rootName: (_c = serializerOptions.rootName) !== null && _c !== void 0 ? _c : "", + includeRoot: (_d = serializerOptions.includeRoot) !== null && _d !== void 0 ? _d : false, + xmlCharKey: (_e = serializerOptions.xmlCharKey) !== null && _e !== void 0 ? _e : XML_CHARKEY + }; + var xmlCharKey = serializerOptions.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + var bodyMapper = operationSpec.requestBody.mapper; + var required = bodyMapper.required, xmlName = bodyMapper.xmlName, xmlElementName = bodyMapper.xmlElementName, serializedName = bodyMapper.serializedName, xmlNamespace = bodyMapper.xmlNamespace, xmlNamespacePrefix = bodyMapper.xmlNamespacePrefix; + var typeName = bodyMapper.type.name; + try { + if ((httpRequest.body !== undefined && httpRequest.body !== null) || required) { + var requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString, updatedOptions); + var isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + var xmlnsKey = xmlNamespacePrefix ? "xmlns:" + xmlNamespacePrefix : "xmlns"; + var value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, httpRequest.body, updatedOptions); + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(utils.prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { + rootName: xmlName || serializedName, + xmlCharKey: xmlCharKey + }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(value, { + rootName: xmlName || serializedName, + xmlCharKey: xmlCharKey + }); + } + } + else if (typeName === MapperType.String && + (((_f = operationSpec.contentType) === null || _f === void 0 ? void 0 : _f.match("text/plain")) || operationSpec.mediaType === "text")) { + // the String serializer has validated that request body is a string + // so just send the string. + return; + } + else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } + catch (error) { + throw new Error("Error \"" + error.message + "\" occurred in serializing the payload - " + JSON.stringify(serializedName, undefined, " ") + "."); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (var _i = 0, _g = operationSpec.formDataParameters; _i < _g.length; _i++) { + var formDataParameter = _g[_i]; + var formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue !== undefined && formDataParameterValue !== null) { + var formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions); + } + } + } +} +/** + * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself + */ +function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { + var _a; + // Composite and Sequence schemas already got their root namespace set during serialization + // We just need to add xmlns to the other schema types + if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { + var result = {}; + result[options.xmlCharKey] = serializedValue; + result[XML_ATTRKEY] = (_a = {}, _a[xmlnsKey] = xmlNamespace, _a); + return result; + } + return serializedValue; +} +function getValueOrFunctionResult(value, defaultValueCreator) { + var result; + if (typeof value === "string") { + result = value; + } + else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; +} +function createDefaultRequestPolicyFactories(authPolicyFactory, options) { + var factories = []; + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + if (authPolicyFactory) { + factories.push(authPolicyFactory); + } + var userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + var userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + factories.push(deserializationPolicy(options.deserializationContentTypes)); + if (isNode) { + factories.push(proxyPolicy(options.proxySettings)); + } + factories.push(logPolicy({ logger: logger.info })); + return factories; +} +export function createPipelineFromOptions(pipelineOptions, authPolicyFactory) { + var requestPolicyFactories = []; + if (pipelineOptions.sendStreamingJson) { + requestPolicyFactories.push(ndJsonPolicy()); + } + var userAgentValue = undefined; + if (pipelineOptions.userAgentOptions && pipelineOptions.userAgentOptions.userAgentPrefix) { + var userAgentInfo = []; + userAgentInfo.push(pipelineOptions.userAgentOptions.userAgentPrefix); + // Add the default user agent value if it isn't already specified + // by the userAgentPrefix option. + var defaultUserAgentInfo = getDefaultUserAgentValue(); + if (userAgentInfo.indexOf(defaultUserAgentInfo) === -1) { + userAgentInfo.push(defaultUserAgentInfo); + } + userAgentValue = userAgentInfo.join(" "); + } + var keepAliveOptions = __assign(__assign({}, DefaultKeepAliveOptions), pipelineOptions.keepAliveOptions); + var retryOptions = __assign(__assign({}, DefaultRetryOptions), pipelineOptions.retryOptions); + var redirectOptions = __assign(__assign({}, DefaultRedirectOptions), pipelineOptions.redirectOptions); + if (isNode) { + requestPolicyFactories.push(proxyPolicy(pipelineOptions.proxyOptions)); + } + var deserializationOptions = __assign(__assign({}, DefaultDeserializationOptions), pipelineOptions.deserializationOptions); + var loggingOptions = __assign({}, pipelineOptions.loggingOptions); + requestPolicyFactories.push(tracingPolicy({ userAgent: userAgentValue }), keepAlivePolicy(keepAliveOptions), userAgentPolicy({ value: userAgentValue }), generateClientRequestIdPolicy(), deserializationPolicy(deserializationOptions.expectedContentTypes), throttlingRetryPolicy(), systemErrorRetryPolicy(), exponentialRetryPolicy(retryOptions.maxRetries, retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs)); + if (redirectOptions.handleRedirects) { + requestPolicyFactories.push(redirectPolicy(redirectOptions.maxRetries)); + } + if (authPolicyFactory) { + requestPolicyFactories.push(authPolicyFactory); + } + requestPolicyFactories.push(logPolicy(loggingOptions)); + if (isNode && pipelineOptions.decompressResponse === false) { + requestPolicyFactories.push(disableResponseDecompressionPolicy()); + } + return { + httpClient: pipelineOptions.httpClient, + requestPolicyFactories: requestPolicyFactories + }; +} +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export function getPropertyParent(parent, propertyPath) { + if (parent && propertyPath) { + var propertyPathLength = propertyPath.length; + for (var i = 0; i < propertyPathLength - 1; ++i) { + var propertyName = propertyPath[i]; + if (!parent[propertyName]) { + parent[propertyName] = {}; + } + parent = parent[propertyName]; + } + } + return parent; +} +function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); +} +export function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { + var _a; + var value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + var serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + var propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + var useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = + parameterMapper.required || + (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + // Serialize just for validation purposes. + var parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString, serializerOptions); + } + } + else { + if (parameterMapper.required) { + value = {}; + } + for (var propertyName in parameterPath) { + var propertyMapper = parameterMapper.type.modelProperties[propertyName]; + var propertyPath = parameterPath[propertyName]; + var propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + var propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString, serializerOptions); + if (propertyValue !== undefined && propertyValue !== null) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + var result = { propertyFound: false }; + var i = 0; + for (; i < parameterPath.length; ++i) { + var parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent !== undefined && parent !== null && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} +export function flattenResponse(_response, responseSpec) { + var parsedHeaders = _response.parsedHeaders; + var bodyMapper = responseSpec && responseSpec.bodyMapper; + var addOperationResponse = function (obj) { + return Object.defineProperty(obj, "_response", { + value: _response + }); + }; + if (bodyMapper) { + var typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody })); + } + var modelProperties_1 = (typeName === "Composite" && bodyMapper.type.modelProperties) || {}; + var isPageableResponse = Object.keys(modelProperties_1).some(function (k) { return modelProperties_1[k].serializedName === ""; }); + if (typeName === "Sequence" || isPageableResponse) { + var arrayResponse = __spreadArrays((_response.parsedBody || [])); + for (var _i = 0, _a = Object.keys(modelProperties_1); _i < _a.length; _i++) { + var key = _a[_i]; + if (modelProperties_1[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + if (parsedHeaders) { + for (var _b = 0, _c = Object.keys(parsedHeaders); _b < _c.length; _b++) { + var key = _c[_b]; + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); + } + } + if (bodyMapper || + _response.request.method === "HEAD" || + utils.isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse(__assign(__assign({}, parsedHeaders), { body: _response.parsedBody })); + } + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); +} +//# sourceMappingURL=serviceClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/serviceClient.js.map b/node_modules/@azure/core-http/es/src/serviceClient.js.map new file mode 100644 index 000000000..1da52d1f5 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/serviceClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClient.js","sourceRoot":"","sources":["../../src/serviceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAmB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,SAAS,EAAoB,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAG/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,qBAAqB,EAErB,6BAA6B,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EACL,eAAe,EACf,6BAA6B,EAC7B,wBAAwB,EACzB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SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;iBAChD;aACF;YAED,IAAI,aAAa,EAAE;gBACjB,KAAkB,UAA0B,EAA1B,KAAA,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAA1B,cAA0B,EAA1B,IAA0B,EAAE;oBAAzC,IAAM,GAAG,SAAA;oBACZ,aAAa,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;iBACzC;aACF;YACD,oBAAoB,CAAC,aAAa,CAAC,CAAC;YACpC,OAAO,aAAa,CAAC;SACtB;QAED,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,YAAY,EAAE;YACzD,OAAO,oBAAoB,uBACtB,aAAa,GACb,SAAS,CAAC,UAAU,EACvB,CAAC;SACJ;KACF;IAED,IACE,UAAU;QACV,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM;QACnC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,UAAU,CAAC,EAC3C;QACA,yCAAyC;QACzC,OAAO,oBAAoB,uBACtB,aAAa,KAChB,IAAI,EAAE,SAAS,CAAC,UAAU,IAC1B,CAAC;KACJ;IAED,OAAO,oBAAoB,uBACtB,aAAa,GACb,SAAS,CAAC,UAAU,EACvB,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { DefaultHttpClient } from \"./defaultHttpClient\";\nimport { HttpClient } from \"./httpClient\";\nimport { HttpOperationResponse, RestResponse } from \"./httpOperationResponse\";\nimport { HttpPipelineLogger } from \"./httpPipelineLogger\";\nimport { logPolicy, LogPolicyOptions } from \"./policies/logPolicy\";\nimport { OperationArguments } from \"./operationArguments\";\nimport {\n getPathStringFromParameter,\n getPathStringFromParameterPath,\n OperationParameter,\n ParameterPath\n} from \"./operationParameter\";\nimport { isStreamOperation, OperationSpec } from \"./operationSpec\";\nimport {\n deserializationPolicy,\n DeserializationContentTypes,\n DefaultDeserializationOptions\n} from \"./policies/deserializationPolicy\";\nimport { exponentialRetryPolicy, DefaultRetryOptions } from \"./policies/exponentialRetryPolicy\";\nimport { generateClientRequestIdPolicy } from \"./policies/generateClientRequestIdPolicy\";\nimport {\n userAgentPolicy,\n getDefaultUserAgentHeaderName,\n getDefaultUserAgentValue\n} from \"./policies/userAgentPolicy\";\nimport { redirectPolicy, DefaultRedirectOptions } from \"./policies/redirectPolicy\";\nimport {\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions\n} from \"./policies/requestPolicy\";\nimport { rpRegistrationPolicy } from \"./policies/rpRegistrationPolicy\";\nimport { bearerTokenAuthenticationPolicy } from \"./policies/bearerTokenAuthenticationPolicy\";\nimport { systemErrorRetryPolicy } from \"./policies/systemErrorRetryPolicy\";\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { CompositeMapper, DictionaryMapper, Mapper, MapperType, Serializer } from \"./serializer\";\nimport { URLBuilder } from \"./url\";\nimport * as utils from \"./util/utils\";\nimport { stringifyXML } from \"./util/xml\";\nimport {\n RequestOptionsBase,\n RequestPrepareOptions,\n WebResource,\n WebResourceLike,\n isWebResourceLike\n} from \"./webResource\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { ServiceCallback, isNode } from \"./util/utils\";\nimport { proxyPolicy } from \"./policies/proxyPolicy\";\nimport { throttlingRetryPolicy } from \"./policies/throttlingRetryPolicy\";\nimport { ServiceClientCredentials } from \"./credentials/serviceClientCredentials\";\nimport { signingPolicy } from \"./policies/signingPolicy\";\nimport { logger } from \"./log\";\nimport { InternalPipelineOptions } from \"./pipelineOptions\";\nimport { DefaultKeepAliveOptions, keepAlivePolicy } from \"./policies/keepAlivePolicy\";\nimport { tracingPolicy } from \"./policies/tracingPolicy\";\nimport { disableResponseDecompressionPolicy } from \"./policies/disableResponseDecompressionPolicy\";\nimport { ndJsonPolicy } from \"./policies/ndJsonPolicy\";\nimport { XML_ATTRKEY, SerializerOptions, XML_CHARKEY } from \"./util/serializer.common\";\n\n/**\n * Options to configure a proxy for outgoing requests (Node.js only).\n */\nexport interface ProxySettings {\n /**\n * The proxy's host address.\n */\n host: string;\n\n /**\n * The proxy host's port.\n */\n port: number;\n\n /**\n * The user name to authenticate with the proxy, if required.\n */\n username?: string;\n\n /**\n * The password to authenticate with the proxy, if required.\n */\n password?: string;\n}\n\nexport type ProxyOptions = ProxySettings; // Alias ProxySettings as ProxyOptions for future use.\n\n/**\n * Options to be provided while creating the client.\n */\nexport interface ServiceClientOptions {\n /**\n * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP\n * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns\n * the requestPolicyFactories that will be used.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline.\n */\n httpPipelineLogger?: HttpPipelineLogger;\n /**\n * If set to true, turn off the default retry policy.\n */\n noRetryPolicy?: boolean;\n /**\n * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30.\n */\n rpRegistrationRetryTimeout?: number;\n /**\n * Whether or not to generate a client request ID header for each HTTP request.\n */\n generateClientRequestIdHeader?: boolean;\n /**\n * Whether to include credentials in CORS requests in the browser.\n * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information.\n */\n withCredentials?: boolean;\n /**\n * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a\n * header to all outgoing requests with this header name and a random UUID as the request ID.\n */\n clientRequestIdHeaderName?: string;\n /**\n * The content-types that will be associated with JSON or XML serialization.\n */\n deserializationContentTypes?: DeserializationContentTypes;\n /**\n * The header name to use for the telemetry header while sending the request. If this is not\n * specified, then \"User-Agent\" will be used when running on Node.js and \"x-ms-useragent\" will\n * be used when running in a browser.\n */\n userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string);\n /**\n * The string to be set to the telemetry header while sending the request, or a function that\n * takes in the default user-agent string and returns the user-agent string that will be used.\n */\n userAgent?: string | ((defaultUserAgent: string) => string);\n /**\n * Proxy settings which will be used for every HTTP request (Node.js only).\n */\n proxySettings?: ProxySettings;\n}\n\n/**\n * @class\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n /**\n * If specified, this is the base URI that requests will be made against for this ServiceClient.\n * If it is not specified, then all OperationSpecs must contain a baseUrl property.\n */\n protected baseUri?: string;\n\n /**\n * The default request content type for the service.\n * Used if no requestContentType is present on an OperationSpec.\n */\n protected requestContentType?: string;\n\n /**\n * The HTTP client that will be used to send requests.\n */\n private readonly _httpClient: HttpClient;\n private readonly _requestPolicyOptions: RequestPolicyOptions;\n\n private readonly _requestPolicyFactories: RequestPolicyFactory[];\n private readonly _withCredentials: boolean;\n\n /**\n * The ServiceClient constructor\n * @constructor\n * @param credentials The credentials used for authentication with the service.\n * @param options The service client options that govern the behavior of the client.\n */\n constructor(\n credentials?: TokenCredential | ServiceClientCredentials,\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ServiceClientOptions\n ) {\n if (!options) {\n options = {};\n }\n\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || new DefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n\n let requestPolicyFactories: RequestPolicyFactory[];\n if (Array.isArray(options.requestPolicyFactories)) {\n logger.info(\"ServiceClient: using custom request policies\");\n requestPolicyFactories = options.requestPolicyFactories;\n } else {\n let authPolicyFactory: RequestPolicyFactory | undefined = undefined;\n if (isTokenCredential(credentials)) {\n logger.info(\n \"ServiceClient: creating bearer token authentication policy from provided credentials\"\n );\n // Create a wrapped RequestPolicyFactory here so that we can provide the\n // correct scope to the BearerTokenAuthenticationPolicy at the first time\n // one is requested. This is needed because generated ServiceClient\n // implementations do not set baseUri until after ServiceClient's constructor\n // is finished, leaving baseUri empty at the time when it is needed to\n // build the correct scope name.\n const wrappedPolicyFactory: () => RequestPolicyFactory = () => {\n let bearerTokenPolicyFactory: RequestPolicyFactory | undefined = undefined;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const serviceClient = this;\n return {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): RequestPolicy {\n if (bearerTokenPolicyFactory === undefined || bearerTokenPolicyFactory === null) {\n bearerTokenPolicyFactory = bearerTokenAuthenticationPolicy(\n credentials,\n `${serviceClient.baseUri || \"\"}/.default`\n );\n }\n\n return bearerTokenPolicyFactory.create(nextPolicy, options);\n }\n };\n };\n\n authPolicyFactory = wrappedPolicyFactory();\n } else if (credentials && typeof credentials.signRequest === \"function\") {\n logger.info(\"ServiceClient: creating signing policy from provided credentials\");\n authPolicyFactory = signingPolicy(credentials);\n } else if (credentials !== undefined && credentials !== null) {\n throw new Error(\"The credentials argument must implement the TokenCredential interface\");\n }\n\n logger.info(\"ServiceClient: using default request policies\");\n requestPolicyFactories = createDefaultRequestPolicyFactories(authPolicyFactory, options);\n if (options.requestPolicyFactories) {\n // options.requestPolicyFactories can also be a function that manipulates\n // the default requestPolicyFactories array\n const newRequestPolicyFactories:\n | void\n | RequestPolicyFactory[] = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n\n let httpRequest: WebResourceLike;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n } else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n } catch (error) {\n return Promise.reject(error);\n }\n\n let httpPipeline: RequestPolicy = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(\n httpPipeline,\n this._requestPolicyOptions\n );\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from.\n * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest.\n * @param {ServiceCallback} callback The callback to call when the response is received.\n */\n async sendOperationRequest(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n callback?: ServiceCallback\n ): Promise {\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n\n const serializerOptions = operationArguments.options?.serializerOptions;\n const httpRequest: WebResourceLike = new WebResource();\n\n let result: Promise;\n try {\n const baseUri: string | undefined = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\n \"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\"\n );\n }\n\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n\n const requestUrl: URLBuilder = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue: string = getOperationArgumentValueFromParameter(\n this,\n operationArguments,\n urlParameter,\n operationSpec.serializer\n );\n urlParameterValue = operationSpec.serializer.serialize(\n urlParameter.mapper,\n urlParameterValue,\n getPathStringFromParameter(urlParameter),\n serializerOptions\n );\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(\n `{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`,\n urlParameterValue\n );\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue: any = getOperationArgumentValueFromParameter(\n this,\n operationArguments,\n queryParameter,\n operationSpec.serializer\n );\n if (queryParameterValue !== undefined && queryParameterValue !== null) {\n queryParameterValue = operationSpec.serializer.serialize(\n queryParameter.mapper,\n queryParameterValue,\n getPathStringFromParameter(queryParameter),\n serializerOptions\n );\n if (\n queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null\n ) {\n if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n // The collection is empty, no need to try serializing the current queryParam\n continue;\n } else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] =\n item === undefined || item === null ? \"\" : item.toString();\n }\n }\n } else if (\n queryParameter.collectionFormat === QueryCollectionFormat.Ssv ||\n queryParameter.collectionFormat === QueryCollectionFormat.Tsv\n ) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (\n queryParameterValue[index] !== undefined &&\n queryParameterValue[index] !== null\n ) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n } else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (\n queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null &&\n queryParameter.collectionFormat !== QueryCollectionFormat.Multi &&\n queryParameter.collectionFormat !== QueryCollectionFormat.Ssv &&\n queryParameter.collectionFormat !== QueryCollectionFormat.Tsv\n ) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(\n queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter),\n queryParameterValue\n );\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue: any = getOperationArgumentValueFromParameter(\n this,\n operationArguments,\n headerParameter,\n operationSpec.serializer\n );\n if (headerValue !== undefined && headerValue !== null) {\n headerValue = operationSpec.serializer.serialize(\n headerParameter.mapper,\n headerValue,\n getPathStringFromParameter(headerParameter),\n serializerOptions\n );\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper)\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n httpRequest.headers.set(\n headerParameter.mapper.serializedName ||\n getPathStringFromParameter(headerParameter),\n headerValue\n );\n }\n }\n }\n }\n\n const options: RequestOptionsBase | undefined = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n\n if (options.spanOptions) {\n httpRequest.spanOptions = options.spanOptions;\n }\n\n if (options.shouldDeserialize !== undefined && options.shouldDeserialize !== null) {\n httpRequest.shouldDeserialize = options.shouldDeserialize;\n }\n }\n\n httpRequest.withCredentials = this._withCredentials;\n\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n\n if (httpRequest.streamResponseBody === undefined || httpRequest.streamResponseBody === null) {\n httpRequest.streamResponseBody = isStreamOperation(operationSpec);\n }\n\n let rawResponse: HttpOperationResponse;\n let sendRequestError;\n try {\n rawResponse = await this.sendRequest(httpRequest);\n } catch (error) {\n sendRequestError = error;\n }\n if (sendRequestError) {\n if (sendRequestError.response) {\n sendRequestError.details = flattenResponse(\n sendRequestError.response,\n operationSpec.responses[sendRequestError.statusCode] ||\n operationSpec.responses[\"default\"]\n );\n }\n result = Promise.reject(sendRequestError);\n } else {\n result = Promise.resolve(\n flattenResponse(rawResponse!, operationSpec.responses[rawResponse!.status])\n );\n }\n } catch (error) {\n result = Promise.reject(error);\n }\n\n const cb = callback;\n if (cb) {\n result\n // tslint:disable-next-line:no-null-keyword\n .then((res) => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch((err) => cb(err));\n }\n\n return result;\n }\n}\n\nexport function serializeRequestBody(\n serviceClient: ServiceClient,\n httpRequest: WebResourceLike,\n operationArguments: OperationArguments,\n operationSpec: OperationSpec\n): void {\n const serializerOptions = operationArguments.options?.serializerOptions ?? {};\n const updatedOptions: Required = {\n rootName: serializerOptions.rootName ?? \"\",\n includeRoot: serializerOptions.includeRoot ?? false,\n xmlCharKey: serializerOptions.xmlCharKey ?? XML_CHARKEY\n };\n\n const xmlCharKey = serializerOptions.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(\n serviceClient,\n operationArguments,\n operationSpec.requestBody,\n operationSpec.serializer\n );\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const {\n required,\n xmlName,\n xmlElementName,\n serializedName,\n xmlNamespace,\n xmlNamespacePrefix\n } = bodyMapper;\n const typeName = bodyMapper.type.name;\n\n try {\n if ((httpRequest.body !== undefined && httpRequest.body !== null) || required) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(\n operationSpec.requestBody\n );\n httpRequest.body = operationSpec.serializer.serialize(\n bodyMapper,\n httpRequest.body,\n requestBodyParameterPathString,\n updatedOptions\n );\n\n const isStream = typeName === MapperType.Stream;\n\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(\n xmlNamespace,\n xmlnsKey,\n typeName,\n httpRequest.body,\n updatedOptions\n );\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(\n utils.prepareXMLRootList(\n value,\n xmlElementName || xmlName || serializedName!,\n xmlnsKey,\n xmlNamespace\n ),\n {\n rootName: xmlName || serializedName,\n xmlCharKey\n }\n );\n } else if (!isStream) {\n httpRequest.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey\n });\n }\n } else if (\n typeName === MapperType.String &&\n (operationSpec.contentType?.match(\"text/plain\") || operationSpec.mediaType === \"text\")\n ) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n } else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n } catch (error) {\n throw new Error(\n `Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(\n serializedName,\n undefined,\n \" \"\n )}.`\n );\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue: any = getOperationArgumentValueFromParameter(\n serviceClient,\n operationArguments,\n formDataParameter,\n operationSpec.serializer\n );\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName: string =\n formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(\n formDataParameter.mapper,\n formDataParameterValue,\n getPathStringFromParameter(formDataParameter),\n updatedOptions\n );\n }\n }\n }\n}\n\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(\n xmlNamespace: string | undefined,\n xmlnsKey: string,\n typeName: string,\n serializedValue: any,\n options: Required\n): any {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result: any = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n\n return serializedValue;\n}\n\nfunction getValueOrFunctionResult(\n value: undefined | string | ((defaultValue: string) => string),\n defaultValueCreator: () => string\n): string {\n let result: string;\n if (typeof value === \"string\") {\n result = value;\n } else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\n\nfunction createDefaultRequestPolicyFactories(\n authPolicyFactory: RequestPolicyFactory | undefined,\n options: ServiceClientOptions\n): RequestPolicyFactory[] {\n const factories: RequestPolicyFactory[] = [];\n\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n\n if (authPolicyFactory) {\n factories.push(authPolicyFactory);\n }\n\n const userAgentHeaderName: string = getValueOrFunctionResult(\n options.userAgentHeaderName,\n getDefaultUserAgentHeaderName\n );\n const userAgentHeaderValue: string = getValueOrFunctionResult(\n options.userAgent,\n getDefaultUserAgentValue\n );\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n\n if (isNode) {\n factories.push(proxyPolicy(options.proxySettings));\n }\n\n factories.push(logPolicy({ logger: logger.info }));\n\n return factories;\n}\n\nexport function createPipelineFromOptions(\n pipelineOptions: InternalPipelineOptions,\n authPolicyFactory?: RequestPolicyFactory\n): ServiceClientOptions {\n const requestPolicyFactories: RequestPolicyFactory[] = [];\n\n if (pipelineOptions.sendStreamingJson) {\n requestPolicyFactories.push(ndJsonPolicy());\n }\n\n let userAgentValue = undefined;\n if (pipelineOptions.userAgentOptions && pipelineOptions.userAgentOptions.userAgentPrefix) {\n const userAgentInfo: string[] = [];\n userAgentInfo.push(pipelineOptions.userAgentOptions.userAgentPrefix);\n\n // Add the default user agent value if it isn't already specified\n // by the userAgentPrefix option.\n const defaultUserAgentInfo = getDefaultUserAgentValue();\n if (userAgentInfo.indexOf(defaultUserAgentInfo) === -1) {\n userAgentInfo.push(defaultUserAgentInfo);\n }\n\n userAgentValue = userAgentInfo.join(\" \");\n }\n\n const keepAliveOptions = {\n ...DefaultKeepAliveOptions,\n ...pipelineOptions.keepAliveOptions\n };\n\n const retryOptions = {\n ...DefaultRetryOptions,\n ...pipelineOptions.retryOptions\n };\n\n const redirectOptions = {\n ...DefaultRedirectOptions,\n ...pipelineOptions.redirectOptions\n };\n\n if (isNode) {\n requestPolicyFactories.push(proxyPolicy(pipelineOptions.proxyOptions));\n }\n\n const deserializationOptions = {\n ...DefaultDeserializationOptions,\n ...pipelineOptions.deserializationOptions\n };\n\n const loggingOptions: LogPolicyOptions = {\n ...pipelineOptions.loggingOptions\n };\n\n requestPolicyFactories.push(\n tracingPolicy({ userAgent: userAgentValue }),\n keepAlivePolicy(keepAliveOptions),\n userAgentPolicy({ value: userAgentValue }),\n generateClientRequestIdPolicy(),\n deserializationPolicy(deserializationOptions.expectedContentTypes),\n throttlingRetryPolicy(),\n systemErrorRetryPolicy(),\n exponentialRetryPolicy(\n retryOptions.maxRetries,\n retryOptions.retryDelayInMs,\n retryOptions.maxRetryDelayInMs\n )\n );\n\n if (redirectOptions.handleRedirects) {\n requestPolicyFactories.push(redirectPolicy(redirectOptions.maxRetries));\n }\n\n if (authPolicyFactory) {\n requestPolicyFactories.push(authPolicyFactory);\n }\n\n requestPolicyFactories.push(logPolicy(loggingOptions));\n\n if (isNode && pipelineOptions.decompressResponse === false) {\n requestPolicyFactories.push(disableResponseDecompressionPolicy());\n }\n\n return {\n httpClient: pipelineOptions.httpClient,\n requestPolicyFactories\n };\n}\n\nexport type PropertyParent = { [propertyName: string]: any };\n\n/**\n * Get the property parent for the property at the provided path when starting with the provided\n * parent object.\n */\nexport function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent {\n if (parent && propertyPath) {\n const propertyPathLength: number = propertyPath.length;\n for (let i = 0; i < propertyPathLength - 1; ++i) {\n const propertyName: string = propertyPath[i];\n if (!parent[propertyName]) {\n parent[propertyName] = {};\n }\n parent = parent[propertyName];\n }\n }\n return parent;\n}\n\nfunction getOperationArgumentValueFromParameter(\n serviceClient: ServiceClient,\n operationArguments: OperationArguments,\n parameter: OperationParameter,\n serializer: Serializer\n): any {\n return getOperationArgumentValueFromParameterPath(\n serviceClient,\n operationArguments,\n parameter.parameterPath,\n parameter.mapper,\n serializer\n );\n}\n\nexport function getOperationArgumentValueFromParameterPath(\n serviceClient: ServiceClient,\n operationArguments: OperationArguments,\n parameterPath: ParameterPath,\n parameterMapper: Mapper,\n serializer: Serializer\n): any {\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n const serializerOptions = operationArguments.options?.serializerOptions;\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult: PropertySearchResult = getPropertyFromParameterPath(\n operationArguments,\n parameterPath\n );\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n\n // Serialize just for validation purposes.\n const parameterPathString: string = getPathStringFromParameterPath(\n parameterPath,\n parameterMapper\n );\n serializer.serialize(parameterMapper, value, parameterPathString, serializerOptions);\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![\n propertyName\n ];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameterPath(\n serviceClient,\n operationArguments,\n propertyPath,\n propertyMapper,\n serializer\n );\n // Serialize just for validation purposes.\n const propertyPathString: string = getPathStringFromParameterPath(\n propertyPath,\n propertyMapper\n );\n serializer.serialize(propertyMapper, propertyValue, propertyPathString, serializerOptions);\n if (propertyValue !== undefined && propertyValue !== null) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(\n parent: { [parameterName: string]: any },\n parameterPath: string[]\n): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent !== undefined && parent !== null && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nexport function flattenResponse(\n _response: HttpOperationResponse,\n responseSpec: OperationResponse | undefined\n): RestResponse {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n\n const addOperationResponse = (obj: {}): {\n _response: HttpOperationResponse;\n } => {\n return Object.defineProperty(obj, \"_response\", {\n value: _response\n });\n };\n\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse({\n ...parsedHeaders,\n blobBody: _response.blobBody,\n readableStreamBody: _response.readableStreamBody\n });\n }\n\n const modelProperties =\n (typeName === \"Composite\" && (bodyMapper as CompositeMapper).type.modelProperties) || {};\n const isPageableResponse = Object.keys(modelProperties).some(\n (k) => modelProperties[k].serializedName === \"\"\n );\n if (typeName === \"Sequence\" || isPageableResponse) {\n const arrayResponse = [...(_response.parsedBody || [])] as RestResponse & any[];\n\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n }\n }\n\n if (\n bodyMapper ||\n _response.request.method === \"HEAD\" ||\n utils.isPrimitiveType(_response.parsedBody)\n ) {\n // primitive body types and HEAD booleans\n return addOperationResponse({\n ...parsedHeaders,\n body: _response.parsedBody\n });\n }\n\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/url.js b/node_modules/@azure/core-http/es/src/url.js new file mode 100644 index 000000000..b20c0945e --- /dev/null +++ b/node_modules/@azure/core-http/es/src/url.js @@ -0,0 +1,602 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { replaceAll } from "./util/utils"; +/** + * A class that handles the query portion of a URLBuilder. + */ +var URLQuery = /** @class */ (function () { + function URLQuery() { + this._rawQuery = {}; + } + /** + * Get whether or not there any query parameters in this URLQuery. + */ + URLQuery.prototype.any = function () { + return Object.keys(this._rawQuery).length > 0; + }; + /** + * Get the keys of the query string. + */ + URLQuery.prototype.keys = function () { + return Object.keys(this._rawQuery); + }; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + URLQuery.prototype.set = function (parameterName, parameterValue) { + if (parameterName) { + if (parameterValue !== undefined && parameterValue !== null) { + var newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } + else { + delete this._rawQuery[parameterName]; + } + } + }; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + URLQuery.prototype.get = function (parameterName) { + return parameterName ? this._rawQuery[parameterName] : undefined; + }; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + URLQuery.prototype.toString = function () { + var result = ""; + for (var parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + var parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + var parameterStrings = []; + for (var _i = 0, parameterValue_1 = parameterValue; _i < parameterValue_1.length; _i++) { + var parameterValueElement = parameterValue_1[_i]; + parameterStrings.push(parameterName + "=" + parameterValueElement); + } + result += parameterStrings.join("&"); + } + else { + result += parameterName + "=" + parameterValue; + } + } + return result; + }; + /** + * Parse a URLQuery from the provided text. + */ + URLQuery.parse = function (text) { + var result = new URLQuery(); + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + var currentState = "ParameterName"; + var parameterName = ""; + var parameterValue = ""; + for (var i = 0; i < text.length; ++i) { + var currentCharacter = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + case "&": + parameterName = ""; + parameterValue = ""; + break; + default: + parameterName += currentCharacter; + break; + } + break; + case "ParameterValue": + switch (currentCharacter) { + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + default: + parameterValue += currentCharacter; + break; + } + break; + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + return result; + }; + return URLQuery; +}()); +export { URLQuery }; +/** + * A class that handles creating, modifying, and parsing URLs. + */ +var URLBuilder = /** @class */ (function () { + function URLBuilder() { + } + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setScheme = function (scheme) { + if (!scheme) { + this._scheme = undefined; + } + else { + this.set(scheme, "SCHEME"); + } + }; + /** + * Get the scheme that has been set in this URL. + */ + URLBuilder.prototype.getScheme = function () { + return this._scheme; + }; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setHost = function (host) { + if (!host) { + this._host = undefined; + } + else { + this.set(host, "SCHEME_OR_HOST"); + } + }; + /** + * Get the host that has been set in this URL. + */ + URLBuilder.prototype.getHost = function () { + return this._host; + }; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setPort = function (port) { + if (port === undefined || port === null || port === "") { + this._port = undefined; + } + else { + this.set(port.toString(), "PORT"); + } + }; + /** + * Get the port that has been set in this URL. + */ + URLBuilder.prototype.getPort = function () { + return this._port; + }; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + URLBuilder.prototype.setPath = function (path) { + if (!path) { + this._path = undefined; + } + else { + var schemeIndex = path.indexOf("://"); + if (schemeIndex !== -1) { + var schemeStart = path.lastIndexOf("/", schemeIndex); + // Make sure to only grab the URL part of the path before setting the state back to SCHEME + // this will handle cases such as "/a/b/c/https://microsoft.com" => "https://microsoft.com" + this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), "SCHEME"); + } + else { + this.set(path, "PATH"); + } + } + }; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + URLBuilder.prototype.appendPath = function (path) { + if (path) { + var currentPath = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + if (path.startsWith("/")) { + path = path.substring(1); + } + path = currentPath + path; + } + this.set(path, "PATH"); + } + }; + /** + * Get the path that has been set in this URL. + */ + URLBuilder.prototype.getPath = function () { + return this._path; + }; + /** + * Set the query in this URL. + */ + URLBuilder.prototype.setQuery = function (query) { + if (!query) { + this._query = undefined; + } + else { + this._query = URLQuery.parse(query); + } + }; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + URLBuilder.prototype.setQueryParameter = function (queryParameterName, queryParameterValue) { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + }; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + URLBuilder.prototype.getQueryParameterValue = function (queryParameterName) { + return this._query ? this._query.get(queryParameterName) : undefined; + }; + /** + * Get the query in this URL. + */ + URLBuilder.prototype.getQuery = function () { + return this._query ? this._query.toString() : undefined; + }; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + URLBuilder.prototype.set = function (text, startState) { + var tokenizer = new URLTokenizer(text, startState); + while (tokenizer.next()) { + var token = tokenizer.current(); + var tokenPath = void 0; + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + case "HOST": + this._host = token.text || undefined; + break; + case "PORT": + this._port = token.text || undefined; + break; + case "PATH": + tokenPath = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + default: + throw new Error("Unrecognized URLTokenType: " + token.type); + } + } + } + }; + URLBuilder.prototype.toString = function () { + var result = ""; + if (this._scheme) { + result += this._scheme + "://"; + } + if (this._host) { + result += this._host; + } + if (this._port) { + result += ":" + this._port; + } + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + if (this._query && this._query.any()) { + result += "?" + this._query.toString(); + } + return result; + }; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + URLBuilder.prototype.replaceAll = function (searchValue, replaceValue) { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + }; + URLBuilder.parse = function (text) { + var result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + }; + return URLBuilder; +}()); +export { URLBuilder }; +var URLToken = /** @class */ (function () { + function URLToken(text, type) { + this.text = text; + this.type = type; + } + URLToken.scheme = function (text) { + return new URLToken(text, "SCHEME"); + }; + URLToken.host = function (text) { + return new URLToken(text, "HOST"); + }; + URLToken.port = function (text) { + return new URLToken(text, "PORT"); + }; + URLToken.path = function (text) { + return new URLToken(text, "PATH"); + }; + URLToken.query = function (text) { + return new URLToken(text, "QUERY"); + }; + return URLToken; +}()); +export { URLToken }; +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export function isAlphaNumericCharacter(character) { + var characterCode = character.charCodeAt(0); + return ((48 /* '0' */ <= characterCode && characterCode <= 57) /* '9' */ || + (65 /* 'A' */ <= characterCode && characterCode <= 90) /* 'Z' */ || + (97 /* 'a' */ <= characterCode && characterCode <= 122) /* 'z' */); +} +/** + * A class that tokenizes URL strings. + */ +var URLTokenizer = /** @class */ (function () { + function URLTokenizer(_text, state) { + this._text = _text; + this._textLength = _text ? _text.length : 0; + this._currentState = state !== undefined && state !== null ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + URLTokenizer.prototype.current = function () { + return this._currentToken; + }; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + URLTokenizer.prototype.next = function () { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } + else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + case "HOST": + nextHost(this); + break; + case "PORT": + nextPort(this); + break; + case "PATH": + nextPath(this); + break; + case "QUERY": + nextQuery(this); + break; + default: + throw new Error("Unrecognized URLTokenizerState: " + this._currentState); + } + } + return !!this._currentToken; + }; + return URLTokenizer; +}()); +export { URLTokenizer }; +/** + * Read the remaining characters from this Tokenizer's character stream. + */ +function readRemaining(tokenizer) { + var result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; +} +/** + * Whether or not this URLTokenizer has a current character. + */ +function hasCurrentCharacter(tokenizer) { + return tokenizer._currentIndex < tokenizer._textLength; +} +/** + * Get the character in the text string at the current index. + */ +function getCurrentCharacter(tokenizer) { + return tokenizer._text[tokenizer._currentIndex]; +} +/** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ +function nextCharacter(tokenizer, step) { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } +} +/** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ +function peekCharacters(tokenizer, charactersToPeek) { + var endIndex = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); +} +/** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ +function readWhile(tokenizer, condition) { + var result = ""; + while (hasCurrentCharacter(tokenizer)) { + var currentCharacter = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } + else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + return result; +} +/** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ +function readWhileLetterOrDigit(tokenizer) { + return readWhile(tokenizer, function (character) { return isAlphaNumericCharacter(character); }); +} +/** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ +function readUntilCharacter(tokenizer) { + var terminatingCharacters = []; + for (var _i = 1; _i < arguments.length; _i++) { + terminatingCharacters[_i - 1] = arguments[_i]; + } + return readWhile(tokenizer, function (character) { return terminatingCharacters.indexOf(character) === -1; }); +} +function nextScheme(tokenizer) { + var scheme = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "HOST"; + } +} +function nextSchemeOrHost(tokenizer) { + var schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } +} +function nextHost(tokenizer) { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + var host = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPort(tokenizer) { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + var port = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPath(tokenizer) { + var path = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextQuery(tokenizer) { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + var query = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; +} +//# sourceMappingURL=url.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/url.js.map b/node_modules/@azure/core-http/es/src/url.js.map new file mode 100644 index 000000000..7979c2280 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/url.js.map @@ -0,0 +1 @@ +{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/url.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;GAEG;AACH;IAAA;QACmB,cAAS,GAAwD,EAAE,CAAC;IA4HvF,CAAC;IA1HC;;OAEG;IACI,sBAAG,GAAV;QACE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,uBAAI,GAAX;QACE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACI,sBAAG,GAAV,UAAW,aAAqB,EAAE,cAAmB;QACnD,IAAI,aAAa,EAAE;YACjB,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE;gBAC3D,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;gBAC5F,IAAI,CAAC,SAAS,CAAC,a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AW,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACxD,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE9C,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE;QACnC,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;KAClC;SAAM;QACL,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC;KACnC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,SAAuB;IACxC,IAAI,mBAAmB,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE;QAC1C,aAAa,CAAC,SAAS,CAAC,CAAC;KAC1B;IAED,IAAM,KAAK,GAAW,aAAa,CAAC,SAAS,CAAC,CAAC;IAC/C,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;AACnC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { replaceAll } from \"./util/utils\";\n\ntype URLQueryParseState = \"ParameterName\" | \"ParameterValue\";\n\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nexport class URLQuery {\n private readonly _rawQuery: { [queryParameterName: string]: string | string[] } = {};\n\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n public any(): boolean {\n return Object.keys(this._rawQuery).length > 0;\n }\n\n /**\n * Get the keys of the query string.\n */\n public keys(): string[] {\n return Object.keys(this._rawQuery);\n }\n\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n public set(parameterName: string, parameterValue: any): void {\n if (parameterName) {\n if (parameterValue !== undefined && parameterValue !== null) {\n const newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n } else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n public get(parameterName: string): string | string[] | undefined {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n public toString(): string {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n } else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n\n /**\n * Parse a URLQuery from the provided text.\n */\n public static parse(text: string): URLQuery {\n const result = new URLQuery();\n\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n\n let currentState: URLQueryParseState = \"ParameterName\";\n\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter: string = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n\n return result;\n }\n}\n\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nexport class URLBuilder {\n private _scheme: string | undefined;\n private _host: string | undefined;\n private _port: string | undefined;\n private _path: string | undefined;\n private _query: URLQuery | undefined;\n\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n public setScheme(scheme: string | undefined): void {\n if (!scheme) {\n this._scheme = undefined;\n } else {\n this.set(scheme, \"SCHEME\");\n }\n }\n\n /**\n * Get the scheme that has been set in this URL.\n */\n public getScheme(): string | undefined {\n return this._scheme;\n }\n\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n public setHost(host: string | undefined): void {\n if (!host) {\n this._host = undefined;\n } else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n\n /**\n * Get the host that has been set in this URL.\n */\n public getHost(): string | undefined {\n return this._host;\n }\n\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n public setPort(port: number | string | undefined): void {\n if (port === undefined || port === null || port === \"\") {\n this._port = undefined;\n } else {\n this.set(port.toString(), \"PORT\");\n }\n }\n\n /**\n * Get the port that has been set in this URL.\n */\n public getPort(): string | undefined {\n return this._port;\n }\n\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n public setPath(path: string | undefined): void {\n if (!path) {\n this._path = undefined;\n } else {\n const schemeIndex = path.indexOf(\"://\");\n if (schemeIndex !== -1) {\n const schemeStart = path.lastIndexOf(\"/\", schemeIndex);\n // Make sure to only grab the URL part of the path before setting the state back to SCHEME\n // this will handle cases such as \"/a/b/c/https://microsoft.com\" => \"https://microsoft.com\"\n this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), \"SCHEME\");\n } else {\n this.set(path, \"PATH\");\n }\n }\n }\n\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n public appendPath(path: string | undefined): void {\n if (path) {\n let currentPath: string | undefined = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n\n /**\n * Get the path that has been set in this URL.\n */\n public getPath(): string | undefined {\n return this._path;\n }\n\n /**\n * Set the query in this URL.\n */\n public setQuery(query: string | undefined): void {\n if (!query) {\n this._query = undefined;\n } else {\n this._query = URLQuery.parse(query);\n }\n }\n\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n public setQueryParameter(queryParameterName: string, queryParameterValue: any): void {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n public getQueryParameterValue(queryParameterName: string): string | string[] | undefined {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n\n /**\n * Get the query in this URL.\n */\n public getQuery(): string | undefined {\n return this._query ? this._query.toString() : undefined;\n }\n\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n private set(text: string, startState: URLTokenizerState): void {\n const tokenizer = new URLTokenizer(text, startState);\n\n while (tokenizer.next()) {\n const token: URLToken | undefined = tokenizer.current();\n let tokenPath: string | undefined;\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n\n case \"PATH\":\n tokenPath = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n\n public toString(): string {\n let result = \"\";\n\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n\n if (this._host) {\n result += this._host;\n }\n\n if (this._port) {\n result += `:${this._port}`;\n }\n\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n\n return result;\n }\n\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n public replaceAll(searchValue: string, replaceValue: string): void {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n\n public static parse(text: string): URLBuilder {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\n\ntype URLTokenizerState = \"SCHEME\" | \"SCHEME_OR_HOST\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\" | \"DONE\";\n\ntype URLTokenType = \"SCHEME\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\";\n\nexport class URLToken {\n public constructor(public readonly text: string, public readonly type: URLTokenType) {}\n\n public static scheme(text: string): URLToken {\n return new URLToken(text, \"SCHEME\");\n }\n\n public static host(text: string): URLToken {\n return new URLToken(text, \"HOST\");\n }\n\n public static port(text: string): URLToken {\n return new URLToken(text, \"PORT\");\n }\n\n public static path(text: string): URLToken {\n return new URLToken(text, \"PATH\");\n }\n\n public static query(text: string): URLToken {\n return new URLToken(text, \"QUERY\");\n }\n}\n\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nexport function isAlphaNumericCharacter(character: string): boolean {\n const characterCode: number = character.charCodeAt(0);\n return (\n (48 /* '0' */ <= characterCode && characterCode <= 57) /* '9' */ ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90) /* 'Z' */ ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122) /* 'z' */\n );\n}\n\n/**\n * A class that tokenizes URL strings.\n */\nexport class URLTokenizer {\n readonly _textLength: number;\n _currentState: URLTokenizerState;\n _currentIndex: number;\n _currentToken: URLToken | undefined;\n\n public constructor(readonly _text: string, state?: URLTokenizerState) {\n this._textLength = _text ? _text.length : 0;\n this._currentState = state !== undefined && state !== null ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n public current(): URLToken | undefined {\n return this._currentToken;\n }\n\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n public next(): boolean {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n } else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n\n case \"HOST\":\n nextHost(this);\n break;\n\n case \"PORT\":\n nextPort(this);\n break;\n\n case \"PATH\":\n nextPath(this);\n break;\n\n case \"QUERY\":\n nextQuery(this);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer: URLTokenizer): string {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer: URLTokenizer): boolean {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer: URLTokenizer): string {\n return tokenizer._text[tokenizer._currentIndex];\n}\n\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer: URLTokenizer, step?: number): void {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer: URLTokenizer, charactersToPeek: number): string {\n let endIndex: number = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer: URLTokenizer, condition: (character: string) => boolean): string {\n let result = \"\";\n\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter: string = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n } else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n\n return result;\n}\n\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer: URLTokenizer): string {\n return readWhile(tokenizer, (character: string) => isAlphaNumericCharacter(character));\n}\n\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer: URLTokenizer, ...terminatingCharacters: string[]): string {\n return readWhile(\n tokenizer,\n (character: string) => terminatingCharacters.indexOf(character) === -1\n );\n}\n\nfunction nextScheme(tokenizer: URLTokenizer): void {\n const scheme: string = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"HOST\";\n }\n}\n\nfunction nextSchemeOrHost(tokenizer: URLTokenizer): void {\n const schemeOrHost: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\n\nfunction nextHost(tokenizer: URLTokenizer): void {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n\n const host: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPort(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n\n const port: string = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPath(tokenizer: URLTokenizer): void {\n const path: string = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextQuery(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n\n const query: string = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/base64.browser.js b/node_modules/@azure/core-http/es/src/util/base64.browser.js new file mode 100644 index 000000000..7275be62c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/base64.browser.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value) { + return btoa(value); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value) { + var str = ""; + for (var i = 0; i < value.length; i++) { + str += String.fromCharCode(value[i]); + } + return btoa(str); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value) { + var byteString = atob(value); + var arr = new Uint8Array(byteString.length); + for (var i = 0; i < byteString.length; i++) { + arr[i] = byteString.charCodeAt(i); + } + return arr; +} +//# sourceMappingURL=base64.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/base64.browser.js.map b/node_modules/@azure/core-http/es/src/util/base64.browser.js.map new file mode 100644 index 000000000..d0b5d2d96 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/base64.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.browser.js","sourceRoot":"","sources":["../../../src/util/base64.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACtC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAM,GAAG,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KACnC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Encodes a string in base64 format.\n * @param value the string to encode\n */\nexport function encodeString(value: string): string {\n return btoa(value);\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value the Uint8Aray to encode\n */\nexport function encodeByteArray(value: Uint8Array): string {\n let str = \"\";\n for (let i = 0; i < value.length; i++) {\n str += String.fromCharCode(value[i]);\n }\n return btoa(str);\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value the base64 string to decode\n */\nexport function decodeString(value: string): Uint8Array {\n const byteString = atob(value);\n const arr = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n arr[i] = byteString.charCodeAt(i);\n }\n return arr;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/base64.js b/node_modules/@azure/core-http/es/src/util/base64.js new file mode 100644 index 000000000..1be11ebc5 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/base64.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value) { + return Buffer.from(value).toString("base64"); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value) { + // Buffer.from accepts | -- the TypeScript definition is off here + // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length + var bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value) { + return Buffer.from(value, "base64"); +} +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/base64.js.map b/node_modules/@azure/core-http/es/src/util/base64.js.map new file mode 100644 index 000000000..4fe86344b --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/util/base64.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,kGAAkG;IAClG,mGAAmG;IACnG,IAAM,WAAW,GAAG,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAqB,CAAC,CAAC;IAC/F,OAAO,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Encodes a string in base64 format.\n * @param value the string to encode\n */\nexport function encodeString(value: string): string {\n return Buffer.from(value).toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value the Uint8Aray to encode\n */\nexport function encodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts | -- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer as ArrayBuffer);\n return bufferValue.toString(\"base64\");\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value the base64 string to decode\n */\nexport function decodeString(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/constants.js b/node_modules/@azure/core-http/es/src/util/constants.js new file mode 100644 index 000000000..fd0d8fa6a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/constants.js @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export var Constants = { + /** + * The core-http version + * @const + * @type {string} + */ + coreHttpVersion: "1.2.0", + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + /** + * Specifies NO Proxy. + * + * @const + * @type {string} + */ + NO_PROXY: "NO_PROXY", + /** + * Specifies ALL Proxy. + * + * @const + * @type {string} + */ + ALL_PROXY: "ALL_PROXY", + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + StatusCodes: { + TooManyRequests: 429 + } + }, + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + AUTHORIZATION_SCHEME: "Bearer", + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } +}; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/constants.js.map b/node_modules/@azure/core-http/es/src/util/constants.js.map new file mode 100644 index 000000000..1d8b933de --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/util/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB;;;;OAIG;IACH,eAAe,EAAE,OAAO;IAExB;;;;;OAKG;IACH,IAAI,EAAE,OAAO;IAEb;;;;;OAKG;IACH,KAAK,EAAE,QAAQ;IAEf;;;;;OAKG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;OAKG;IACH,WAAW,EAAE,aAAa;IAE1B;;;;;OAKG;IACH,QAAQ,EAAE,UAAU;IAEpB;;;;;OAKG;IACH,SAAS,EAAE,WAAW;IAEtB,aAAa,EAAE;QACb;;;;;WAKG;QACH,SAAS,EAAE;YACT,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;SACf;QAED,WAAW,EAAE;YACX,eAAe,EAAE,GAAG;SACrB;KACF;IAED;;OAEG;IACH,eAAe,EAAE;QACf;;;;;WAKG;QACH,aAAa,EAAE,eAAe;QAE9B,oBAAoB,EAAE,QAAQ;QAE9B;;;;;;;WAOG;QACH,WAAW,EAAE,aAAa;QAE1B;;;;;WAKG;QACH,UAAU,EAAE,YAAY;KACzB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const Constants = {\n /**\n * The core-http version\n * @const\n * @type {string}\n */\n coreHttpVersion: \"1.2.0\",\n\n /**\n * Specifies HTTP.\n *\n * @const\n * @type {string}\n */\n HTTP: \"http:\",\n\n /**\n * Specifies HTTPS.\n *\n * @const\n * @type {string}\n */\n HTTPS: \"https:\",\n\n /**\n * Specifies HTTP Proxy.\n *\n * @const\n * @type {string}\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n\n /**\n * Specifies HTTPS Proxy.\n *\n * @const\n * @type {string}\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n\n /**\n * Specifies NO Proxy.\n *\n * @const\n * @type {string}\n */\n NO_PROXY: \"NO_PROXY\",\n\n /**\n * Specifies ALL Proxy.\n *\n * @const\n * @type {string}\n */\n ALL_PROXY: \"ALL_PROXY\",\n\n HttpConstants: {\n /**\n * Http Verbs\n *\n * @const\n * @enum {string}\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\"\n },\n\n StatusCodes: {\n TooManyRequests: 429\n }\n },\n\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n *\n * @const\n * @type {string}\n */\n AUTHORIZATION: \"authorization\",\n\n AUTHORIZATION_SCHEME: \"Bearer\",\n\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n *\n * @const\n * @type {string}\n */\n RETRY_AFTER: \"Retry-After\",\n\n /**\n * The UserAgent header.\n *\n * @const\n * @type {string}\n */\n USER_AGENT: \"User-Agent\"\n }\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js b/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js new file mode 100644 index 000000000..21d91b5b0 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export var DEFAULT_CLIENT_RETRY_COUNT = 3; +// intervals are in ms +export var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; +export var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; +export var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; +export function isNumber(n) { + return typeof n === "number"; +} +/** + * @internal + * Determines if the operation should be retried. + * + * @param {number} retryLimit Specifies the max number of retries. + * @param {(response?: HttpOperationResponse, error?: RetryError) => boolean} predicate Initial chekck on whether to retry based on given responses or errors + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +export function shouldRetry(retryLimit, predicate, retryData, response, error) { + if (!predicate(response, error)) { + return false; + } + return retryData.retryCount < retryLimit; +} +/** + * @internal + * Updates the retry data for the next attempt. + * + * @param {RetryPolicyOptions} retryOptions specifies retry interval, and its lower bound and upper bound. + * @param {RetryData} [retryData] The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +export function updateRetryData(retryOptions, retryData, err) { + if (retryData === void 0) { retryData = { retryCount: 0, retryInterval: 0 }; } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount - 1) - 1; + var boundedRandDelta = retryOptions.retryInterval * 0.8 + + Math.floor(Math.random() * (retryOptions.retryInterval * 0.4)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(retryOptions.minRetryInterval + incrementDelta, retryOptions.maxRetryInterval); + return retryData; +} +//# sourceMappingURL=exponentialBackoffStrategy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js.map b/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js.map new file mode 100644 index 000000000..56853241c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/exponentialBackoffStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialBackoffStrategy.js","sourceRoot":"","sources":["../../../src/util/exponentialBackoffStrategy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,CAAC,IAAM,0BAA0B,GAAG,CAAC,CAAC;AAC5C,sBAAsB;AACtB,MAAM,CAAC,IAAM,6BAA6B,GAAG,IAAI,GAAG,EAAE,CAAC;AACvD,MAAM,CAAC,IAAM,iCAAiC,GAAG,IAAI,GAAG,EAAE,CAAC;AAC3D,MAAM,CAAC,IAAM,iCAAiC,GAAG,IAAI,GAAG,CAAC,CAAC;AAE1D,MAAM,UAAU,QAAQ,CAAC,CAAM;IAC7B,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC;AAC/B,CAAC;AAaD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CACzB,UAAkB,EAClB,SAA4E,EAC5E,SAAoB,EACpB,QAAgC,EAChC,KAAkB;IAElB,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IAED,OAAO,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;AAC3C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,YAA2F,EAC3F,SAA0D,EAC1D,GAAgB;IADhB,0BAAA,EAAA,cAAyB,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE;IAG1D,IAAI,GAAG,EAAE;QACP,IAAI,SAAS,CAAC,KAAK,EAAE;YACnB,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;SAClC;QAED,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC;KACvB;IAED,qBAAqB;IACrB,SAAS,CAAC,UAAU,EAAE,CAAC;IAEvB,wBAAwB;IACxB,IAAI,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/D,IAAM,gBAAgB,GACpB,YAAY,CAAC,aAAa,GAAG,GAAG;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC;IACjE,cAAc,IAAI,gBAAgB,CAAC;IAEnC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAChC,YAAY,CAAC,gBAAgB,GAAG,cAAc,EAC9C,YAAY,CAAC,gBAAgB,CAC9B,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse } from \"../coreHttp\";\n\nexport const DEFAULT_CLIENT_RETRY_COUNT = 3;\n// intervals are in ms\nexport const DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nexport const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nexport const DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\nexport function isNumber(n: any): n is number {\n return typeof n === \"number\";\n}\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\n/**\n * @internal\n * Determines if the operation should be retried.\n *\n * @param {number} retryLimit Specifies the max number of retries.\n * @param {(response?: HttpOperationResponse, error?: RetryError) => boolean} predicate Initial chekck on whether to retry based on given responses or errors\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nexport function shouldRetry(\n retryLimit: number,\n predicate: (response?: HttpOperationResponse, error?: RetryError) => boolean,\n retryData: RetryData,\n response?: HttpOperationResponse,\n error?: RetryError\n): boolean {\n if (!predicate(response, error)) {\n return false;\n }\n\n return retryData.retryCount < retryLimit;\n}\n\n/**\n * @internal\n * Updates the retry data for the next attempt.\n *\n * @param {RetryPolicyOptions} retryOptions specifies retry interval, and its lower bound and upper bound.\n * @param {RetryData} [retryData] The retry data.\n * @param {RetryError} [err] The operation\"s error, if any.\n */\nexport function updateRetryData(\n retryOptions: { retryInterval: number; minRetryInterval: number; maxRetryInterval: number },\n retryData: RetryData = { retryCount: 0, retryInterval: 0 },\n err?: RetryError\n): RetryData {\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount - 1) - 1;\n const boundedRandDelta =\n retryOptions.retryInterval * 0.8 +\n Math.floor(Math.random() * (retryOptions.retryInterval * 0.4));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(\n retryOptions.minRetryInterval + incrementDelta,\n retryOptions.maxRetryInterval\n );\n\n return retryData;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/inspect.browser.js b/node_modules/@azure/core-http/es/src/util/inspect.browser.js new file mode 100644 index 000000000..57f7db32e --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/inspect.browser.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export var custom = {}; +//# sourceMappingURL=inspect.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/inspect.browser.js.map b/node_modules/@azure/core-http/es/src/util/inspect.browser.js.map new file mode 100644 index 000000000..b6060ac9a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/inspect.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.browser.js","sourceRoot":"","sources":["../../../src/util/inspect.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const custom = {};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/inspect.js b/node_modules/@azure/core-http/es/src/util/inspect.js new file mode 100644 index 000000000..15879663a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/inspect.js @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { inspect } from "util"; +export var custom = inspect.custom; +//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/inspect.js.map b/node_modules/@azure/core-http/es/src/util/inspect.js.map new file mode 100644 index 000000000..db491959d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../../src/util/inspect.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { inspect } from \"util\";\n\nexport const custom = inspect.custom;\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/sanitizer.js b/node_modules/@azure/core-http/es/src/util/sanitizer.js new file mode 100644 index 000000000..be6c7171d --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/sanitizer.js @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign } from "tslib"; +import { URLBuilder, URLQuery } from "../url"; +var RedactedString = "REDACTED"; +var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent" +]; +var defaultAllowedQueryParameters = ["api-version"]; +var Sanitizer = /** @class */ (function () { + function Sanitizer(_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.allowedHeaderNames, allowedHeaderNames = _c === void 0 ? [] : _c, _d = _b.allowedQueryParameters, allowedQueryParameters = _d === void 0 ? [] : _d; + allowedHeaderNames = Array.isArray(allowedHeaderNames) + ? defaultAllowedHeaderNames.concat(allowedHeaderNames) + : defaultAllowedHeaderNames; + allowedQueryParameters = Array.isArray(allowedQueryParameters) + ? defaultAllowedQueryParameters.concat(allowedQueryParameters) + : defaultAllowedQueryParameters; + this.allowedHeaderNames = new Set(allowedHeaderNames.map(function (n) { return n.toLowerCase(); })); + this.allowedQueryParameters = new Set(allowedQueryParameters.map(function (p) { return p.toLowerCase(); })); + } + Sanitizer.prototype.sanitize = function (obj) { + return JSON.stringify(obj, this.replacer.bind(this), 2); + }; + Sanitizer.prototype.replacer = function (key, value) { + // Ensure Errors include their interesting non-enumerable members + if (value instanceof Error) { + return __assign(__assign({}, value), { name: value.name, message: value.message }); + } + if (key === "_headersMap") { + return this.sanitizeHeaders(key, value); + } + else if (key === "url") { + return this.sanitizeUrl(value); + } + else if (key === "query") { + return this.sanitizeQuery(value); + } + else if (key === "body") { + // Don't log the request body + return undefined; + } + else if (key === "response") { + // Don't log response again + return undefined; + } + else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + return value; + }; + Sanitizer.prototype.sanitizeHeaders = function (_, value) { + return this.sanitizeObject(value, this.allowedHeaderNames, function (v, k) { return v[k].value; }); + }; + Sanitizer.prototype.sanitizeQuery = function (value) { + return this.sanitizeObject(value, this.allowedQueryParameters, function (v, k) { return v[k]; }); + }; + Sanitizer.prototype.sanitizeObject = function (value, allowedKeys, accessor) { + if (typeof value !== "object" || value === null) { + return value; + } + var sanitized = {}; + for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) { + var k = _a[_i]; + if (allowedKeys.has(k.toLowerCase())) { + sanitized[k] = accessor(value, k); + } + else { + sanitized[k] = RedactedString; + } + } + return sanitized; + }; + Sanitizer.prototype.sanitizeUrl = function (value) { + if (typeof value !== "string" || value === null) { + return value; + } + var urlBuilder = URLBuilder.parse(value); + var queryString = urlBuilder.getQuery(); + if (!queryString) { + return value; + } + var query = URLQuery.parse(queryString); + for (var _i = 0, _a = query.keys(); _i < _a.length; _i++) { + var k = _a[_i]; + if (!this.allowedQueryParameters.has(k.toLowerCase())) { + query.set(k, RedactedString); + } + } + urlBuilder.setQuery(query.toString()); + return urlBuilder.toString(); + }; + return Sanitizer; +}()); +export { Sanitizer }; +//# sourceMappingURL=sanitizer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/sanitizer.js.map b/node_modules/@azure/core-http/es/src/util/sanitizer.js.map new file mode 100644 index 000000000..dc338bc39 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/sanitizer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sanitizer.js","sourceRoot":"","sources":["../../../src/util/sanitizer.ts"],"names":[],"mappings":"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CAAC,QAAQ,EAAE,CAAC;QAE1C,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,KAAK,CAAC;SACd;QAED,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC1C,KAAgB,UAAY,EAAZ,KAAA,KAAK,CAAC,IAAI,EAAE,EAAZ,cAAY,EAAZ,IAAY,EAAE;YAAzB,IAAM,CAAC,SAAA;YACV,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE;gBACrD,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;aAC9B;SACF;QAED,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtC,OAAO,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IACH,gBAAC;AAAD,CAAC,AAvGD,IAuGC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { URLBuilder, URLQuery } from \"../url\";\n\nexport interface SanitizerOptions {\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n */\n allowedHeaderNames?: string[];\n\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n */\n allowedQueryParameters?: string[];\n}\n\nconst RedactedString = \"REDACTED\";\n\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"return-client-request-id\",\n \"traceparent\",\n\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n\n \"Accept\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\"\n];\n\nconst defaultAllowedQueryParameters: string[] = [\"api-version\"];\n\nexport class Sanitizer {\n public allowedHeaderNames: Set;\n public allowedQueryParameters: Set;\n\n constructor({ allowedHeaderNames = [], allowedQueryParameters = [] }: SanitizerOptions = {}) {\n allowedHeaderNames = Array.isArray(allowedHeaderNames)\n ? defaultAllowedHeaderNames.concat(allowedHeaderNames)\n : defaultAllowedHeaderNames;\n\n allowedQueryParameters = Array.isArray(allowedQueryParameters)\n ? defaultAllowedQueryParameters.concat(allowedQueryParameters)\n : defaultAllowedQueryParameters;\n\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n\n public sanitize(obj: object): string {\n return JSON.stringify(obj, this.replacer.bind(this), 2);\n }\n\n private replacer(key: string, value: unknown): any {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return {\n ...value,\n name: value.name,\n message: value.message\n };\n }\n if (key === \"_headersMap\") {\n return this.sanitizeHeaders(key, value as {});\n } else if (key === \"url\") {\n return this.sanitizeUrl(value as string);\n } else if (key === \"query\") {\n return this.sanitizeQuery(value as {});\n } else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n } else if (key === \"response\") {\n // Don't log response again\n return undefined;\n } else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n }\n\n return value;\n }\n\n private sanitizeHeaders(_: string, value: { [s: string]: any }): { [s: string]: string } {\n return this.sanitizeObject(value, this.allowedHeaderNames, (v, k) => v[k].value);\n }\n\n private sanitizeQuery(value: { [s: string]: string }): { [s: string]: string } {\n return this.sanitizeObject(value, this.allowedQueryParameters, (v, k) => v[k]);\n }\n\n private sanitizeObject(\n value: { [s: string]: any },\n allowedKeys: Set,\n accessor: (value: any, key: string) => any\n ): { [s: string]: string } {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n const sanitized: { [s: string]: string } = {};\n\n for (const k of Object.keys(value)) {\n if (allowedKeys.has(k.toLowerCase())) {\n sanitized[k] = accessor(value, k);\n } else {\n sanitized[k] = RedactedString;\n }\n }\n\n return sanitized;\n }\n\n private sanitizeUrl(value: string): string {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n\n const urlBuilder = URLBuilder.parse(value);\n const queryString = urlBuilder.getQuery();\n\n if (!queryString) {\n return value;\n }\n\n const query = URLQuery.parse(queryString);\n for (const k of query.keys()) {\n if (!this.allowedQueryParameters.has(k.toLowerCase())) {\n query.set(k, RedactedString);\n }\n }\n\n urlBuilder.setQuery(query.toString());\n return urlBuilder.toString();\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/serializer.common.js b/node_modules/@azure/core-http/es/src/util/serializer.common.js new file mode 100644 index 000000000..c09045717 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/serializer.common.js @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/** + * Default key used to access the XML attributes. + */ +export var XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +export var XML_CHARKEY = "_"; +//# sourceMappingURL=serializer.common.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/serializer.common.js.map b/node_modules/@azure/core-http/es/src/util/serializer.common.js.map new file mode 100644 index 000000000..6e3a596a7 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/serializer.common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.common.js","sourceRoot":"","sources":["../../../src/util/serializer.common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,CAAC;AAC/B;;GAEG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,GAAG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n\n/**\n * Options to govern behavior of xml parser and builder.\n */\nexport interface SerializerOptions {\n /**\n * indicates the name of the root element in the resulting XML when building XML.\n */\n rootName?: string;\n /**\n * indicates whether the root element is to be included or not in the output when parsing XML.\n */\n includeRoot?: boolean;\n /**\n * key used to access the XML value content when parsing XML.\n */\n xmlCharKey?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/utils.js b/node_modules/@azure/core-http/es/src/util/utils.js new file mode 100644 index 000000000..6b87d8437 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/utils.js @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { v4 as uuidv4 } from "uuid"; +import { Constants } from "./constants"; +var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export var isNode = typeof process !== "undefined" && + !!process.version && + !!process.versions && + !!process.versions.node; +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export function urlIsHTTPS(urlToCheck) { + return urlToCheck.protocol.toLowerCase() === Constants.HTTPS; +} +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export function encodeUri(uri) { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); +} +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export function stripResponse(response) { + var strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; +} +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResourceLike} request The Http Request object + * + * @return {WebResourceLike} The stripped version of Http Request. + */ +export function stripRequest(request) { + var strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; +} +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export function isValidUuid(uuid) { + return validUuidRegex.test(uuid); +} +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export function generateUuid() { + return uuidv4(); +} +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export function executePromisesSequentially(promiseFactories, kickstart) { + var result = Promise.resolve(kickstart); + promiseFactories.forEach(function (promiseFactory) { + result = result.then(promiseFactory); + }); + return result; +} +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export function delay(t, value) { + return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); }); +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export function promiseToCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise + .then(function (data) { + // eslint-disable-next-line promise/no-callback-in-promise + return cb(undefined, data); + }) + .catch(function (err) { + // eslint-disable-next-line promise/no-callback-in-promise + cb(err); + }); + }; +} +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export function promiseToServiceCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise + .then(function (data) { + return process.nextTick(cb, undefined, data.parsedBody, data.request, data); + }) + .catch(function (err) { + process.nextTick(cb, err); + }); + }; +} +export function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + var _a, _b, _c; + if (!Array.isArray(obj)) { + obj = [obj]; + } + if (!xmlNamespaceKey || !xmlNamespace) { + return _a = {}, _a[elementName] = obj, _a; + } + return _b = {}, _b[elementName] = obj, _b.$ = (_c = {}, _c[xmlNamespaceKey] = xmlNamespace, _c), _b; +} +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export function applyMixins(targetCtor, sourceCtors) { + sourceCtors.forEach(function (sourceCtors) { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(function (name) { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); +} +var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export function isDuration(value) { + return validateISODuration.test(value); +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +/** + * Determines whether the given entity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param {any} value Any entity + * @return {boolean} - true is it is primitive type, false otherwise. + */ +export function isPrimitiveType(value) { + return (typeof value !== "object" && typeof value !== "function") || value === null; +} +export function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; + } + else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return undefined; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/utils.js.map b/node_modules/@azure/core-http/es/src/util/utils.js.map new file mode 100644 index 000000000..c623b343a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/util/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,IAAM,cAAc,GAAG,gFAAgF,CAAC;AAExG;;GAEG;AACH,MAAM,CAAC,IAAM,MAAM,GACjB,OAAO,OAAO,KAAK,WAAW;IAC9B,CAAC,CAAC,OAAO,CAAC,OAAO;IACjB,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,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CACxB,KAAyB,EACzB,WAAmB,EACnB,YAAoB;IAEpB,OAAO,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;AAC5F,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAU;IACxC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAC1B;SAAM,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;KACxC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { v4 as uuidv4 } from \"uuid\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { RestError } from \"../restError\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"./constants\";\n\nconst validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;\n\n/**\n * A constant that indicates whether the environment is node.js or browser based.\n */\nexport const isNode =\n typeof process !== \"undefined\" &&\n !!process.version &&\n !!process.versions &&\n !!process.versions.node;\n\n/**\n * Checks if a parsed URL is HTTPS\n *\n * @param {object} urlToCheck The url to check\n * @return {boolean} True if the URL is HTTPS; false otherwise.\n */\nexport function urlIsHTTPS(urlToCheck: { protocol: string }): boolean {\n return urlToCheck.protocol.toLowerCase() === Constants.HTTPS;\n}\n\n/**\n * Encodes an URI.\n *\n * @param {string} uri The URI to be encoded.\n * @return {string} The encoded URI.\n */\nexport function encodeUri(uri: string): string {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param {HttpOperationResponse} response The Http Response\n *\n * @return {object} The stripped version of Http Response.\n */\nexport function stripResponse(response: HttpOperationResponse): any {\n const strippedResponse: any = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param {WebResourceLike} request The Http Request object\n *\n * @return {WebResourceLike} The stripped version of Http Request.\n */\nexport function stripRequest(request: WebResourceLike): WebResourceLike {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n\n/**\n * Validates the given uuid as a string\n *\n * @param {string} uuid The uuid as a string that needs to be validated\n *\n * @return {boolean} True if the uuid is valid; false otherwise.\n */\nexport function isValidUuid(uuid: string): boolean {\n return validUuidRegex.test(uuid);\n}\n\n/**\n * Generated UUID\n *\n * @return {string} RFC4122 v4 UUID.\n */\nexport function generateUuid(): string {\n return uuidv4();\n}\n\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param {Array} promiseFactories An array of promise factories(A function that return a promise)\n *\n * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n *\n * @return A chain of resolved or rejected promises\n */\nexport function executePromisesSequentially(\n promiseFactories: Array,\n kickstart: any\n): Promise {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after t milliseconds.\n * @param {number} t The number of milliseconds to be delayed.\n * @param {T} value The value to be resolved with after a timeout of t milliseconds.\n * @returns {Promise} Resolved promise\n */\nexport function delay(t: number, value?: T): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\n}\n\n/**\n * Service callback that is returned for REST requests initiated by the service client.\n */\nexport interface ServiceCallback {\n /**\n * A method that will be invoked as a callback to a service function.\n * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null.\n * @param {TResult} [result] The deserialized response body if an error did not occur.\n * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur.\n * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur.\n */\n (\n err: Error | RestError | null,\n result?: TResult,\n request?: WebResourceLike,\n response?: HttpOperationResponse\n ): void;\n}\n\n/**\n * Converts a Promise to a callback.\n * @param {Promise} promise The Promise to be converted to a callback\n * @returns {Function} A function that takes the callback (cb: Function): void\n * @deprecated generated code should instead depend on responseToBody\n */\nexport function promiseToCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: Function): void => {\n promise\n .then((data: any) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n return cb(undefined, data);\n })\n .catch((err: Error) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n cb(err);\n });\n };\n}\n\n/**\n * Converts a Promise to a service callback.\n * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void\n */\nexport function promiseToServiceCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: ServiceCallback): void => {\n promise\n .then((data: HttpOperationResponse) => {\n return process.nextTick(cb, undefined, data.parsedBody as T, data.request, data);\n })\n .catch((err: Error) => {\n process.nextTick(cb, err);\n });\n };\n}\n\nexport function prepareXMLRootList(\n obj: any,\n elementName: string,\n xmlNamespaceKey?: string,\n xmlNamespace?: string\n): { [s: string]: any } {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n\n return { [elementName]: obj, $: { [xmlNamespaceKey]: xmlNamespace } };\n}\n\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param {object} targetCtor The target object on which the properties need to be applied.\n * @param {Array} sourceCtors An array of source objects from which the properties need to be taken.\n */\nexport function applyMixins(targetCtor: any, sourceCtors: any[]): void {\n sourceCtors.forEach((sourceCtors) => {\n Object.getOwnPropertyNames(sourceCtors.prototype).forEach((name) => {\n targetCtor.prototype[name] = sourceCtors.prototype[name];\n });\n });\n}\n\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param {string} value The value to be validated for ISO 8601 duration format.\n * @return {boolean} `true` if valid, `false` otherwise.\n */\nexport function isDuration(value: string): boolean {\n return validateISODuration.test(value);\n}\n\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param {string | undefined} value The value to search and replace in.\n * @param {string} searchValue The value to search for in the value argument.\n * @param {string} replaceValue The value to replace searchValue with in the value argument.\n * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue.\n */\nexport function replaceAll(\n value: string | undefined,\n searchValue: string,\n replaceValue: string\n): string | undefined {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n\n/**\n * Determines whether the given entity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param {any} value Any entity\n * @return {boolean} - true is it is primitive type, false otherwise.\n */\nexport function isPrimitiveType(value: any): boolean {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}\n\nexport function getEnvironmentValue(name: string): string | undefined {\n if (process.env[name]) {\n return process.env[name];\n } else if (process.env[name.toLowerCase()]) {\n return process.env[name.toLowerCase()];\n }\n return undefined;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/xml.browser.js b/node_modules/@azure/core-http/es/src/util/xml.browser.js new file mode 100644 index 000000000..c6b74abd7 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/xml.browser.js @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { XML_ATTRKEY, XML_CHARKEY } from "./serializer.common"; +// tslint:disable-next-line:no-null-keyword +var doc = document.implementation.createDocument(null, null, null); +var parser = new DOMParser(); +export function parseXML(str, opts) { + var _a, _b, _c; + if (opts === void 0) { opts = {}; } + try { + var updatedOptions = { + rootName: (_a = opts.rootName) !== null && _a !== void 0 ? _a : "", + includeRoot: (_b = opts.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = opts.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + var dom = parser.parseFromString(str, "application/xml"); + throwIfError(dom); + var obj = void 0; + if (updatedOptions.includeRoot) { + obj = domToObject(dom, updatedOptions); + } + else { + obj = domToObject(dom.childNodes[0], updatedOptions); + } + return Promise.resolve(obj); + } + catch (err) { + return Promise.reject(err); + } +} +var errorNS = ""; +try { + errorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0] + .namespaceURI; +} +catch (ignored) { + // Most browsers will return a document containing , but IE will throw. +} +function throwIfError(dom) { + if (errorNS) { + var parserErrors = dom.getElementsByTagNameNS(errorNS, "parsererror"); + if (parserErrors.length) { + throw new Error(parserErrors.item(0).innerHTML); + } + } +} +function isElement(node) { + return !!node.attributes; +} +/** + * Get the Element-typed version of the provided Node if the provided node is an element with + * attributes. If it isn't, then undefined is returned. + */ +function asElementWithAttributes(node) { + return isElement(node) && node.hasAttributes() ? node : undefined; +} +function domToObject(node, options) { + var result = {}; + var childNodeCount = node.childNodes.length; + var firstChildNode = node.childNodes[0]; + var onlyChildTextValue = (firstChildNode && + childNodeCount === 1 && + firstChildNode.nodeType === Node.TEXT_NODE && + firstChildNode.nodeValue) || + undefined; + var elementWithAttributes = asElementWithAttributes(node); + if (elementWithAttributes) { + result[XML_ATTRKEY] = {}; + for (var i = 0; i < elementWithAttributes.attributes.length; i++) { + var attr = elementWithAttributes.attributes[i]; + result[XML_ATTRKEY][attr.nodeName] = attr.nodeValue; + } + if (onlyChildTextValue) { + result[options.xmlCharKey] = onlyChildTextValue; + } + } + else if (childNodeCount === 0) { + result = ""; + } + else if (onlyChildTextValue) { + result = onlyChildTextValue; + } + if (!onlyChildTextValue) { + for (var i = 0; i < childNodeCount; i++) { + var child = node.childNodes[i]; + // Ignore leading/trailing whitespace nodes + if (child.nodeType !== Node.TEXT_NODE) { + var childObject = domToObject(child, options); + if (!result[child.nodeName]) { + result[child.nodeName] = childObject; + } + else if (Array.isArray(result[child.nodeName])) { + result[child.nodeName].push(childObject); + } + else { + result[child.nodeName] = [result[child.nodeName], childObject]; + } + } + } + } + return result; +} +var serializer = new XMLSerializer(); +export function stringifyXML(content, opts) { + var _a, _b, _c; + if (opts === void 0) { opts = {}; } + var updatedOptions = { + rootName: (_a = opts.rootName) !== null && _a !== void 0 ? _a : "root", + includeRoot: (_b = opts.includeRoot) !== null && _b !== void 0 ? _b : false, + xmlCharKey: (_c = opts.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY + }; + var dom = buildNode(content, updatedOptions.rootName, updatedOptions)[0]; + return ('' + serializer.serializeToString(dom)); +} +function buildAttributes(attrs) { + var result = []; + for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) { + var key = _a[_i]; + var attr = doc.createAttribute(key); + attr.value = attrs[key].toString(); + result.push(attr); + } + return result; +} +function buildNode(obj, elementName, options) { + if (obj === undefined || + obj === null || + typeof obj === "string" || + typeof obj === "number" || + typeof obj === "boolean") { + var elem = doc.createElement(elementName); + elem.textContent = obj === undefined || obj === null ? "" : obj.toString(); + return [elem]; + } + else if (Array.isArray(obj)) { + var result = []; + for (var _i = 0, obj_1 = obj; _i < obj_1.length; _i++) { + var arrayElem = obj_1[_i]; + for (var _a = 0, _b = buildNode(arrayElem, elementName, options); _a < _b.length; _a++) { + var child = _b[_a]; + result.push(child); + } + } + return result; + } + else if (typeof obj === "object") { + var elem = doc.createElement(elementName); + for (var _c = 0, _d = Object.keys(obj); _c < _d.length; _c++) { + var key = _d[_c]; + if (key === XML_ATTRKEY) { + for (var _e = 0, _f = buildAttributes(obj[key]); _e < _f.length; _e++) { + var attr = _f[_e]; + elem.attributes.setNamedItem(attr); + } + } + else if (key === options.xmlCharKey) { + elem.textContent = obj[key].toString(); + } + else { + for (var _g = 0, _h = buildNode(obj[key], key, options); _g < _h.length; _g++) { + var child = _h[_g]; + elem.appendChild(child); + } + } + } + return [elem]; + } + else { + throw new Error("Illegal value passed to buildObject: " + obj); + } +} +//# sourceMappingURL=xml.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/xml.browser.js.map b/node_modules/@azure/core-http/es/src/util/xml.browser.js.map new file mode 100644 index 000000000..77ebcb91c --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/xml.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.browser.js","sourceRoot":"","sources":["../../../src/util/xml.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAqB,MAAM,qBAAqB,CAAC;AAElF,2CAA2C;AAC3C,IAAM,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EA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;SACF;QACD,OAAO,CAAC,IAAI,CAAC,CAAC;KACf;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,0CAAwC,GAAK,CAAC,CAAC;KAChE;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from \"./serializer.common\";\n\n// tslint:disable-next-line:no-null-keyword\nconst doc = document.implementation.createDocument(null, null, null);\n\nconst parser = new DOMParser();\nexport function parseXML(str: string, opts: SerializerOptions = {}): Promise {\n try {\n const updatedOptions: Required = {\n rootName: opts.rootName ?? \"\",\n includeRoot: opts.includeRoot ?? false,\n xmlCharKey: opts.xmlCharKey ?? XML_CHARKEY\n };\n const dom = parser.parseFromString(str, \"application/xml\");\n throwIfError(dom);\n\n let obj;\n if (updatedOptions.includeRoot) {\n obj = domToObject(dom, updatedOptions);\n } else {\n obj = domToObject(dom.childNodes[0], updatedOptions);\n }\n\n return Promise.resolve(obj);\n } catch (err) {\n return Promise.reject(err);\n }\n}\n\nlet errorNS = \"\";\ntry {\n errorNS = parser.parseFromString(\"INVALID\", \"text/xml\").getElementsByTagName(\"parsererror\")[0]\n .namespaceURI!;\n} catch (ignored) {\n // Most browsers will return a document containing , but IE will throw.\n}\n\nfunction throwIfError(dom: Document): void {\n if (errorNS) {\n const parserErrors = dom.getElementsByTagNameNS(errorNS, \"parsererror\");\n if (parserErrors.length) {\n throw new Error(parserErrors.item(0)!.innerHTML);\n }\n }\n}\n\nfunction isElement(node: Node): node is Element {\n return !!(node as Element).attributes;\n}\n\n/**\n * Get the Element-typed version of the provided Node if the provided node is an element with\n * attributes. If it isn't, then undefined is returned.\n */\nfunction asElementWithAttributes(node: Node): Element | undefined {\n return isElement(node) && node.hasAttributes() ? node : undefined;\n}\n\nfunction domToObject(node: Node, options: Required): any {\n let result: any = {};\n\n const childNodeCount: number = node.childNodes.length;\n\n const firstChildNode: Node = node.childNodes[0];\n const onlyChildTextValue: string | undefined =\n (firstChildNode &&\n childNodeCount === 1 &&\n firstChildNode.nodeType === Node.TEXT_NODE &&\n firstChildNode.nodeValue) ||\n undefined;\n\n const elementWithAttributes: Element | undefined = asElementWithAttributes(node);\n if (elementWithAttributes) {\n result[XML_ATTRKEY] = {};\n\n for (let i = 0; i < elementWithAttributes.attributes.length; i++) {\n const attr = elementWithAttributes.attributes[i];\n result[XML_ATTRKEY][attr.nodeName] = attr.nodeValue;\n }\n\n if (onlyChildTextValue) {\n result[options.xmlCharKey] = onlyChildTextValue;\n }\n } else if (childNodeCount === 0) {\n result = \"\";\n } else if (onlyChildTextValue) {\n result = onlyChildTextValue;\n }\n\n if (!onlyChildTextValue) {\n for (let i = 0; i < childNodeCount; i++) {\n const child = node.childNodes[i];\n // Ignore leading/trailing whitespace nodes\n if (child.nodeType !== Node.TEXT_NODE) {\n const childObject: any = domToObject(child, options);\n if (!result[child.nodeName]) {\n result[child.nodeName] = childObject;\n } else if (Array.isArray(result[child.nodeName])) {\n result[child.nodeName].push(childObject);\n } else {\n result[child.nodeName] = [result[child.nodeName], childObject];\n }\n }\n }\n }\n\n return result;\n}\n\nconst serializer = new XMLSerializer();\n\nexport function stringifyXML(content: any, opts: SerializerOptions = {}): string {\n const updatedOptions: Required = {\n rootName: opts.rootName ?? \"root\",\n includeRoot: opts.includeRoot ?? false,\n xmlCharKey: opts.xmlCharKey ?? XML_CHARKEY\n };\n const dom = buildNode(content, updatedOptions.rootName, updatedOptions)[0];\n return (\n '' + serializer.serializeToString(dom)\n );\n}\n\nfunction buildAttributes(attrs: { [key: string]: { toString(): string } }): Attr[] {\n const result = [];\n for (const key of Object.keys(attrs)) {\n const attr = doc.createAttribute(key);\n attr.value = attrs[key].toString();\n result.push(attr);\n }\n return result;\n}\n\nfunction buildNode(obj: any, elementName: string, options: Required): Node[] {\n if (\n obj === undefined ||\n obj === null ||\n typeof obj === \"string\" ||\n typeof obj === \"number\" ||\n typeof obj === \"boolean\"\n ) {\n const elem = doc.createElement(elementName);\n elem.textContent = obj === undefined || obj === null ? \"\" : obj.toString();\n return [elem];\n } else if (Array.isArray(obj)) {\n const result = [];\n for (const arrayElem of obj) {\n for (const child of buildNode(arrayElem, elementName, options)) {\n result.push(child);\n }\n }\n return result;\n } else if (typeof obj === \"object\") {\n const elem = doc.createElement(elementName);\n for (const key of Object.keys(obj)) {\n if (key === XML_ATTRKEY) {\n for (const attr of buildAttributes(obj[key])) {\n elem.attributes.setNamedItem(attr);\n }\n } else if (key === options.xmlCharKey) {\n elem.textContent = obj[key].toString();\n } else {\n for (const child of buildNode(obj[key], key, options)) {\n elem.appendChild(child);\n }\n }\n }\n return [elem];\n } else {\n throw new Error(`Illegal value passed to buildObject: ${obj}`);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/xml.js b/node_modules/@azure/core-http/es/src/util/xml.js new file mode 100644 index 000000000..17559334a --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/xml.js @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import * as xml2js from "xml2js"; +import { XML_ATTRKEY, XML_CHARKEY } from "./serializer.common"; +// Note: The reason we re-define all of the xml2js default settings (version 2.0) here is because the default settings object exposed +// by the xm2js library is mutable. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/536 +// By creating a new copy of the settings each time we instantiate the parser, +// we are safeguarding against the possibility of the default settings being mutated elsewhere unintentionally. +var xml2jsDefaultOptionsV2 = { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: XML_ATTRKEY, + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: undefined, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: "$$", + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: undefined, + attrValueProcessors: undefined, + tagNameProcessors: undefined, + valueProcessors: undefined, + rootName: "root", + xmldec: { + version: "1.0", + encoding: "UTF-8", + standalone: true + }, + doctype: undefined, + renderOpts: { + pretty: true, + indent: " ", + newline: "\n" + }, + headless: false, + chunkSize: 10000, + emptyTag: "", + cdata: false +}; +// The xml2js settings for general XML parsing operations. +var xml2jsParserSettings = Object.assign({}, xml2jsDefaultOptionsV2); +xml2jsParserSettings.explicitArray = false; +// The xml2js settings for general XML building operations. +var xml2jsBuilderSettings = Object.assign({}, xml2jsDefaultOptionsV2); +xml2jsBuilderSettings.explicitArray = false; +xml2jsBuilderSettings.renderOpts = { + pretty: false +}; +/** + * Converts given JSON object to XML string + * @param obj JSON object to be converted into XML string + * @param opts Options that govern the parsing of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ +export function stringifyXML(obj, opts) { + var _a; + if (opts === void 0) { opts = {}; } + xml2jsBuilderSettings.rootName = opts.rootName; + xml2jsBuilderSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + var builder = new xml2js.Builder(xml2jsBuilderSettings); + return builder.buildObject(obj); +} +/** + * Converts given XML string into JSON + * @param str String containing the XML content to be parsed into JSON + * @param opts Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +export function parseXML(str, opts) { + var _a; + if (opts === void 0) { opts = {}; } + xml2jsParserSettings.explicitRoot = !!opts.includeRoot; + xml2jsParserSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; + var xmlParser = new xml2js.Parser(xml2jsParserSettings); + return new Promise(function (resolve, reject) { + if (!str) { + reject(new Error("Document is empty")); + } + else { + xmlParser.parseString(str, function (err, res) { + if (err) { + reject(err); + } + else { + resolve(res); + } + }); + } + }); +} +//# sourceMappingURL=xml.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/util/xml.js.map b/node_modules/@azure/core-http/es/src/util/xml.js.map new file mode 100644 index 000000000..ba824d4e2 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/util/xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":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AAM,CAAC,GAAG,CAAC,CAAC;iBACb;qBAAM;oBACL,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as xml2js from \"xml2js\";\nimport { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from \"./serializer.common\";\n\n// Note: The reason we re-define all of the xml2js default settings (version 2.0) here is because the default settings object exposed\n// by the xm2js library is mutable. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/536\n// By creating a new copy of the settings each time we instantiate the parser,\n// we are safeguarding against the possibility of the default settings being mutated elsewhere unintentionally.\nconst xml2jsDefaultOptionsV2: xml2js.OptionsV2 = {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: XML_ATTRKEY,\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: undefined,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: \"$$\",\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: undefined,\n attrValueProcessors: undefined,\n tagNameProcessors: undefined,\n valueProcessors: undefined,\n rootName: \"root\",\n xmldec: {\n version: \"1.0\",\n encoding: \"UTF-8\",\n standalone: true\n },\n doctype: undefined,\n renderOpts: {\n pretty: true,\n indent: \" \",\n newline: \"\\n\"\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: \"\",\n cdata: false\n};\n\n// The xml2js settings for general XML parsing operations.\nconst xml2jsParserSettings: any = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsParserSettings.explicitArray = false;\n\n// The xml2js settings for general XML building operations.\nconst xml2jsBuilderSettings: any = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsBuilderSettings.explicitArray = false;\nxml2jsBuilderSettings.renderOpts = {\n pretty: false\n};\n\n/**\n * Converts given JSON object to XML string\n * @param obj JSON object to be converted into XML string\n * @param opts Options that govern the parsing of given JSON object\n * `rootName` indicates the name of the root element in the resulting XML\n */\nexport function stringifyXML(obj: any, opts: SerializerOptions = {}): string {\n xml2jsBuilderSettings.rootName = opts.rootName;\n xml2jsBuilderSettings.charkey = opts.xmlCharKey ?? XML_CHARKEY;\n const builder = new xml2js.Builder(xml2jsBuilderSettings);\n return builder.buildObject(obj);\n}\n\n/**\n * Converts given XML string into JSON\n * @param str String containing the XML content to be parsed into JSON\n * @param opts Options that govern the parsing of given xml string\n * `includeRoot` indicates whether the root element is to be included or not in the output\n */\nexport function parseXML(str: string, opts: SerializerOptions = {}): Promise {\n xml2jsParserSettings.explicitRoot = !!opts.includeRoot;\n xml2jsParserSettings.charkey = opts.xmlCharKey ?? XML_CHARKEY;\n const xmlParser = new xml2js.Parser(xml2jsParserSettings);\n return new Promise((resolve, reject) => {\n if (!str) {\n reject(new Error(\"Document is empty\"));\n } else {\n xmlParser.parseString(str, (err?: Error, res?: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(res);\n }\n });\n }\n });\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/webResource.js b/node_modules/@azure/core-http/es/src/webResource.js new file mode 100644 index 000000000..3cd7ce812 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/webResource.js @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { HttpHeaders, isHttpHeadersLike } from "./httpHeaders"; +import { Serializer } from "./serializer"; +import { generateUuid } from "./util/utils"; +export function isWebResourceLike(object) { + if (typeof object !== "object") { + return false; + } + if (typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function") { + return true; + } + return false; +} +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +var WebResource = /** @class */ (function () { + function WebResource(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, decompressResponse) { + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.decompressResponse = decompressResponse; + this.requestId = this.headers.get("x-ms-client-request-id") || generateUuid(); + } + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + WebResource.prototype.validateRequestProperties = function () { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + }; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + WebResource.prototype.prepare = function (options) { + if (!options) { + throw new Error("options object is required"); + } + if (options.method === undefined || + options.method === null || + typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + if ((options.pathTemplate === undefined || + options.pathTemplate === null || + typeof options.pathTemplate.valueOf() !== "string") && + (options.url === undefined || + options.url === null || + typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error('options.url must be of type "string".'); + } + this.url = options.url; + } + // set the method + if (options.method) { + var validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error('The provided method "' + + options.method + + '" is invalid. Supported HTTP methods are: ' + + JSON.stringify(validMethods)); + } + } + this.method = options.method.toUpperCase(); + // construct the url if path template is provided + if (options.pathTemplate) { + var pathTemplate_1 = options.pathTemplate, pathParameters_1 = options.pathParameters; + if (typeof pathTemplate_1 !== "string") { + throw new Error('options.pathTemplate must be of type "string".'); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + var baseUrl = options.baseUrl; + var url_1 = baseUrl + + (baseUrl.endsWith("/") ? "" : "/") + + (pathTemplate_1.startsWith("/") ? pathTemplate_1.slice(1) : pathTemplate_1); + var segments = url_1.match(/({[\w-]*\s*[\w-]*})/gi); + if (segments && segments.length) { + if (!pathParameters_1) { + throw new Error("pathTemplate: " + pathTemplate_1 + " has been provided. Hence, options.pathParameters must also be provided."); + } + segments.forEach(function (item) { + var pathParamName = item.slice(1, -1); + var pathParam = pathParameters_1[pathParamName]; + if (pathParam === null || + pathParam === undefined || + !(typeof pathParam === "string" || typeof pathParam === "object")) { + var stringifiedPathParameters = JSON.stringify(pathParameters_1, undefined, 2); + throw new Error("pathTemplate: " + pathTemplate_1 + " contains the path parameter " + pathParamName + + (" however, it is not present in parameters: " + stringifiedPathParameters + ".") + + ("The value of the path parameter can either be a \"string\" of the form { " + pathParamName + ": \"some sample value\" } or ") + + ("it can be an \"object\" of the form { \"" + pathParamName + "\": { value: \"some sample value\", skipUrlEncoding: true } }.")); + } + if (typeof pathParam.valueOf() === "string") { + url_1 = url_1.replace(item, encodeURIComponent(pathParam)); + } + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error("options.pathParameters[" + pathParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (pathParam.skipUrlEncoding) { + url_1 = url_1.replace(item, pathParam.value); + } + else { + url_1 = url_1.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url_1; + } + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + var queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error("options.queryParameters must be of type object. It should be a JSON object " + + "of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. " + + "The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }."); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + var queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (var queryParamName in queryParameters) { + var queryParam = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error("options.queryParameters[" + queryParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } + else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + } // end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + // add headers to the request if they are provided + if (options.headers) { + var headers = options.headers; + for (var _i = 0, _a = Object.keys(options.headers); _i < _a.length; _i++) { + var headerName = _a[_i]; + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", this.requestId); + } + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body !== undefined && options.body !== null) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } + else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + if (options.spanOptions) { + this.spanOptions = options.spanOptions; + } + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + return this; + }; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + WebResource.prototype.clone = function () { + var result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.decompressResponse); + if (this.formData) { + result.formData = this.formData; + } + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + return result; + }; + return WebResource; +}()); +export { WebResource }; +//# sourceMappingURL=webResource.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/webResource.js.map b/node_modules/@azure/core-http/es/src/webResource.js.map new file mode 100644 index 000000000..4fc23e62f --- /dev/null +++ b/node_modules/@azure/core-http/es/src/webResource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webResource.js","sourceRoot":"","sources":["../../src/webResource.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAmB,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAU,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,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E;YACtB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC3C;QAED,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;SACnD;QAED,IAAI,IAAI,CAAC,uBAAuB,EAAE;YAChC,MAAM,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC;SAC/D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,kBAAC;AAAD,CAAC,AAlWD,IAkWC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpHeaders, HttpHeadersLike, isHttpHeadersLike } from \"./httpHeaders\";\nimport { OperationSpec } from \"./operationSpec\";\nimport { Mapper, Serializer } from \"./serializer\";\nimport { generateUuid } from \"./util/utils\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { ProxySettings } from \"./serviceClient\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { SpanOptions } from \"@azure/core-tracing\";\nimport { SerializerOptions } from \"./util/serializer.common\";\n\nexport type HttpMethods =\n | \"GET\"\n | \"PUT\"\n | \"POST\"\n | \"DELETE\"\n | \"PATCH\"\n | \"HEAD\"\n | \"OPTIONS\"\n | \"TRACE\";\nexport type HttpRequestBody =\n | Blob\n | string\n | ArrayBuffer\n | ArrayBufferView\n | (() => NodeJS.ReadableStream);\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number;\n};\n\nexport interface WebResourceLike {\n /**\n * The URL being accessed by the request.\n */\n url: string;\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n /**\n * The HTTP body contents of the request.\n */\n body?: any;\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse;\n formData?: any;\n /**\n * A query string represented as an object.\n */\n query?: { [key: string]: any };\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n /**\n * If credentials (cookies) should be sent along during an XHR.\n */\n withCredentials: boolean;\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n */\n timeout: number;\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n /**\n * If the connection should be reused.\n */\n keepAlive?: boolean;\n /**\n * Whether or not to decompress response according to Accept-Encoding header (node-fetch only)\n */\n decompressResponse?: boolean;\n /**\n * A unique identifier for the request. Used for logging and tracing.\n */\n requestId: string;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Options used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void;\n\n /**\n * Sets options on the request.\n */\n prepare(options: RequestPrepareOptions): WebResourceLike;\n /**\n * Clone this request object.\n */\n clone(): WebResourceLike;\n}\n\nexport function isWebResourceLike(object: any): object is WebResourceLike {\n if (typeof object !== \"object\") {\n return false;\n }\n if (\n typeof object.url === \"string\" &&\n typeof object.method === \"string\" &&\n typeof object.headers === \"object\" &&\n isHttpHeadersLike(object.headers) &&\n typeof object.validateRequestProperties === \"function\" &&\n typeof object.prepare === \"function\" &&\n typeof object.clone === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n *\n * @constructor\n */\nexport class WebResource implements WebResourceLike {\n url: string;\n method: HttpMethods;\n body?: any;\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse;\n formData?: any;\n query?: { [key: string]: any };\n operationSpec?: OperationSpec;\n withCredentials: boolean;\n timeout: number;\n proxySettings?: ProxySettings;\n keepAlive?: boolean;\n /**\n * Whether or not to decompress response according to Accept-Encoding header (node-fetch only)\n */\n decompressResponse?: boolean;\n requestId: string;\n\n abortSignal?: AbortSignalLike;\n\n /** Callback which fires upon upload progress. */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Options used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n\n constructor(\n url?: string,\n method?: HttpMethods,\n body?: any,\n query?: { [key: string]: any },\n headers?: { [key: string]: any } | HttpHeadersLike,\n streamResponseBody?: boolean,\n withCredentials?: boolean,\n abortSignal?: AbortSignalLike,\n timeout?: number,\n onUploadProgress?: (progress: TransferProgressEvent) => void,\n onDownloadProgress?: (progress: TransferProgressEvent) => void,\n proxySettings?: ProxySettings,\n keepAlive?: boolean,\n decompressResponse?: boolean\n ) {\n this.streamResponseBody = streamResponseBody;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers);\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.decompressResponse = decompressResponse;\n this.requestId = this.headers.get(\"x-ms-client-request-id\") || generateUuid();\n }\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n\n /**\n * Prepares the request.\n * @param {RequestPrepareOptions} options Options to provide for preparing the request.\n * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options: RequestPrepareOptions): WebResource {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n\n if (\n options.method === undefined ||\n options.method === null ||\n typeof options.method.valueOf() !== \"string\"\n ) {\n throw new Error(\"options.method must be a string.\");\n }\n\n if (options.url && options.pathTemplate) {\n throw new Error(\n \"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\"\n );\n }\n\n if (\n (options.pathTemplate === undefined ||\n options.pathTemplate === null ||\n typeof options.pathTemplate.valueOf() !== \"string\") &&\n (options.url === undefined ||\n options.url === null ||\n typeof options.url.valueOf() !== \"string\")\n ) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error('options.url must be of type \"string\".');\n }\n this.url = options.url;\n }\n\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error(\n 'The provided method \"' +\n options.method +\n '\" is invalid. Supported HTTP methods are: ' +\n JSON.stringify(validMethods)\n );\n }\n }\n this.method = options.method.toUpperCase() as HttpMethods;\n\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error('options.pathTemplate must be of type \"string\".');\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url =\n baseUrl +\n (baseUrl.endsWith(\"/\") ? \"\" : \"/\") +\n (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({[\\w-]*\\s*[\\w-]*})/gi);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(\n `pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`\n );\n }\n segments.forEach(function(item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = (pathParameters as { [key: string]: any })[pathParamName];\n if (\n pathParam === null ||\n pathParam === undefined ||\n !(typeof pathParam === \"string\" || typeof pathParam === \"object\")\n ) {\n const stringifiedPathParameters = JSON.stringify(pathParameters, undefined, 2);\n throw new Error(\n `pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in parameters: ${stringifiedPathParameters}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`\n );\n }\n\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(\n `options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`\n );\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n } else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(\n `options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`\n );\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam: any = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n } else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(\n `options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`\n );\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n } else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n } // end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", this.requestId);\n }\n\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty\n this.body = options.body;\n if (options.body !== undefined && options.body !== null) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n } else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(\n options.serializationMapper,\n options.body,\n \"requestBody\"\n );\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n\n if (options.spanOptions) {\n this.spanOptions = options.spanOptions;\n }\n\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n\n return this;\n }\n\n /**\n * Clone this WebResource HTTP request object.\n * @returns {WebResource} The clone of this WebResource HTTP request object.\n */\n clone(): WebResource {\n const result = new WebResource(\n this.url,\n this.method,\n this.body,\n this.query,\n this.headers && this.headers.clone(),\n this.streamResponseBody,\n this.withCredentials,\n this.abortSignal,\n this.timeout,\n this.onUploadProgress,\n this.onDownloadProgress,\n this.proxySettings,\n this.keepAlive,\n this.decompressResponse\n );\n\n if (this.formData) {\n result.formData = this.formData;\n }\n\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n\n return result;\n }\n}\n\nexport interface RequestPrepareOptions {\n /**\n * The HTTP request method. Valid values are \"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\",\n * or \"PATCH\".\n */\n method: HttpMethods;\n /**\n * The request url. It may or may not have query parameters in it. Either provide the \"url\" or\n * provide the \"pathTemplate\" in the options object. Both the options are mutually exclusive.\n */\n url?: string;\n /**\n * A dictionary of query parameters to be appended to the url, where\n * the \"key\" is the \"query-parameter-name\" and the \"value\" is the \"query-parameter-value\".\n * The \"query-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"query-parameter-value\".\n * Example:\n * - query-parameter-value in \"object\" format: { \"query-parameter-name\": { value: \"query-parameter-value\", skipUrlEncoding: true } }\n * - query-parameter-value in \"string\" format: { \"query-parameter-name\": \"query-parameter-value\"}.\n * Note: \"If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url.\n */\n queryParameters?: { [key: string]: any | ParameterValue };\n /**\n * The path template of the request url. Either provide the \"url\" or provide the \"pathTemplate\" in\n * the options object. Both the options are mutually exclusive.\n * Example: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}\"\n */\n pathTemplate?: string;\n /**\n * The base url of the request. Default value is: \"https://management.azure.com\". This is\n * applicable only with pathTemplate. If you are providing options.url then it is expected that\n * you provide the complete url.\n */\n baseUrl?: string;\n /**\n * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate.\n * Here the key is the \"path-parameter-name\" and the value is the \"path-parameter-value\".\n * The \"path-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"path-parameter-value\".\n * Example:\n * - path-parameter-value in \"object\" format: { \"path-parameter-name\": { value: \"path-parameter-value\", skipUrlEncoding: true } }\n * - path-parameter-value in \"string\" format: { \"path-parameter-name\": \"path-parameter-value\" }.\n */\n pathParameters?: { [key: string]: any | ParameterValue };\n formData?: { [key: string]: any };\n /**\n * A dictionary of request headers that need to be applied to the request.\n * Here the key is the \"header-name\" and the value is the \"header-value\". The header-value MUST be of type string.\n * - ContentType must be provided with the key name as \"Content-Type\". Default value \"application/json; charset=utf-8\".\n * - \"Transfer-Encoding\" is set to \"chunked\" by default if \"options.bodyIsStream\" is set to true.\n * - \"Content-Type\" is set to \"application/octet-stream\" by default if \"options.bodyIsStream\" is set to true.\n * - \"accept-language\" by default is set to \"en-US\"\n * - \"x-ms-client-request-id\" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true\n */\n headers?: { [key: string]: any };\n /**\n * When set to true, instructs the client to not set \"x-ms-client-request-id\" header to a new Guid().\n */\n disableClientRequestId?: boolean;\n /**\n * The request body. It can be of any type. This value will be serialized if it is not a stream.\n */\n body?: any;\n /**\n * Provides information on how to serialize the request body.\n */\n serializationMapper?: Mapper;\n /**\n * A dictionary of mappers that may be used while [de]serialization.\n */\n mappers?: { [x: string]: any };\n /**\n * Provides information on how to deserialize the response body.\n */\n deserializationMapper?: object;\n /**\n * Indicates whether this method should JSON.stringify() the request body. Default value: false.\n */\n disableJsonStringifyOnBody?: boolean;\n /**\n * Indicates whether the request body is a stream (useful for file upload scenarios).\n */\n bodyIsStream?: boolean;\n abortSignal?: AbortSignalLike;\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n spanOptions?: SpanOptions;\n}\n\n/**\n * The Parameter value provided for path or query parameters in RequestPrepareOptions\n */\nexport interface ParameterValue {\n value: any;\n skipUrlEncoding: boolean;\n [key: string]: any;\n}\n\n/**\n * Describes the base structure of the options object that will be used in every operation.\n */\nexport interface RequestOptionsBase {\n /**\n * @property {object} [customHeaders] User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n\n /**\n * Options used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n\n [key: string]: any;\n\n /**\n * Options to override XML parsing/building behavior.\n */\n serializerOptions?: SerializerOptions;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/xhrHttpClient.js b/node_modules/@azure/core-http/es/src/xhrHttpClient.js new file mode 100644 index 000000000..f4d913da4 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/xhrHttpClient.js @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { AbortError } from "@azure/abort-controller"; +import { HttpHeaders } from "./httpHeaders"; +import { RestError } from "./restError"; +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +var XhrHttpClient = /** @class */ (function () { + function XhrHttpClient() { + } + XhrHttpClient.prototype.sendRequest = function (request) { + var xhr = new XMLHttpRequest(); + if (request.proxySettings) { + throw new Error("HTTP proxy is not supported in browser environment"); + } + var abortSignal = request.abortSignal; + if (abortSignal) { + if (abortSignal.aborted) { + return Promise.reject(new AbortError("The operation was aborted.")); + } + var listener_1 = function () { + xhr.abort(); + }; + abortSignal.addEventListener("abort", listener_1); + xhr.addEventListener("readystatechange", function () { + if (xhr.readyState === XMLHttpRequest.DONE) { + abortSignal.removeEventListener("abort", listener_1); + } + }); + } + addProgressListener(xhr.upload, request.onUploadProgress); + addProgressListener(xhr, request.onDownloadProgress); + if (request.formData) { + var formData = request.formData; + var requestForm_1 = new FormData(); + var appendFormValue = function (key, value) { + // eslint-disable-next-line no-prototype-builtins + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (var _i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + var formKey = _a[_i]; + var formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + request.body = requestForm_1; + request.formData = undefined; + var contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + // browser will automatically apply a suitable content-type header + request.headers.remove("Content-Type"); + } + } + xhr.open(request.method, request.url); + xhr.timeout = request.timeout; + xhr.withCredentials = request.withCredentials; + for (var _b = 0, _c = request.headers.headersArray(); _b < _c.length; _b++) { + var header = _c[_b]; + xhr.setRequestHeader(header.name, header.value); + } + xhr.responseType = request.streamResponseBody ? "blob" : "text"; + // tslint:disable-next-line:no-null-keyword + xhr.send(request.body === undefined ? null : request.body); + if (request.streamResponseBody) { + return new Promise(function (resolve, reject) { + xhr.addEventListener("readystatechange", function () { + // Resolve as soon as headers are loaded + if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { + var blobBody = new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { + resolve(xhr.response); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + blobBody: blobBody + }); + } + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + else { + return new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { + return resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + bodyAsText: xhr.responseText + }); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + }; + return XhrHttpClient; +}()); +export { XhrHttpClient }; +function addProgressListener(xhr, listener) { + if (listener) { + xhr.addEventListener("progress", function (rawEvent) { + return listener({ + loadedBytes: rawEvent.loaded + }); + }); + } +} +// exported locally for testing +export function parseHeaders(xhr) { + var responseHeaders = new HttpHeaders(); + var headerLines = xhr + .getAllResponseHeaders() + .trim() + .split(/[\r\n]+/); + for (var _i = 0, headerLines_1 = headerLines; _i < headerLines_1.length; _i++) { + var line = headerLines_1[_i]; + var index = line.indexOf(":"); + var headerName = line.slice(0, index); + var headerValue = line.slice(index + 2); + responseHeaders.set(headerName, headerValue); + } + return responseHeaders; +} +function rejectOnTerminalEvent(request, xhr, reject) { + xhr.addEventListener("error", function () { + return reject(new RestError("Failed to send request to " + request.url, RestError.REQUEST_SEND_ERROR, undefined, request)); + }); + var abortError = new AbortError("The operation was aborted."); + xhr.addEventListener("abort", function () { return reject(abortError); }); + xhr.addEventListener("timeout", function () { return reject(abortError); }); +} +//# sourceMappingURL=xhrHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/es/src/xhrHttpClient.js.map b/node_modules/@azure/core-http/es/src/xhrHttpClient.js.map new file mode 100644 index 000000000..43d810612 --- /dev/null +++ b/node_modules/@azure/core-http/es/src/xhrHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xhrHttpClient.js","sourceRoot":"","sources":["../../src/xhrHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH;IAAA;IAyGA,CAAC;IAxGQ,mCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QAEjC,IAAI,OAAO,CAAC,aAAa,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACvE;QAED,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,C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AAS,CAAC,kBAAkB,EAC5B,SAAS,EACT,OAAO,CACR,CACF;IAPD,CAOC,CACF,CAAC;IACF,IAAM,UAAU,GAAG,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAChE,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,UAAU,CAAC,EAAlB,CAAkB,CAAC,CAAC;IACxD,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAM,OAAA,MAAM,CAAC,UAAU,CAAC,EAAlB,CAAkB,CAAC,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport { HttpClient } from \"./httpClient\";\nimport { HttpHeaders, HttpHeadersLike } from \"./httpHeaders\";\nimport { WebResourceLike, TransferProgressEvent } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { RestError } from \"./restError\";\n\n/**\n * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.\n */\nexport class XhrHttpClient implements HttpClient {\n public sendRequest(request: WebResourceLike): Promise {\n const xhr = new XMLHttpRequest();\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n const abortSignal = request.abortSignal;\n if (abortSignal) {\n if (abortSignal.aborted) {\n return Promise.reject(new AbortError(\"The operation was aborted.\"));\n }\n\n const listener = (): void => {\n xhr.abort();\n };\n abortSignal.addEventListener(\"abort\", listener);\n xhr.addEventListener(\"readystatechange\", () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n abortSignal.removeEventListener(\"abort\", listener);\n }\n });\n }\n\n addProgressListener(xhr.upload, request.onUploadProgress);\n addProgressListener(xhr, request.onDownloadProgress);\n\n if (request.formData) {\n const formData = request.formData;\n const requestForm = new FormData();\n const appendFormValue = (key: string, value: any): void => {\n // eslint-disable-next-line no-prototype-builtins\n if (value && value.hasOwnProperty(\"value\") && value.hasOwnProperty(\"options\")) {\n requestForm.append(key, value.value, value.options);\n } else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n } else {\n appendFormValue(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n // browser will automatically apply a suitable content-type header\n request.headers.remove(\"Content-Type\");\n }\n }\n\n xhr.open(request.method, request.url);\n xhr.timeout = request.timeout;\n xhr.withCredentials = request.withCredentials;\n for (const header of request.headers.headersArray()) {\n xhr.setRequestHeader(header.name, header.value);\n }\n xhr.responseType = request.streamResponseBody ? \"blob\" : \"text\";\n\n // tslint:disable-next-line:no-null-keyword\n xhr.send(request.body === undefined ? null : request.body);\n\n if (request.streamResponseBody) {\n return new Promise((resolve, reject) => {\n xhr.addEventListener(\"readystatechange\", () => {\n // Resolve as soon as headers are loaded\n if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\n const blobBody = new Promise((resolve, reject) => {\n xhr.addEventListener(\"load\", () => {\n resolve(xhr.response);\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n blobBody\n });\n }\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n } else {\n return new Promise(function(resolve, reject) {\n xhr.addEventListener(\"load\", () =>\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: xhr.responseText\n })\n );\n rejectOnTerminalEvent(request, xhr, reject);\n });\n }\n }\n}\n\nfunction addProgressListener(\n xhr: XMLHttpRequestEventTarget,\n listener?: (progress: TransferProgressEvent) => void\n): void {\n if (listener) {\n xhr.addEventListener(\"progress\", (rawEvent) =>\n listener({\n loadedBytes: rawEvent.loaded\n })\n );\n }\n}\n\n// exported locally for testing\nexport function parseHeaders(xhr: XMLHttpRequest): HttpHeadersLike {\n const responseHeaders = new HttpHeaders();\n const headerLines = xhr\n .getAllResponseHeaders()\n .trim()\n .split(/[\\r\\n]+/);\n for (const line of headerLines) {\n const index = line.indexOf(\":\");\n const headerName = line.slice(0, index);\n const headerValue = line.slice(index + 2);\n responseHeaders.set(headerName, headerValue);\n }\n return responseHeaders;\n}\n\nfunction rejectOnTerminalEvent(\n request: WebResourceLike,\n xhr: XMLHttpRequest,\n reject: (err: any) => void\n): void {\n xhr.addEventListener(\"error\", () =>\n reject(\n new RestError(\n `Failed to send request to ${request.url}`,\n RestError.REQUEST_SEND_ERROR,\n undefined,\n request\n )\n )\n );\n const abortError = new AbortError(\"The operation was aborted.\");\n xhr.addEventListener(\"abort\", () => reject(abortError));\n xhr.addEventListener(\"timeout\", () => reject(abortError));\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-http/node_modules/form-data/License b/node_modules/@azure/core-http/node_modules/form-data/License new file mode 100644 index 000000000..c7ff12a2f --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/License @@ -0,0 +1,19 @@ +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/node_modules/@azure/core-http/node_modules/form-data/README.md b/node_modules/@azure/core-http/node_modules/form-data/README.md new file mode 100644 index 000000000..42f630f23 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/README.md @@ -0,0 +1,351 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v3.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. +- Starting version `3.x` FormData has dropped support for `node@4.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/@azure/core-http/node_modules/form-data/README.md.bak b/node_modules/@azure/core-http/node_modules/form-data/README.md.bak new file mode 100644 index 000000000..e9195bdb4 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/README.md.bak @@ -0,0 +1,351 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. +- Starting version `3.x` FormData has dropped support for `node@4.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/@azure/core-http/node_modules/form-data/index.d.ts b/node_modules/@azure/core-http/node_modules/form-data/index.d.ts new file mode 100644 index 000000000..6e5204546 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/index.d.ts @@ -0,0 +1,61 @@ +// Definitions by: Carlos Ballesteros Velasco +// Leon Yu +// BendingBender +// Maple Miao + +/// +import * as stream from 'stream'; +import * as http from 'http'; + +export = FormData; + +// Extracted because @types/node doesn't export interfaces. +interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: stream.Readable, size: number): void; + destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; +} + +interface Options extends ReadableOptions { + writable?: boolean; + readable?: boolean; + dataSize?: number; + maxDataSize?: number; + pauseStreams?: boolean; +} + +declare class FormData extends stream.Readable { + constructor(options?: Options); + append(key: string, value: any, options?: FormData.AppendOptions | string): void; + getHeaders(userHeaders?: FormData.Headers): FormData.Headers; + submit( + params: string | FormData.SubmitOptions, + callback?: (error: Error | null, response: http.IncomingMessage) => void + ): http.ClientRequest; + getBuffer(): Buffer; + getBoundary(): string; + getLength(callback: (err: Error | null, length: number) => void): void; + getLengthSync(): number; + hasKnownLength(): boolean; +} + +declare namespace FormData { + interface Headers { + [key: string]: any; + } + + interface AppendOptions { + header?: string | Headers; + knownLength?: number; + filename?: string; + filepath?: string; + contentType?: string; + } + + interface SubmitOptions extends http.RequestOptions { + protocol?: 'https:' | 'http:'; + } +} diff --git a/node_modules/@azure/core-http/node_modules/form-data/lib/browser.js b/node_modules/@azure/core-http/node_modules/form-data/lib/browser.js new file mode 100644 index 000000000..09e7c70e6 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/lib/browser.js @@ -0,0 +1,2 @@ +/* eslint-env browser */ +module.exports = typeof self == 'object' ? self.FormData : window.FormData; diff --git a/node_modules/@azure/core-http/node_modules/form-data/lib/form_data.js b/node_modules/@azure/core-http/node_modules/form-data/lib/form_data.js new file mode 100644 index 000000000..ddfae2e34 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/lib/form_data.js @@ -0,0 +1,494 @@ +var CombinedStream = require('combined-stream'); +var util = require('util'); +var path = require('path'); +var http = require('http'); +var https = require('https'); +var parseUrl = require('url').parse; +var fs = require('fs'); +var mime = require('mime-types'); +var asynckit = require('asynckit'); +var populate = require('./populate.js'); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; diff --git a/node_modules/@azure/core-http/node_modules/form-data/lib/populate.js b/node_modules/@azure/core-http/node_modules/form-data/lib/populate.js new file mode 100644 index 000000000..4d35738dd --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/lib/populate.js @@ -0,0 +1,10 @@ +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; diff --git a/node_modules/@azure/core-http/node_modules/form-data/package.json b/node_modules/@azure/core-http/node_modules/form-data/package.json new file mode 100644 index 000000000..e1481119b --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/form-data/package.json @@ -0,0 +1,101 @@ +{ + "_from": "form-data@^3.0.0", + "_id": "form-data@3.0.0", + "_inBundle": false, + "_integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "_location": "/@azure/core-http/form-data", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "form-data@^3.0.0", + "name": "form-data", + "escapedName": "form-data", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@azure/core-http" + ], + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "_shasum": "31b7e39c85f1355b7139ee0c647cf0de7f83c682", + "_spec": "form-data@^3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-http", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "browser": "./lib/browser", + "bugs": { + "url": "https://github.com/form-data/form-data/issues" + }, + "bundleDependencies": false, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "deprecated": false, + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "devDependencies": { + "@types/node": "^12.0.10", + "browserify": "^13.1.1", + "browserify-istanbul": "^2.0.0", + "coveralls": "^3.0.4", + "cross-spawn": "^6.0.5", + "eslint": "^6.0.1", + "fake": "^0.2.2", + "far": "^0.0.7", + "formidable": "^1.0.17", + "in-publish": "^2.0.0", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "obake": "^0.1.2", + "pkgfiles": "^2.3.0", + "pre-commit": "^1.1.3", + "puppeteer": "^1.19.0", + "request": "^2.88.0", + "rimraf": "^2.7.1", + "tape": "^4.6.2", + "typescript": "^3.5.2" + }, + "engines": { + "node": ">= 6" + }, + "homepage": "https://github.com/form-data/form-data#readme", + "license": "MIT", + "main": "./lib/form_data", + "name": "form-data", + "pre-commit": [ + "lint", + "ci-test", + "check" + ], + "repository": { + "type": "git", + "url": "git://github.com/form-data/form-data.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", + "check": "istanbul check-coverage coverage/coverage*.json", + "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", + "ci-test": "npm run test && npm run browser && npm run report", + "debug": "verbose=1 ./test/run.js", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "postpublish": "npm run restore-readme", + "posttest": "istanbul report lcov text", + "predebug": "rimraf coverage test/tmp", + "prepublish": "in-publish && npm run update-readme || not-in-publish", + "pretest": "rimraf coverage test/tmp", + "report": "istanbul report lcov text", + "restore-readme": "mv README.md.bak README.md", + "test": "istanbul cover test/run.js", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" + }, + "typings": "./index.d.ts", + "version": "3.0.0" +} diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/LICENSE b/node_modules/@azure/core-http/node_modules/tough-cookie/LICENSE new file mode 100644 index 000000000..22204e875 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2015, Salesforce.com, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/README.md b/node_modules/@azure/core-http/node_modules/tough-cookie/README.md new file mode 100644 index 000000000..2dc9496d8 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/README.md @@ -0,0 +1,582 @@ +[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/) + +[![Build Status](https://travis-ci.org/salesforce/tough-cookie.svg?branch=master)](https://travis-ci.org/salesforce/tough-cookie) + +# Synopsis + +``` javascript +var tough = require('tough-cookie'); +var Cookie = tough.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new tough.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +## Version Support + +Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module. + +# API + +## tough + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. + +### `parseDate(string)` + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. + +### `formatDate(date)` + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +### `canonicalDomain(str)` + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +### `domainMatch(str,domStr[,canonicalize=true])` + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not. + +### `defaultPath(path)` + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +### `pathMatch(reqPath,cookiePath)` + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +### `parse(cookieString[, options])` + +alias for `Cookie.parse(cookieString[, options])` + +### `fromJSON(string)` + +alias for `Cookie.fromJSON(string)` + +### `getPublicSuffix(hostname)` + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain). + +### `cookieCompare(a,b)` + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: + +* Longest `.path` +* oldest `.creation` (which has a 1ms precision, same as `Date`) +* lowest `.creationIndex` (to get beyond the 1ms precision) + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. + +### `permuteDomain(domain)` + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + +### `permutePath(path)` + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + + +## Cookie + +Exported via `tough.Cookie`. + +### `Cookie.parse(cookieString[, options])` + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. + +The options parameter is not required and currently has only one property: + + * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. + +If options is not an object, it is ignored, which means you can use `Array#map` with it. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed. +See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92) + +### Properties + +Cookie object properties: + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _sameSite_ - string - the `SameSite` cookie attribute (from [RFC6265bis]); must be one of `none`, `lax`, or `strict` + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + * _creation_ - `Date` - when this cookie was constructed + * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +### `Cookie([{properties}])` + +Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. + +### `.toString()` + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +### `.cookieString()` + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +### `.setExpires(String)` + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +### `.setMaxAge(number)` + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +### `.expiryTime([now=Date.now()])` + +### `.expiryDate([now=Date.now()])` + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +### `.TTL([now=Date.now()])` + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +### `.canonicalizedDomain()` + +### `.cdomain()` + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +### `.toJSON()` + +For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). + +**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +### `Cookie.fromJSON(strOrObj)` + +Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. + +Returns `null` upon JSON parsing error. + +### `.clone()` + +Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. + +### `.validate()` + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + + +## CookieJar + +Exported via `tough.CookieJar`. + +### `CookieJar([store],[options])` + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + +The `options` object can be omitted and can have the following properties: + + * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" + * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. + * _prefixSecurity_ - string - default `silent` - set to `'unsafe-disabled'`, `'silent'`, or `'strict'`. See [Cookie Prefixes] below. + * _allowSpecialUseDomain_ - boolean - default `false` - accepts special-use domain suffixes, such as `local`. Useful for testing purposes. + This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. + * _sameSiteContext_ - string - default unset - set to `'none'`, `'lax'`, or `'strict'` See [SameSite Cookies] below. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +### `.setCookieSync(cookieOrString, currentUrl, [{options}])` + +Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookies(currentUrl, [{options},] cb(err,cookies))` + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). + * _sameSiteContext_ - string - default unset - Set this to `'none'`, `'lax'` or `'strict'` to enforce SameSite cookies upon retrival. See [SameSite Cookies] below. + +The `.lastAccessed` property of the returned cookies will have been updated. + +### `.getCookiesSync(currentUrl, [{options}])` + +Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookieString(...)` + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +### `.getCookieStringSync(...)` + +Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getSetCookieStrings(...)` + +Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. + +### `.getSetCookieStringsSync(...)` + +Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.serialize(cb(err,serializedObject))` + +Serialize the Jar if the underlying store supports `.getAllCookies`. + +**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +See [Serialization Format]. + +### `.serializeSync()` + +Sync version of .serialize + +### `.toJSON()` + +Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. + +### `CookieJar.deserialize(serialized, [store], cb(err,object))` + +A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. + +As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. + +### `CookieJar.deserializeSync(serialized, [store])` + +Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. + +### `CookieJar.fromJSON(string)` + +Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. + +### `.clone([store,]cb(err,newJar))` + +Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. + +### `.cloneSync([store])` + +Synchronous version of `.clone`, returning a new `CookieJar` instance. + +The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. + +The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. + +### `.removeAllCookies(cb(err))` + +Removes all cookies from the jar. + +This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned. + +### `.removeAllCookiesSync()` + +Sync version of `.removeAllCookies()` + +## Store + +Base class for CookieJar stores. Available as `tough.Store`. + +## Store API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. + +Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +### `store.findCookie(domain, path, key, cb(err,cookie))` + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +### `store.findCookies(domain, path, cb(err,cookies))` + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +### `store.putCookie(cookie, cb(err))` + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +### `store.updateCookie(oldCookie, newCookie, cb(err))` + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +### `store.removeCookie(domain, path, key, cb(err))` + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +### `store.removeCookies(domain, path, cb(err))` + +Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +### `store.removeAllCookies(cb(err))` + +_Optional_. Removes all cookies from the store. + +Pass an error if one or more cookies can't be removed. + +**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this. + +### `store.getAllCookies(cb(err, cookies))` + +_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. + +Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. + +Pass an error if retrieval fails. + +**Note**: not all Stores can implement this due to technical limitations, so it is optional. + +## MemoryCookieStore + +Inherits from `Store`. + +A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`. + +## Community Cookie Stores + +These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: + +- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases +- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk +- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis +- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk +- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage + + +# Serialization Format + +**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. + +```js + { + // The version of tough-cookie that serialized this jar. + version: 'tough-cookie@1.x.y', + + // add the store type, to make humans happy: + storeType: 'MemoryCookieStore', + + // CookieJar configuration: + rejectPublicSuffixes: true, + // ... future items go here + + // Gets filled from jar.store.getAllCookies(): + cookies: [ + { + key: 'string', + value: 'string', + // ... + /* other Cookie.serializableProperties go here */ + } + ] + } +``` + +# RFC6265bis + +Support for RFC6265bis revision 02 is being developed. Since this is a bit of an omnibus revision to the RFC6252, support is broken up into the functional areas. + +## Leave Secure Cookies Alone + +Not yet supported. + +This change makes it so that if a cookie is sent from the server to the client with a `Secure` attribute, the channel must also be secure or the cookie is ignored. + +## SameSite Cookies + +Supported. + +This change makes it possible for servers, and supporting clients, to mitigate certain types of CSRF attacks by disallowing `SameSite` cookies from being sent cross-origin. + +On the Cookie object itself, you can get/set the `.sameSite` attribute, which will be serialized into the `SameSite=` cookie attribute. When unset or `undefined`, no `SameSite=` attribute will be serialized. The valid values of this attribute are `'none'`, `'lax'`, or `'strict'`. Other values will be serialized as-is. + +When parsing cookies with a `SameSite` cookie attribute, values other than `'lax'` or `'strict'` are parsed as `'none'`. For example, `SomeCookie=SomeValue; SameSite=garbage` will parse so that `cookie.sameSite === 'none'`. + +In order to support SameSite cookies, you must provide a `sameSiteContext` option to _both_ `setCookie` and `getCookies`. Valid values for this option are just like for the Cookie object, but have particular meanings: +1. `'strict'` mode - If the request is on the same "site for cookies" (see the RFC draft for what this means), pass this option to add a layer of defense against CSRF. +2. `'lax'` mode - If the request is from another site, _but_ is directly because of navigation by the user, e.g., `` or ``, pass `sameSiteContext: 'lax'`. +3. `'none'` - Otherwise, pass `sameSiteContext: 'none'` (this indicates a cross-origin request). +4. unset/`undefined` - SameSite **will not** be enforced! This can be a valid use-case for when CSRF isn't in the threat model of the system being built. + +It is highly recommended that you read RFC 6265bis for fine details on SameSite cookies. In particular [Section 8.8](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-8.8) discusses security considerations and defense in depth. + +## Cookie Prefixes + +Supported. + +Cookie prefixes are a way to indicate that a given cookie was set with a set of attributes simply by inspecting the first few characters of the cookie's name. + +Cookie prefixes are defined in [Section 4.1.3 of 6265bis](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.3). Two prefixes are defined: + +1. `"__Secure-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "__Secure-", then the cookie will have been set with a "Secure" attribute. +2. `"__Host-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "__Host-", then the cookie will have been set with a "Secure" attribute, a "Path" attribute with a value of "/", and no "Domain" attribute. + +If `prefixSecurity` is enabled for `CookieJar`, then cookies that match the prefixes defined above but do not obey the attribute restrictions will not be added. + +You can define this functionality by passing in `prefixSecurity` option to `CookieJar`. It can be one of 3 values: + +1. `silent`: Enable cookie prefix checking but silently fail to add the cookie if conditions not met. Default. +2. `strict`: Enable cookie prefix checking and error out if conditions not met. +3. `unsafe-disabled`: Disable cookie prefix checking. + +Note that if `ignoreError` is passed in as `true` then the error will be silent regardless of `prefixSecurity` option (assuming it's enabled). + + +# Copyright and License + +BSD-3-Clause: + +```text + Copyright (c) 2015, Salesforce.com, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of Salesforce.com nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +``` diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/cookie.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 000000000..a042893e1 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,1671 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +const punycode = require("punycode"); +const urlParse = require("url").parse; +const util = require("util"); +const pubsuffix = require("./pubsuffix-psl"); +const Store = require("./store").Store; +const MemoryCookieStore = require("./memstore").MemoryCookieStore; +const pathMatch = require("./pathMatch").pathMatch; +const VERSION = require("./version"); +const { fromCallback } = require("universalify"); + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +const COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +const CONTROL_CHARS = /[\x00-\x1F]/; + +// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in +// the "relaxed" mode, see: +// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 +const TERMINATORS = ["\n", "\r", "\0"]; + +// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +const PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; + +// date-time parsing constants (RFC6265 S5.1.1) + +const DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +const MONTH_TO_NUM = { + jan: 0, + feb: 1, + mar: 2, + apr: 3, + may: 4, + jun: 5, + jul: 6, + aug: 7, + sep: 8, + oct: 9, + nov: 10, + dec: 11 +}; + +const MAX_TIME = 2147483647000; // 31-bit max +const MIN_TIME = 0; // 31-bit min +const SAME_SITE_CONTEXT_VAL_ERR = + 'Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"'; + +function checkSameSiteContext(value) { + const context = String(value).toLowerCase(); + if (context === "none" || context === "lax" || context === "strict") { + return context; + } else { + return null; + } +} + +const PrefixSecurityEnum = Object.freeze({ + SILENT: "silent", + STRICT: "strict", + DISABLED: "unsafe-disabled" +}); + +// Dumped from ip-regex@4.0.0, with the following changes: +// * all capturing groups converted to non-capturing -- "(?:)" +// * support for IPv6 Scoped Literal ("%eth1") removed +// * lowercase hexadecimal only +var IP_REGEX_LOWERCASE =/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/; + +/* + * Parses a Natural number (i.e., non-negative integer) with either the + * *DIGIT ( non-digit *OCTET ) + * or + * *DIGIT + * grammar (RFC6265 S5.1.1). + * + * The "trailingOK" boolean controls if the grammar accepts a + * "( non-digit *OCTET )" trailer. + */ +function parseDigits(token, minDigits, maxDigits, trailingOK) { + let count = 0; + while (count < token.length) { + const c = token.charCodeAt(count); + // "non-digit = %x00-2F / %x3A-FF" + if (c <= 0x2f || c >= 0x3a) { + break; + } + count++; + } + + // constrain to a minimum and maximum number of digits. + if (count < minDigits || count > maxDigits) { + return null; + } + + if (!trailingOK && count != token.length) { + return null; + } + + return parseInt(token.substr(0, count), 10); +} + +function parseTime(token) { + const parts = token.split(":"); + const result = [0, 0, 0]; + + /* RF6256 S5.1.1: + * time = hms-time ( non-digit *OCTET ) + * hms-time = time-field ":" time-field ":" time-field + * time-field = 1*2DIGIT + */ + + if (parts.length !== 3) { + return null; + } + + for (let i = 0; i < 3; i++) { + // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be + // followed by "( non-digit *OCTET )" so therefore the last time-field can + // have a trailer + const trailingOK = i == 2; + const num = parseDigits(parts[i], 1, 2, trailingOK); + if (num === null) { + return null; + } + result[i] = num; + } + + return result; +} + +function parseMonth(token) { + token = String(token) + .substr(0, 3) + .toLowerCase(); + const num = MONTH_TO_NUM[token]; + return num >= 0 ? num : null; +} + +/* + * RFC6265 S5.1.1 date parser (see RFC for full grammar) + */ +function parseDate(str) { + if (!str) { + return; + } + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + const tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } + + let hour = null; + let minute = null; + let second = null; + let dayOfMonth = null; + let month = null; + let year = null; + + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i].trim(); + if (!token.length) { + continue; + } + + let result; + + /* 2.1. If the found-time flag is not set and the token matches the time + * production, set the found-time flag and set the hour- value, + * minute-value, and second-value to the numbers denoted by the digits in + * the date-token, respectively. Skip the remaining sub-steps and continue + * to the next date-token. + */ + if (second === null) { + result = parseTime(token); + if (result) { + hour = result[0]; + minute = result[1]; + second = result[2]; + continue; + } + } + + /* 2.2. If the found-day-of-month flag is not set and the date-token matches + * the day-of-month production, set the found-day-of- month flag and set + * the day-of-month-value to the number denoted by the date-token. Skip + * the remaining sub-steps and continue to the next date-token. + */ + if (dayOfMonth === null) { + // "day-of-month = 1*2DIGIT ( non-digit *OCTET )" + result = parseDigits(token, 1, 2, true); + if (result !== null) { + dayOfMonth = result; + continue; + } + } + + /* 2.3. If the found-month flag is not set and the date-token matches the + * month production, set the found-month flag and set the month-value to + * the month denoted by the date-token. Skip the remaining sub-steps and + * continue to the next date-token. + */ + if (month === null) { + result = parseMonth(token); + if (result !== null) { + month = result; + continue; + } + } + + /* 2.4. If the found-year flag is not set and the date-token matches the + * year production, set the found-year flag and set the year-value to the + * number denoted by the date-token. Skip the remaining sub-steps and + * continue to the next date-token. + */ + if (year === null) { + // "year = 2*4DIGIT ( non-digit *OCTET )" + result = parseDigits(token, 2, 4, true); + if (result !== null) { + year = result; + /* From S5.1.1: + * 3. If the year-value is greater than or equal to 70 and less + * than or equal to 99, increment the year-value by 1900. + * 4. If the year-value is greater than or equal to 0 and less + * than or equal to 69, increment the year-value by 2000. + */ + if (year >= 70 && year <= 99) { + year += 1900; + } else if (year >= 0 && year <= 69) { + year += 2000; + } + } + } + } + + /* RFC 6265 S5.1.1 + * "5. Abort these steps and fail to parse the cookie-date if: + * * at least one of the found-day-of-month, found-month, found- + * year, or found-time flags is not set, + * * the day-of-month-value is less than 1 or greater than 31, + * * the year-value is less than 1601, + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + * (Note that leap seconds cannot be represented in this syntax.)" + * + * So, in order as above: + */ + if ( + dayOfMonth === null || + month === null || + year === null || + second === null || + dayOfMonth < 1 || + dayOfMonth > 31 || + year < 1601 || + hour > 23 || + minute > 59 || + second > 59 + ) { + return; + } + + return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); +} + +function formatDate(date) { + return date.toUTCString(); +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./, ""); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * S5.1.3: + * "A string domain-matches a given domain string if at least one of the + * following conditions hold:" + * + * " o The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) { + return true; + } + + /* " o All of the following [three] conditions hold:" */ + + /* "* The domain string is a suffix of the string" */ + const idx = str.indexOf(domStr); + if (idx <= 0) { + return false; // it's a non-match (-1) or prefix (0) + } + + // next, check it's a proper suffix + // e.g., "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) { + return false; // it's not a suffix + } + + /* " * The last character of the string that is not included in the + * domain string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') { + return false; // doesn't align on "." + } + + /* " * The string is a host name (i.e., not an IP address)." */ + if (IP_REGEX_LOWERCASE.test(str)) { + return false; // it's an IP address + } + + return true; +} + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0, 1) !== "/") { + return "/"; + } + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") { + return path; + } + + const rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +function trimTerminator(str) { + for (let t = 0; t < TERMINATORS.length; t++) { + const terminatorIdx = str.indexOf(TERMINATORS[t]); + if (terminatorIdx !== -1) { + str = str.substr(0, terminatorIdx); + } + } + + return str; +} + +function parseCookiePair(cookiePair, looseMode) { + cookiePair = trimTerminator(cookiePair); + + let firstEq = cookiePair.indexOf("="); + if (looseMode) { + if (firstEq === 0) { + // '=' is immediately at start + cookiePair = cookiePair.substr(1); + firstEq = cookiePair.indexOf("="); // might still need to split on '=' + } + } else { + // non-loose mode + if (firstEq <= 0) { + // no '=' or is at start + return; // needs to have non-empty "cookie-name" + } + } + + let cookieName, cookieValue; + if (firstEq <= 0) { + cookieName = ""; + cookieValue = cookiePair.trim(); + } else { + cookieName = cookiePair.substr(0, firstEq).trim(); + cookieValue = cookiePair.substr(firstEq + 1).trim(); + } + + if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { + return; + } + + const c = new Cookie(); + c.key = cookieName; + c.value = cookieValue; + return c; +} + +function parse(str, options) { + if (!options || typeof options !== "object") { + options = {}; + } + str = str.trim(); + + // We use a regex to parse the "name-value-pair" part of S5.2 + const firstSemi = str.indexOf(";"); // S5.2 step 1 + const cookiePair = firstSemi === -1 ? str : str.substr(0, firstSemi); + const c = parseCookiePair(cookiePair, !!options.loose); + if (!c) { + return; + } + + if (firstSemi === -1) { + return c; + } + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + const unparsed = str.slice(firstSemi + 1).trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) { + return c; + } + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + const cookie_avs = unparsed.split(";"); + while (cookie_avs.length) { + const av = cookie_avs.shift().trim(); + if (av.length === 0) { + // happens if ";;" appears + continue; + } + const av_sep = av.indexOf("="); + let av_key, av_value; + + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0, av_sep); + av_value = av.substr(av_sep + 1); + } + + av_key = av_key.trim().toLowerCase(); + + if (av_value) { + av_value = av_value.trim(); + } + + switch (av_key) { + case "expires": // S5.2.1 + if (av_value) { + const exp = parseDate(av_value); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp) { + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + c.expires = exp; + } + } + break; + + case "max-age": // S5.2.2 + if (av_value) { + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (/^-?[0-9]+$/.test(av_value)) { + const delta = parseInt(av_value, 10); + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + } + } + break; + + case "domain": // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (av_value) { + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + const domain = av_value.trim().replace(/^\./, ""); + if (domain) { + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + } + } + break; + + case "path": // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; + + case "secure": // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + c.secure = true; + break; + + case "httponly": // S5.2.6 -- effectively the same as 'secure' + c.httpOnly = true; + break; + + case "samesite": // RFC6265bis-02 S5.3.7 + const enforcement = av_value ? av_value.toLowerCase() : ""; + switch (enforcement) { + case "strict": + c.sameSite = "strict"; + break; + case "lax": + c.sameSite = "lax"; + break; + default: + // RFC6265bis-02 S5.3.7 step 1: + // "If cookie-av's attribute-value is not a case-insensitive match + // for "Strict" or "Lax", ignore the "cookie-av"." + // This effectively sets it to 'none' from the prototype. + break; + } + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + return c; +} + +/** + * If the cookie-name begins with a case-sensitive match for the + * string "__Secure-", abort these steps and ignore the cookie + * entirely unless the cookie's secure-only-flag is true. + * @param cookie + * @returns boolean + */ +function isSecurePrefixConditionMet(cookie) { + return !cookie.key.startsWith("__Secure-") || cookie.secure; +} + +/** + * If the cookie-name begins with a case-sensitive match for the + * string "__Host-", abort these steps and ignore the cookie + * entirely unless the cookie meets all the following criteria: + * 1. The cookie's secure-only-flag is true. + * 2. The cookie's host-only-flag is true. + * 3. The cookie-attribute-list contains an attribute with an + * attribute-name of "Path", and the cookie's path is "/". + * @param cookie + * @returns boolean + */ +function isHostPrefixConditionMet(cookie) { + return ( + !cookie.key.startsWith("__Host-") || + (cookie.secure && + cookie.hostOnly && + cookie.path != null && + cookie.path === "/") + ); +} + +// avoid the V8 deoptimization monster! +function jsonParse(str) { + let obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; +} + +function fromJSON(str) { + if (!str) { + return null; + } + + let obj; + if (typeof str === "string") { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + // assume it's an Object + obj = str; + } + + const c = new Cookie(); + for (let i = 0; i < Cookie.serializableProperties.length; i++) { + const prop = Cookie.serializableProperties[i]; + if (obj[prop] === undefined || obj[prop] === cookieDefaults[prop]) { + continue; // leave as prototype default + } + + if (prop === "expires" || prop === "creation" || prop === "lastAccessed") { + if (obj[prop] === null) { + c[prop] = null; + } else { + c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(obj[prop]); + } + } else { + c[prop] = obj[prop]; + } + } + + return c; +} + +/* Section 5.4 part 2: + * "* Cookies with longer paths are listed before cookies with + * shorter paths. + * + * * Among cookies that have equal-length path fields, cookies with + * earlier creation-times are listed before cookies with later + * creation-times." + */ + +function cookieCompare(a, b) { + let cmp = 0; + + // descending for length: b CMP a + const aPathLen = a.path ? a.path.length : 0; + const bPathLen = b.path ? b.path.length : 0; + cmp = bPathLen - aPathLen; + if (cmp !== 0) { + return cmp; + } + + // ascending for time: a CMP b + const aTime = a.creation ? a.creation.getTime() : MAX_TIME; + const bTime = b.creation ? b.creation.getTime() : MAX_TIME; + cmp = aTime - bTime; + if (cmp !== 0) { + return cmp; + } + + // break ties for the same millisecond (precision of JavaScript's clock) + cmp = a.creationIndex - b.creationIndex; + + return cmp; +} + +// Gives the permutation of all possible pathMatch()es of a given path. The +// array is in longest-to-shortest order. Handy for indexing. +function permutePath(path) { + if (path === "/") { + return ["/"]; + } + const permutations = [path]; + while (path.length > 1) { + const lindex = path.lastIndexOf("/"); + if (lindex === 0) { + break; + } + path = path.substr(0, lindex); + permutations.push(path); + } + permutations.push("/"); + return permutations; +} + +function getCookieContext(url) { + if (url instanceof Object) { + return url; + } + // NOTE: decodeURI will throw on malformed URIs (see GH-32). + // Therefore, we will just skip decoding for such URIs. + try { + url = decodeURI(url); + } catch (err) { + // Silently swallow error + } + + return urlParse(url); +} + +const cookieDefaults = { + // the order in which the RFC has them: + key: "", + value: "", + expires: "Infinity", + maxAge: null, + domain: null, + path: null, + secure: false, + httpOnly: false, + extensions: null, + // set by the CookieJar: + hostOnly: null, + pathIsDefault: null, + creation: null, + lastAccessed: null, + sameSite: "none" +}; + +class Cookie { + constructor(options = {}) { + if (util.inspect.custom) { + this[util.inspect.custom] = this.inspect; + } + + Object.assign(this, cookieDefaults, options); + this.creation = this.creation || new Date(); + + // used to break creation ties in cookieCompare(): + Object.defineProperty(this, "creationIndex", { + configurable: false, + enumerable: false, // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); + } + + inspect() { + const now = Date.now(); + const hostOnly = this.hostOnly != null ? this.hostOnly : "?"; + const createAge = this.creation + ? `${now - this.creation.getTime()}ms` + : "?"; + const accessAge = this.lastAccessed + ? `${now - this.lastAccessed.getTime()}ms` + : "?"; + return `Cookie="${this.toString()}; hostOnly=${hostOnly}; aAge=${accessAge}; cAge=${createAge}"`; + } + + toJSON() { + const obj = {}; + + for (const prop of Cookie.serializableProperties) { + if (this[prop] === cookieDefaults[prop]) { + continue; // leave as prototype default + } + + if ( + prop === "expires" || + prop === "creation" || + prop === "lastAccessed" + ) { + if (this[prop] === null) { + obj[prop] = null; + } else { + obj[prop] = + this[prop] == "Infinity" // intentionally not === + ? "Infinity" + : this[prop].toISOString(); + } + } else if (prop === "maxAge") { + if (this[prop] !== null) { + // again, intentionally not === + obj[prop] = + this[prop] == Infinity || this[prop] == -Infinity + ? this[prop].toString() + : this[prop]; + } + } else { + if (this[prop] !== cookieDefaults[prop]) { + obj[prop] = this[prop]; + } + } + } + + return obj; + } + + clone() { + return fromJSON(this.toJSON()); + } + + validate() { + if (!COOKIE_OCTETS.test(this.value)) { + return false; + } + if ( + this.expires != Infinity && + !(this.expires instanceof Date) && + !parseDate(this.expires) + ) { + return false; + } + if (this.maxAge != null && this.maxAge <= 0) { + return false; // "Max-Age=" non-zero-digit *DIGIT + } + if (this.path != null && !PATH_VALUE.test(this.path)) { + return false; + } + + const cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) { + return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this + } + const suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) { + // it's a public suffix + return false; + } + } + return true; + } + + setExpires(exp) { + if (exp instanceof Date) { + this.expires = exp; + } else { + this.expires = parseDate(exp) || "Infinity"; + } + } + + setMaxAge(age) { + if (age === Infinity || age === -Infinity) { + this.maxAge = age.toString(); // so JSON.stringify() works + } else { + this.maxAge = age; + } + } + + cookieString() { + let val = this.value; + if (val == null) { + val = ""; + } + if (this.key === "") { + return val; + } + return `${this.key}=${val}`; + } + + // gives Set-Cookie header format + toString() { + let str = this.cookieString(); + + if (this.expires != Infinity) { + if (this.expires instanceof Date) { + str += `; Expires=${formatDate(this.expires)}`; + } else { + str += `; Expires=${this.expires}`; + } + } + + if (this.maxAge != null && this.maxAge != Infinity) { + str += `; Max-Age=${this.maxAge}`; + } + + if (this.domain && !this.hostOnly) { + str += `; Domain=${this.domain}`; + } + if (this.path) { + str += `; Path=${this.path}`; + } + + if (this.secure) { + str += "; Secure"; + } + if (this.httpOnly) { + str += "; HttpOnly"; + } + if (this.sameSite && this.sameSite !== "none") { + const ssCanon = Cookie.sameSiteCanonical[this.sameSite.toLowerCase()]; + str += `; SameSite=${ssCanon ? ssCanon : this.sameSite}`; + } + if (this.extensions) { + this.extensions.forEach(ext => { + str += `; ${ext}`; + }); + } + + return str; + } + + // TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() + // elsewhere) + // S5.3 says to give the "latest representable date" for which we use Infinity + // For "expired" we use 0 + TTL(now) { + /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires + * attribute, the Max-Age attribute has precedence and controls the + * expiration date of the cookie. + * (Concurs with S5.3 step 3) + */ + if (this.maxAge != null) { + return this.maxAge <= 0 ? 0 : this.maxAge * 1000; + } + + let expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } + + if (expires == Infinity) { + return Infinity; + } + + return expires.getTime() - (now || Date.now()); + } + + return Infinity; + } + + // expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() + // elsewhere) + expiryTime(now) { + if (this.maxAge != null) { + const relativeTo = now || this.creation || new Date(); + const age = this.maxAge <= 0 ? -Infinity : this.maxAge * 1000; + return relativeTo.getTime() + age; + } + + if (this.expires == Infinity) { + return Infinity; + } + return this.expires.getTime(); + } + + // expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() + // elsewhere), except it returns a Date + expiryDate(now) { + const millisec = this.expiryTime(now); + if (millisec == Infinity) { + return new Date(MAX_TIME); + } else if (millisec == -Infinity) { + return new Date(MIN_TIME); + } else { + return new Date(millisec); + } + } + + // This replaces the "persistent-flag" parts of S5.3 step 3 + isPersistent() { + return this.maxAge != null || this.expires != Infinity; + } + + // Mostly S5.1.2 and S5.2.3: + canonicalizedDomain() { + if (this.domain == null) { + return null; + } + return canonicalDomain(this.domain); + } + + cdomain() { + return this.canonicalizedDomain(); + } +} + +Cookie.cookiesCreated = 0; +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; +Cookie.serializableProperties = Object.keys(cookieDefaults); +Cookie.sameSiteLevel = { + strict: 3, + lax: 2, + none: 1 +}; + +Cookie.sameSiteCanonical = { + strict: "Strict", + lax: "Lax" +}; + +function getNormalizedPrefixSecurity(prefixSecurity) { + if (prefixSecurity != null) { + const normalizedPrefixSecurity = prefixSecurity.toLowerCase(); + /* The three supported options */ + switch (normalizedPrefixSecurity) { + case PrefixSecurityEnum.STRICT: + case PrefixSecurityEnum.SILENT: + case PrefixSecurityEnum.DISABLED: + return normalizedPrefixSecurity; + } + } + /* Default is SILENT */ + return PrefixSecurityEnum.SILENT; +} + +class CookieJar { + constructor(store, options = { rejectPublicSuffixes: true }) { + if (typeof options === "boolean") { + options = { rejectPublicSuffixes: options }; + } + this.rejectPublicSuffixes = options.rejectPublicSuffixes; + this.enableLooseMode = !!options.looseMode; + this.allowSpecialUseDomain = !!options.allowSpecialUseDomain; + this.store = store || new MemoryCookieStore(); + this.prefixSecurity = getNormalizedPrefixSecurity(options.prefixSecurity); + this._cloneSync = syncWrap("clone"); + this._importCookiesSync = syncWrap("_importCookies"); + this.getCookiesSync = syncWrap("getCookies"); + this.getCookieStringSync = syncWrap("getCookieString"); + this.getSetCookieStringsSync = syncWrap("getSetCookieStrings"); + this.removeAllCookiesSync = syncWrap("removeAllCookies"); + this.setCookieSync = syncWrap("setCookie"); + this.serializeSync = syncWrap("serialize"); + } + + setCookie(cookie, url, options, cb) { + let err; + const context = getCookieContext(url); + if (typeof options === "function") { + cb = options; + options = {}; + } + + const host = canonicalDomain(context.hostname); + const loose = options.loose || this.enableLooseMode; + + let sameSiteContext = null; + if (options.sameSiteContext) { + sameSiteContext = checkSameSiteContext(options.sameSiteContext); + if (!sameSiteContext) { + return cb(new Error(SAME_SITE_CONTEXT_VAL_ERR)); + } + } + + // S5.3 step 1 + if (typeof cookie === "string" || cookie instanceof String) { + cookie = Cookie.parse(cookie, { loose: loose }); + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + } else if (!(cookie instanceof Cookie)) { + // If you're seeing this error, and are passing in a Cookie object, + // it *might* be a Cookie object from another loaded version of tough-cookie. + err = new Error( + "First argument to setCookie must be a Cookie object or string" + ); + return cb(options.ignoreError ? null : err); + } + + // S5.3 step 2 + const now = options.now || new Date(); // will assign later to save effort in the face of errors + + // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() + + // S5.3 step 4: NOOP; domain is null by default + + // S5.3 step 5: public suffixes + if (this.rejectPublicSuffixes && cookie.domain) { + const suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { + // e.g. "com" + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } + + // S5.3 step 6: + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error( + `Cookie not in this host's domain. Cookie:${cookie.cdomain()} Request:${host}` + ); + return cb(options.ignoreError ? null : err); + } + + if (cookie.hostOnly == null) { + // don't reset if already set + cookie.hostOnly = false; + } + } else { + cookie.hostOnly = true; + cookie.domain = host; + } + + //S5.2.4 If the attribute-value is empty or if the first character of the + //attribute-value is not %x2F ("/"): + //Let cookie-path be the default-path. + if (!cookie.path || cookie.path[0] !== "/") { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } + + // S5.3 step 8: NOOP; secure attribute + // S5.3 step 9: NOOP; httpOnly attribute + + // S5.3 step 10 + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + + // 6252bis-02 S5.4 Step 13 & 14: + if (cookie.sameSite !== "none" && sameSiteContext) { + // "If the cookie's "same-site-flag" is not "None", and the cookie + // is being set from a context whose "site for cookies" is not an + // exact match for request-uri's host's registered domain, then + // abort these steps and ignore the newly created cookie entirely." + if (sameSiteContext === "none") { + err = new Error( + "Cookie is SameSite but this is a cross-origin request" + ); + return cb(options.ignoreError ? null : err); + } + } + + /* 6265bis-02 S5.4 Steps 15 & 16 */ + const ignoreErrorForPrefixSecurity = + this.prefixSecurity === PrefixSecurityEnum.SILENT; + const prefixSecurityDisabled = + this.prefixSecurity === PrefixSecurityEnum.DISABLED; + /* If prefix checking is not disabled ...*/ + if (!prefixSecurityDisabled) { + let errorFound = false; + let errorMsg; + /* Check secure prefix condition */ + if (!isSecurePrefixConditionMet(cookie)) { + errorFound = true; + errorMsg = "Cookie has __Secure prefix but Secure attribute is not set"; + } else if (!isHostPrefixConditionMet(cookie)) { + /* Check host prefix condition */ + errorFound = true; + errorMsg = + "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'"; + } + if (errorFound) { + return cb( + options.ignoreError || ignoreErrorForPrefixSecurity + ? null + : new Error(errorMsg) + ); + } + } + + const store = this.store; + + if (!store.updateCookie) { + store.updateCookie = function(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + } + + function withCookie(err, oldCookie) { + if (err) { + return cb(err); + } + + const next = function(err) { + if (err) { + return cb(err); + } else { + cb(null, cookie); + } + }; + + if (oldCookie) { + // S5.3 step 11 - "If the cookie store contains a cookie with the same name, + // domain, and path as the newly created cookie:" + if (options.http === false && oldCookie.httpOnly) { + // step 11.2 + err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + cookie.creation = oldCookie.creation; // step 11.3 + cookie.creationIndex = oldCookie.creationIndex; // preserve tie-breaker + cookie.lastAccessed = now; + // Step 11.4 (delete cookie) is implied by just setting the new one: + store.updateCookie(oldCookie, cookie, next); // step 12 + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); // step 12 + } + } + + store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie); + } + + // RFC6365 S5.4 + getCookies(url, options, cb) { + const context = getCookieContext(url); + if (typeof options === "function") { + cb = options; + options = {}; + } + + const host = canonicalDomain(context.hostname); + const path = context.pathname || "/"; + + let secure = options.secure; + if ( + secure == null && + context.protocol && + (context.protocol == "https:" || context.protocol == "wss:") + ) { + secure = true; + } + + let sameSiteLevel = 0; + if (options.sameSiteContext) { + const sameSiteContext = checkSameSiteContext(options.sameSiteContext); + sameSiteLevel = Cookie.sameSiteLevel[sameSiteContext]; + if (!sameSiteLevel) { + return cb(new Error(SAME_SITE_CONTEXT_VAL_ERR)); + } + } + + let http = options.http; + if (http == null) { + http = true; + } + + const now = options.now || Date.now(); + const expireCheck = options.expire !== false; + const allPaths = !!options.allPaths; + const store = this.store; + + function matchingCookie(c) { + // "Either: + // The cookie's host-only-flag is true and the canonicalized + // request-host is identical to the cookie's domain. + // Or: + // The cookie's host-only-flag is false and the canonicalized + // request-host domain-matches the cookie's domain." + if (c.hostOnly) { + if (c.domain != host) { + return false; + } + } else { + if (!domainMatch(host, c.domain, false)) { + return false; + } + } + + // "The request-uri's path path-matches the cookie's path." + if (!allPaths && !pathMatch(path, c.path)) { + return false; + } + + // "If the cookie's secure-only-flag is true, then the request-uri's + // scheme must denote a "secure" protocol" + if (c.secure && !secure) { + return false; + } + + // "If the cookie's http-only-flag is true, then exclude the cookie if the + // cookie-string is being generated for a "non-HTTP" API" + if (c.httpOnly && !http) { + return false; + } + + // RFC6265bis-02 S5.3.7 + if (sameSiteLevel) { + const cookieLevel = Cookie.sameSiteLevel[c.sameSite || "none"]; + if (cookieLevel > sameSiteLevel) { + // only allow cookies at or below the request level + return false; + } + } + + // deferred from S5.3 + // non-RFC: allow retention of expired cookies by choice + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, () => {}); // result ignored + return false; + } + + return true; + } + + store.findCookies( + host, + allPaths ? null : path, + this.allowSpecialUseDomain, + (err, cookies) => { + if (err) { + return cb(err); + } + + cookies = cookies.filter(matchingCookie); + + // sorting of S5.4 part 2 + if (options.sort !== false) { + cookies = cookies.sort(cookieCompare); + } + + // S5.4 part 3 + const now = new Date(); + for (const cookie of cookies) { + cookie.lastAccessed = now; + } + // TODO persist lastAccessed + + cb(null, cookies); + } + ); + } + + getCookieString(...args) { + const cb = args.pop(); + const next = function(err, cookies) { + if (err) { + cb(err); + } else { + cb( + null, + cookies + .sort(cookieCompare) + .map(c => c.cookieString()) + .join("; ") + ); + } + }; + args.push(next); + this.getCookies.apply(this, args); + } + + getSetCookieStrings(...args) { + const cb = args.pop(); + const next = function(err, cookies) { + if (err) { + cb(err); + } else { + cb( + null, + cookies.map(c => { + return c.toString(); + }) + ); + } + }; + args.push(next); + this.getCookies.apply(this, args); + } + + serialize(cb) { + let type = this.store.constructor.name; + if (type === "Object") { + type = null; + } + + // update README.md "Serialization Format" if you change this, please! + const serialized = { + // The version of tough-cookie that serialized this jar. Generally a good + // practice since future versions can make data import decisions based on + // known past behavior. When/if this matters, use `semver`. + version: `tough-cookie@${VERSION}`, + + // add the store type, to make humans happy: + storeType: type, + + // CookieJar configuration: + rejectPublicSuffixes: !!this.rejectPublicSuffixes, + + // this gets filled from getAllCookies: + cookies: [] + }; + + if ( + !( + this.store.getAllCookies && + typeof this.store.getAllCookies === "function" + ) + ) { + return cb( + new Error( + "store does not support getAllCookies and cannot be serialized" + ) + ); + } + + this.store.getAllCookies((err, cookies) => { + if (err) { + return cb(err); + } + + serialized.cookies = cookies.map(cookie => { + // convert to serialized 'raw' cookies + cookie = cookie instanceof Cookie ? cookie.toJSON() : cookie; + + // Remove the index so new ones get assigned during deserialization + delete cookie.creationIndex; + + return cookie; + }); + + return cb(null, serialized); + }); + } + + toJSON() { + return this.serializeSync(); + } + + // use the class method CookieJar.deserialize instead of calling this directly + _importCookies(serialized, cb) { + let cookies = serialized.cookies; + if (!cookies || !Array.isArray(cookies)) { + return cb(new Error("serialized jar has no cookies array")); + } + cookies = cookies.slice(); // do not modify the original + + const putNext = err => { + if (err) { + return cb(err); + } + + if (!cookies.length) { + return cb(err, this); + } + + let cookie; + try { + cookie = fromJSON(cookies.shift()); + } catch (e) { + return cb(e); + } + + if (cookie === null) { + return putNext(null); // skip this cookie + } + + this.store.putCookie(cookie, putNext); + }; + + putNext(); + } + + clone(newStore, cb) { + if (arguments.length === 1) { + cb = newStore; + newStore = null; + } + + this.serialize((err, serialized) => { + if (err) { + return cb(err); + } + CookieJar.deserialize(serialized, newStore, cb); + }); + } + + cloneSync(newStore) { + if (arguments.length === 0) { + return this._cloneSync(); + } + if (!newStore.synchronous) { + throw new Error( + "CookieJar clone destination store is not synchronous; use async API instead." + ); + } + return this._cloneSync(newStore); + } + + removeAllCookies(cb) { + const store = this.store; + + // Check that the store implements its own removeAllCookies(). The default + // implementation in Store will immediately call the callback with a "not + // implemented" Error. + if ( + typeof store.removeAllCookies === "function" && + store.removeAllCookies !== Store.prototype.removeAllCookies + ) { + return store.removeAllCookies(cb); + } + + store.getAllCookies((err, cookies) => { + if (err) { + return cb(err); + } + + if (cookies.length === 0) { + return cb(null); + } + + let completedCount = 0; + const removeErrors = []; + + function removeCookieCb(removeErr) { + if (removeErr) { + removeErrors.push(removeErr); + } + + completedCount++; + + if (completedCount === cookies.length) { + return cb(removeErrors.length ? removeErrors[0] : null); + } + } + + cookies.forEach(cookie => { + store.removeCookie( + cookie.domain, + cookie.path, + cookie.key, + removeCookieCb + ); + }); + }); + } + + static deserialize(strOrObj, store, cb) { + if (arguments.length !== 3) { + // store is optional + cb = store; + store = null; + } + + let serialized; + if (typeof strOrObj === "string") { + serialized = jsonParse(strOrObj); + if (serialized instanceof Error) { + return cb(serialized); + } + } else { + serialized = strOrObj; + } + + const jar = new CookieJar(store, serialized.rejectPublicSuffixes); + jar._importCookies(serialized, err => { + if (err) { + return cb(err); + } + cb(null, jar); + }); + } + + static deserializeSync(strOrObj, store) { + const serialized = + typeof strOrObj === "string" ? JSON.parse(strOrObj) : strOrObj; + const jar = new CookieJar(store, serialized.rejectPublicSuffixes); + + // catch this mistake early: + if (!jar.store.synchronous) { + throw new Error( + "CookieJar store is not synchronous; use async API instead." + ); + } + + jar._importCookiesSync(serialized); + return jar; + } +} +CookieJar.fromJSON = CookieJar.deserializeSync; + +[ + "_importCookies", + "clone", + "getCookies", + "getCookieString", + "getSetCookieStrings", + "removeAllCookies", + "serialize", + "setCookie" +].forEach(name => { + CookieJar.prototype[name] = fromCallback(CookieJar.prototype[name]); +}); +CookieJar.deserialize = fromCallback(CookieJar.deserialize); + +// Use a closure to provide a true imperative API for synchronous stores. +function syncWrap(method) { + return function(...args) { + if (!this.store.synchronous) { + throw new Error( + "CookieJar store is not synchronous; use async API instead." + ); + } + + let syncErr, syncResult; + this[method](...args, (err, result) => { + syncErr = err; + syncResult = result; + }); + + if (syncErr) { + throw syncErr; + } + return syncResult; + }; +} + +exports.version = VERSION; +exports.CookieJar = CookieJar; +exports.Cookie = Cookie; +exports.Store = Store; +exports.MemoryCookieStore = MemoryCookieStore; +exports.parseDate = parseDate; +exports.formatDate = formatDate; +exports.parse = parse; +exports.fromJSON = fromJSON; +exports.domainMatch = domainMatch; +exports.defaultPath = defaultPath; +exports.pathMatch = pathMatch; +exports.getPublicSuffix = pubsuffix.getPublicSuffix; +exports.cookieCompare = cookieCompare; +exports.permuteDomain = require("./permuteDomain").permuteDomain; +exports.permutePath = permutePath; +exports.canonicalDomain = canonicalDomain; +exports.PrefixSecurityEnum = PrefixSecurityEnum; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/memstore.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/memstore.js new file mode 100644 index 000000000..912eead35 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/memstore.js @@ -0,0 +1,190 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +const { fromCallback } = require("universalify"); +const Store = require("./store").Store; +const permuteDomain = require("./permuteDomain").permuteDomain; +const pathMatch = require("./pathMatch").pathMatch; +const util = require("util"); + +class MemoryCookieStore extends Store { + constructor() { + super(); + this.synchronous = true; + this.idx = {}; + if (util.inspect.custom) { + this[util.inspect.custom] = this.inspect; + } + } + + inspect() { + return `{ idx: ${util.inspect(this.idx, false, 2)} }`; + } + + findCookie(domain, path, key, cb) { + if (!this.idx[domain]) { + return cb(null, undefined); + } + if (!this.idx[domain][path]) { + return cb(null, undefined); + } + return cb(null, this.idx[domain][path][key] || null); + } + findCookies(domain, path, allowSpecialUseDomain, cb) { + const results = []; + if (typeof allowSpecialUseDomain === "function") { + cb = allowSpecialUseDomain; + allowSpecialUseDomain = false; + } + if (!domain) { + return cb(null, []); + } + + let pathMatcher; + if (!path) { + // null means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (const curPath in domainIndex) { + const pathIndex = domainIndex[curPath]; + for (const key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + } else { + pathMatcher = function matchRFC(domainIndex) { + //NOTE: we should use path-match algorithm from S5.1.4 here + //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299) + Object.keys(domainIndex).forEach(cookiePath => { + if (pathMatch(path, cookiePath)) { + const pathIndex = domainIndex[cookiePath]; + for (const key in pathIndex) { + results.push(pathIndex[key]); + } + } + }); + }; + } + + const domains = permuteDomain(domain, allowSpecialUseDomain) || [domain]; + const idx = this.idx; + domains.forEach(curDomain => { + const domainIndex = idx[curDomain]; + if (!domainIndex) { + return; + } + pathMatcher(domainIndex); + }); + + cb(null, results); + } + + putCookie(cookie, cb) { + if (!this.idx[cookie.domain]) { + this.idx[cookie.domain] = {}; + } + if (!this.idx[cookie.domain][cookie.path]) { + this.idx[cookie.domain][cookie.path] = {}; + } + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); + } + updateCookie(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie, cb); + } + removeCookie(domain, path, key, cb) { + if ( + this.idx[domain] && + this.idx[domain][path] && + this.idx[domain][path][key] + ) { + delete this.idx[domain][path][key]; + } + cb(null); + } + removeCookies(domain, path, cb) { + if (this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); + } + removeAllCookies(cb) { + this.idx = {}; + return cb(null); + } + getAllCookies(cb) { + const cookies = []; + const idx = this.idx; + + const domains = Object.keys(idx); + domains.forEach(domain => { + const paths = Object.keys(idx[domain]); + paths.forEach(path => { + const keys = Object.keys(idx[domain][path]); + keys.forEach(key => { + if (key !== null) { + cookies.push(idx[domain][path][key]); + } + }); + }); + }); + + // Sort by creationIndex so deserializing retains the creation order. + // When implementing your own store, this SHOULD retain the order too + cookies.sort((a, b) => { + return (a.creationIndex || 0) - (b.creationIndex || 0); + }); + + cb(null, cookies); + } +} + +[ + "findCookie", + "findCookies", + "putCookie", + "updateCookie", + "removeCookie", + "removeCookies", + "removeAllCookies", + "getAllCookies" +].forEach(name => { + MemoryCookieStore[name] = fromCallback(MemoryCookieStore.prototype[name]); +}); + +exports.MemoryCookieStore = MemoryCookieStore; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pathMatch.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pathMatch.js new file mode 100644 index 000000000..16ff63eea --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pathMatch.js @@ -0,0 +1,61 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch(reqPath, cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) { + return true; + } + + const idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") { + return true; + } + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length, 1) === "/") { + return true; + } + } + + return false; +} + +exports.pathMatch = pathMatch; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/permuteDomain.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/permuteDomain.js new file mode 100644 index 000000000..78e6cad56 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/permuteDomain.js @@ -0,0 +1,70 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +const pubsuffix = require("./pubsuffix-psl"); + +// Gives the permutation of all possible domainMatch()es of a given domain. The +// array is in shortest-to-longest order. Handy for indexing. +const SPECIAL_USE_DOMAINS = ["local"]; // RFC 6761 +function permuteDomain(domain, allowSpecialUseDomain) { + let pubSuf = null; + if (allowSpecialUseDomain) { + const domainParts = domain.split("."); + if (SPECIAL_USE_DOMAINS.includes(domainParts[domainParts.length - 1])) { + pubSuf = `${domainParts[domainParts.length - 2]}.${ + domainParts[domainParts.length - 1] + }`; + } else { + pubSuf = pubsuffix.getPublicSuffix(domain); + } + } else { + pubSuf = pubsuffix.getPublicSuffix(domain); + } + + if (!pubSuf) { + return null; + } + if (pubSuf == domain) { + return [domain]; + } + + const prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com" + const parts = prefix.split(".").reverse(); + let cur = pubSuf; + const permutations = [cur]; + while (parts.length) { + cur = `${parts.shift()}.${cur}`; + permutations.push(cur); + } + return permutations; +} + +exports.permuteDomain = permuteDomain; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pubsuffix-psl.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pubsuffix-psl.js new file mode 100644 index 000000000..93a8577c6 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/pubsuffix-psl.js @@ -0,0 +1,38 @@ +/*! + * Copyright (c) 2018, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +const psl = require("psl"); + +function getPublicSuffix(domain) { + return psl.get(domain); +} + +exports.getPublicSuffix = getPublicSuffix; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/store.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/store.js new file mode 100644 index 000000000..2ed0259e0 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/store.js @@ -0,0 +1,76 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +"use strict"; +/*jshint unused:false */ + +class Store { + constructor() { + this.synchronous = false; + } + + findCookie(domain, path, key, cb) { + throw new Error("findCookie is not implemented"); + } + + findCookies(domain, path, allowSpecialUseDomain, cb) { + throw new Error("findCookies is not implemented"); + } + + putCookie(cookie, cb) { + throw new Error("putCookie is not implemented"); + } + + updateCookie(oldCookie, newCookie, cb) { + // recommended default implementation: + // return this.putCookie(newCookie, cb); + throw new Error("updateCookie is not implemented"); + } + + removeCookie(domain, path, key, cb) { + throw new Error("removeCookie is not implemented"); + } + + removeCookies(domain, path, cb) { + throw new Error("removeCookies is not implemented"); + } + + removeAllCookies(cb) { + throw new Error("removeAllCookies is not implemented"); + } + + getAllCookies(cb) { + throw new Error( + "getAllCookies is not implemented (therefore jar cannot be serialized)" + ); + } +} + +exports.Store = Store; diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/lib/version.js b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/version.js new file mode 100644 index 000000000..e52f25be7 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/lib/version.js @@ -0,0 +1,2 @@ +// generated by genversion +module.exports = '4.0.0' diff --git a/node_modules/@azure/core-http/node_modules/tough-cookie/package.json b/node_modules/@azure/core-http/node_modules/tough-cookie/package.json new file mode 100644 index 000000000..235de442c --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tough-cookie/package.json @@ -0,0 +1,121 @@ +{ + "_from": "tough-cookie@^4.0.0", + "_id": "tough-cookie@4.0.0", + "_inBundle": false, + "_integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "_location": "/@azure/core-http/tough-cookie", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tough-cookie@^4.0.0", + "name": "tough-cookie", + "escapedName": "tough-cookie", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/@azure/core-http" + ], + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "_shasum": "d822234eeca882f991f0f908824ad2622ddbece4", + "_spec": "tough-cookie@^4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-http", + "author": { + "name": "Jeremy Stashewsky", + "email": "jstash@gmail.com" + }, + "bugs": { + "url": "https://github.com/salesforce/tough-cookie/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Ivan Nikulin" + }, + { + "name": "Shivan Kaul Sahib" + }, + { + "name": "Clint Ruoho" + }, + { + "name": "Ian Livingstone" + }, + { + "name": "Andrew Waterman" + }, + { + "name": "Michael de Libero" + }, + { + "name": "Jonathan Stewmon" + }, + { + "name": "Miguel Roncancio" + }, + { + "name": "Sebastian Mayr" + }, + { + "name": "Alexander Savin" + }, + { + "name": "Lalit Kapoor" + }, + { + "name": "Sam Thompson" + } + ], + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "deprecated": false, + "description": "RFC6265 Cookies and Cookie Jar for node.js", + "devDependencies": { + "async": "^2.6.2", + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-plugin-prettier": "^3.0.1", + "genversion": "^2.1.0", + "nyc": "^14.0.0", + "prettier": "^1.17.0", + "vows": "^0.8.2" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/salesforce/tough-cookie", + "keywords": [ + "HTTP", + "cookie", + "cookies", + "set-cookie", + "cookiejar", + "jar", + "RFC6265", + "RFC2965" + ], + "license": "BSD-3-Clause", + "main": "./lib/cookie", + "name": "tough-cookie", + "repository": { + "type": "git", + "url": "git://github.com/salesforce/tough-cookie.git" + }, + "scripts": { + "cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js", + "eslint": "eslint --env node --ext .js .", + "format": "npm run eslint -- --fix", + "prettier": "prettier '**/*.{json,ts,yaml,md}'", + "test": "vows test/*_test.js", + "version": "genversion lib/version.js && git add lib/version.js" + }, + "version": "4.0.0" +} diff --git a/node_modules/@azure/core-http/node_modules/tslib/CopyrightNotice.txt b/node_modules/@azure/core-http/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 000000000..3d4c82348 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@azure/core-http/node_modules/tslib/LICENSE.txt b/node_modules/@azure/core-http/node_modules/tslib/LICENSE.txt new file mode 100644 index 000000000..bfe6430cb --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@azure/core-http/node_modules/tslib/README.md b/node_modules/@azure/core-http/node_modules/tslib/README.md new file mode 100644 index 000000000..49c001420 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/README.md @@ -0,0 +1,154 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 3.9.2 or later +npm install tslib + +# TypeScript 3.8.4 or earlier +npm install tslib@^1 + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 3.9.2 or later +yarn add tslib + +# TypeScript 3.8.4 or earlier +yarn add tslib@^1 + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 3.9.2 or later +bower install tslib + +# TypeScript 3.8.4 or earlier +bower install tslib@^1 + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 3.9.2 or later +jspm install tslib + +# TypeScript 3.8.4 or earlier +jspm install tslib@^1 + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@azure/core-http/node_modules/tslib/modules/index.js b/node_modules/@azure/core-http/node_modules/tslib/modules/index.js new file mode 100644 index 000000000..d241d0422 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@azure/core-http/node_modules/tslib/modules/package.json b/node_modules/@azure/core-http/node_modules/tslib/modules/package.json new file mode 100644 index 000000000..aafa0e4b4 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@azure/core-http/node_modules/tslib/package.json b/node_modules/@azure/core-http/node_modules/tslib/package.json new file mode 100644 index 000000000..f575e6b23 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/package.json @@ -0,0 +1,64 @@ +{ + "_from": "tslib@^2.0.0", + "_id": "tslib@2.0.3", + "_inBundle": false, + "_integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "_location": "/@azure/core-http/tslib", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tslib@^2.0.0", + "name": "tslib", + "escapedName": "tslib", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@azure/core-http" + ], + "_resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "_shasum": "8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c", + "_spec": "tslib@^2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-http", + "author": { + "name": "Microsoft Corp." + }, + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Runtime library for TypeScript helper functions", + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + }, + "homepage": "https://www.typescriptlang.org/", + "jsnext:main": "tslib.es6.js", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "license": "0BSD", + "main": "tslib.js", + "module": "tslib.es6.js", + "name": "tslib", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/tslib.git" + }, + "sideEffects": false, + "typings": "tslib.d.ts", + "version": "2.0.3" +} diff --git a/node_modules/@azure/core-http/node_modules/tslib/tslib.d.ts b/node_modules/@azure/core-http/node_modules/tslib/tslib.d.ts new file mode 100644 index 000000000..9e43edcda --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, o: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; diff --git a/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.html b/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.html new file mode 100644 index 000000000..b122e41b0 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.js b/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.js new file mode 100644 index 000000000..c60aa609f --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/tslib.es6.js @@ -0,0 +1,227 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __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]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@azure/core-http/node_modules/tslib/tslib.html b/node_modules/@azure/core-http/node_modules/tslib/tslib.html new file mode 100644 index 000000000..44c9ba51e --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-http/node_modules/tslib/tslib.js b/node_modules/@azure/core-http/node_modules/tslib/tslib.js new file mode 100644 index 000000000..fcf619a47 --- /dev/null +++ b/node_modules/@azure/core-http/node_modules/tslib/tslib.js @@ -0,0 +1,292 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __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]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@azure/core-http/package.json b/node_modules/@azure/core-http/package.json new file mode 100644 index 000000000..c7963f2fe --- /dev/null +++ b/node_modules/@azure/core-http/package.json @@ -0,0 +1,236 @@ +{ + "//metadata": { + "constantPaths": [ + { + "path": "src/util/constants.ts", + "prefix": "coreHttpVersion" + } + ] + }, + "_from": "@azure/core-http@^1.2.0", + "_id": "@azure/core-http@1.2.0", + "_inBundle": false, + "_integrity": "sha512-SQmyI1tpstWKePNmTseEUp8PMq1uNBslvGBrYF2zNM/fEfLD1q64XCatoH8nDQtSmDydEPsqlyyLSjjnuXrlOQ==", + "_location": "/@azure/core-http", + "_phantomChildren": { + "asynckit": "0.4.0", + "combined-stream": "1.0.8", + "mime-types": "2.1.27", + "psl": "1.8.0", + "punycode": "2.1.1", + "universalify": "0.1.2" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/core-http@^1.2.0", + "name": "@azure/core-http", + "escapedName": "@azure%2fcore-http", + "scope": "@azure", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/@azure/core-lro", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.2.0.tgz", + "_shasum": "eb2a1da9bdba8407a09d78450af5f13f8cc43d63", + "_spec": "@azure/core-http@^1.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation" + }, + "browser": { + "./es/src/policies/msRestUserAgentPolicy.js": "./es/src/policies/msRestUserAgentPolicy.browser.js", + "./es/src/policies/disableResponseDecompressionPolicy.js": "./es/src/policies/disableResponseDecompressionPolicy.browser.js", + "./es/src/policies/proxyPolicy.js": "./es/src/policies/proxyPolicy.browser.js", + "./es/src/util/base64.js": "./es/src/util/base64.browser.js", + "./es/src/util/xml.js": "./es/src/util/xml.browser.js", + "./es/src/defaultHttpClient.js": "./es/src/defaultHttpClient.browser.js", + "./es/src/util/inspect.js": "./es/src/util/inspect.browser.js" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.1.3", + "@azure/core-tracing": "1.0.0-preview.9", + "@azure/logger": "^1.0.0", + "@opentelemetry/api": "^0.10.2", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.1", + "form-data": "^3.0.0", + "node-fetch": "^2.6.0", + "process": "^0.11.10", + "tough-cookie": "^4.0.0", + "tslib": "^2.0.0", + "tunnel": "^0.0.6", + "uuid": "^8.3.0", + "xml2js": "^0.4.19" + }, + "deprecated": false, + "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", + "devDependencies": { + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/logger-js": "^1.0.2", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "@types/chai": "^4.1.6", + "@types/express": "^4.16.0", + "@types/glob": "^7.1.1", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@types/sinon": "^9.0.4", + "@types/tough-cookie": "^4.0.0", + "@types/uuid": "^8.0.0", + "@types/xml2js": "^0.4.3", + "babel-runtime": "^6.26.0", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "downlevel-dts": "~0.4.0", + "eslint": "^6.1.0", + "express": "^4.16.3", + "fetch-mock": "^9.10.1", + "glob": "^7.1.2", + "karma": "^5.1.0", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^3.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-firefox-launcher": "^1.1.0", + "karma-mocha": "^2.0.1", + "karma-rollup-preprocessor": "^7.0.0", + "karma-sourcemap-loader": "^0.3.7", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "npm-run-all": "^4.1.5", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "puppeteer": "^3.3.0", + "regenerator-runtime": "^0.13.3", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-visualizer": "^4.0.4", + "shx": "^0.3.2", + "sinon": "^9.0.2", + "ts-node": "^8.3.0", + "typescript": "~3.9.3", + "uglify-js": "^3.4.9", + "xhr-mock": "^2.4.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "dist/**/*.node.js", + "dist/**/*.node.js.map", + "dom-shim.d.ts", + "es/src/**/*.js", + "es/src/**/*.js.map", + "types/*/src/**/*.d.ts", + "types/*/src/**/*.d.ts.map", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-http/README.md", + "keywords": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime", + "azure", + "cloud" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "./es/src/coreHttp.js", + "name": "@azure/core-http", + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "coverage/**/*", + "**/*.d.ts", + "**/*.js" + ], + "reporter": [ + "text", + "html", + "cobertura" + ], + "all": true + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "run-s build:tsc extract-api:nobuild build:types build:rollup", + "build:rollup": "rollup -c 2>&1", + "build:scripts": "tsc -p ./.scripts/", + "build:test": "run-s build build:test-browser", + "build:test-browser": "rollup -c rollup.test.config.js 2>&1", + "build:tsc": "tsc -p tsconfig.es.json", + "build:types": "downlevel-dts types/latest/ types/3.1/", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "check:everything": "ts-node ./.scripts/checkEverything.ts", + "check:foronlycalls": "ts-node ./.scripts/checkForOnlyCalls.ts", + "check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts", + "clean": "rimraf ./es ./dist ./dist-test ./dist-browser ./types ./types3.1 ./coverage ./temp ./*.tgz", + "cover:unit:node": "nyc npm run unit-test:node", + "dep:autorest.typescript": "npx ts-node .scripts/testDependentProjects.ts autorest.typescript 'gulp build' 'gulp regenerate' 'npm run local'", + "dep:ms-rest-azure-js": "npx ts-node .scripts/testDependentProjects.ts ms-rest-azure-js", + "execute:samples": "echo skipped", + "extract-api": "tsc -p tsconfig.es.json && api-extractor run --local", + "extract-api:nobuild": "api-extractor run --local", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "latest": "ts-node ./.scripts/latest.ts", + "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o core-http-lintReport.html || exit 0", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "local": "ts-node ./.scripts/local.ts", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "publish-preview": "mocha --no-colors && shx rm -rf dist/test && node ./.scripts/publish", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "node ./node_modules/karma/bin/karma start karma.conf.ts --browsers ChromeNoSecurity --single-run", + "unit-test:node": "cross-env TS_NODE_FILES=true mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors --exclude \"test/**/*.browser.ts\" \"test/**/*.ts\"" + }, + "sdk-type": "client", + "sideEffects": false, + "tags": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime" + ], + "types": "./types/latest/src/coreHttp.d.ts", + "typesVersions": { + "<3.6": { + "types/latest/src/*": [ + "types/3.1/src/*" + ] + } + }, + "version": "1.2.0" +} diff --git a/node_modules/@azure/core-http/types/3.1/src/browserFetchHttpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/browserFetchHttpClient.d.ts new file mode 100644 index 000000000..a9edd62d6 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/browserFetchHttpClient.d.ts @@ -0,0 +1,9 @@ +import { FetchHttpClient, CommonRequestInfo, CommonResponse, CommonRequestInit } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class BrowserFetchHttpClient extends FetchHttpClient { + prepareRequest(_httpRequest: WebResourceLike): Promise>; + processRequest(_operationResponse: HttpOperationResponse): Promise; + fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; +} +//# sourceMappingURL=browserFetchHttpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/coreHttp.d.ts b/node_modules/@azure/core-http/types/3.1/src/coreHttp.d.ts new file mode 100644 index 000000000..4647ae54c --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/coreHttp.d.ts @@ -0,0 +1,48 @@ +/// +export { WebResource, WebResourceLike, HttpRequestBody, RequestPrepareOptions, HttpMethods, ParameterValue, RequestOptionsBase, TransferProgressEvent } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpClient } from "./httpClient"; +export { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from "./httpHeaders"; +export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse"; +export { HttpPipelineLogger } from "./httpPipelineLogger"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { OperationArguments } from "./operationArguments"; +export { OperationOptions, OperationRequestOptions, operationOptionsToRequestOptionsBase } from "./operationOptions"; +export { OperationParameter, OperationQueryParameter, OperationURLParameter, ParameterPath } from "./operationParameter"; +export { OperationResponse } from "./operationResponse"; +export { OperationSpec } from "./operationSpec"; +export { ServiceClient, ServiceClientOptions, flattenResponse, createPipelineFromOptions, ProxySettings, ProxyOptions } from "./serviceClient"; +export { PipelineOptions, InternalPipelineOptions } from "./pipelineOptions"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { bearerTokenAuthenticationPolicy } from "./policies/bearerTokenAuthenticationPolicy"; +export { LogPolicyOptions, logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy, RetryOptions, RetryMode } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy, RedirectOptions } from "./policies/redirectPolicy"; +export { keepAlivePolicy, KeepAliveOptions } from "./policies/keepAlivePolicy"; +export { disableResponseDecompressionPolicy } from "./policies/disableResponseDecompressionPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue, UserAgentOptions, TelemetryInfo } from "./policies/userAgentPolicy"; +export { deserializationPolicy, DeserializationOptions, deserializeResponseBody, DeserializationContentTypes } from "./policies/deserializationPolicy"; +export { tracingPolicy, TracingPolicyOptions } from "./policies/tracingPolicy"; +export { MapperType, SimpleMapperType, CompositeMapperType, DictionaryMapperType, SequenceMapperType, EnumMapperType, Mapper, BaseMapper, CompositeMapper, SequenceMapper, DictionaryMapper, EnumMapper, MapperConstraints, PolymorphicDiscriminator, Serializer, UrlParameterValue, serializeObject } from "./serializer"; +export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, ServiceCallback, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration } from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; +export { AbortSignalLike } from "@azure/abort-controller"; +export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; +export { AccessTokenCache, ExpiringAccessTokenCache } from "./credentials/accessTokenCache"; +export { AccessTokenRefresher } from "./credentials/accessTokenRefresher"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials"; +export { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { Authenticator } from "./credentials/credentials"; +export { parseXML, stringifyXML } from "./util/xml"; +export { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from "./util/serializer.common"; +//# sourceMappingURL=coreHttp.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenCache.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenCache.d.ts new file mode 100644 index 000000000..7ffbf8373 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenCache.d.ts @@ -0,0 +1,39 @@ +import { AccessToken } from "@azure/core-auth"; +/** + * Defines the default token refresh buffer duration. + */ +export declare const TokenRefreshBufferMs: number; +/** + * Provides a cache for an AccessToken that was that + * was returned from a TokenCredential. + */ +export interface AccessTokenCache { + /** + * Sets the cached token. + * + * @param The {@link AccessToken} to be cached or null to + * clear the cached token. + */ + setCachedToken(accessToken: AccessToken | undefined): void; + /** + * Returns the cached {@link AccessToken} or undefined if nothing is cached. + */ + getCachedToken(): AccessToken | undefined; +} +/** + * Provides an {@link AccessTokenCache} implementation which clears + * the cached {@link AccessToken}'s after the expiresOnTimestamp has + * passed. + */ +export declare class ExpiringAccessTokenCache implements AccessTokenCache { + private tokenRefreshBufferMs; + private cachedToken?; + /** + * Constructs an instance of {@link ExpiringAccessTokenCache} with + * an optional expiration buffer time. + */ + constructor(tokenRefreshBufferMs?: number); + setCachedToken(accessToken: AccessToken | undefined): void; + getCachedToken(): AccessToken | undefined; +} +//# sourceMappingURL=accessTokenCache.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenRefresher.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenRefresher.d.ts new file mode 100644 index 000000000..72666cdef --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/accessTokenRefresher.d.ts @@ -0,0 +1,34 @@ +import { AccessToken, TokenCredential, GetTokenOptions } from "@azure/core-auth"; +/** + * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token. + */ +export declare class AccessTokenRefresher { + private credential; + private scopes; + private requiredMillisecondsBeforeNewRefresh; + private promise; + private lastCalled; + constructor(credential: TokenCredential, scopes: string | string[], requiredMillisecondsBeforeNewRefresh?: number); + /** + * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying + * that we are ready for a new refresh. + * + * @returns {boolean} + */ + isReady(): boolean; + /** + * Stores the time in which it is called, + * then requests a new token, + * then sets this.promise to undefined, + * then returns the token. + * @param options getToken options + */ + private getToken; + /** + * Requests a new token if we're not currently waiting for a new token. + * Returns null if the required time between each call hasn't been reached. + * @param options getToken options + */ + refresh(options: GetTokenOptions): Promise; +} +//# sourceMappingURL=accessTokenRefresher.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/apiKeyCredentials.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/apiKeyCredentials.d.ts new file mode 100644 index 000000000..ba195c2ee --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/apiKeyCredentials.d.ts @@ -0,0 +1,46 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +/** + * @interface ApiKeyCredentialOptions + * Describes the options to be provided while creating an instance of ApiKeyCredentials + */ +export interface ApiKeyCredentialOptions { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + inHeader?: { + [x: string]: any; + }; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + inQuery?: { + [x: string]: any; + }; +} +/** + * Authenticates to a service using an API key. + */ +export declare class ApiKeyCredentials implements ServiceClientCredentials { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + private readonly inHeader?; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + private readonly inQuery?; + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + constructor(options: ApiKeyCredentialOptions); + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=apiKeyCredentials.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/basicAuthenticationCredentials.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/basicAuthenticationCredentials.d.ts new file mode 100644 index 000000000..b99fc0a98 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/basicAuthenticationCredentials.d.ts @@ -0,0 +1,24 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +export declare class BasicAuthenticationCredentials implements ServiceClientCredentials { + userName: string; + password: string; + authorizationScheme: string; + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(userName: string, password: string, authorizationScheme?: string); + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=basicAuthenticationCredentials.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/credentials.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/credentials.d.ts new file mode 100644 index 000000000..09a4d1e95 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/credentials.d.ts @@ -0,0 +1,2 @@ +export declare type Authenticator = (challenge: object) => Promise; +//# sourceMappingURL=credentials.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/serviceClientCredentials.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/serviceClientCredentials.d.ts new file mode 100644 index 000000000..4ec9cd6bd --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/serviceClientCredentials.d.ts @@ -0,0 +1,11 @@ +import { WebResourceLike } from "../webResource"; +export interface ServiceClientCredentials { + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike/request to be signed. + * @returns {Promise} The signed request object; + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=serviceClientCredentials.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/credentials/topicCredentials.d.ts b/node_modules/@azure/core-http/types/3.1/src/credentials/topicCredentials.d.ts new file mode 100644 index 000000000..e08b90e28 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/credentials/topicCredentials.d.ts @@ -0,0 +1,11 @@ +import { ApiKeyCredentials } from "./apiKeyCredentials"; +export declare class TopicCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + constructor(topicKey: string); +} +//# sourceMappingURL=topicCredentials.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.browser.d.ts new file mode 100644 index 000000000..26fcaefa2 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.browser.d.ts @@ -0,0 +1,2 @@ +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; +//# sourceMappingURL=defaultHttpClient.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.d.ts new file mode 100644 index 000000000..c46685882 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/defaultHttpClient.d.ts @@ -0,0 +1,2 @@ +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; +//# sourceMappingURL=defaultHttpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/fetchHttpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/fetchHttpClient.d.ts new file mode 100644 index 000000000..0284e0ff6 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/fetchHttpClient.d.ts @@ -0,0 +1,31 @@ +/// +import { HttpClient } from "./httpClient"; +import { TransferProgressEvent, WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { HttpHeadersLike } from "./httpHeaders"; +import { Transform } from "stream"; +export declare type CommonRequestInfo = string; +export declare type CommonRequestInit = Pick> & { + body?: any; + headers?: any; + signal?: any; +}; +export declare type CommonResponse = Pick> & { + body: any; + trailer: any; + formData: any; +}; +export declare class ReportTransform extends Transform { + private progressCallback; + private loadedBytes; + _transform(chunk: string | Buffer, _encoding: string, callback: Function): void; + constructor(progressCallback: (progress: TransferProgressEvent) => void); +} +export declare abstract class FetchHttpClient implements HttpClient { + sendRequest(httpRequest: WebResourceLike): Promise; + abstract prepareRequest(httpRequest: WebResourceLike): Promise>; + abstract processRequest(operationResponse: HttpOperationResponse): Promise; + abstract fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; +} +export declare function parseHeaders(headers: Headers): HttpHeadersLike; +//# sourceMappingURL=fetchHttpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/httpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/httpClient.d.ts new file mode 100644 index 000000000..6f853022c --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/httpClient.d.ts @@ -0,0 +1,7 @@ +import { RequestPolicy } from "./policies/requestPolicy"; +/** + * An interface that can send HttpRequests and receive promised HttpResponses. + */ +export interface HttpClient extends RequestPolicy { +} +//# sourceMappingURL=httpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/httpHeaders.d.ts b/node_modules/@azure/core-http/types/3.1/src/httpHeaders.d.ts new file mode 100644 index 000000000..d2407a66c --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/httpHeaders.d.ts @@ -0,0 +1,132 @@ +/** + * An individual header within a HttpHeaders collection. + */ +export interface HttpHeader { + /** + * The name of the header. + */ + name: string; + /** + * The value of the header. + */ + value: string; +} +/** + * A HttpHeaders collection represented as a simple JSON object. + */ +export declare type RawHttpHeaders = { + [headerName: string]: string; +}; +/** + * A collection of HTTP header key/value pairs. + */ +export interface HttpHeadersLike { + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeadersLike; + /** + * Get the JSON object representation of this HTTP header collection. + * The result is the same as `rawHeaders()`. + */ + toJson(): RawHttpHeaders; +} +export declare function isHttpHeadersLike(object?: any): object is HttpHeadersLike; +/** + * A collection of HTTP header key/value pairs. + */ +export declare class HttpHeaders implements HttpHeadersLike { + private readonly _headersMap; + constructor(rawHeaders?: RawHttpHeaders); + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(): RawHttpHeaders; + /** + * Get the string representation of this HTTP header collection. + */ + toString(): string; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeaders; +} +//# sourceMappingURL=httpHeaders.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/httpOperationResponse.d.ts b/node_modules/@azure/core-http/types/3.1/src/httpOperationResponse.d.ts new file mode 100644 index 000000000..58252ac5b --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/httpOperationResponse.d.ts @@ -0,0 +1,75 @@ +/// +import { WebResourceLike } from "./webResource"; +import { HttpHeadersLike } from "./httpHeaders"; +/** + * The properties on an HTTP response which will always be present. + */ +export interface HttpResponse { + /** + * The raw request + */ + request: WebResourceLike; + /** + * The HTTP response status (e.g. 200) + */ + status: number; + /** + * The HTTP response headers. + */ + headers: HttpHeadersLike; +} +declare global { + /** + * Stub declaration of the browser-only Blob type. + * Full type information can be obtained by including "lib": ["dom"] in tsconfig.json. + */ + interface Blob { + } +} +/** + * Wrapper object for http request and response. Deserialized object is stored in + * the `parsedBody` property when the response body is received in JSON or XML. + */ +export interface HttpOperationResponse extends HttpResponse { + /** + * The parsed HTTP response headers. + */ + parsedHeaders?: { + [key: string]: any; + }; + /** + * The response body as text (string format) + */ + bodyAsText?: string | null; + /** + * The response body as parsed JSON or XML + */ + parsedBody?: any; + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; +} +/** + * The flattened response to a REST call. + * Contains the underlying HttpOperationResponse as well as + * the merged properties of the parsedBody, parsedHeaders, etc. + */ +export interface RestResponse { + /** + * The underlying HTTP response containing both raw and deserialized response data. + */ + _response: HttpOperationResponse; + [key: string]: any; +} +//# sourceMappingURL=httpOperationResponse.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogLevel.d.ts b/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogLevel.d.ts new file mode 100644 index 000000000..26520c466 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogLevel.d.ts @@ -0,0 +1,22 @@ +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export declare enum HttpPipelineLogLevel { + /** + * A log level that indicates that no logs will be logged. + */ + OFF = 0, + /** + * An error log. + */ + ERROR = 1, + /** + * A warning log. + */ + WARNING = 2, + /** + * An information log. + */ + INFO = 3 +} +//# sourceMappingURL=httpPipelineLogLevel.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogger.d.ts b/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogger.d.ts new file mode 100644 index 000000000..03cf6239a --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/httpPipelineLogger.d.ts @@ -0,0 +1,35 @@ +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +/** + * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages + * that can be used for debugging purposes. + */ +export interface HttpPipelineLogger { + /** + * The log level threshold for what logs will be logged. + */ + minimumLogLevel: HttpPipelineLogLevel; + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +export declare class ConsoleHttpPipelineLogger implements HttpPipelineLogger { + minimumLogLevel: HttpPipelineLogLevel; + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + constructor(minimumLogLevel: HttpPipelineLogLevel); + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=httpPipelineLogger.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/log.d.ts b/node_modules/@azure/core-http/types/3.1/src/log.d.ts new file mode 100644 index 000000000..c757fef42 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/log.d.ts @@ -0,0 +1,2 @@ +export declare const logger: import("@azure/logger").AzureLogger; +//# sourceMappingURL=log.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/nodeFetchHttpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/nodeFetchHttpClient.d.ts new file mode 100644 index 000000000..c894da560 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/nodeFetchHttpClient.d.ts @@ -0,0 +1,13 @@ +import { FetchHttpClient, CommonRequestInfo, CommonRequestInit, CommonResponse } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class NodeFetchHttpClient extends FetchHttpClient { + private proxyAgents; + private keepAliveAgents; + private readonly cookieJar; + private getOrCreateAgent; + fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; + prepareRequest(httpRequest: WebResourceLike): Promise>; + processRequest(operationResponse: HttpOperationResponse): Promise; +} +//# sourceMappingURL=nodeFetchHttpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/operationArguments.d.ts b/node_modules/@azure/core-http/types/3.1/src/operationArguments.d.ts new file mode 100644 index 000000000..88327d290 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/operationArguments.d.ts @@ -0,0 +1,15 @@ +import { RequestOptionsBase } from "./webResource"; +/** + * A collection of properties that apply to a single invocation of an operation. + */ +export interface OperationArguments { + /** + * The parameters that were passed to the operation method. + */ + [parameterName: string]: any; + /** + * The optional arugments that are provided to an operation. + */ + options?: RequestOptionsBase; +} +//# sourceMappingURL=operationArguments.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/operationOptions.d.ts b/node_modules/@azure/core-http/types/3.1/src/operationOptions.d.ts new file mode 100644 index 000000000..eeed6b8dd --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/operationOptions.d.ts @@ -0,0 +1,54 @@ +import { AbortSignalLike } from "@azure/abort-controller"; +import { OperationTracingOptions } from "@azure/core-tracing"; +import { TransferProgressEvent, RequestOptionsBase } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +/** + * The base options type for all operations. + */ +export interface OperationOptions { + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * Options used when creating and sending HTTP requests for this operation. + */ + requestOptions?: OperationRequestOptions; + /** + * Options used when tracing is enabled. + */ + tracingOptions?: OperationTracingOptions; +} +export interface OperationRequestOptions { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); +} +/** + * Converts an OperationOptions to a RequestOptionsBase + * + * @param opts OperationOptions object to convert to RequestOptionsBase + */ +export declare function operationOptionsToRequestOptionsBase(opts: T): RequestOptionsBase; +//# sourceMappingURL=operationOptions.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/operationParameter.d.ts b/node_modules/@azure/core-http/types/3.1/src/operationParameter.d.ts new file mode 100644 index 000000000..7c5be1f3b --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/operationParameter.d.ts @@ -0,0 +1,51 @@ +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { Mapper } from "./serializer"; +export declare type ParameterPath = string | string[] | { + [propertyName: string]: ParameterPath; +}; +/** + * A common interface that all Operation parameter's extend. + */ +export interface OperationParameter { + /** + * The path to this parameter's value in OperationArguments or the object that contains paths for + * each property's value in OperationArguments. + */ + parameterPath: ParameterPath; + /** + * The mapper that defines how to validate and serialize this parameter's value. + */ + mapper: Mapper; +} +/** + * A parameter for an operation that will be substituted into the operation's request URL. + */ +export interface OperationURLParameter extends OperationParameter { + /** + * Whether or not to skip encoding the URL parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; +} +/** + * A parameter for an operation that will be added as a query parameter to the operation's HTTP + * request. + */ +export interface OperationQueryParameter extends OperationParameter { + /** + * Whether or not to skip encoding the query parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; + /** + * If this query parameter's value is a collection, what type of format should the value be + * converted to. + */ + collectionFormat?: QueryCollectionFormat; +} +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export declare function getPathStringFromParameter(parameter: OperationParameter): string; +export declare function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string; +//# sourceMappingURL=operationParameter.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/operationResponse.d.ts b/node_modules/@azure/core-http/types/3.1/src/operationResponse.d.ts new file mode 100644 index 000000000..bfe4a1f62 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/operationResponse.d.ts @@ -0,0 +1,19 @@ +import { Mapper } from "./serializer"; +/** + * An OperationResponse that can be returned from an operation request for a single status code. + */ +export interface OperationResponse { + /** + * The mapper that will be used to deserialize the response headers. + */ + headersMapper?: Mapper; + /** + * The mapper that will be used to deserialize the response body. + */ + bodyMapper?: Mapper; + /** + * Indicates if this is an error response + */ + isError?: boolean; +} +//# sourceMappingURL=operationResponse.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/operationSpec.d.ts b/node_modules/@azure/core-http/types/3.1/src/operationSpec.d.ts new file mode 100644 index 000000000..0f2193b2a --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/operationSpec.d.ts @@ -0,0 +1,73 @@ +import { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +import { OperationResponse } from "./operationResponse"; +import { Serializer } from "./serializer"; +import { HttpMethods } from "./webResource"; +/** + * A specification that defines an operation. + */ +export interface OperationSpec { + /** + * The serializer to use in this operation. + */ + readonly serializer: Serializer; + /** + * The HTTP method that should be used by requests for this operation. + */ + readonly httpMethod: HttpMethods; + /** + * The URL that was provided in the service's specification. This will still have all of the URL + * template variables in it. If this is not provided when the OperationSpec is created, then it + * will be populated by a "baseUri" property on the ServiceClient. + */ + readonly baseUrl?: string; + /** + * The fixed path for this operation's URL. This will still have all of the URL template variables + * in it. + */ + readonly path?: string; + /** + * The content type of the request body. This value will be used as the "Content-Type" header if + * it is provided. + */ + readonly contentType?: string; + /** + * The media type of the request body. + * This value can be used to aide in serialization if it is provided. + */ + readonly mediaType?: "json" | "xml" | "form" | "binary" | "multipart" | "text" | "unknown" | string; + /** + * The parameter that will be used to construct the HTTP request's body. + */ + readonly requestBody?: OperationParameter; + /** + * Whether or not this operation uses XML request and response bodies. + */ + readonly isXML?: boolean; + /** + * The parameters to the operation method that will be substituted into the constructed URL. + */ + readonly urlParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be added to the constructed URL's query. + */ + readonly queryParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be converted to headers on the operation's + * HTTP request. + */ + readonly headerParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be used to create a formdata body for the + * operation's HTTP request. + */ + readonly formDataParameters?: ReadonlyArray; + /** + * The different types of responses that this operation can return based on what status code is + * returned. + */ + readonly responses: { + [responseCode: string]: OperationResponse; + }; +} +export declare function isStreamOperation(operationSpec: OperationSpec): boolean; +//# sourceMappingURL=operationSpec.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/pipelineOptions.d.ts b/node_modules/@azure/core-http/types/3.1/src/pipelineOptions.d.ts new file mode 100644 index 000000000..34a657d43 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/pipelineOptions.d.ts @@ -0,0 +1,59 @@ +import { HttpClient } from "./httpClient"; +import { RetryOptions } from "./policies/exponentialRetryPolicy"; +import { KeepAliveOptions } from "./policies/keepAlivePolicy"; +import { RedirectOptions } from "./policies/redirectPolicy"; +import { ProxyOptions } from "./serviceClient"; +import { UserAgentOptions } from "./policies/userAgentPolicy"; +import { DeserializationOptions } from "./policies/deserializationPolicy"; +import { LogPolicyOptions } from "./policies/logPolicy"; +/** + * Defines options that are used to configure the HTTP pipeline for + * an SDK client. + */ +export interface PipelineOptions { + /** + * The HttpClient implementation to use for outgoing HTTP requests. Defaults + * to DefaultHttpClient. + */ + httpClient?: HttpClient; + /** + * Options that control how to retry failed requests. + */ + retryOptions?: RetryOptions; + /** + * Options to configure a proxy for outgoing requests. + */ + proxyOptions?: ProxyOptions; + keepAliveOptions?: KeepAliveOptions; + /** + * Options for how redirect responses are handled. + */ + redirectOptions?: RedirectOptions; + /** + * Options for adding user agent details to outgoing requests. + */ + userAgentOptions?: UserAgentOptions; +} +/** + * Defines options that are used to configure internal options of + * the HTTP pipeline for an SDK client. + */ +export interface InternalPipelineOptions extends PipelineOptions { + /** + * Options to configure API response deserialization. + */ + deserializationOptions?: DeserializationOptions; + /** + * Options to configure request/response logging. + */ + loggingOptions?: LogPolicyOptions; + /** + * Configure whether to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + /** + * Send JSON Array payloads as NDJSON. + */ + sendStreamingJson?: boolean; +} +//# sourceMappingURL=pipelineOptions.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/bearerTokenAuthenticationPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/bearerTokenAuthenticationPolicy.d.ts new file mode 100644 index 000000000..bf29e0442 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/bearerTokenAuthenticationPolicy.d.ts @@ -0,0 +1,45 @@ +import { TokenCredential } from "@azure/core-auth"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "../policies/requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { AccessTokenCache } from "../credentials/accessTokenCache"; +import { AccessTokenRefresher } from "../credentials/accessTokenRefresher"; +/** + * Creates a new BearerTokenAuthenticationPolicy factory. + * + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + */ +export declare function bearerTokenAuthenticationPolicy(credential: TokenCredential, scopes: string | string[]): RequestPolicyFactory; +/** + * + * Provides a RequestPolicy that can request a token from a TokenCredential + * implementation and then apply it to the Authorization header of a request + * as a Bearer token. + * + */ +export declare class BearerTokenAuthenticationPolicy extends BaseRequestPolicy { + private tokenCache; + private tokenRefresher; + /** + * Creates a new BearerTokenAuthenticationPolicy object. + * + * @param nextPolicy The next RequestPolicy in the request pipeline. + * @param options Options for this RequestPolicy. + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + * @param tokenCache The cache for the most recent AccessToken returned from the TokenCredential. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, tokenCache: AccessTokenCache, tokenRefresher: AccessTokenRefresher); + /** + * Applies the Bearer token to the request through the Authorization header. + * @param webResource + */ + sendRequest(webResource: WebResourceLike): Promise; + /** + * Attempts a token update if any other time related conditionals have been reached based on the tokenRefresher class. + */ + private updateTokenIfNeeded; + private getToken; +} +//# sourceMappingURL=bearerTokenAuthenticationPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/deserializationPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/deserializationPolicy.d.ts new file mode 100644 index 000000000..956b4c5ef --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/deserializationPolicy.d.ts @@ -0,0 +1,51 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { SerializerOptions } from "../util/serializer.common"; +/** + * Options to configure API response deserialization. + */ +export interface DeserializationOptions { + /** + * Configures the expected content types for the deserialization of + * JSON and XML response bodies. + */ + expectedContentTypes: DeserializationContentTypes; +} +/** + * The content-types that will indicate that an operation response should be deserialized in a + * particular way. + */ +export interface DeserializationContentTypes { + /** + * The content-types that indicate that an operation response should be deserialized as JSON. + * Defaults to [ "application/json", "text/json" ]. + */ + json?: string[]; + /** + * The content-types that indicate that an operation response should be deserialized as XML. + * Defaults to [ "application/xml", "application/atom+xml" ]. + */ + xml?: string[]; +} +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export declare function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes, parsingOptions?: SerializerOptions): RequestPolicyFactory; +export declare const defaultJsonContentTypes: string[]; +export declare const defaultXmlContentTypes: string[]; +export declare const DefaultDeserializationOptions: DeserializationOptions; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +export declare class DeserializationPolicy extends BaseRequestPolicy { + readonly jsonContentTypes: string[]; + readonly xmlContentTypes: string[]; + readonly xmlCharKey: string; + constructor(nextPolicy: RequestPolicy, requestPolicyOptions: RequestPolicyOptions, deserializationContentTypes?: DeserializationContentTypes, parsingOptions?: SerializerOptions); + sendRequest(request: WebResourceLike): Promise; +} +export declare function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse, options?: SerializerOptions): Promise; +//# sourceMappingURL=deserializationPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.browser.d.ts new file mode 100644 index 000000000..30b13c034 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.browser.d.ts @@ -0,0 +1,13 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResource } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * {@link DisableResponseDecompressionPolicy} is not supported in browser and attempting + * to use it will results in error being thrown. + */ +export declare function disableResponseDecompressionPolicy(): RequestPolicyFactory; +export declare class DisableResponseDecompressionPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + sendRequest(_request: WebResource): Promise; +} +//# sourceMappingURL=disableResponseDecompressionPolicy.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.d.ts new file mode 100644 index 000000000..5b31055ad --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/disableResponseDecompressionPolicy.d.ts @@ -0,0 +1,29 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResource } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * Returns a request policy factory that can be used to create an instance of + * {@link DisableResponseDecompressionPolicy}. + */ +export declare function disableResponseDecompressionPolicy(): RequestPolicyFactory; +/** + * A policy to disable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +export declare class DisableResponseDecompressionPolicy extends BaseRequestPolicy { + /** + * Creates an instance of DisableResponseDecompressionPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + */ + sendRequest(request: WebResource): Promise; +} +//# sourceMappingURL=disableResponseDecompressionPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/exponentialRetryPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/exponentialRetryPolicy.d.ts new file mode 100644 index 000000000..5ad1c63e4 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/exponentialRetryPolicy.d.ts @@ -0,0 +1,66 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * Describes the Retry Mode type. Currently supporting only Exponential. + * @enum RetryMode + */ +export declare enum RetryMode { + Exponential = 0 +} +/** + * Options that control how to retry failed requests. + */ +export interface RetryOptions { + /** + * The maximum number of retry attempts. Defaults to 3. + */ + maxRetries?: number; + /** + * The amount of delay in milliseconds between retry attempts. Defaults to 30000 + * (30 seconds). The delay increases exponentially with each retry up to a maximum + * specified by maxRetryDelayInMs. + */ + retryDelayInMs?: number; + /** + * The maximum delay in milliseconds allowed before retrying an operation. Defaults + * to 90000 (90 seconds). + */ + maxRetryDelayInMs?: number; + /** + * Currently supporting only Exponential mode. + */ + mode?: RetryMode; +} +export declare const DefaultRetryOptions: RetryOptions; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +export declare class ExponentialRetryPolicy extends BaseRequestPolicy { + /** + * The client retry count. + */ + retryCount: number; + /** + * The client retry interval in milliseconds. + */ + retryInterval: number; + /** + * The maximum retry interval in milliseconds. + */ + maxRetryInterval: number; + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptions} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryCount?: number, retryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=exponentialRetryPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/generateClientRequestIdPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/generateClientRequestIdPolicy.d.ts new file mode 100644 index 000000000..a768b1086 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/generateClientRequestIdPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function generateClientRequestIdPolicy(requestIdHeaderName?: string): RequestPolicyFactory; +export declare class GenerateClientRequestIdPolicy extends BaseRequestPolicy { + private _requestIdHeaderName; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _requestIdHeaderName: string); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=generateClientRequestIdPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/keepAlivePolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/keepAlivePolicy.d.ts new file mode 100644 index 000000000..213397be7 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/keepAlivePolicy.d.ts @@ -0,0 +1,35 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * Options for how HTTP connections should be maintained for future + * requests. + */ +export interface KeepAliveOptions { + enable: boolean; +} +export declare const DefaultKeepAliveOptions: KeepAliveOptions; +export declare function keepAlivePolicy(keepAliveOptions?: KeepAliveOptions): RequestPolicyFactory; +/** + * KeepAlivePolicy is a policy used to control keep alive settings for every request. + */ +export declare class KeepAlivePolicy extends BaseRequestPolicy { + private readonly keepAliveOptions; + /** + * Creates an instance of KeepAlivePolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {KeepAliveOptions} [keepAliveOptions] + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, keepAliveOptions: KeepAliveOptions); + /** + * Sends out request. + * + * @param {WebResourceLike} request + * @returns {Promise} + * @memberof KeepAlivePolicy + */ + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=keepAlivePolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/logPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/logPolicy.d.ts new file mode 100644 index 000000000..88ebd8bdb --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/logPolicy.d.ts @@ -0,0 +1,35 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { Debugger } from "@azure/logger"; +import { Sanitizer } from "../util/sanitizer"; +export interface LogPolicyOptions { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + allowedHeaderNames?: string[]; + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + allowedQueryParameters?: string[]; + /** + * The Debugger (logger) instance to use for writing pipeline logs. + */ + logger?: Debugger; +} +export declare function logPolicy(loggingOptions?: LogPolicyOptions): RequestPolicyFactory; +export declare class LogPolicy extends BaseRequestPolicy { + logger: Debugger; + sanitizer: Sanitizer; + allowedHeaderNames: Set; + allowedQueryParameters: Set; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, { logger, allowedHeaderNames, allowedQueryParameters }?: LogPolicyOptions); + sendRequest(request: WebResourceLike): Promise; + private logRequest; + private logResponse; +} +//# sourceMappingURL=logPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.browser.d.ts new file mode 100644 index 000000000..09a257fb7 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.browser.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.d.ts new file mode 100644 index 000000000..2e50b8b45 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/msRestUserAgentPolicy.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/ndJsonPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/ndJsonPolicy.d.ts new file mode 100644 index 000000000..72e4ed6d1 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/ndJsonPolicy.d.ts @@ -0,0 +1,3 @@ +import { RequestPolicyFactory } from "./requestPolicy"; +export declare function ndJsonPolicy(): RequestPolicyFactory; +//# sourceMappingURL=ndJsonPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.browser.d.ts new file mode 100644 index 000000000..7d4987024 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.browser.d.ts @@ -0,0 +1,11 @@ +import { ProxySettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + sendRequest(_request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.d.ts new file mode 100644 index 000000000..343f5e524 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/proxyPolicy.d.ts @@ -0,0 +1,12 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { ProxySettings } from "../serviceClient"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + proxySettings: ProxySettings; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, proxySettings: ProxySettings); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/redirectPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/redirectPolicy.d.ts new file mode 100644 index 000000000..484044512 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/redirectPolicy.d.ts @@ -0,0 +1,18 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +/** + * Options for how redirect responses are handled. + */ +export interface RedirectOptions { + handleRedirects: boolean; + maxRetries?: number; +} +export declare const DefaultRedirectOptions: RedirectOptions; +export declare function redirectPolicy(maximumRetries?: number): RequestPolicyFactory; +export declare class RedirectPolicy extends BaseRequestPolicy { + readonly maxRetries: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, maxRetries?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=redirectPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/requestPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/requestPolicy.d.ts new file mode 100644 index 000000000..f6735629f --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/requestPolicy.d.ts @@ -0,0 +1,71 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { HttpPipelineLogger } from "../httpPipelineLogger"; +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +import { WebResourceLike } from "../webResource"; +/** + * Creates a new RequestPolicy per-request that uses the provided nextPolicy. + */ +export declare type RequestPolicyFactory = { + create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy; +}; +export interface RequestPolicy { + sendRequest(httpRequest: WebResourceLike): Promise; +} +export declare abstract class BaseRequestPolicy implements RequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptionsLike; + protected constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike); + abstract sendRequest(webResource: WebResourceLike): Promise; + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export interface RequestPolicyOptionsLike { + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export declare class RequestPolicyOptions { + private _logger?; + constructor(_logger?: HttpPipelineLogger | undefined); + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=requestPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/rpRegistrationPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/rpRegistrationPolicy.d.ts new file mode 100644 index 000000000..ec613785c --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/rpRegistrationPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function rpRegistrationPolicy(retryTimeout?: number): RequestPolicyFactory; +export declare class RPRegistrationPolicy extends BaseRequestPolicy { + readonly _retryTimeout: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _retryTimeout?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=rpRegistrationPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/signingPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/signingPolicy.d.ts new file mode 100644 index 000000000..a20f93566 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/signingPolicy.d.ts @@ -0,0 +1,12 @@ +import { ServiceClientCredentials } from "../credentials/serviceClientCredentials"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptions } from "./requestPolicy"; +export declare function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory; +export declare class SigningPolicy extends BaseRequestPolicy { + authenticationProvider: ServiceClientCredentials; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, authenticationProvider: ServiceClientCredentials); + signRequest(request: WebResourceLike): Promise; + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=signingPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/systemErrorRetryPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/systemErrorRetryPolicy.d.ts new file mode 100644 index 000000000..2c1f6895c --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/systemErrorRetryPolicy.d.ts @@ -0,0 +1,23 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +export declare class SystemErrorRetryPolicy extends BaseRequestPolicy { + retryCount: number; + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=systemErrorRetryPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/throttlingRetryPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/throttlingRetryPolicy.d.ts new file mode 100644 index 000000000..3d6e8dcf0 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/throttlingRetryPolicy.d.ts @@ -0,0 +1,21 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +declare type ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise; +export declare function throttlingRetryPolicy(): RequestPolicyFactory; +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +export declare class ThrottlingRetryPolicy extends BaseRequestPolicy { + private _handleResponse; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _handleResponse?: ResponseHandler); + sendRequest(httpRequest: WebResourceLike): Promise; + private _defaultResponseHandler; + static parseRetryAfterHeader(headerValue: string): number | undefined; + static parseDateRetryAfterHeader(headerValue: string): number | undefined; +} +export {}; +//# sourceMappingURL=throttlingRetryPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/tracingPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/tracingPolicy.d.ts new file mode 100644 index 000000000..02f5cd7ed --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/tracingPolicy.d.ts @@ -0,0 +1,13 @@ +import { RequestPolicyFactory, RequestPolicy, RequestPolicyOptions, BaseRequestPolicy } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +export interface TracingPolicyOptions { + userAgent?: string; +} +export declare function tracingPolicy(tracingOptions?: TracingPolicyOptions): RequestPolicyFactory; +export declare class TracingPolicy extends BaseRequestPolicy { + private userAgent?; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, tracingOptions: TracingPolicyOptions); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=tracingPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/policies/userAgentPolicy.d.ts b/node_modules/@azure/core-http/types/3.1/src/policies/userAgentPolicy.d.ts new file mode 100644 index 000000000..cf30904ce --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/policies/userAgentPolicy.d.ts @@ -0,0 +1,27 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { getDefaultUserAgentKey } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare type TelemetryInfo = { + key?: string; + value?: string; +}; +/** + * Options for adding user agent details to outgoing requests. + */ +export interface UserAgentOptions { + userAgentPrefix?: string; +} +export declare const getDefaultUserAgentHeaderName: typeof getDefaultUserAgentKey; +export declare function getDefaultUserAgentValue(): string; +export declare function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory; +export declare class UserAgentPolicy extends BaseRequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptions; + protected headerKey: string; + protected headerValue: string; + constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions, headerKey: string, headerValue: string); + sendRequest(request: WebResourceLike): Promise; + addUserAgentHeader(request: WebResourceLike): void; +} +//# sourceMappingURL=userAgentPolicy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/proxyAgent.d.ts b/node_modules/@azure/core-http/types/3.1/src/proxyAgent.d.ts new file mode 100644 index 000000000..05e898bb2 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/proxyAgent.d.ts @@ -0,0 +1,14 @@ +/// +import * as http from "http"; +import * as https from "https"; +import * as tunnel from "tunnel"; +import { ProxySettings } from "./serviceClient"; +import { HttpHeadersLike } from "./httpHeaders"; +export declare type ProxyAgent = { + isHttps: boolean; + agent: http.Agent | https.Agent; +}; +export declare function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent; +export declare function isUrlHttps(url: string): boolean; +export declare function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: tunnel.HttpsOverHttpsOptions): http.Agent | https.Agent; +//# sourceMappingURL=proxyAgent.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/queryCollectionFormat.d.ts b/node_modules/@azure/core-http/types/3.1/src/queryCollectionFormat.d.ts new file mode 100644 index 000000000..9e48e3567 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/queryCollectionFormat.d.ts @@ -0,0 +1,11 @@ +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export declare enum QueryCollectionFormat { + Csv = ",", + Ssv = " ", + Tsv = "\t", + Pipes = "|", + Multi = "Multi" +} +//# sourceMappingURL=queryCollectionFormat.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/restError.d.ts b/node_modules/@azure/core-http/types/3.1/src/restError.d.ts new file mode 100644 index 000000000..189656b23 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/restError.d.ts @@ -0,0 +1,13 @@ +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class RestError extends Error { + static readonly REQUEST_SEND_ERROR: string; + static readonly PARSE_ERROR: string; + code?: string; + statusCode?: number; + request?: WebResourceLike; + response?: HttpOperationResponse; + details?: unknown; + constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse); +} +//# sourceMappingURL=restError.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/serializer.d.ts b/node_modules/@azure/core-http/types/3.1/src/serializer.d.ts new file mode 100644 index 000000000..cf4f1f267 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/serializer.d.ts @@ -0,0 +1,179 @@ +import { SerializerOptions } from "./util/serializer.common"; +export declare class Serializer { + readonly modelMappers: { + [key: string]: any; + }; + readonly isXML?: boolean | undefined; + constructor(modelMappers?: { + [key: string]: any; + }, isXML?: boolean | undefined); + validateConstraints(mapper: Mapper, value: any, objectName: string): void; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @param {options} options additional options to deserialization + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + serialize(mapper: Mapper, object: any, objectName?: string, options?: SerializerOptions): any; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @param options Controls behavior of XML parser and builder. + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + deserialize(mapper: Mapper, responseBody: any, objectName: string, options?: SerializerOptions): any; +} +export interface MapperConstraints { + InclusiveMaximum?: number; + ExclusiveMaximum?: number; + InclusiveMinimum?: number; + ExclusiveMinimum?: number; + MaxLength?: number; + MinLength?: number; + Pattern?: RegExp; + MaxItems?: number; + MinItems?: number; + UniqueItems?: true; + MultipleOf?: number; +} +export declare type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType; +export interface SimpleMapperType { + name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; +} +export interface CompositeMapperType { + name: "Composite"; + className?: string; + modelProperties?: { + [propertyName: string]: Mapper; + }; + additionalProperties?: Mapper; + uberParent?: string; + polymorphicDiscriminator?: PolymorphicDiscriminator; +} +export interface SequenceMapperType { + name: "Sequence"; + element: Mapper; +} +export interface DictionaryMapperType { + name: "Dictionary"; + value: Mapper; +} +export interface EnumMapperType { + name: "Enum"; + allowedValues: any[]; +} +export interface BaseMapper { + /** + * Name for the xml element + */ + xmlName?: string; + /** + * Xml element namespace + */ + xmlNamespace?: string; + /** + * Xml element namespace prefix + */ + xmlNamespacePrefix?: string; + /** + * Determines if the current property should be serialized as an attribute of the parent xml element + */ + xmlIsAttribute?: boolean; + /** + * Name for the xml elements when serializing an array + */ + xmlElementName?: string; + /** + * Whether or not the current propery should have a wrapping XML element + */ + xmlIsWrapped?: boolean; + /** + * Whether or not the current propery is readonly + */ + readOnly?: boolean; + /** + * Whether or not the current propery is a constant + */ + isConstant?: boolean; + /** + * Whether or not the current propery is required + */ + required?: boolean; + /** + * Whether or not the current propery allows mull as a value + */ + nullable?: boolean; + /** + * The name to use when serializing + */ + serializedName?: string; + /** + * Type of the mapper + */ + type: MapperType; + /** + * Default value when one is not explicitly provided + */ + defaultValue?: any; + /** + * Constraints to test the current value against + */ + constraints?: MapperConstraints; +} +export declare type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper; +export interface PolymorphicDiscriminator { + serializedName: string; + clientName: string; + [key: string]: string; +} +export interface CompositeMapper extends BaseMapper { + type: CompositeMapperType; +} +export interface SequenceMapper extends BaseMapper { + type: SequenceMapperType; +} +export interface DictionaryMapper extends BaseMapper { + type: DictionaryMapperType; + headerCollectionPrefix?: string; +} +export interface EnumMapper extends BaseMapper { + type: EnumMapperType; +} +export interface UrlParameterValue { + value: string; + skipUrlEncoding: boolean; +} +export declare function serializeObject(toSerialize: any): any; +export declare const MapperType: { + Date: "Date"; + Base64Url: "Base64Url"; + Boolean: "Boolean"; + ByteArray: "ByteArray"; + DateTime: "DateTime"; + DateTimeRfc1123: "DateTimeRfc1123"; + Object: "Object"; + Stream: "Stream"; + String: "String"; + TimeSpan: "TimeSpan"; + UnixTime: "UnixTime"; + Number: "Number"; + Composite: "Composite"; + Sequence: "Sequence"; + Dictionary: "Dictionary"; + Enum: "Enum"; +}; +//# sourceMappingURL=serializer.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/serviceClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/serviceClient.d.ts new file mode 100644 index 000000000..8f612bbd2 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/serviceClient.d.ts @@ -0,0 +1,151 @@ +import { TokenCredential } from "@azure/core-auth"; +import { HttpClient } from "./httpClient"; +import { HttpOperationResponse, RestResponse } from "./httpOperationResponse"; +import { HttpPipelineLogger } from "./httpPipelineLogger"; +import { OperationArguments } from "./operationArguments"; +import { ParameterPath } from "./operationParameter"; +import { OperationSpec } from "./operationSpec"; +import { DeserializationContentTypes } from "./policies/deserializationPolicy"; +import { RequestPolicyFactory } from "./policies/requestPolicy"; +import { Mapper, Serializer } from "./serializer"; +import { RequestPrepareOptions, WebResourceLike } from "./webResource"; +import { OperationResponse } from "./operationResponse"; +import { ServiceCallback } from "./util/utils"; +import { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +import { InternalPipelineOptions } from "./pipelineOptions"; +/** + * Options to configure a proxy for outgoing requests (Node.js only). + */ +export interface ProxySettings { + /** + * The proxy's host address. + */ + host: string; + /** + * The proxy host's port. + */ + port: number; + /** + * The user name to authenticate with the proxy, if required. + */ + username?: string; + /** + * The password to authenticate with the proxy, if required. + */ + password?: string; +} +export declare type ProxyOptions = ProxySettings; +/** + * Options to be provided while creating the client. + */ +export interface ServiceClientOptions { + /** + * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP + * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns + * the requestPolicyFactories that will be used. + */ + requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]); + /** + * The HttpClient that will be used to send HTTP requests. + */ + httpClient?: HttpClient; + /** + * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline. + */ + httpPipelineLogger?: HttpPipelineLogger; + /** + * If set to true, turn off the default retry policy. + */ + noRetryPolicy?: boolean; + /** + * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30. + */ + rpRegistrationRetryTimeout?: number; + /** + * Whether or not to generate a client request ID header for each HTTP request. + */ + generateClientRequestIdHeader?: boolean; + /** + * Whether to include credentials in CORS requests in the browser. + * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information. + */ + withCredentials?: boolean; + /** + * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a + * header to all outgoing requests with this header name and a random UUID as the request ID. + */ + clientRequestIdHeaderName?: string; + /** + * The content-types that will be associated with JSON or XML serialization. + */ + deserializationContentTypes?: DeserializationContentTypes; + /** + * The header name to use for the telemetry header while sending the request. If this is not + * specified, then "User-Agent" will be used when running on Node.js and "x-ms-useragent" will + * be used when running in a browser. + */ + userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string); + /** + * The string to be set to the telemetry header while sending the request, or a function that + * takes in the default user-agent string and returns the user-agent string that will be used. + */ + userAgent?: string | ((defaultUserAgent: string) => string); + /** + * Proxy settings which will be used for every HTTP request (Node.js only). + */ + proxySettings?: ProxySettings; +} +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +export declare class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + protected baseUri?: string; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + protected requestContentType?: string; + /** + * The HTTP client that will be used to send requests. + */ + private readonly _httpClient; + private readonly _requestPolicyOptions; + private readonly _requestPolicyFactories; + private readonly _withCredentials; + /** + * The ServiceClient constructor + * @constructor + * @param credentials The credentials used for authentication with the service. + * @param options The service client options that govern the behavior of the client. + */ + constructor(credentials?: TokenCredential | ServiceClientCredentials, options?: ServiceClientOptions); + /** + * Send the provided httpRequest. + */ + sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise; +} +export declare function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void; +export declare function createPipelineFromOptions(pipelineOptions: InternalPipelineOptions, authPolicyFactory?: RequestPolicyFactory): ServiceClientOptions; +export declare type PropertyParent = { + [propertyName: string]: any; +}; +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export declare function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent; +export declare function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any; +export declare function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse; +//# sourceMappingURL=serviceClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/url.d.ts b/node_modules/@azure/core-http/types/3.1/src/url.d.ts new file mode 100644 index 000000000..8ba95a4a6 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/url.d.ts @@ -0,0 +1,153 @@ +/** + * A class that handles the query portion of a URLBuilder. + */ +export declare class URLQuery { + private readonly _rawQuery; + /** + * Get whether or not there any query parameters in this URLQuery. + */ + any(): boolean; + /** + * Get the keys of the query string. + */ + keys(): string[]; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + set(parameterName: string, parameterValue: any): void; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + get(parameterName: string): string | string[] | undefined; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + toString(): string; + /** + * Parse a URLQuery from the provided text. + */ + static parse(text: string): URLQuery; +} +/** + * A class that handles creating, modifying, and parsing URLs. + */ +export declare class URLBuilder { + private _scheme; + private _host; + private _port; + private _path; + private _query; + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + setScheme(scheme: string | undefined): void; + /** + * Get the scheme that has been set in this URL. + */ + getScheme(): string | undefined; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + setHost(host: string | undefined): void; + /** + * Get the host that has been set in this URL. + */ + getHost(): string | undefined; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + setPort(port: number | string | undefined): void; + /** + * Get the port that has been set in this URL. + */ + getPort(): string | undefined; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + setPath(path: string | undefined): void; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + appendPath(path: string | undefined): void; + /** + * Get the path that has been set in this URL. + */ + getPath(): string | undefined; + /** + * Set the query in this URL. + */ + setQuery(query: string | undefined): void; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + setQueryParameter(queryParameterName: string, queryParameterValue: any): void; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + getQueryParameterValue(queryParameterName: string): string | string[] | undefined; + /** + * Get the query in this URL. + */ + getQuery(): string | undefined; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + private set; + toString(): string; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + replaceAll(searchValue: string, replaceValue: string): void; + static parse(text: string): URLBuilder; +} +declare type URLTokenizerState = "SCHEME" | "SCHEME_OR_HOST" | "HOST" | "PORT" | "PATH" | "QUERY" | "DONE"; +declare type URLTokenType = "SCHEME" | "HOST" | "PORT" | "PATH" | "QUERY"; +export declare class URLToken { + readonly text: string; + readonly type: URLTokenType; + constructor(text: string, type: URLTokenType); + static scheme(text: string): URLToken; + static host(text: string): URLToken; + static port(text: string): URLToken; + static path(text: string): URLToken; + static query(text: string): URLToken; +} +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export declare function isAlphaNumericCharacter(character: string): boolean; +/** + * A class that tokenizes URL strings. + */ +export declare class URLTokenizer { + readonly _text: string; + readonly _textLength: number; + _currentState: URLTokenizerState; + _currentIndex: number; + _currentToken: URLToken | undefined; + constructor(_text: string, state?: URLTokenizerState); + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + current(): URLToken | undefined; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + next(): boolean; +} +export {}; +//# sourceMappingURL=url.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/base64.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/base64.browser.d.ts new file mode 100644 index 000000000..e3d8d1713 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/base64.browser.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/base64.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/base64.d.ts new file mode 100644 index 000000000..e4d2fdb8e --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/base64.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/constants.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/constants.d.ts new file mode 100644 index 000000000..a5a7b1bda --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/constants.d.ts @@ -0,0 +1,100 @@ +export declare const Constants: { + /** + * The core-http version + * @const + * @type {string} + */ + coreHttpVersion: string; + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: string; + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: string; + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: string; + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: string; + /** + * Specifies NO Proxy. + * + * @const + * @type {string} + */ + NO_PROXY: string; + /** + * Specifies ALL Proxy. + * + * @const + * @type {string} + */ + ALL_PROXY: string; + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: string; + GET: string; + DELETE: string; + POST: string; + MERGE: string; + HEAD: string; + PATCH: string; + }; + StatusCodes: { + TooManyRequests: number; + }; + }; + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: string; + AUTHORIZATION_SCHEME: string; + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: string; + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: string; + }; +}; +//# sourceMappingURL=constants.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/exponentialBackoffStrategy.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/exponentialBackoffStrategy.d.ts new file mode 100644 index 000000000..92ec934b8 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/exponentialBackoffStrategy.d.ts @@ -0,0 +1,40 @@ +import { HttpOperationResponse } from "../coreHttp"; +export declare const DEFAULT_CLIENT_RETRY_COUNT = 3; +export declare const DEFAULT_CLIENT_RETRY_INTERVAL: number; +export declare const DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number; +export declare const DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number; +export declare function isNumber(n: any): n is number; +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} +/** + * @internal + * Determines if the operation should be retried. + * + * @param {number} retryLimit Specifies the max number of retries. + * @param {(response?: HttpOperationResponse, error?: RetryError) => boolean} predicate Initial chekck on whether to retry based on given responses or errors + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +export declare function shouldRetry(retryLimit: number, predicate: (response?: HttpOperationResponse, error?: RetryError) => boolean, retryData: RetryData, response?: HttpOperationResponse, error?: RetryError): boolean; +/** + * @internal + * Updates the retry data for the next attempt. + * + * @param {RetryPolicyOptions} retryOptions specifies retry interval, and its lower bound and upper bound. + * @param {RetryData} [retryData] The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +export declare function updateRetryData(retryOptions: { + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; +}, retryData?: RetryData, err?: RetryError): RetryData; +//# sourceMappingURL=exponentialBackoffStrategy.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/inspect.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/inspect.browser.d.ts new file mode 100644 index 000000000..9f3d21100 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/inspect.browser.d.ts @@ -0,0 +1,2 @@ +export declare const custom: {}; +//# sourceMappingURL=inspect.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/inspect.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/inspect.d.ts new file mode 100644 index 000000000..d203786d6 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/inspect.d.ts @@ -0,0 +1,2 @@ +export declare const custom: symbol; +//# sourceMappingURL=inspect.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/sanitizer.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/sanitizer.d.ts new file mode 100644 index 000000000..625a7126b --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/sanitizer.d.ts @@ -0,0 +1,26 @@ +export interface SanitizerOptions { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + allowedHeaderNames?: string[]; + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + allowedQueryParameters?: string[]; +} +export declare class Sanitizer { + allowedHeaderNames: Set; + allowedQueryParameters: Set; + constructor({ allowedHeaderNames, allowedQueryParameters }?: SanitizerOptions); + sanitize(obj: object): string; + private replacer; + private sanitizeHeaders; + private sanitizeQuery; + private sanitizeObject; + private sanitizeUrl; +} +//# sourceMappingURL=sanitizer.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/serializer.common.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/serializer.common.d.ts new file mode 100644 index 000000000..e3e4e2d2a --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/serializer.common.d.ts @@ -0,0 +1,26 @@ +/** + * Default key used to access the XML attributes. + */ +export declare const XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +export declare const XML_CHARKEY = "_"; +/** + * Options to govern behavior of xml parser and builder. + */ +export interface SerializerOptions { + /** + * indicates the name of the root element in the resulting XML when building XML. + */ + rootName?: string; + /** + * indicates whether the root element is to be included or not in the output when parsing XML. + */ + includeRoot?: boolean; + /** + * key used to access the XML value content when parsing XML. + */ + xmlCharKey?: string; +} +//# sourceMappingURL=serializer.common.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/utils.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/utils.d.ts new file mode 100644 index 000000000..f5f437fd6 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/utils.d.ts @@ -0,0 +1,132 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { RestError } from "../restError"; +import { WebResourceLike } from "../webResource"; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export declare const isNode: boolean; +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export declare function urlIsHTTPS(urlToCheck: { + protocol: string; +}): boolean; +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export declare function encodeUri(uri: string): string; +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export declare function stripResponse(response: HttpOperationResponse): any; +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResourceLike} request The Http Request object + * + * @return {WebResourceLike} The stripped version of Http Request. + */ +export declare function stripRequest(request: WebResourceLike): WebResourceLike; +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export declare function isValidUuid(uuid: string): boolean; +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export declare function generateUuid(): string; +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export declare function executePromisesSequentially(promiseFactories: Array, kickstart: any): Promise; +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export declare function delay(t: number, value?: T): Promise; +/** + * Service callback that is returned for REST requests initiated by the service client. + */ +export interface ServiceCallback { + /** + * A method that will be invoked as a callback to a service function. + * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null. + * @param {TResult} [result] The deserialized response body if an error did not occur. + * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur. + * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur. + */ + (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void; +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export declare function promiseToCallback(promise: Promise): Function; +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export declare function promiseToServiceCallback(promise: Promise): Function; +export declare function prepareXMLRootList(obj: any, elementName: string, xmlNamespaceKey?: string, xmlNamespace?: string): { + [s: string]: any; +}; +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export declare function applyMixins(targetCtor: any, sourceCtors: any[]): void; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export declare function isDuration(value: string): boolean; +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export declare function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined; +/** + * Determines whether the given entity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param {any} value Any entity + * @return {boolean} - true is it is primitive type, false otherwise. + */ +export declare function isPrimitiveType(value: any): boolean; +export declare function getEnvironmentValue(name: string): string | undefined; +//# sourceMappingURL=utils.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/xml.browser.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/xml.browser.d.ts new file mode 100644 index 000000000..ee5b61fb1 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/xml.browser.d.ts @@ -0,0 +1,4 @@ +import { SerializerOptions } from "./serializer.common"; +export declare function parseXML(str: string, opts?: SerializerOptions): Promise; +export declare function stringifyXML(content: any, opts?: SerializerOptions): string; +//# sourceMappingURL=xml.browser.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/util/xml.d.ts b/node_modules/@azure/core-http/types/3.1/src/util/xml.d.ts new file mode 100644 index 000000000..d8edc8334 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/util/xml.d.ts @@ -0,0 +1,16 @@ +import { SerializerOptions } from "./serializer.common"; +/** + * Converts given JSON object to XML string + * @param obj JSON object to be converted into XML string + * @param opts Options that govern the parsing of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ +export declare function stringifyXML(obj: any, opts?: SerializerOptions): string; +/** + * Converts given XML string into JSON + * @param str String containing the XML content to be parsed into JSON + * @param opts Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +export declare function parseXML(str: string, opts?: SerializerOptions): Promise; +//# sourceMappingURL=xml.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/webResource.d.ts b/node_modules/@azure/core-http/types/3.1/src/webResource.d.ts new file mode 100644 index 000000000..934498598 --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/webResource.d.ts @@ -0,0 +1,345 @@ +/// +import { HttpHeadersLike } from "./httpHeaders"; +import { OperationSpec } from "./operationSpec"; +import { Mapper } from "./serializer"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { OperationResponse } from "./operationResponse"; +import { ProxySettings } from "./serviceClient"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { SpanOptions } from "@azure/core-tracing"; +import { SerializerOptions } from "./util/serializer.common"; +export declare type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; +export declare type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream); +/** + * Fired in response to upload or download progress. + */ +export declare type TransferProgressEvent = { + /** + * The number of bytes loaded so far. + */ + loadedBytes: number; +}; +export interface WebResourceLike { + /** + * The URL being accessed by the request. + */ + url: string; + /** + * The HTTP method to use when making the request. + */ + method: HttpMethods; + /** + * The HTTP body contents of the request. + */ + body?: any; + /** + * The HTTP headers to use when making the request. + */ + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse; + formData?: any; + /** + * A query string represented as an object. + */ + query?: { + [key: string]: any; + }; + /** + * Used to parse the response. + */ + operationSpec?: OperationSpec; + /** + * If credentials (cookies) should be sent along during an XHR. + */ + withCredentials: boolean; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout: number; + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + /** + * If the connection should be reused. + */ + keepAlive?: boolean; + /** + * Whether or not to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + /** + * A unique identifier for the request. Used for logging and tracing. + */ + requestId: string; + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Sets options on the request. + */ + prepare(options: RequestPrepareOptions): WebResourceLike; + /** + * Clone this request object. + */ + clone(): WebResourceLike; +} +export declare function isWebResourceLike(object: any): object is WebResourceLike; +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +export declare class WebResource implements WebResourceLike { + url: string; + method: HttpMethods; + body?: any; + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse; + formData?: any; + query?: { + [key: string]: any; + }; + operationSpec?: OperationSpec; + withCredentials: boolean; + timeout: number; + proxySettings?: ProxySettings; + keepAlive?: boolean; + /** + * Whether or not to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + requestId: string; + abortSignal?: AbortSignalLike; + /** Callback which fires upon upload progress. */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + constructor(url?: string, method?: HttpMethods, body?: any, query?: { + [key: string]: any; + }, headers?: { + [key: string]: any; + } | HttpHeadersLike, streamResponseBody?: boolean, withCredentials?: boolean, abortSignal?: AbortSignalLike, timeout?: number, onUploadProgress?: (progress: TransferProgressEvent) => void, onDownloadProgress?: (progress: TransferProgressEvent) => void, proxySettings?: ProxySettings, keepAlive?: boolean, decompressResponse?: boolean); + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + prepare(options: RequestPrepareOptions): WebResource; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + clone(): WebResource; +} +export interface RequestPrepareOptions { + /** + * The HTTP request method. Valid values are "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", + * or "PATCH". + */ + method: HttpMethods; + /** + * The request url. It may or may not have query parameters in it. Either provide the "url" or + * provide the "pathTemplate" in the options object. Both the options are mutually exclusive. + */ + url?: string; + /** + * A dictionary of query parameters to be appended to the url, where + * the "key" is the "query-parameter-name" and the "value" is the "query-parameter-value". + * The "query-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "query-parameter-value". + * Example: + * - query-parameter-value in "object" format: { "query-parameter-name": { value: "query-parameter-value", skipUrlEncoding: true } } + * - query-parameter-value in "string" format: { "query-parameter-name": "query-parameter-value"}. + * Note: "If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url. + */ + queryParameters?: { + [key: string]: any | ParameterValue; + }; + /** + * The path template of the request url. Either provide the "url" or provide the "pathTemplate" in + * the options object. Both the options are mutually exclusive. + * Example: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" + */ + pathTemplate?: string; + /** + * The base url of the request. Default value is: "https://management.azure.com". This is + * applicable only with pathTemplate. If you are providing options.url then it is expected that + * you provide the complete url. + */ + baseUrl?: string; + /** + * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate. + * Here the key is the "path-parameter-name" and the value is the "path-parameter-value". + * The "path-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "path-parameter-value". + * Example: + * - path-parameter-value in "object" format: { "path-parameter-name": { value: "path-parameter-value", skipUrlEncoding: true } } + * - path-parameter-value in "string" format: { "path-parameter-name": "path-parameter-value" }. + */ + pathParameters?: { + [key: string]: any | ParameterValue; + }; + formData?: { + [key: string]: any; + }; + /** + * A dictionary of request headers that need to be applied to the request. + * Here the key is the "header-name" and the value is the "header-value". The header-value MUST be of type string. + * - ContentType must be provided with the key name as "Content-Type". Default value "application/json; charset=utf-8". + * - "Transfer-Encoding" is set to "chunked" by default if "options.bodyIsStream" is set to true. + * - "Content-Type" is set to "application/octet-stream" by default if "options.bodyIsStream" is set to true. + * - "accept-language" by default is set to "en-US" + * - "x-ms-client-request-id" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true + */ + headers?: { + [key: string]: any; + }; + /** + * When set to true, instructs the client to not set "x-ms-client-request-id" header to a new Guid(). + */ + disableClientRequestId?: boolean; + /** + * The request body. It can be of any type. This value will be serialized if it is not a stream. + */ + body?: any; + /** + * Provides information on how to serialize the request body. + */ + serializationMapper?: Mapper; + /** + * A dictionary of mappers that may be used while [de]serialization. + */ + mappers?: { + [x: string]: any; + }; + /** + * Provides information on how to deserialize the response body. + */ + deserializationMapper?: object; + /** + * Indicates whether this method should JSON.stringify() the request body. Default value: false. + */ + disableJsonStringifyOnBody?: boolean; + /** + * Indicates whether the request body is a stream (useful for file upload scenarios). + */ + bodyIsStream?: boolean; + abortSignal?: AbortSignalLike; + onUploadProgress?: (progress: TransferProgressEvent) => void; + onDownloadProgress?: (progress: TransferProgressEvent) => void; + spanOptions?: SpanOptions; +} +/** + * The Parameter value provided for path or query parameters in RequestPrepareOptions + */ +export interface ParameterValue { + value: any; + skipUrlEncoding: boolean; + [key: string]: any; +} +/** + * Describes the base structure of the options object that will be used in every operation. + */ +export interface RequestOptionsBase { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + [key: string]: any; + /** + * Options to override XML parsing/building behavior. + */ + serializerOptions?: SerializerOptions; +} +//# sourceMappingURL=webResource.d.ts.map diff --git a/node_modules/@azure/core-http/types/3.1/src/xhrHttpClient.d.ts b/node_modules/@azure/core-http/types/3.1/src/xhrHttpClient.d.ts new file mode 100644 index 000000000..1fb3bd2fd --- /dev/null +++ b/node_modules/@azure/core-http/types/3.1/src/xhrHttpClient.d.ts @@ -0,0 +1,12 @@ +import { HttpClient } from "./httpClient"; +import { HttpHeadersLike } from "./httpHeaders"; +import { WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +export declare class XhrHttpClient implements HttpClient { + sendRequest(request: WebResourceLike): Promise; +} +export declare function parseHeaders(xhr: XMLHttpRequest): HttpHeadersLike; +//# sourceMappingURL=xhrHttpClient.d.ts.map diff --git a/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts new file mode 100644 index 000000000..5cc0cfe94 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts @@ -0,0 +1,9 @@ +import { FetchHttpClient, CommonRequestInfo, CommonResponse, CommonRequestInit } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class BrowserFetchHttpClient extends FetchHttpClient { + prepareRequest(_httpRequest: WebResourceLike): Promise>; + processRequest(_operationResponse: HttpOperationResponse): Promise; + fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; +} +//# sourceMappingURL=browserFetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts.map new file mode 100644 index 000000000..aacea839e --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/browserFetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browserFetchHttpClient.d.ts","sourceRoot":"","sources":["../../../src/browserFetchHttpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,sBAAuB,SAAQ,eAAe;IACzD,cAAc,CAAC,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAI5E,cAAc,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxE,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;CAGnF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts b/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts new file mode 100644 index 000000000..b2a6d5a83 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts @@ -0,0 +1,48 @@ +/// +export { WebResource, WebResourceLike, HttpRequestBody, RequestPrepareOptions, HttpMethods, ParameterValue, RequestOptionsBase, TransferProgressEvent } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpClient } from "./httpClient"; +export { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from "./httpHeaders"; +export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse"; +export { HttpPipelineLogger } from "./httpPipelineLogger"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { OperationArguments } from "./operationArguments"; +export { OperationOptions, OperationRequestOptions, operationOptionsToRequestOptionsBase } from "./operationOptions"; +export { OperationParameter, OperationQueryParameter, OperationURLParameter, ParameterPath } from "./operationParameter"; +export { OperationResponse } from "./operationResponse"; +export { OperationSpec } from "./operationSpec"; +export { ServiceClient, ServiceClientOptions, flattenResponse, createPipelineFromOptions, ProxySettings, ProxyOptions } from "./serviceClient"; +export { PipelineOptions, InternalPipelineOptions } from "./pipelineOptions"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { bearerTokenAuthenticationPolicy } from "./policies/bearerTokenAuthenticationPolicy"; +export { LogPolicyOptions, logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy, RetryOptions, RetryMode } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy, RedirectOptions } from "./policies/redirectPolicy"; +export { keepAlivePolicy, KeepAliveOptions } from "./policies/keepAlivePolicy"; +export { disableResponseDecompressionPolicy } from "./policies/disableResponseDecompressionPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue, UserAgentOptions, TelemetryInfo } from "./policies/userAgentPolicy"; +export { deserializationPolicy, DeserializationOptions, deserializeResponseBody, DeserializationContentTypes } from "./policies/deserializationPolicy"; +export { tracingPolicy, TracingPolicyOptions } from "./policies/tracingPolicy"; +export { MapperType, SimpleMapperType, CompositeMapperType, DictionaryMapperType, SequenceMapperType, EnumMapperType, Mapper, BaseMapper, CompositeMapper, SequenceMapper, DictionaryMapper, EnumMapper, MapperConstraints, PolymorphicDiscriminator, Serializer, UrlParameterValue, serializeObject } from "./serializer"; +export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, ServiceCallback, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration } from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; +export { AbortSignalLike } from "@azure/abort-controller"; +export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; +export { AccessTokenCache, ExpiringAccessTokenCache } from "./credentials/accessTokenCache"; +export { AccessTokenRefresher } from "./credentials/accessTokenRefresher"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials"; +export { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { Authenticator } from "./credentials/credentials"; +export { parseXML, stringifyXML } from "./util/xml"; +export { XML_ATTRKEY, XML_CHARKEY, SerializerOptions } from "./util/serializer.common"; +//# sourceMappingURL=coreHttp.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts.map b/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts.map new file mode 100644 index 000000000..1cf683683 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/coreHttp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"coreHttp.d.ts","sourceRoot":"","sources":["../../../src/coreHttp.ts"],"names":[],"mappings":";AAMA,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,oCAAoC,EACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,aAAa,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of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts new file mode 100644 index 000000000..32d0f4c99 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts @@ -0,0 +1,39 @@ +import { AccessToken } from "@azure/core-auth"; +/** + * Defines the default token refresh buffer duration. + */ +export declare const TokenRefreshBufferMs: number; +/** + * Provides a cache for an AccessToken that was that + * was returned from a TokenCredential. + */ +export interface AccessTokenCache { + /** + * Sets the cached token. + * + * @param The {@link AccessToken} to be cached or null to + * clear the cached token. + */ + setCachedToken(accessToken: AccessToken | undefined): void; + /** + * Returns the cached {@link AccessToken} or undefined if nothing is cached. + */ + getCachedToken(): AccessToken | undefined; +} +/** + * Provides an {@link AccessTokenCache} implementation which clears + * the cached {@link AccessToken}'s after the expiresOnTimestamp has + * passed. + */ +export declare class ExpiringAccessTokenCache implements AccessTokenCache { + private tokenRefreshBufferMs; + private cachedToken?; + /** + * Constructs an instance of {@link ExpiringAccessTokenCache} with + * an optional expiration buffer time. + */ + constructor(tokenRefreshBufferMs?: number); + setCachedToken(accessToken: AccessToken | undefined): void; + getCachedToken(): AccessToken | undefined; +} +//# sourceMappingURL=accessTokenCache.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts.map new file mode 100644 index 000000000..082dc3a28 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"accessTokenCache.d.ts","sourceRoot":"","sources":["../../../../src/credentials/accessTokenCache.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IAE3D;;OAEG;IACH,cAAc,IAAI,WAAW,GAAG,SAAS,CAAC;CAC3C;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,YAAW,gBAAgB;IAC/D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,WAAW,CAAC,CAA0B;IAE9C;;;OAGG;gBACS,oBAAoB,GAAE,MAA6B;IAI/D,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAI1D,cAAc,IAAI,WAAW,GAAG,SAAS;CAU1C"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts new file mode 100644 index 000000000..574dd529b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts @@ -0,0 +1,34 @@ +import { AccessToken, TokenCredential, GetTokenOptions } from "@azure/core-auth"; +/** + * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token. + */ +export declare class AccessTokenRefresher { + private credential; + private scopes; + private requiredMillisecondsBeforeNewRefresh; + private promise; + private lastCalled; + constructor(credential: TokenCredential, scopes: string | string[], requiredMillisecondsBeforeNewRefresh?: number); + /** + * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying + * that we are ready for a new refresh. + * + * @returns {boolean} + */ + isReady(): boolean; + /** + * Stores the time in which it is called, + * then requests a new token, + * then sets this.promise to undefined, + * then returns the token. + * @param options getToken options + */ + private getToken; + /** + * Requests a new token if we're not currently waiting for a new token. + * Returns null if the required time between each call hasn't been reached. + * @param options getToken options + */ + refresh(options: GetTokenOptions): Promise; +} +//# sourceMappingURL=accessTokenRefresher.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts.map new file mode 100644 index 000000000..f2153aedd --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/accessTokenRefresher.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"accessTokenRefresher.d.ts","sourceRoot":"","sources":["../../../../src/credentials/accessTokenRefresher.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjF;;GAEG;AACH,qBAAa,oBAAoB;IAK7B,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,oCAAoC;IAN9C,OAAO,CAAC,OAAO,CAA+C;IAC9D,OAAO,CAAC,UAAU,CAAK;gBAGb,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,oCAAoC,GAAE,MAAc;IAG9D;;;;;OAKG;IACI,OAAO,IAAI,OAAO;IAOzB;;;;;;OAMG;YACW,QAAQ;IAOtB;;;;OAIG;IACI,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;CAO3E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts new file mode 100644 index 000000000..9e1f151e4 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts @@ -0,0 +1,46 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +/** + * @interface ApiKeyCredentialOptions + * Describes the options to be provided while creating an instance of ApiKeyCredentials + */ +export interface ApiKeyCredentialOptions { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + inHeader?: { + [x: string]: any; + }; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + inQuery?: { + [x: string]: any; + }; +} +/** + * Authenticates to a service using an API key. + */ +export declare class ApiKeyCredentials implements ServiceClientCredentials { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + private readonly inHeader?; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + private readonly inQuery?; + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + constructor(options: ApiKeyCredentialOptions); + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=apiKeyCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts.map new file mode 100644 index 000000000..ec06cb2a6 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/apiKeyCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apiKeyCredentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/apiKeyCredentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,wBAAwB;IAChE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAuB;IACjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAuB;IAEhD;;;OAGG;gBACS,OAAO,EAAE,uBAAuB;IAU5C;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CAiCpE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts new file mode 100644 index 000000000..c313e5257 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts @@ -0,0 +1,24 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +export declare class BasicAuthenticationCredentials implements ServiceClientCredentials { + userName: string; + password: string; + authorizationScheme: string; + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(userName: string, password: string, authorizationScheme?: string); + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=basicAuthenticationCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts.map new file mode 100644 index 000000000..36f0852dc --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/basicAuthenticationCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"basicAuthenticationCredentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/basicAuthenticationCredentials.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAItE,qBAAa,8BAA+B,YAAW,wBAAwB;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAgC;IAE3D;;;;;;;OAOG;gBAED,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,mBAAmB,GAAE,MAAqC;IAa5D;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CAOpE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts new file mode 100644 index 000000000..34c7db7a0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts @@ -0,0 +1,2 @@ +export declare type Authenticator = (challenge: object) => Promise; +//# sourceMappingURL=credentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts.map new file mode 100644 index 000000000..ec8d22f52 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/credentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/credentials.ts"],"names":[],"mappings":"AAGA,oBAAY,aAAa,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts new file mode 100644 index 000000000..af0bbacae --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts @@ -0,0 +1,11 @@ +import { WebResourceLike } from "../webResource"; +export interface ServiceClientCredentials { + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike/request to be signed. + * @returns {Promise} The signed request object; + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=serviceClientCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts.map new file mode 100644 index 000000000..b370e76b0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/serviceClientCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClientCredentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/serviceClientCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts b/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts new file mode 100644 index 000000000..059fe9357 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts @@ -0,0 +1,11 @@ +import { ApiKeyCredentials } from "./apiKeyCredentials"; +export declare class TopicCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + constructor(topicKey: string); +} +//# sourceMappingURL=topicCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts.map b/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts.map new file mode 100644 index 000000000..93172090b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/credentials/topicCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"topicCredentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/topicCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF,qBAAa,gBAAiB,SAAQ,iBAAiB;IACrD;;;;;OAKG;gBACS,QAAQ,EAAE,MAAM;CAW7B"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts new file mode 100644 index 000000000..883145a45 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts @@ -0,0 +1,2 @@ +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; +//# sourceMappingURL=defaultHttpClient.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts.map new file mode 100644 index 000000000..2613c9052 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.browser.d.ts","sourceRoot":"","sources":["../../../src/defaultHttpClient.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts new file mode 100644 index 000000000..a7381a249 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts @@ -0,0 +1,2 @@ +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; +//# sourceMappingURL=defaultHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts.map new file mode 100644 index 000000000..c15b8dd5a --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/defaultHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.d.ts","sourceRoot":"","sources":["../../../src/defaultHttpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts new file mode 100644 index 000000000..e60088f64 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts @@ -0,0 +1,31 @@ +/// +import { HttpClient } from "./httpClient"; +import { TransferProgressEvent, WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { HttpHeadersLike } from "./httpHeaders"; +import { Transform } from "stream"; +export declare type CommonRequestInfo = string; +export declare type CommonRequestInit = Omit & { + body?: any; + headers?: any; + signal?: any; +}; +export declare type CommonResponse = Omit & { + body: any; + trailer: any; + formData: any; +}; +export declare class ReportTransform extends Transform { + private progressCallback; + private loadedBytes; + _transform(chunk: string | Buffer, _encoding: string, callback: Function): void; + constructor(progressCallback: (progress: TransferProgressEvent) => void); +} +export declare abstract class FetchHttpClient implements HttpClient { + sendRequest(httpRequest: WebResourceLike): Promise; + abstract prepareRequest(httpRequest: WebResourceLike): Promise>; + abstract processRequest(operationResponse: HttpOperationResponse): Promise; + abstract fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; +} +export declare function parseHeaders(headers: Headers): HttpHeadersLike; +//# sourceMappingURL=fetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts.map new file mode 100644 index 000000000..6041126d4 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/fetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fetchHttpClient.d.ts","sourceRoot":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iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;aACvE,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;CAClG;AAMD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAQ9D"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts new file mode 100644 index 000000000..5f5f00e97 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts @@ -0,0 +1,7 @@ +import { RequestPolicy } from "./policies/requestPolicy"; +/** + * An interface that can send HttpRequests and receive promised HttpResponses. + */ +export interface HttpClient extends RequestPolicy { +} +//# sourceMappingURL=httpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts.map new file mode 100644 index 000000000..060dbe014 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../../src/httpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;CAAG"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts b/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts new file mode 100644 index 000000000..cb05d6513 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts @@ -0,0 +1,132 @@ +/** + * An individual header within a HttpHeaders collection. + */ +export interface HttpHeader { + /** + * The name of the header. + */ + name: string; + /** + * The value of the header. + */ + value: string; +} +/** + * A HttpHeaders collection represented as a simple JSON object. + */ +export declare type RawHttpHeaders = { + [headerName: string]: string; +}; +/** + * A collection of HTTP header key/value pairs. + */ +export interface HttpHeadersLike { + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeadersLike; + /** + * Get the JSON object representation of this HTTP header collection. + * The result is the same as `rawHeaders()`. + */ + toJson(): RawHttpHeaders; +} +export declare function isHttpHeadersLike(object?: any): object is HttpHeadersLike; +/** + * A collection of HTTP header key/value pairs. + */ +export declare class HttpHeaders implements HttpHeadersLike { + private readonly _headersMap; + constructor(rawHeaders?: RawHttpHeaders); + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(): RawHttpHeaders; + /** + * Get the string representation of this HTTP header collection. + */ + toString(): string; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeaders; +} +//# sourceMappingURL=httpHeaders.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts.map b/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts.map new file mode 100644 index 000000000..ba4250a8b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpHeaders.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpHeaders.d.ts","sourceRoot":"","sources":["../../../src/httpHeaders.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5D;;;;OAIG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;OAEG;IACH,UAAU,IAAI,cAAc,CAAC;IAC7B;;OAEG;IACH,YAAY,IAAI,UAAU,EAAE,CAAC;IAC7B;;OAEG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE,CAAC;IACzB;;OAEG;IACH,KAAK,IAAI,eAAe,CAAC;IACzB;;;OAGG;IACH,MAAM,IAAI,cAAc,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM,IAAI,eAAe,CAoBzE;AAED;;GAEG;AACH,qBAAa,WAAY,YAAW,eAAe;IACjD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;gBAEtD,UAAU,CAAC,EAAE,cAAc;IASvC;;;;;OAKG;IACI,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAOlE;;;;OAIG;IACI,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKlD;;OAEG;IACI,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI5C;;;;OAIG;IACI,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAM1C;;OAEG;IACI,UAAU,IAAI,cAAc;IASnC;;OAEG;IACI,YAAY,IAAI,UAAU,EAAE;IAQnC;;OAEG;IACI,WAAW,IAAI,MAAM,EAAE;IAS9B;;OAEG;IACI,YAAY,IAAI,MAAM,EAAE;IAS/B;;OAEG;IACI,MAAM,IAAI,cAAc;IAI/B;;OAEG;IACI,QAAQ,IAAI,MAAM;IAIzB;;OAEG;IACI,KAAK,IAAI,WAAW;CAG5B"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts b/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts new file mode 100644 index 000000000..49de13e06 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts @@ -0,0 +1,75 @@ +/// +import { WebResourceLike } from "./webResource"; +import { HttpHeadersLike } from "./httpHeaders"; +/** + * The properties on an HTTP response which will always be present. + */ +export interface HttpResponse { + /** + * The raw request + */ + request: WebResourceLike; + /** + * The HTTP response status (e.g. 200) + */ + status: number; + /** + * The HTTP response headers. + */ + headers: HttpHeadersLike; +} +declare global { + /** + * Stub declaration of the browser-only Blob type. + * Full type information can be obtained by including "lib": ["dom"] in tsconfig.json. + */ + interface Blob { + } +} +/** + * Wrapper object for http request and response. Deserialized object is stored in + * the `parsedBody` property when the response body is received in JSON or XML. + */ +export interface HttpOperationResponse extends HttpResponse { + /** + * The parsed HTTP response headers. + */ + parsedHeaders?: { + [key: string]: any; + }; + /** + * The response body as text (string format) + */ + bodyAsText?: string | null; + /** + * The response body as parsed JSON or XML + */ + parsedBody?: any; + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; +} +/** + * The flattened response to a REST call. + * Contains the underlying HttpOperationResponse as well as + * the merged properties of the parsedBody, parsedHeaders, etc. + */ +export interface RestResponse { + /** + * The underlying HTTP response containing both raw and deserialized response data. + */ + _response: HttpOperationResponse; + [key: string]: any; +} +//# sourceMappingURL=httpOperationResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts.map b/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts.map new file mode 100644 index 000000000..dab8acbdc --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpOperationResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpOperationResponse.d.ts","sourceRoot":"","sources":["../../../src/httpOperationResponse.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IAEzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;CAC1B;AAGD,OAAO,CAAC,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,IAAI;KAAG;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,EAAE,qBAAqB,CAAC;IAEjC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts new file mode 100644 index 000000000..7a13ab291 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts @@ -0,0 +1,22 @@ +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export declare enum HttpPipelineLogLevel { + /** + * A log level that indicates that no logs will be logged. + */ + OFF = 0, + /** + * An error log. + */ + ERROR = 1, + /** + * A warning log. + */ + WARNING = 2, + /** + * An information log. + */ + INFO = 3 +} +//# sourceMappingURL=httpPipelineLogLevel.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts.map b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts.map new file mode 100644 index 000000000..879719da4 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogLevel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogLevel.d.ts","sourceRoot":"","sources":["../../../src/httpPipelineLogLevel.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,KAAK,IAAA;IAEL;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,IAAI,IAAA;CACL"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts new file mode 100644 index 000000000..fdbf56c8e --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts @@ -0,0 +1,35 @@ +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +/** + * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages + * that can be used for debugging purposes. + */ +export interface HttpPipelineLogger { + /** + * The log level threshold for what logs will be logged. + */ + minimumLogLevel: HttpPipelineLogLevel; + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +export declare class ConsoleHttpPipelineLogger implements HttpPipelineLogger { + minimumLogLevel: HttpPipelineLogLevel; + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + constructor(minimumLogLevel: HttpPipelineLogLevel); + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=httpPipelineLogger.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts.map b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts.map new file mode 100644 index 000000000..22fa88587 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/httpPipelineLogger.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogger.d.ts","sourceRoot":"","sources":["../../../src/httpPipelineLogger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,eAAe,EAAE,oBAAoB,CAAC;IAEtC;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;IAK/C,eAAe,EAAE,oBAAoB;IAJxD;;;OAGG;gBACgB,eAAe,EAAE,oBAAoB;IAExD;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAgB3D"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/log.d.ts b/node_modules/@azure/core-http/types/latest/src/log.d.ts new file mode 100644 index 000000000..d9ad771b8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/log.d.ts @@ -0,0 +1,2 @@ +export declare const logger: import("@azure/logger").AzureLogger; +//# sourceMappingURL=log.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/log.d.ts.map b/node_modules/@azure/core-http/types/latest/src/log.d.ts.map new file mode 100644 index 000000000..0a002fa3d --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/log.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,qCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts new file mode 100644 index 000000000..e10051a07 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts @@ -0,0 +1,13 @@ +import { FetchHttpClient, CommonRequestInfo, CommonRequestInit, CommonResponse } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class NodeFetchHttpClient extends FetchHttpClient { + private proxyAgents; + private keepAliveAgents; + private readonly cookieJar; + private getOrCreateAgent; + fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise; + prepareRequest(httpRequest: WebResourceLike): Promise>; + processRequest(operationResponse: HttpOperationResponse): Promise; +} +//# sourceMappingURL=nodeFetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts.map new file mode 100644 index 000000000..89e1fc57e --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/nodeFetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFetchHttpClient.d.ts","sourceRoot":"","sources":["../../../src/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAehD,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,eAAe,CAAkB;IAEzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuD;IAEjF,OAAO,CAAC,gBAAgB;IAiDlB,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlF,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAyB3E,cAAc,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB9E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts b/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts new file mode 100644 index 000000000..7eadcda91 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts @@ -0,0 +1,15 @@ +import { RequestOptionsBase } from "./webResource"; +/** + * A collection of properties that apply to a single invocation of an operation. + */ +export interface OperationArguments { + /** + * The parameters that were passed to the operation method. + */ + [parameterName: string]: any; + /** + * The optional arugments that are provided to an operation. + */ + options?: RequestOptionsBase; +} +//# sourceMappingURL=operationArguments.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts.map b/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts.map new file mode 100644 index 000000000..341dc04c2 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationArguments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationArguments.d.ts","sourceRoot":"","sources":["../../../src/operationArguments.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,CAAC,aAAa,EAAE,MAAM,GAAG,GAAG,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts b/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts new file mode 100644 index 000000000..c3d31d636 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts @@ -0,0 +1,54 @@ +import { AbortSignalLike } from "@azure/abort-controller"; +import { OperationTracingOptions } from "@azure/core-tracing"; +import { TransferProgressEvent, RequestOptionsBase } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +/** + * The base options type for all operations. + */ +export interface OperationOptions { + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * Options used when creating and sending HTTP requests for this operation. + */ + requestOptions?: OperationRequestOptions; + /** + * Options used when tracing is enabled. + */ + tracingOptions?: OperationTracingOptions; +} +export interface OperationRequestOptions { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); +} +/** + * Converts an OperationOptions to a RequestOptionsBase + * + * @param opts OperationOptions object to convert to RequestOptionsBase + */ +export declare function operationOptionsToRequestOptionsBase(opts: T): RequestOptionsBase; +//# sourceMappingURL=operationOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts.map b/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts.map new file mode 100644 index 000000000..a773a6d83 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationOptions.d.ts","sourceRoot":"","sources":["../../../src/operationOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC/D;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,qBAAqB,KAAK,OAAO,CAAC,CAAC;CAC9E;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,CAAC,SAAS,gBAAgB,EAC7E,IAAI,EAAE,CAAC,GACN,kBAAkB,CAcpB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts b/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts new file mode 100644 index 000000000..f5b78021b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts @@ -0,0 +1,51 @@ +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { Mapper } from "./serializer"; +export declare type ParameterPath = string | string[] | { + [propertyName: string]: ParameterPath; +}; +/** + * A common interface that all Operation parameter's extend. + */ +export interface OperationParameter { + /** + * The path to this parameter's value in OperationArguments or the object that contains paths for + * each property's value in OperationArguments. + */ + parameterPath: ParameterPath; + /** + * The mapper that defines how to validate and serialize this parameter's value. + */ + mapper: Mapper; +} +/** + * A parameter for an operation that will be substituted into the operation's request URL. + */ +export interface OperationURLParameter extends OperationParameter { + /** + * Whether or not to skip encoding the URL parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; +} +/** + * A parameter for an operation that will be added as a query parameter to the operation's HTTP + * request. + */ +export interface OperationQueryParameter extends OperationParameter { + /** + * Whether or not to skip encoding the query parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; + /** + * If this query parameter's value is a collection, what type of format should the value be + * converted to. + */ + collectionFormat?: QueryCollectionFormat; +} +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export declare function getPathStringFromParameter(parameter: OperationParameter): string; +export declare function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string; +//# sourceMappingURL=operationParameter.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts.map b/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts.map new file mode 100644 index 000000000..fed2ad0cd --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationParameter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationParameter.d.ts","sourceRoot":"","sources":["../../../src/operationParameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,oBAAY,aAAa,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,aAAa,EAAE,aAAa,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CAEhF;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,GACb,MAAM,CAUR"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts b/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts new file mode 100644 index 000000000..7e3d06bd8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts @@ -0,0 +1,19 @@ +import { Mapper } from "./serializer"; +/** + * An OperationResponse that can be returned from an operation request for a single status code. + */ +export interface OperationResponse { + /** + * The mapper that will be used to deserialize the response headers. + */ + headersMapper?: Mapper; + /** + * The mapper that will be used to deserialize the response body. + */ + bodyMapper?: Mapper; + /** + * Indicates if this is an error response + */ + isError?: boolean; +} +//# sourceMappingURL=operationResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts.map b/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts.map new file mode 100644 index 000000000..c6c21cfde --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationResponse.d.ts","sourceRoot":"","sources":["../../../src/operationResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts b/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts new file mode 100644 index 000000000..f955ab2c7 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts @@ -0,0 +1,73 @@ +import { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +import { OperationResponse } from "./operationResponse"; +import { Serializer } from "./serializer"; +import { HttpMethods } from "./webResource"; +/** + * A specification that defines an operation. + */ +export interface OperationSpec { + /** + * The serializer to use in this operation. + */ + readonly serializer: Serializer; + /** + * The HTTP method that should be used by requests for this operation. + */ + readonly httpMethod: HttpMethods; + /** + * The URL that was provided in the service's specification. This will still have all of the URL + * template variables in it. If this is not provided when the OperationSpec is created, then it + * will be populated by a "baseUri" property on the ServiceClient. + */ + readonly baseUrl?: string; + /** + * The fixed path for this operation's URL. This will still have all of the URL template variables + * in it. + */ + readonly path?: string; + /** + * The content type of the request body. This value will be used as the "Content-Type" header if + * it is provided. + */ + readonly contentType?: string; + /** + * The media type of the request body. + * This value can be used to aide in serialization if it is provided. + */ + readonly mediaType?: "json" | "xml" | "form" | "binary" | "multipart" | "text" | "unknown" | string; + /** + * The parameter that will be used to construct the HTTP request's body. + */ + readonly requestBody?: OperationParameter; + /** + * Whether or not this operation uses XML request and response bodies. + */ + readonly isXML?: boolean; + /** + * The parameters to the operation method that will be substituted into the constructed URL. + */ + readonly urlParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be added to the constructed URL's query. + */ + readonly queryParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be converted to headers on the operation's + * HTTP request. + */ + readonly headerParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be used to create a formdata body for the + * operation's HTTP request. + */ + readonly formDataParameters?: ReadonlyArray; + /** + * The different types of responses that this operation can return based on what status code is + * returned. + */ + readonly responses: { + [responseCode: string]: OperationResponse; + }; +} +export declare function isStreamOperation(operationSpec: OperationSpec): boolean; +//# sourceMappingURL=operationSpec.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts.map b/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts.map new file mode 100644 index 000000000..e562ef39a --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/operationSpec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationSpec.d.ts","sourceRoot":"","sources":["../../../src/operationSpec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAc,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EACf,MAAM,GACN,KAAK,GACL,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,SAAS,GACT,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE9D;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAElE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAEhE;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAAE,CAAC;CACnE;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAavE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts b/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts new file mode 100644 index 000000000..4972f02cb --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts @@ -0,0 +1,59 @@ +import { HttpClient } from "./httpClient"; +import { RetryOptions } from "./policies/exponentialRetryPolicy"; +import { KeepAliveOptions } from "./policies/keepAlivePolicy"; +import { RedirectOptions } from "./policies/redirectPolicy"; +import { ProxyOptions } from "./serviceClient"; +import { UserAgentOptions } from "./policies/userAgentPolicy"; +import { DeserializationOptions } from "./policies/deserializationPolicy"; +import { LogPolicyOptions } from "./policies/logPolicy"; +/** + * Defines options that are used to configure the HTTP pipeline for + * an SDK client. + */ +export interface PipelineOptions { + /** + * The HttpClient implementation to use for outgoing HTTP requests. Defaults + * to DefaultHttpClient. + */ + httpClient?: HttpClient; + /** + * Options that control how to retry failed requests. + */ + retryOptions?: RetryOptions; + /** + * Options to configure a proxy for outgoing requests. + */ + proxyOptions?: ProxyOptions; + keepAliveOptions?: KeepAliveOptions; + /** + * Options for how redirect responses are handled. + */ + redirectOptions?: RedirectOptions; + /** + * Options for adding user agent details to outgoing requests. + */ + userAgentOptions?: UserAgentOptions; +} +/** + * Defines options that are used to configure internal options of + * the HTTP pipeline for an SDK client. + */ +export interface InternalPipelineOptions extends PipelineOptions { + /** + * Options to configure API response deserialization. + */ + deserializationOptions?: DeserializationOptions; + /** + * Options to configure request/response logging. + */ + loggingOptions?: LogPolicyOptions; + /** + * Configure whether to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + /** + * Send JSON Array payloads as NDJSON. + */ + sendStreamingJson?: boolean; +} +//# sourceMappingURL=pipelineOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts.map b/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts.map new file mode 100644 index 000000000..c2824b10b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/pipelineOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pipelineOptions.d.ts","sourceRoot":"","sources":["../../../src/pipelineOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAM5B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D;;OAEG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAEhD;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts new file mode 100644 index 000000000..4beacf77e --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts @@ -0,0 +1,45 @@ +import { TokenCredential } from "@azure/core-auth"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "../policies/requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { AccessTokenCache } from "../credentials/accessTokenCache"; +import { AccessTokenRefresher } from "../credentials/accessTokenRefresher"; +/** + * Creates a new BearerTokenAuthenticationPolicy factory. + * + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + */ +export declare function bearerTokenAuthenticationPolicy(credential: TokenCredential, scopes: string | string[]): RequestPolicyFactory; +/** + * + * Provides a RequestPolicy that can request a token from a TokenCredential + * implementation and then apply it to the Authorization header of a request + * as a Bearer token. + * + */ +export declare class BearerTokenAuthenticationPolicy extends BaseRequestPolicy { + private tokenCache; + private tokenRefresher; + /** + * Creates a new BearerTokenAuthenticationPolicy object. + * + * @param nextPolicy The next RequestPolicy in the request pipeline. + * @param options Options for this RequestPolicy. + * @param credential The TokenCredential implementation that can supply the bearer token. + * @param scopes The scopes for which the bearer token applies. + * @param tokenCache The cache for the most recent AccessToken returned from the TokenCredential. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, tokenCache: AccessTokenCache, tokenRefresher: AccessTokenRefresher); + /** + * Applies the Bearer token to the request through the Authorization header. + * @param webResource + */ + sendRequest(webResource: WebResourceLike): Promise; + /** + * Attempts a token update if any other time related conditionals have been reached based on the tokenRefresher class. + */ + private updateTokenIfNeeded; + private getToken; +} +//# sourceMappingURL=bearerTokenAuthenticationPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts.map new file mode 100644 index 000000000..cc046cf53 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/bearerTokenAuthenticationPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bearerTokenAuthenticationPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/bearerTokenAuthenticationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAmB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAA4B,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GACxB,oBAAoB,CAatB;AASD;;;;;;GAMG;AACH,qBAAa,+BAAgC,SAAQ,iBAAiB;IAalE,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,cAAc;IAbxB;;;;;;;;OAQG;gBAED,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EACrB,UAAU,EAAE,gBAAgB,EAC5B,cAAc,EAAE,oBAAoB;IAK9C;;;OAGG;IACU,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAYtF;;OAEG;YACW,mBAAmB;YAOnB,QAAQ;CAgBvB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts new file mode 100644 index 000000000..00ca24aef --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts @@ -0,0 +1,51 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { SerializerOptions } from "../util/serializer.common"; +/** + * Options to configure API response deserialization. + */ +export interface DeserializationOptions { + /** + * Configures the expected content types for the deserialization of + * JSON and XML response bodies. + */ + expectedContentTypes: DeserializationContentTypes; +} +/** + * The content-types that will indicate that an operation response should be deserialized in a + * particular way. + */ +export interface DeserializationContentTypes { + /** + * The content-types that indicate that an operation response should be deserialized as JSON. + * Defaults to [ "application/json", "text/json" ]. + */ + json?: string[]; + /** + * The content-types that indicate that an operation response should be deserialized as XML. + * Defaults to [ "application/xml", "application/atom+xml" ]. + */ + xml?: string[]; +} +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export declare function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes, parsingOptions?: SerializerOptions): RequestPolicyFactory; +export declare const defaultJsonContentTypes: string[]; +export declare const defaultXmlContentTypes: string[]; +export declare const DefaultDeserializationOptions: DeserializationOptions; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +export declare class DeserializationPolicy extends BaseRequestPolicy { + readonly jsonContentTypes: string[]; + readonly xmlContentTypes: string[]; + readonly xmlCharKey: string; + constructor(nextPolicy: RequestPolicy, requestPolicyOptions: RequestPolicyOptions, deserializationContentTypes?: DeserializationContentTypes, parsingOptions?: SerializerOptions); + sendRequest(request: WebResourceLike): Promise; +} +export declare function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse, options?: SerializerOptions): Promise; +//# sourceMappingURL=deserializationPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts.map new file mode 100644 index 000000000..67cf443d0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/deserializationPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializationPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/deserializationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAMjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,oBAAoB,EAAE,2BAA2B,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,2BAA2B,CAAC,EAAE,2BAA2B,EACzD,cAAc,CAAC,EAAE,iBAAiB,GACjC,oBAAoB,CAWtB;AAED,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,sBAAsB,UAA8C,CAAC;AAElF,eAAO,MAAM,6BAA6B,EAAE,sBAK3C,CAAC;AAEF;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,SAAgB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3C,SAAgB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1C,SAAgB,UAAU,EAAE,MAAM,CAAC;gBAGjC,UAAU,EAAE,aAAa,EACzB,oBAAoB,EAAE,oBAAoB,EAC1C,2BAA2B,CAAC,EAAE,2BAA2B,EACzD,cAAc,GAAE,iBAAsB;IAW3B,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAOnF;AAsCD,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,eAAe,EAAE,MAAM,EAAE,EACzB,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CA4EhC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts new file mode 100644 index 000000000..51b04d490 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts @@ -0,0 +1,13 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResource } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * {@link DisableResponseDecompressionPolicy} is not supported in browser and attempting + * to use it will results in error being thrown. + */ +export declare function disableResponseDecompressionPolicy(): RequestPolicyFactory; +export declare class DisableResponseDecompressionPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + sendRequest(_request: WebResource): Promise; +} +//# sourceMappingURL=disableResponseDecompressionPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts.map new file mode 100644 index 000000000..1f9c207e3 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"disableResponseDecompressionPolicy.browser.d.ts","sourceRoot":"","sources":["../../../../src/policies/disableResponseDecompressionPolicy.browser.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAMjE;;;GAGG;AACH,wBAAgB,kCAAkC,IAAI,oBAAoB,CAMzE;AAED,qBAAa,kCAAmC,SAAQ,iBAAiB;gBAC3D,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB;IAKvD,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAGhF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts new file mode 100644 index 000000000..65e98e8fd --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts @@ -0,0 +1,29 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResource } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * Returns a request policy factory that can be used to create an instance of + * {@link DisableResponseDecompressionPolicy}. + */ +export declare function disableResponseDecompressionPolicy(): RequestPolicyFactory; +/** + * A policy to disable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +export declare class DisableResponseDecompressionPolicy extends BaseRequestPolicy { + /** + * Creates an instance of DisableResponseDecompressionPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + */ + sendRequest(request: WebResource): Promise; +} +//# sourceMappingURL=disableResponseDecompressionPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts.map new file mode 100644 index 000000000..9a82df7fd --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/disableResponseDecompressionPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"disableResponseDecompressionPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/disableResponseDecompressionPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,kCAAkC,IAAI,oBAAoB,CAMzE;AAED;;;GAGG;AACH,qBAAa,kCAAmC,SAAQ,iBAAiB;IACvE;;;;;OAKG;gBAGS,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB;IAIpE;;;;;OAKG;IACU,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAI/E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts new file mode 100644 index 000000000..a1ee14606 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts @@ -0,0 +1,66 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * Describes the Retry Mode type. Currently supporting only Exponential. + * @enum RetryMode + */ +export declare enum RetryMode { + Exponential = 0 +} +/** + * Options that control how to retry failed requests. + */ +export interface RetryOptions { + /** + * The maximum number of retry attempts. Defaults to 3. + */ + maxRetries?: number; + /** + * The amount of delay in milliseconds between retry attempts. Defaults to 30000 + * (30 seconds). The delay increases exponentially with each retry up to a maximum + * specified by maxRetryDelayInMs. + */ + retryDelayInMs?: number; + /** + * The maximum delay in milliseconds allowed before retrying an operation. Defaults + * to 90000 (90 seconds). + */ + maxRetryDelayInMs?: number; + /** + * Currently supporting only Exponential mode. + */ + mode?: RetryMode; +} +export declare const DefaultRetryOptions: RetryOptions; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +export declare class ExponentialRetryPolicy extends BaseRequestPolicy { + /** + * The client retry count. + */ + retryCount: number; + /** + * The client retry interval in milliseconds. + */ + retryInterval: number; + /** + * The maximum retry interval in milliseconds. + */ + maxRetryInterval: number; + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptions} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryCount?: number, retryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=exponentialRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts.map new file mode 100644 index 000000000..a823365d8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/exponentialRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialRetryPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/exponentialRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAczB,wBAAgB,sBAAsB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,GACxB,oBAAoB,CAYtB;AAED;;;GAGG;AACH,oBAAY,SAAS;IACnB,WAAW,IAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC;AAEF;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;gBAED,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM;IAUpB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts new file mode 100644 index 000000000..e0bf3c770 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function generateClientRequestIdPolicy(requestIdHeaderName?: string): RequestPolicyFactory; +export declare class GenerateClientRequestIdPolicy extends BaseRequestPolicy { + private _requestIdHeaderName; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _requestIdHeaderName: string); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=generateClientRequestIdPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts.map new file mode 100644 index 000000000..00ad755d0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/generateClientRequestIdPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generateClientRequestIdPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,6BAA6B,CAC3C,mBAAmB,SAA2B,GAC7C,oBAAoB,CAMtB;AAED,qBAAa,6BAA8B,SAAQ,iBAAiB;IAIhE,OAAO,CAAC,oBAAoB;gBAF5B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EACrB,oBAAoB,EAAE,MAAM;IAK/B,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts new file mode 100644 index 000000000..7f09ab5c1 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts @@ -0,0 +1,35 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +/** + * Options for how HTTP connections should be maintained for future + * requests. + */ +export interface KeepAliveOptions { + enable: boolean; +} +export declare const DefaultKeepAliveOptions: KeepAliveOptions; +export declare function keepAlivePolicy(keepAliveOptions?: KeepAliveOptions): RequestPolicyFactory; +/** + * KeepAlivePolicy is a policy used to control keep alive settings for every request. + */ +export declare class KeepAlivePolicy extends BaseRequestPolicy { + private readonly keepAliveOptions; + /** + * Creates an instance of KeepAlivePolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {KeepAliveOptions} [keepAliveOptions] + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, keepAliveOptions: KeepAliveOptions); + /** + * Sends out request. + * + * @param {WebResourceLike} request + * @returns {Promise} + * @memberof KeepAlivePolicy + */ + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=keepAlivePolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts.map new file mode 100644 index 000000000..41a518ec8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/keepAlivePolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"keepAlivePolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/keepAlivePolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAK/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAErC,CAAC;AAEF,wBAAgB,eAAe,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,oBAAoB,CAMzF;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,iBAAiB;IAWlD,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAVnC;;;;;;OAMG;gBAED,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EACZ,gBAAgB,EAAE,gBAAgB;IAKrD;;;;;;OAMG;IACU,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAInF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts new file mode 100644 index 000000000..50505f449 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts @@ -0,0 +1,61 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { Debugger } from "@azure/logger"; +import { Sanitizer } from "../util/sanitizer"; +export interface LogPolicyOptions { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + allowedHeaderNames?: string[]; + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + allowedQueryParameters?: string[]; + /** + * The Debugger (logger) instance to use for writing pipeline logs. + */ + logger?: Debugger; +} +export declare function logPolicy(loggingOptions?: LogPolicyOptions): RequestPolicyFactory; +export declare class LogPolicy extends BaseRequestPolicy { + logger: Debugger; + sanitizer: Sanitizer; + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + get allowedHeaderNames(): Set; + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + * @deprecated Pass these into the constructor instead. + */ + set allowedHeaderNames(allowedHeaderNames: Set); + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + get allowedQueryParameters(): Set; + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + * @deprecated Pass these into the constructor instead. + */ + set allowedQueryParameters(allowedQueryParameters: Set); + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, { logger, allowedHeaderNames, allowedQueryParameters }?: LogPolicyOptions); + sendRequest(request: WebResourceLike): Promise; + private logRequest; + private logResponse; +} +//# sourceMappingURL=logPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts.map new file mode 100644 index 000000000..64b87e9b9 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/logPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"logPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/logPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,cAAc,GAAE,gBAAqB,GAAG,oBAAoB,CAMrF;AAED,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;;OAMG;IACH,IAAW,kBAAkB,IAAI,GAAG,CAAC,MAAM,CAAC,CAE3C;IAED;;;;;;OAMG;IACH,IAAW,kBAAkB,CAAC,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,EAE5D;IAED;;;;OAIG;IACH,IAAW,sBAAsB,IAAI,GAAG,CAAC,MAAM,CAAC,CAE/C;IAED;;;;OAIG;IACH,IAAW,sBAAsB,CAAC,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,EAEpE;gBAGC,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,EACE,MAAwB,EACxB,kBAAuB,EACvB,sBAA2B,EAC5B,GAAE,gBAAqB;IAOnB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAO5E,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;CAKpB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts new file mode 100644 index 000000000..3ff8522d3 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts.map new file mode 100644 index 000000000..248cde0e5 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.browser.d.ts","sourceRoot":"","sources":["../../../../src/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAQzD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts new file mode 100644 index 000000000..1fac88842 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts.map new file mode 100644 index 000000000..1742bae62 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/msRestUserAgentPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAYzD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts new file mode 100644 index 000000000..4993bca54 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts @@ -0,0 +1,3 @@ +import { RequestPolicyFactory } from "./requestPolicy"; +export declare function ndJsonPolicy(): RequestPolicyFactory; +//# sourceMappingURL=ndJsonPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts.map new file mode 100644 index 000000000..df33b4134 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/ndJsonPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ndJsonPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/ndJsonPolicy.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAIzB,wBAAgB,YAAY,IAAI,oBAAoB,CAMnD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts new file mode 100644 index 000000000..36a0edd19 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts @@ -0,0 +1,11 @@ +import { ProxySettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + sendRequest(_request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts.map new file mode 100644 index 000000000..21c97c870 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.browser.d.ts","sourceRoot":"","sources":["../../../../src/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAErF;AAED,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAMhF;AAED,qBAAa,WAAY,SAAQ,iBAAiB;gBACpC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB;IAK7D,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG9E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts new file mode 100644 index 000000000..7010d2f2b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts @@ -0,0 +1,12 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { ProxySettings } from "../serviceClient"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + proxySettings: ProxySettings; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, proxySettings: ProxySettings); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts.map new file mode 100644 index 000000000..5e92c4d99 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/proxyPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/proxyPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA4DjD,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAiBpF;AAED,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAS/E;AAyBD,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,aAAa,EAAE,aAAa,CAAC;gBAG3B,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,aAAa,EAAE,aAAa;IAMvB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts new file mode 100644 index 000000000..d39636a99 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts @@ -0,0 +1,18 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +/** + * Options for how redirect responses are handled. + */ +export interface RedirectOptions { + handleRedirects: boolean; + maxRetries?: number; +} +export declare const DefaultRedirectOptions: RedirectOptions; +export declare function redirectPolicy(maximumRetries?: number): RequestPolicyFactory; +export declare class RedirectPolicy extends BaseRequestPolicy { + readonly maxRetries: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, maxRetries?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=redirectPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts.map new file mode 100644 index 000000000..af28e6733 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/redirectPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"redirectPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/redirectPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAOzB;;GAEG;AACH,MAAM,WAAW,eAAe;IAI9B,eAAe,EAAE,OAAO,CAAC;IAMzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,eAGpC,CAAC;AAEF,wBAAgB,cAAc,CAAC,cAAc,SAAK,GAAG,oBAAoB,CAMxE;AAED,qBAAa,cAAe,SAAQ,iBAAiB;IACmB,QAAQ,CAAC,UAAU;gBAA7E,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB,EAAW,UAAU,SAAK;IAIvF,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts new file mode 100644 index 000000000..6d50f4c1c --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts @@ -0,0 +1,71 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { HttpPipelineLogger } from "../httpPipelineLogger"; +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +import { WebResourceLike } from "../webResource"; +/** + * Creates a new RequestPolicy per-request that uses the provided nextPolicy. + */ +export declare type RequestPolicyFactory = { + create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy; +}; +export interface RequestPolicy { + sendRequest(httpRequest: WebResourceLike): Promise; +} +export declare abstract class BaseRequestPolicy implements RequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptionsLike; + protected constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike); + abstract sendRequest(webResource: WebResourceLike): Promise; + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export interface RequestPolicyOptionsLike { + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export declare class RequestPolicyOptions { + private _logger?; + constructor(_logger?: HttpPipelineLogger | undefined); + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=requestPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts.map new file mode 100644 index 000000000..4b8f796bb --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/requestPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"requestPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/requestPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,GAAG,aAAa,CAAC;CACrF,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC3E;AAED,8BAAsB,iBAAkB,YAAW,aAAa;IAE5D,QAAQ,CAAC,WAAW,EAAE,aAAa;IACnC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB;IAF7C,SAAS,aACE,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,wBAAwB;aAG7B,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAEzF;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO;IAIzD;;;;;OAKG;IACI,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAGlE;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC;IAEnD;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,oBAAoB;IACnB,OAAO,CAAC,OAAO,CAAC;gBAAR,OAAO,CAAC,gCAAoB;IAEhD;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO;IAQzD;;;;;OAKG;IACI,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts new file mode 100644 index 000000000..f14681d7d --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function rpRegistrationPolicy(retryTimeout?: number): RequestPolicyFactory; +export declare class RPRegistrationPolicy extends BaseRequestPolicy { + readonly _retryTimeout: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _retryTimeout?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=rpRegistrationPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts.map new file mode 100644 index 000000000..cc5fc671a --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/rpRegistrationPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rpRegistrationPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,oBAAoB,CAAC,YAAY,SAAK,GAAG,oBAAoB,CAM5E;AAED,qBAAa,oBAAqB,SAAQ,iBAAiB;IAIvD,QAAQ,CAAC,aAAa;gBAFtB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EACpB,aAAa,SAAK;IAKtB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts new file mode 100644 index 000000000..8fb9a1a76 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts @@ -0,0 +1,12 @@ +import { ServiceClientCredentials } from "../credentials/serviceClientCredentials"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptions } from "./requestPolicy"; +export declare function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory; +export declare class SigningPolicy extends BaseRequestPolicy { + authenticationProvider: ServiceClientCredentials; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, authenticationProvider: ServiceClientCredentials); + signRequest(request: WebResourceLike): Promise; + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=signingPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts.map new file mode 100644 index 000000000..3154b6b4c --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/signingPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signingPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/signingPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,aAAa,CAC3B,sBAAsB,EAAE,wBAAwB,GAC/C,oBAAoB,CAMtB;AAED,qBAAa,aAAc,SAAQ,iBAAiB;IAIzC,sBAAsB,EAAE,wBAAwB;gBAFvD,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EACtB,sBAAsB,EAAE,wBAAwB;IAKzD,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxD,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts new file mode 100644 index 000000000..edd61bc01 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts @@ -0,0 +1,23 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +export declare class SystemErrorRetryPolicy extends BaseRequestPolicy { + retryCount: number; + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=systemErrorRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts.map new file mode 100644 index 000000000..0dfac5986 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/systemErrorRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"systemErrorRetryPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAazB,wBAAgB,sBAAsB,CACpC,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,GACxB,oBAAoB,CAatB;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;gBAGvB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM;IAapB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAK7E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts new file mode 100644 index 000000000..235d354a0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts @@ -0,0 +1,21 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptions, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +declare type ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise; +export declare function throttlingRetryPolicy(): RequestPolicyFactory; +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +export declare class ThrottlingRetryPolicy extends BaseRequestPolicy { + private _handleResponse; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, _handleResponse?: ResponseHandler); + sendRequest(httpRequest: WebResourceLike): Promise; + private _defaultResponseHandler; + static parseRetryAfterHeader(headerValue: string): number | undefined; + static parseDateRetryAfterHeader(headerValue: string): number | undefined; +} +export {}; +//# sourceMappingURL=throttlingRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts.map new file mode 100644 index 000000000..344d2afd8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/throttlingRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throttlingRetryPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAIjE,aAAK,eAAe,GAAG,CACrB,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,qBAAqB,KAC5B,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAGpC,wBAAgB,qBAAqB,IAAI,oBAAoB,CAM5D;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,OAAO,CAAC,eAAe,CAAkB;gBAGvC,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,eAAe,CAAC,EAAE,eAAe;IAMtB,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAUxE,uBAAuB;WAoBvB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;WAS9D,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAWjF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts new file mode 100644 index 000000000..261e90c31 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts @@ -0,0 +1,13 @@ +import { RequestPolicyFactory, RequestPolicy, RequestPolicyOptions, BaseRequestPolicy } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +export interface TracingPolicyOptions { + userAgent?: string; +} +export declare function tracingPolicy(tracingOptions?: TracingPolicyOptions): RequestPolicyFactory; +export declare class TracingPolicy extends BaseRequestPolicy { + private userAgent?; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, tracingOptions: TracingPolicyOptions); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=tracingPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts.map new file mode 100644 index 000000000..3959fcb93 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/tracingPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tracingPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/tracingPolicy.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,cAAc,GAAE,oBAAyB,GAAG,oBAAoB,CAM7F;AAED,qBAAa,aAAc,SAAQ,iBAAiB;IAClD,OAAO,CAAC,SAAS,CAAC,CAAS;gBAGzB,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,cAAc,EAAE,oBAAoB;IAMzB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAiDnF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts b/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts new file mode 100644 index 000000000..81aab3679 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts @@ -0,0 +1,27 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { getDefaultUserAgentKey } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from "./requestPolicy"; +export declare type TelemetryInfo = { + key?: string; + value?: string; +}; +/** + * Options for adding user agent details to outgoing requests. + */ +export interface UserAgentOptions { + userAgentPrefix?: string; +} +export declare const getDefaultUserAgentHeaderName: typeof getDefaultUserAgentKey; +export declare function getDefaultUserAgentValue(): string; +export declare function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory; +export declare class UserAgentPolicy extends BaseRequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptions; + protected headerKey: string; + protected headerValue: string; + constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions, headerKey: string, headerValue: string); + sendRequest(request: WebResourceLike): Promise; + addUserAgentHeader(request: WebResourceLike): void; +} +//# sourceMappingURL=userAgentPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts.map new file mode 100644 index 000000000..aec9dcf7c --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/policies/userAgentPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"userAgentPolicy.d.ts","sourceRoot":"","sources":["../../../../src/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,aAAa,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAK/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwBD,eAAO,MAAM,6BAA6B,+BAAyB,CAAC;AAEpE,wBAAgB,wBAAwB,IAAI,MAAM,CAKjD;AAED,wBAAgB,eAAe,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAenF;AAED,qBAAa,eAAgB,SAAQ,iBAAiB;IAElD,QAAQ,CAAC,WAAW,EAAE,aAAa;IACnC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB;IACvC,SAAS,CAAC,SAAS,EAAE,MAAM;IAC3B,SAAS,CAAC,WAAW,EAAE,MAAM;gBAHpB,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,oBAAoB,EAC7B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM;IAK/B,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKrE,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CASnD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts b/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts new file mode 100644 index 000000000..a9b7ae9e2 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts @@ -0,0 +1,14 @@ +/// +import * as http from "http"; +import * as https from "https"; +import * as tunnel from "tunnel"; +import { ProxySettings } from "./serviceClient"; +import { HttpHeadersLike } from "./httpHeaders"; +export declare type ProxyAgent = { + isHttps: boolean; + agent: http.Agent | https.Agent; +}; +export declare function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent; +export declare function isUrlHttps(url: string): boolean; +export declare function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: tunnel.HttpsOverHttpsOptions): http.Agent | https.Agent; +//# sourceMappingURL=proxyAgent.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts.map b/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts.map new file mode 100644 index 000000000..0df4edf71 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/proxyAgent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyAgent.d.ts","sourceRoot":"","sources":["../../../src/proxyAgent.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,oBAAY,UAAU,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;CAAE,CAAC;AAC/E,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,UAAU,CA6BZ;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED,wBAAgB,YAAY,CAC1B,cAAc,EAAE,OAAO,EACvB,YAAY,EAAE,OAAO,EACrB,aAAa,EAAE,MAAM,CAAC,qBAAqB,GAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAU1B"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts b/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts new file mode 100644 index 000000000..a235f8563 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts @@ -0,0 +1,11 @@ +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export declare enum QueryCollectionFormat { + Csv = ",", + Ssv = " ", + Tsv = "\t", + Pipes = "|", + Multi = "Multi" +} +//# sourceMappingURL=queryCollectionFormat.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts.map b/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts.map new file mode 100644 index 000000000..ab5f300b8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/queryCollectionFormat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"queryCollectionFormat.d.ts","sourceRoot":"","sources":["../../../src/queryCollectionFormat.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,GAAG,MAAM;IACT,GAAG,MAAM;IACT,GAAG,OAAO;IACV,KAAK,MAAM;IACX,KAAK,UAAU;CAChB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/restError.d.ts b/node_modules/@azure/core-http/types/latest/src/restError.d.ts new file mode 100644 index 000000000..45ad010ca --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/restError.d.ts @@ -0,0 +1,13 @@ +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class RestError extends Error { + static readonly REQUEST_SEND_ERROR: string; + static readonly PARSE_ERROR: string; + code?: string; + statusCode?: number; + request?: WebResourceLike; + response?: HttpOperationResponse; + details?: unknown; + constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse); +} +//# sourceMappingURL=restError.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/restError.d.ts.map b/node_modules/@azure/core-http/types/latest/src/restError.d.ts.map new file mode 100644 index 000000000..fef7f1920 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/restError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"restError.d.ts","sourceRoot":"","sources":["../../../src/restError.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAMhD,qBAAa,SAAU,SAAQ,KAAK;IAClC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAwB;IAClE,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAiB;IAEpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEhB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,qBAAqB;CAkBnC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/serializer.d.ts b/node_modules/@azure/core-http/types/latest/src/serializer.d.ts new file mode 100644 index 000000000..60ccf81db --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/serializer.d.ts @@ -0,0 +1,179 @@ +import { SerializerOptions } from "./util/serializer.common"; +export declare class Serializer { + readonly modelMappers: { + [key: string]: any; + }; + readonly isXML?: boolean | undefined; + constructor(modelMappers?: { + [key: string]: any; + }, isXML?: boolean | undefined); + validateConstraints(mapper: Mapper, value: any, objectName: string): void; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @param {options} options additional options to deserialization + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + serialize(mapper: Mapper, object: any, objectName?: string, options?: SerializerOptions): any; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @param options Controls behavior of XML parser and builder. + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + deserialize(mapper: Mapper, responseBody: any, objectName: string, options?: SerializerOptions): any; +} +export interface MapperConstraints { + InclusiveMaximum?: number; + ExclusiveMaximum?: number; + InclusiveMinimum?: number; + ExclusiveMinimum?: number; + MaxLength?: number; + MinLength?: number; + Pattern?: RegExp; + MaxItems?: number; + MinItems?: number; + UniqueItems?: true; + MultipleOf?: number; +} +export declare type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType; +export interface SimpleMapperType { + name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; +} +export interface CompositeMapperType { + name: "Composite"; + className?: string; + modelProperties?: { + [propertyName: string]: Mapper; + }; + additionalProperties?: Mapper; + uberParent?: string; + polymorphicDiscriminator?: PolymorphicDiscriminator; +} +export interface SequenceMapperType { + name: "Sequence"; + element: Mapper; +} +export interface DictionaryMapperType { + name: "Dictionary"; + value: Mapper; +} +export interface EnumMapperType { + name: "Enum"; + allowedValues: any[]; +} +export interface BaseMapper { + /** + * Name for the xml element + */ + xmlName?: string; + /** + * Xml element namespace + */ + xmlNamespace?: string; + /** + * Xml element namespace prefix + */ + xmlNamespacePrefix?: string; + /** + * Determines if the current property should be serialized as an attribute of the parent xml element + */ + xmlIsAttribute?: boolean; + /** + * Name for the xml elements when serializing an array + */ + xmlElementName?: string; + /** + * Whether or not the current propery should have a wrapping XML element + */ + xmlIsWrapped?: boolean; + /** + * Whether or not the current propery is readonly + */ + readOnly?: boolean; + /** + * Whether or not the current propery is a constant + */ + isConstant?: boolean; + /** + * Whether or not the current propery is required + */ + required?: boolean; + /** + * Whether or not the current propery allows mull as a value + */ + nullable?: boolean; + /** + * The name to use when serializing + */ + serializedName?: string; + /** + * Type of the mapper + */ + type: MapperType; + /** + * Default value when one is not explicitly provided + */ + defaultValue?: any; + /** + * Constraints to test the current value against + */ + constraints?: MapperConstraints; +} +export declare type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper; +export interface PolymorphicDiscriminator { + serializedName: string; + clientName: string; + [key: string]: string; +} +export interface CompositeMapper extends BaseMapper { + type: CompositeMapperType; +} +export interface SequenceMapper extends BaseMapper { + type: SequenceMapperType; +} +export interface DictionaryMapper extends BaseMapper { + type: DictionaryMapperType; + headerCollectionPrefix?: string; +} +export interface EnumMapper extends BaseMapper { + type: EnumMapperType; +} +export interface UrlParameterValue { + value: string; + skipUrlEncoding: boolean; +} +export declare function serializeObject(toSerialize: any): any; +export declare const MapperType: { + Date: "Date"; + Base64Url: "Base64Url"; + Boolean: "Boolean"; + ByteArray: "ByteArray"; + DateTime: "DateTime"; + DateTimeRfc1123: "DateTimeRfc1123"; + Object: "Object"; + Stream: "Stream"; + String: "String"; + TimeSpan: "TimeSpan"; + UnixTime: "UnixTime"; + Number: "Number"; + Composite: "Composite"; + Sequence: "Sequence"; + Dictionary: "Dictionary"; + Enum: "Enum"; +}; +//# sourceMappingURL=serializer.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/serializer.d.ts.map b/node_modules/@azure/core-http/types/latest/src/serializer.d.ts.map new file mode 100644 index 000000000..60885a265 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/serializer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../src/serializer.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAEvF,qBAAa,UAAU;aAEH,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;aACpC,KAAK,CAAC;gBADN,YAAY,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO,EACzC,KAAK,CAAC,qBAAS;IAGjC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAiEzE;;;;;;;;;;;;OAYG;IACH,SAAS,CACP,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,EACX,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,iBAAsB,GAC9B,GAAG;IA6FN;;;;;;;;;;;;OAYG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,GAAG,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAsB,GAC9B,GAAG;CA+FP;AA0xBD,MAAM,WAAW,iBAAiB;IAChC,gB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AsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAGD,wBAAgB,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAqBrD;AAaD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBrB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts b/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts new file mode 100644 index 000000000..299861716 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts @@ -0,0 +1,151 @@ +import { TokenCredential } from "@azure/core-auth"; +import { HttpClient } from "./httpClient"; +import { HttpOperationResponse, RestResponse } from "./httpOperationResponse"; +import { HttpPipelineLogger } from "./httpPipelineLogger"; +import { OperationArguments } from "./operationArguments"; +import { ParameterPath } from "./operationParameter"; +import { OperationSpec } from "./operationSpec"; +import { DeserializationContentTypes } from "./policies/deserializationPolicy"; +import { RequestPolicyFactory } from "./policies/requestPolicy"; +import { Mapper, Serializer } from "./serializer"; +import { RequestPrepareOptions, WebResourceLike } from "./webResource"; +import { OperationResponse } from "./operationResponse"; +import { ServiceCallback } from "./util/utils"; +import { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +import { InternalPipelineOptions } from "./pipelineOptions"; +/** + * Options to configure a proxy for outgoing requests (Node.js only). + */ +export interface ProxySettings { + /** + * The proxy's host address. + */ + host: string; + /** + * The proxy host's port. + */ + port: number; + /** + * The user name to authenticate with the proxy, if required. + */ + username?: string; + /** + * The password to authenticate with the proxy, if required. + */ + password?: string; +} +export declare type ProxyOptions = ProxySettings; +/** + * Options to be provided while creating the client. + */ +export interface ServiceClientOptions { + /** + * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP + * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns + * the requestPolicyFactories that will be used. + */ + requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]); + /** + * The HttpClient that will be used to send HTTP requests. + */ + httpClient?: HttpClient; + /** + * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline. + */ + httpPipelineLogger?: HttpPipelineLogger; + /** + * If set to true, turn off the default retry policy. + */ + noRetryPolicy?: boolean; + /** + * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30. + */ + rpRegistrationRetryTimeout?: number; + /** + * Whether or not to generate a client request ID header for each HTTP request. + */ + generateClientRequestIdHeader?: boolean; + /** + * Whether to include credentials in CORS requests in the browser. + * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information. + */ + withCredentials?: boolean; + /** + * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a + * header to all outgoing requests with this header name and a random UUID as the request ID. + */ + clientRequestIdHeaderName?: string; + /** + * The content-types that will be associated with JSON or XML serialization. + */ + deserializationContentTypes?: DeserializationContentTypes; + /** + * The header name to use for the telemetry header while sending the request. If this is not + * specified, then "User-Agent" will be used when running on Node.js and "x-ms-useragent" will + * be used when running in a browser. + */ + userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string); + /** + * The string to be set to the telemetry header while sending the request, or a function that + * takes in the default user-agent string and returns the user-agent string that will be used. + */ + userAgent?: string | ((defaultUserAgent: string) => string); + /** + * Proxy settings which will be used for every HTTP request (Node.js only). + */ + proxySettings?: ProxySettings; +} +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +export declare class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + protected baseUri?: string; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + protected requestContentType?: string; + /** + * The HTTP client that will be used to send requests. + */ + private readonly _httpClient; + private readonly _requestPolicyOptions; + private readonly _requestPolicyFactories; + private readonly _withCredentials; + /** + * The ServiceClient constructor + * @constructor + * @param credentials The credentials used for authentication with the service. + * @param options The service client options that govern the behavior of the client. + */ + constructor(credentials?: TokenCredential | ServiceClientCredentials, options?: ServiceClientOptions); + /** + * Send the provided httpRequest. + */ + sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise; +} +export declare function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void; +export declare function createPipelineFromOptions(pipelineOptions: InternalPipelineOptions, authPolicyFactory?: RequestPolicyFactory): ServiceClientOptions; +export declare type PropertyParent = { + [propertyName: string]: any; +}; +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export declare function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent; +export declare function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any; +export declare function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse; +//# sourceMappingURL=serviceClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts.map new file mode 100644 index 000000000..e31a20d18 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/serviceClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClient.d.ts","sourceRoot":"","sources":["../../../src/serviceClient.ts"],"names":[],"mappings":"AAG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,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA8B7F;;;;;OAKG;IACG,oBAAoB,CACxB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,QAAQ,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,GAC9B,OAAO,CAAC,YAAY,CAAC;CAsOzB;AAED,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,GAC3B,IAAI,CA+GN;AAqFD,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,uBAAuB,EACxC,iBAAiB,CAAC,EAAE,oBAAoB,GACvC,oBAAoB,CAmFtB;AAED,oBAAY,cAAc,GAAG;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,cAAc,CAYhG;AAiBD,wBAAgB,0CAA0C,CACxD,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,UAAU,GACrB,GAAG,CAmEL;AA6BD,wBAAgB,eAAe,CAC7B,SAAS,EAAE,qBAAqB,EAChC,YAAY,EAAE,iBAAiB,GAAG,SAAS,GAC1C,YAAY,CAqEd"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/url.d.ts b/node_modules/@azure/core-http/types/latest/src/url.d.ts new file mode 100644 index 000000000..4a93ea462 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/url.d.ts @@ -0,0 +1,153 @@ +/** + * A class that handles the query portion of a URLBuilder. + */ +export declare class URLQuery { + private readonly _rawQuery; + /** + * Get whether or not there any query parameters in this URLQuery. + */ + any(): boolean; + /** + * Get the keys of the query string. + */ + keys(): string[]; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + set(parameterName: string, parameterValue: any): void; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + get(parameterName: string): string | string[] | undefined; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + toString(): string; + /** + * Parse a URLQuery from the provided text. + */ + static parse(text: string): URLQuery; +} +/** + * A class that handles creating, modifying, and parsing URLs. + */ +export declare class URLBuilder { + private _scheme; + private _host; + private _port; + private _path; + private _query; + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + setScheme(scheme: string | undefined): void; + /** + * Get the scheme that has been set in this URL. + */ + getScheme(): string | undefined; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + setHost(host: string | undefined): void; + /** + * Get the host that has been set in this URL. + */ + getHost(): string | undefined; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + setPort(port: number | string | undefined): void; + /** + * Get the port that has been set in this URL. + */ + getPort(): string | undefined; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + setPath(path: string | undefined): void; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + appendPath(path: string | undefined): void; + /** + * Get the path that has been set in this URL. + */ + getPath(): string | undefined; + /** + * Set the query in this URL. + */ + setQuery(query: string | undefined): void; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + setQueryParameter(queryParameterName: string, queryParameterValue: any): void; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + getQueryParameterValue(queryParameterName: string): string | string[] | undefined; + /** + * Get the query in this URL. + */ + getQuery(): string | undefined; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + private set; + toString(): string; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + replaceAll(searchValue: string, replaceValue: string): void; + static parse(text: string): URLBuilder; +} +declare type URLTokenizerState = "SCHEME" | "SCHEME_OR_HOST" | "HOST" | "PORT" | "PATH" | "QUERY" | "DONE"; +declare type URLTokenType = "SCHEME" | "HOST" | "PORT" | "PATH" | "QUERY"; +export declare class URLToken { + readonly text: string; + readonly type: URLTokenType; + constructor(text: string, type: URLTokenType); + static scheme(text: string): URLToken; + static host(text: string): URLToken; + static port(text: string): URLToken; + static path(text: string): URLToken; + static query(text: string): URLToken; +} +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export declare function isAlphaNumericCharacter(character: string): boolean; +/** + * A class that tokenizes URL strings. + */ +export declare class URLTokenizer { + readonly _text: string; + readonly _textLength: number; + _currentState: URLTokenizerState; + _currentIndex: number; + _currentToken: URLToken | undefined; + constructor(_text: string, state?: URLTokenizerState); + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + current(): URLToken | undefined; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + next(): boolean; +} +export {}; +//# sourceMappingURL=url.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/url.d.ts.map b/node_modules/@azure/core-http/types/latest/src/url.d.ts.map new file mode 100644 index 000000000..a508f231b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/url.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/url.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2D;IAErF;;OAEG;IACI,GAAG,IAAI,OAAO;IAIrB;;OAEG;IACI,IAAI,IAAI,MAAM,EAAE;I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BAER,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,iBAAiB;IAMpE;;;OAGG;IACI,OAAO,IAAI,QAAQ,GAAG,SAAS;IAItC;;OAEG;IACI,IAAI,IAAI,OAAO;CAmCvB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts new file mode 100644 index 000000000..5c40c44b1 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts.map new file mode 100644 index 000000000..1d1a90ce4 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/base64.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.browser.d.ts","sourceRoot":"","sources":["../../../../src/util/base64.browser.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAOtD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts b/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts new file mode 100644 index 000000000..1dfd806b7 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts.map new file mode 100644 index 000000000..2b42c1c72 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../../src/util/base64.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAKzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEtD"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts b/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts new file mode 100644 index 000000000..6cc35d4d6 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts @@ -0,0 +1,100 @@ +export declare const Constants: { + /** + * The core-http version + * @const + * @type {string} + */ + coreHttpVersion: string; + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: string; + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: string; + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: string; + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: string; + /** + * Specifies NO Proxy. + * + * @const + * @type {string} + */ + NO_PROXY: string; + /** + * Specifies ALL Proxy. + * + * @const + * @type {string} + */ + ALL_PROXY: string; + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: string; + GET: string; + DELETE: string; + POST: string; + MERGE: string; + HEAD: string; + PATCH: string; + }; + StatusCodes: { + TooManyRequests: number; + }; + }; + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: string; + AUTHORIZATION_SCHEME: string; + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: string; + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: string; + }; +}; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts.map new file mode 100644 index 000000000..193520b75 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/util/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;IACpB;;;;OAIG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;;QAID;;;;;WAKG;;;;;;;;;;;;;;IAgBL;;OAEG;;QAED;;;;;WAKG;;;QAKH;;;;;;;WAOG;;QAGH;;;;;WAKG;;;CAGN,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts b/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts new file mode 100644 index 000000000..a080a31f0 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts @@ -0,0 +1,40 @@ +import { HttpOperationResponse } from "../coreHttp"; +export declare const DEFAULT_CLIENT_RETRY_COUNT = 3; +export declare const DEFAULT_CLIENT_RETRY_INTERVAL: number; +export declare const DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number; +export declare const DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number; +export declare function isNumber(n: any): n is number; +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} +/** + * @internal + * Determines if the operation should be retried. + * + * @param {number} retryLimit Specifies the max number of retries. + * @param {(response?: HttpOperationResponse, error?: RetryError) => boolean} predicate Initial chekck on whether to retry based on given responses or errors + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +export declare function shouldRetry(retryLimit: number, predicate: (response?: HttpOperationResponse, error?: RetryError) => boolean, retryData: RetryData, response?: HttpOperationResponse, error?: RetryError): boolean; +/** + * @internal + * Updates the retry data for the next attempt. + * + * @param {RetryPolicyOptions} retryOptions specifies retry interval, and its lower bound and upper bound. + * @param {RetryData} [retryData] The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +export declare function updateRetryData(retryOptions: { + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; +}, retryData?: RetryData, err?: RetryError): RetryData; +//# sourceMappingURL=exponentialBackoffStrategy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts.map new file mode 100644 index 000000000..73a7ac2f6 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/exponentialBackoffStrategy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialBackoffStrategy.d.ts","sourceRoot":"","sources":["../../../../src/util/exponentialBackoffStrategy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,eAAO,MAAM,6BAA6B,QAAY,CAAC;AACvD,eAAO,MAAM,iCAAiC,QAAY,CAAC;AAC3D,eAAO,MAAM,iCAAiC,QAAW,CAAC;AAE1D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,MAAM,CAE5C;AACD,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAAE,KAAK,CAAC,EAAE,UAAU,KAAK,OAAO,EAC5E,SAAS,EAAE,SAAS,EACpB,QAAQ,CAAC,EAAE,qBAAqB,EAChC,KAAK,CAAC,EAAE,UAAU,GACjB,OAAO,CAMT;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,EAC3F,SAAS,GAAE,SAA+C,EAC1D,GAAG,CAAC,EAAE,UAAU,GACf,SAAS,CAyBX"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts new file mode 100644 index 000000000..e136c5382 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts @@ -0,0 +1,2 @@ +export declare const custom: {}; +//# sourceMappingURL=inspect.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts.map new file mode 100644 index 000000000..d35d3353b --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/inspect.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.browser.d.ts","sourceRoot":"","sources":["../../../../src/util/inspect.browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,IAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts b/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts new file mode 100644 index 000000000..cd664b8ca --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts @@ -0,0 +1,2 @@ +export declare const custom: symbol; +//# sourceMappingURL=inspect.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts.map new file mode 100644 index 000000000..37ed38baa --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/inspect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/util/inspect.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,QAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts b/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts new file mode 100644 index 000000000..0098cd991 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts @@ -0,0 +1,26 @@ +export interface SanitizerOptions { + /** + * Header names whose values will be logged when logging is enabled. Defaults to + * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers + * specified in this field will be added to that list. Any other values will + * be written to logs as "REDACTED". + */ + allowedHeaderNames?: string[]; + /** + * Query string names whose values will be logged when logging is enabled. By default no + * query string values are logged. + */ + allowedQueryParameters?: string[]; +} +export declare class Sanitizer { + allowedHeaderNames: Set; + allowedQueryParameters: Set; + constructor({ allowedHeaderNames, allowedQueryParameters }?: SanitizerOptions); + sanitize(obj: object): string; + private replacer; + private sanitizeHeaders; + private sanitizeQuery; + private sanitizeObject; + private sanitizeUrl; +} +//# sourceMappingURL=sanitizer.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts.map new file mode 100644 index 000000000..facf5a754 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/sanitizer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../../../src/util/sanitizer.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACnC;AA+CD,qBAAa,SAAS;IACb,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;gBAE/B,EAAE,kBAAuB,EAAE,sBAA2B,EAAE,GAAE,gBAAqB;IAapF,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIpC,OAAO,CAAC,QAAQ;IA8BhB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,WAAW;CAsBpB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts b/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts new file mode 100644 index 000000000..cd9881b5d --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts @@ -0,0 +1,26 @@ +/** + * Default key used to access the XML attributes. + */ +export declare const XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +export declare const XML_CHARKEY = "_"; +/** + * Options to govern behavior of xml parser and builder. + */ +export interface SerializerOptions { + /** + * indicates the name of the root element in the resulting XML when building XML. + */ + rootName?: string; + /** + * indicates whether the root element is to be included or not in the output when parsing XML. + */ + includeRoot?: boolean; + /** + * key used to access the XML value content when parsing XML. + */ + xmlCharKey?: string; +} +//# sourceMappingURL=serializer.common.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts.map new file mode 100644 index 000000000..c6abf329a --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/serializer.common.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.common.d.ts","sourceRoot":"","sources":["../../../../src/util/serializer.common.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B;;GAEG;AACH,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts b/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts new file mode 100644 index 000000000..560660d35 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts @@ -0,0 +1,132 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { RestError } from "../restError"; +import { WebResourceLike } from "../webResource"; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export declare const isNode: boolean; +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export declare function urlIsHTTPS(urlToCheck: { + protocol: string; +}): boolean; +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export declare function encodeUri(uri: string): string; +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export declare function stripResponse(response: HttpOperationResponse): any; +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResourceLike} request The Http Request object + * + * @return {WebResourceLike} The stripped version of Http Request. + */ +export declare function stripRequest(request: WebResourceLike): WebResourceLike; +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export declare function isValidUuid(uuid: string): boolean; +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export declare function generateUuid(): string; +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export declare function executePromisesSequentially(promiseFactories: Array, kickstart: any): Promise; +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export declare function delay(t: number, value?: T): Promise; +/** + * Service callback that is returned for REST requests initiated by the service client. + */ +export interface ServiceCallback { + /** + * A method that will be invoked as a callback to a service function. + * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null. + * @param {TResult} [result] The deserialized response body if an error did not occur. + * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur. + * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur. + */ + (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void; +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export declare function promiseToCallback(promise: Promise): Function; +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export declare function promiseToServiceCallback(promise: Promise): Function; +export declare function prepareXMLRootList(obj: any, elementName: string, xmlNamespaceKey?: string, xmlNamespace?: string): { + [s: string]: any; +}; +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export declare function applyMixins(targetCtor: any, sourceCtors: any[]): void; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export declare function isDuration(value: string): boolean; +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export declare function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined; +/** + * Determines whether the given entity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param {any} value Any entity + * @return {boolean} - true is it is primitive type, false otherwise. + */ +export declare function isPrimitiveType(value: any): boolean; +export declare function getEnvironmentValue(name: string): string | undefined; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts.map new file mode 100644 index 000000000..5bc057a74 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/util/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKjD;;GAEG;AACH,eAAO,MAAM,MAAM,SAIM,CAAC;AAE1B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,qBAAqB,GAAG,GAAG,CAMlE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAMtE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,EAC5B,SAAS,EAAE,GAAG,GACb,OAAO,CAAC,GAAG,CAAC,CAMd;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO;IACtC;;;;;;OAMG;IACH,CACE,GAAG,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI,EAC7B,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,IAAI,CAAC;CACT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAejE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAa7F;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EACxB,YAAY,CAAC,EAAE,MAAM,GACpB;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAUtB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAMrE;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEnD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOpE"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts b/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts new file mode 100644 index 000000000..e167464c7 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts @@ -0,0 +1,4 @@ +import { SerializerOptions } from "./serializer.common"; +export declare function parseXML(str: string, opts?: SerializerOptions): Promise; +export declare function stringifyXML(content: any, opts?: SerializerOptions): string; +//# sourceMappingURL=xml.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts.map new file mode 100644 index 000000000..e3919fbf8 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/xml.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.browser.d.ts","sourceRoot":"","sources":["../../../../src/util/xml.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAMlF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,GAAG,CAAC,CAqBhF;AAoFD,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,GAAE,iBAAsB,GAAG,MAAM,CAU/E"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts b/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts new file mode 100644 index 000000000..82bc469d1 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts @@ -0,0 +1,16 @@ +import { SerializerOptions } from "./serializer.common"; +/** + * Converts given JSON object to XML string + * @param obj JSON object to be converted into XML string + * @param opts Options that govern the parsing of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ +export declare function stringifyXML(obj: any, opts?: SerializerOptions): string; +/** + * Converts given XML string into JSON + * @param str String containing the XML content to be parsed into JSON + * @param opts Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +export declare function parseXML(str: string, opts?: SerializerOptions): Promise; +//# sourceMappingURL=xml.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts.map b/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts.map new file mode 100644 index 000000000..145dcb56c --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/util/xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../../src/util/xml.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA0DlF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE,iBAAsB,GAAG,MAAM,CAK3E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,GAAG,CAAC,CAiBhF"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/webResource.d.ts b/node_modules/@azure/core-http/types/latest/src/webResource.d.ts new file mode 100644 index 000000000..7d6aa9eeb --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/webResource.d.ts @@ -0,0 +1,345 @@ +/// +import { HttpHeadersLike } from "./httpHeaders"; +import { OperationSpec } from "./operationSpec"; +import { Mapper } from "./serializer"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { OperationResponse } from "./operationResponse"; +import { ProxySettings } from "./serviceClient"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { SpanOptions } from "@azure/core-tracing"; +import { SerializerOptions } from "./util/serializer.common"; +export declare type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; +export declare type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream); +/** + * Fired in response to upload or download progress. + */ +export declare type TransferProgressEvent = { + /** + * The number of bytes loaded so far. + */ + loadedBytes: number; +}; +export interface WebResourceLike { + /** + * The URL being accessed by the request. + */ + url: string; + /** + * The HTTP method to use when making the request. + */ + method: HttpMethods; + /** + * The HTTP body contents of the request. + */ + body?: any; + /** + * The HTTP headers to use when making the request. + */ + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse; + formData?: any; + /** + * A query string represented as an object. + */ + query?: { + [key: string]: any; + }; + /** + * Used to parse the response. + */ + operationSpec?: OperationSpec; + /** + * If credentials (cookies) should be sent along during an XHR. + */ + withCredentials: boolean; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout: number; + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + /** + * If the connection should be reused. + */ + keepAlive?: boolean; + /** + * Whether or not to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + /** + * A unique identifier for the request. Used for logging and tracing. + */ + requestId: string; + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Sets options on the request. + */ + prepare(options: RequestPrepareOptions): WebResourceLike; + /** + * Clone this request object. + */ + clone(): WebResourceLike; +} +export declare function isWebResourceLike(object: any): object is WebResourceLike; +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +export declare class WebResource implements WebResourceLike { + url: string; + method: HttpMethods; + body?: any; + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse; + formData?: any; + query?: { + [key: string]: any; + }; + operationSpec?: OperationSpec; + withCredentials: boolean; + timeout: number; + proxySettings?: ProxySettings; + keepAlive?: boolean; + /** + * Whether or not to decompress response according to Accept-Encoding header (node-fetch only) + */ + decompressResponse?: boolean; + requestId: string; + abortSignal?: AbortSignalLike; + /** Callback which fires upon upload progress. */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + constructor(url?: string, method?: HttpMethods, body?: any, query?: { + [key: string]: any; + }, headers?: { + [key: string]: any; + } | HttpHeadersLike, streamResponseBody?: boolean, withCredentials?: boolean, abortSignal?: AbortSignalLike, timeout?: number, onUploadProgress?: (progress: TransferProgressEvent) => void, onDownloadProgress?: (progress: TransferProgressEvent) => void, proxySettings?: ProxySettings, keepAlive?: boolean, decompressResponse?: boolean); + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + prepare(options: RequestPrepareOptions): WebResource; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + clone(): WebResource; +} +export interface RequestPrepareOptions { + /** + * The HTTP request method. Valid values are "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", + * or "PATCH". + */ + method: HttpMethods; + /** + * The request url. It may or may not have query parameters in it. Either provide the "url" or + * provide the "pathTemplate" in the options object. Both the options are mutually exclusive. + */ + url?: string; + /** + * A dictionary of query parameters to be appended to the url, where + * the "key" is the "query-parameter-name" and the "value" is the "query-parameter-value". + * The "query-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "query-parameter-value". + * Example: + * - query-parameter-value in "object" format: { "query-parameter-name": { value: "query-parameter-value", skipUrlEncoding: true } } + * - query-parameter-value in "string" format: { "query-parameter-name": "query-parameter-value"}. + * Note: "If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url. + */ + queryParameters?: { + [key: string]: any | ParameterValue; + }; + /** + * The path template of the request url. Either provide the "url" or provide the "pathTemplate" in + * the options object. Both the options are mutually exclusive. + * Example: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" + */ + pathTemplate?: string; + /** + * The base url of the request. Default value is: "https://management.azure.com". This is + * applicable only with pathTemplate. If you are providing options.url then it is expected that + * you provide the complete url. + */ + baseUrl?: string; + /** + * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate. + * Here the key is the "path-parameter-name" and the value is the "path-parameter-value". + * The "path-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "path-parameter-value". + * Example: + * - path-parameter-value in "object" format: { "path-parameter-name": { value: "path-parameter-value", skipUrlEncoding: true } } + * - path-parameter-value in "string" format: { "path-parameter-name": "path-parameter-value" }. + */ + pathParameters?: { + [key: string]: any | ParameterValue; + }; + formData?: { + [key: string]: any; + }; + /** + * A dictionary of request headers that need to be applied to the request. + * Here the key is the "header-name" and the value is the "header-value". The header-value MUST be of type string. + * - ContentType must be provided with the key name as "Content-Type". Default value "application/json; charset=utf-8". + * - "Transfer-Encoding" is set to "chunked" by default if "options.bodyIsStream" is set to true. + * - "Content-Type" is set to "application/octet-stream" by default if "options.bodyIsStream" is set to true. + * - "accept-language" by default is set to "en-US" + * - "x-ms-client-request-id" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true + */ + headers?: { + [key: string]: any; + }; + /** + * When set to true, instructs the client to not set "x-ms-client-request-id" header to a new Guid(). + */ + disableClientRequestId?: boolean; + /** + * The request body. It can be of any type. This value will be serialized if it is not a stream. + */ + body?: any; + /** + * Provides information on how to serialize the request body. + */ + serializationMapper?: Mapper; + /** + * A dictionary of mappers that may be used while [de]serialization. + */ + mappers?: { + [x: string]: any; + }; + /** + * Provides information on how to deserialize the response body. + */ + deserializationMapper?: object; + /** + * Indicates whether this method should JSON.stringify() the request body. Default value: false. + */ + disableJsonStringifyOnBody?: boolean; + /** + * Indicates whether the request body is a stream (useful for file upload scenarios). + */ + bodyIsStream?: boolean; + abortSignal?: AbortSignalLike; + onUploadProgress?: (progress: TransferProgressEvent) => void; + onDownloadProgress?: (progress: TransferProgressEvent) => void; + spanOptions?: SpanOptions; +} +/** + * The Parameter value provided for path or query parameters in RequestPrepareOptions + */ +export interface ParameterValue { + value: any; + skipUrlEncoding: boolean; + [key: string]: any; +} +/** + * Describes the base structure of the options object that will be used in every operation. + */ +export interface RequestOptionsBase { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * Options used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; + [key: string]: any; + /** + * Options to override XML parsing/building behavior. + */ + serializerOptions?: SerializerOptions; +} +//# sourceMappingURL=webResource.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/webResource.d.ts.map b/node_modules/@azure/core-http/types/latest/src/webResource.d.ts.map new file mode 100644 index 000000000..f5aaa09ea --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/webResource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webResource.d.ts","sourceRoot":"","sources":["../../../src/webResource.ts"],"names":[],"mappings":";AAGA,OAAO,EAAe,eAAe,EAAqB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAc,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,oBAAY,WAAW,GACnB,KAAK,GACL,KAAK,GACL,MAAM,GACN,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AACZ,oBAAY,eAAe,GACvB,IAAI,GACJ,MAAM,GACN,WAAW,GACX,eAAe,GACf,CAAC,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;AAElC;;GAEG;AACH,oBAAY,q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AM,CAAA;KAAE,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE/D;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,qBAAqB,KAAK,OAAO,CAAC,CAAC;IAE7E;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAEnB;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts b/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts new file mode 100644 index 000000000..51faf05b1 --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts @@ -0,0 +1,12 @@ +import { HttpClient } from "./httpClient"; +import { HttpHeadersLike } from "./httpHeaders"; +import { WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +export declare class XhrHttpClient implements HttpClient { + sendRequest(request: WebResourceLike): Promise; +} +export declare function parseHeaders(xhr: XMLHttpRequest): HttpHeadersLike; +//# sourceMappingURL=xhrHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts.map b/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts.map new file mode 100644 index 000000000..6c51420ce --- /dev/null +++ b/node_modules/@azure/core-http/types/latest/src/xhrHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xhrHttpClient.d.ts","sourceRoot":"","sources":["../../../src/xhrHttpClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAe,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAyB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH,qBAAa,aAAc,YAAW,UAAU;IACvC,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAwG7E;AAgBD,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,eAAe,CAajE"} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/CHANGELOG.md b/node_modules/@azure/core-lro/CHANGELOG.md new file mode 100644 index 000000000..62bda0ba0 --- /dev/null +++ b/node_modules/@azure/core-lro/CHANGELOG.md @@ -0,0 +1,19 @@ +# Release History + +## 1.0.2 (2020-04-28) +- Moved `@opentelemetry/types` to the `devDependencies`. + +## 1.0.1 (2020-02-28) + +- `getOperationState()` now returns `TState`. +- `TState` of `PollerLike` can be a subset of `TState` of `Poller`, + +## 1.0.0 (2019-10-29) + +This release marks the general availability of the `@azure/core-lro` package. + +- Updated PollOperation to be more strictly typed. + +## 1.0.0-preview.1 (2019-10-22) + +- Initial implementation of an abstraction for Long Running Operations (LROs). diff --git a/node_modules/@azure/core-lro/LICENSE b/node_modules/@azure/core-lro/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-lro/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-lro/README.md b/node_modules/@azure/core-lro/README.md new file mode 100644 index 000000000..9c1da753e --- /dev/null +++ b/node_modules/@azure/core-lro/README.md @@ -0,0 +1,372 @@ +# Azure Core LRO client library for JavaScript + +Azure's Core LRO is a JavaScript library that provides an API that aims to +allow the azure-sdk-for-js public libraries to implement fully featured pollers +to manage Long Running Operations (LROs) with the Azure services. + +@azure/core-lro is made following our guidelines here: https://azure.github.io/azure-sdk/typescript_design.html#ts-lro + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-lro) + +## Getting started + +### Install the package + +To install this package locally, use `npm install --save @azure/core-lro`. + +### Configure TypeScript + +TypeScript users need to have Node type definitions installed: + +```bash +npm install @types/node +``` + +They will also need to enable `compilerOptions.allowSyntheticDefaultImports` in their +`tsconfig.json`. Note that if you have enabled `compilerOptions.esModuleInterop`, +`allowSyntheticDefaultImports` is enabled by default. +See [TypeScript's compiler options handbook](https://www.typescriptlang.org/docs/handbook/compiler-options.html) +for more information. + +## Key concepts + +@azure/core-lro makes a distinction between the Long Running Operation and its Poller. + +- Whenever we talk about an **operation**, we mean the static representation of a Long Running Operation. + Any operation will have a definition of a **state**, which has an opinionated default set of properties. + The definition of the operation will also have functions that will define how to request new information + about the pending operation, how to request its cancellation, and how to serialize it. +- A **Poller** is an object who's main function is to interact with an operation until the poller is manually stopped, + the operation finishes (either by succeeding or failing) or if a manual request to cancel the operation has succeeded. + Some characteristics of the pollers are: + - Pollers show the status of the polling behavior. + - Pollers support manual as well as automatic polling. + - Pollers are serializable and can resume from a serialized operation. + - Pollers also specify how much of the operation's state is going to be available to the public. +- A **PollerLike** is the public interface of a Poller, which allows for different implementations to be used. + +## Examples + +You will be able to find some working examples of an implementation of an operation and a poller both in +our test files: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-lro/test +as well as in the azure-sdk-for-js libraries that might be currently using core-lro, which can be found here: +https://github.com/Azure/azure-sdk-for-js/search?q="from+%40azure%5C%2Fcore-lro"&unscoped_q="from+%40azure%5C%2Fcore-lro" + +### Implementing an operation + +To work with a Long Running Operation, we need to define how to update, cancel +and serialize the information related to the remote pending task. +To implement this class for your library or application, +you'll need to import the definitions of a poll operation and its state. + +```typescript +import { PollOperationState, PollOperation } from "@azure/core-lro"; +``` + +A `PollOperation` is an interface that defines how to update the local reference of the state +of the remote long running operation, just as well as how to request the cancellation of the same operation. +Besides updating and cancelling, it also defines how to serialize its information, +so that polling can be resumed at any time from a previously serialized operation +(more at [Serializing an operation](#serializing-an-operation)). + +`PollOperationState` provides a basic state for the poll operation. +It contains the minimal set of properties needed +to keep track of a long running operation, and it's intended to be extended +with any custom property that your program might need. +The state can be updated any time, but it should be updated at least in three opportunities: +when the operation starts, when it's finished, and when it's cancelled. + +To be able to create your custom operations, you'll need to extend the +`PollOperation` class with both your operation's state and the final result +value. For this example, we'll think on the final result value to be `MyResult`, +which can be any type. + +```typescript +import { PollOperationState, PollOperation } from "@azure/core-lro"; + +export interface MyOperationState extends PollOperationState { + serviceClient: any; // You define all of these properties + myCustomString: string; + startedAt: Date; + finishedAt: Date; + // ... and so on +} + +export interface MyPollOperation extends PollOperation {} +``` + +We recommend making a utility function to create new instances of your operation. Just like the following: + +```typescript +function makeOperation( + state: MyOperationState, +): MyOperation { + return { + // We recommend creating copies of the given state, + // just to make sure that no references are left or manipulated by mistake. + state: { + ...state, + }, + update, + cancel, + toString + }; +} +``` + +To properly define an operation, you will need to have implemented these three functions: `update`, `cancel` and `toString`. +A guide on how to write them follows. + +#### Your operation's update method + +The `update` method defines how to request the remote service for updates on the status of the long running operation. + +It optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](https://github.com/Azure/azure-sdk-for-js/tree/f5ad8a25fd399564518f526a060a372e602f30c5/sdk/core/abort-controller)'s `AbortSignalLike`. + +A more advanced use allows passing in a `fireProgress` function, which, if called, is responsible for triggering the +poller's `onProgress` callbacks. + +Here is an example of how to write an update method for your operation: + +```typescript +async function update( + this: MyOperation, + options: { + abortSignal?: AbortSignalLike; + fireProgress?: (state: MyOperationState) => void; + } = {} +): Promise { + let isDone: boolean = false; + let doFireProgress: boolean = false; + + // Asynchronously call your service client... + + // You might update the operation's state at any point + if (isDone) { + this.state.completed = true; + this.state.result = "Done"; + } + + // You can also arbitrarily report progress + if (doFireProgress) { + options.fireProgress(state); + } + + return makeOperation(this.state); +} +``` + +#### Your operation's cancel method + +The operation's `cancel` method should attempt to cancel the pending operation, if it's allowed by the remote service. +Otherwise, it should throw. + +It only optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](https://github.com/Azure/azure-sdk-for-js/tree/f5ad8a25fd399564518f526a060a372e602f30c5/sdk/core/abort-controller)'s `AbortSignalLike`. + +It returns a promise that should be resolved with an updated version of the poller's operation. + +```typescript +async function cancel( + this: MyOperation, + options: { abortSignal?: AbortSignalLike } = {} +): Promise { + // ... Reach out to your service to trigger the cancellation of the operation ... + + return makeOperation( + { + ...this.state, + cancelled: true + } + ); +} +``` + +#### Serializing an operation + +The operation's method `toString` returns a string with a serialized representation of the operation. +It's useful when a poller wants to be resumed from a previously serialized state. + +The deserialization of the operation has to be implemented within the constructor of a class that extends +the Poller class. You can read more at [Resuming from a previous poller](#resuming-from-a-previous-poller). + +```typescript +function toString(this: MyOperation): string { + return JSON.stringify({ + state: { + ...this.state, + // Only the plain text properties, for example + } + }); +} +``` + +### Implementing a poller + +@azure/core-lro's `Poller` is a class that represents the definition of a program that polls +through consecutive requests until it reaches a state of completion. + +A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, +until its operation is completed. +It also provides a way to wait until the operation finishes, by calling `pollUntilDone()`, which returns a promise. +Pollers can also request the cancellation of the ongoing process (internally using `PollOperation`'s `cancel()` method). + +The Poller needs two types to be defined, a type representing the state of the poller, which +must include a basic set of properties from `PollOperationState` (as mentioned in [Implementing an operation](#implementing-an-operation)), and a return type defined by `TResult`, which can be anything. + +To implement a poller, you must pull in the definitions of your operation and extend @azure/core-lro's `Poller` class, as follows: + +```typescript +import { Poller } from "@azure/core-lro"; +import { makeOperation, MyOperation, MyOperationState } from "./myOperation"; + +// See that "MyResult" here is the type of the result +export class MyPoller extends Poller { + constructor( + baseOperation?: MyOperation, + onProgress?: (state: MyOperationState) => void + ) { + let state: MyOperationState = {}; + + if (baseOperation) { + state = baseOperation.state; + } + + const operation = makeOperation(state); + + super(operation); + + // Setting up the poller to call progress when the operation decides. + // This ties to the operation's update method, which receives a + // fireProgress method in the optional properties. + if (onProgress) { + this.onProgress(onProgress); + } + } + + async delay(): Promise { + // Your own implementation of a delay + } +} +``` + +Once defined, you'll be able to use your poller as shown below: + +```ts +const poller = new MyPoller(); + +// Polling just once: +await poller.poll(); + +// We can try to cancel the request here, by calling: +// +// await poller.cancelOperation(); +// + +// Getting the final result: +const result = await poller.pollUntilDone(); +``` + +The Poller class implements the `PollerLike` interface, which allows poller implementations that avoid having +to export the Poller's class directly, and instead only export the already instantiated poller with the `PollerLike` type. + +An example of the definition of a client that returns an instantiated poller can be seen below: + +```ts +class Client { + public async makePoller: PollerLike { + const poller = new MyPoller({}); + // It might be preferred to return the poller after the first request is made, + // so that some information can be obtained right away. + await poller.poll(); + return poller; + } +} + +// No knowledge of the class MyPoller: +const poller: PollerLike = myClient.makePoller(); +``` + +A poller can be created through its constructor, then it can be polled until it's completed. +At any point in time, the state of the poller can be obtained without delay through the getOperationState method. +At any point in time, the intermediate forms of the result type can be requested without delay. +Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + +Here's an example usage of your client's poller: + +```ts +const poller = myClient.makePoller(); +const state: MyOperationState = poller.getOperationState(); + +// The intermediate result can be obtained at any time. +const result: MyResult | undefined = poller.getResult(); + +// The final result can only be obtained after the poller finishes. +const result: MyResult = await poller.pollUntilDone(); +``` + +#### Resuming from a previous poller + +Pollers by default have a method called `toString` that invokes the operation's `toString` method. +It can be used to store the state of a poller indefinitely, to then resume by creating another poller at any time in the future. + +If an operation's `toString` method is defined as follows: + +```ts +function toString(this: TestOperation): string { + return JSON.stringify({ + state: this.state + }); +} +``` + +A custom implementation of a poller can deserialize it by receiving this string and converting it back to JSON, like in the following example: + +```ts +export class MyPoller extends Poller { + constructor( + baseOperation: string | undefined + ) { + let state: MyOperationState = {}; + if (baseOperation) { + state = { + ...JSON.parse(baseOperation).state, + ...state + }; + } + const operation = { + state, + // ... + } + super(operation); + } +} +``` + +## Troubleshooting + +### Enable logs + +Logs can be added at the discretion of the library implementing the Long Running Operation poller. +Packages inside of [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) use +[@azure/logger](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/f5ad8a25fd399564518f526a060a372e602f30c5/sdk/core/core-lro/samples) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +### Testing + +To run our tests, first install the dependencies (with `npm install` or `rush install`), +then run the unit tests with: `npm run unit-test`. + +### Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-lro%2FREADME.png) diff --git a/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js b/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js new file mode 100644 index 000000000..4051be71c --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js @@ -0,0 +1,255 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var src_1 = require("../../src"); +var core_http_1 = require("@azure/core-http"); +/** + * A utility method that builds an instance of the sample poll operation with some default methods. + */ +function makeSamplePollOperation(state) { + return { + /** + * To ensure the state is always clean of previously used references, we're making a copy of it. + */ + state: tslib_1.__assign(tslib_1.__assign({}, state), { previousResponses: tslib_1.__spreadArrays(state.previousResponses) }), + /** + * The update method should change the operation's state. + * In our case, we'll be calling the Client's makeRequest. + */ + update: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var state, _a, _b; + return tslib_1.__generator(this, function (_c) { + switch (_c.label) { + case 0: + state = tslib_1.__assign({}, this.state); + if (!!state.isStarted) return [3 /*break*/, 2]; + _a = state; + return [4 /*yield*/, state.client.makeRequest()]; + case 1: + _a.result = _c.sent(); + state.isStarted = true; + return [3 /*break*/, 4]; + case 2: + if (!!state.isCompleted) return [3 /*break*/, 4]; + _b = state; + return [4 /*yield*/, state.client.makeRequest()]; + case 3: + _b.result = _c.sent(); + if (state.client.isDone(state.result.value)) { + state.isCompleted = true; + } + _c.label = 4; + case 4: + state.previousResponses.push(state.result); + return [2 /*return*/, makeSamplePollOperation(state)]; + } + }); + }); + }, + /** + * The cancel method can be called to send a cancelling signal to the remote service. + * If cancelling isn't supported, an error can be thrown instead. + */ + cancel: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var state, _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + state = this.state; + _a = state; + return [4 /*yield*/, state.client.cancel()]; + case 1: + _a.result = _b.sent(); + state.previousResponses.push(state.result); + return [2 /*return*/, makeSamplePollOperation(tslib_1.__assign(tslib_1.__assign({}, state), { isCancelled: true }))]; + } + }); + }); + }, + /** + * The toString method serializes the PollOperationState, so that + * one poller can be stopped and another poller can recover at any time + * based on a copy of the first one. + */ + toString: function () { + return JSON.stringify({ + state: this.state + }); + } + }; +} +/** + * Here's our sample's poller. + * It will work over our SamplePollOperationState. + * Once the polling is completed, it will return an instance of the ReturnValue interface. + */ +var SamplePoller = /** @class */ (function (_super) { + tslib_1.__extends(SamplePoller, _super); + function SamplePoller(_a) { + var client = _a.client, _b = _a.intervalInMs, intervalInMs = _b === void 0 ? 2000 : _b, resumeFrom = _a.resumeFrom; + var _this = this; + var state = { + client: client, + previousResponses: [] + }; + // Here's an example of how to resume from the serialized version of a previously defined poller. + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + // Making a new instance of the SamplePollOperation + var operation = makeSamplePollOperation(state); + _this = _super.call(this, operation) || this; + _this.intervalInMs = intervalInMs; + return _this; + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + SamplePoller.prototype.delay = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, core_http_1.delay(this.intervalInMs)]; + }); + }); + }; + /** + * Could be used to get a publicly safe version of the poller state. + */ + SamplePoller.prototype.getOperationState = function () { + return this.operation.state; + }; + return SamplePoller; +}(src_1.Poller)); +/** + * Now it's time to define our Client. + * Our client will have four public methods: + * `makeRequest()` attempts to emulate the network request, + * `cancel()` which portrays how to tell the remote resource to cancel the long running operation, + * and `beginLongOperation()`, the method that returns the poller. + */ +var Client = /** @class */ (function () { + function Client() { + /** + * We'll keep track of the number of requests through this private property. + * This is just to demonstrate the poller's behavior. + */ + this.requestCount = 0; + } + /** + * isDone is here to represent a way to determine if the response from the service indicates that the long running operation has finished. + * In this sample we're considering a number value of 3 to be the only indicator that the operation has finished. + */ + Client.prototype.isDone = function (value) { + return value === 3; + }; + /** + * cancel should reach out to the remote service to indicate that the + * long running operation should be cancelled. In our case it simply returns a value, + * the poller will stop nonetheless. + */ + Client.prototype.cancel = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + return [2 /*return*/, { + value: 0 + }]; + }); + }); + }; + /** + * makeRequest simulates a method that reaches out to a remote resource that responds differently each time + */ + Client.prototype.makeRequest = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + // Let's assume the HTTP request happens here. + return [4 /*yield*/, core_http_1.delay(1000)]; + case 1: + // Let's assume the HTTP request happens here. + _a.sent(); + return [2 /*return*/, { + value: this.requestCount++ + }]; + } + }); + }); + }; + Client.prototype.beginLongOperation = function (options) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var poller; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + poller = new SamplePoller(tslib_1.__assign({ client: this }, options)); + return [4 /*yield*/, poller.poll()]; + case 1: + _a.sent(); + return [2 /*return*/, poller]; + } + }); + }); + }; + return Client; +}()); +// Now let's see how the client is used. +function main() { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var client, poller, result, serialized; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new Client(); + return [4 /*yield*/, client.beginLongOperation()]; + case 1: + poller = _a.sent(); + console.log(poller.getResult()); // Should show: { value: 1 } + return [4 /*yield*/, poller.pollUntilDone()]; + case 2: + result = _a.sent(); + console.log(result); // Should show: { value: 3 } + return [4 /*yield*/, client.beginLongOperation()]; + case 3: + // We can start again and do each call individually + poller = _a.sent(); + console.log(poller.getResult()); // Should show: { value: 1 } + return [4 /*yield*/, poller.poll()]; + case 4: + _a.sent(); + console.log(poller.getResult()); // Should show: { value: 2 } + return [4 /*yield*/, poller.poll()]; + case 5: + _a.sent(); + console.log(poller.getResult()); // Should show: { value: 3 } + console.log(poller.isDone()); // Should be: true + return [4 /*yield*/, client.beginLongOperation()]; + case 6: + // We can also start it, then serialize it, then resume it with a different poller + poller = _a.sent(); + console.log(poller.getResult()); // Should show: { value: 1 } + serialized = poller.toString(); + return [4 /*yield*/, client.beginLongOperation({ resumeFrom: serialized })]; + case 7: + poller = _a.sent(); + console.log(poller.getResult()); // Should show: { value: 2 } + return [4 /*yield*/, poller.poll()]; + case 8: + _a.sent(); + console.log(poller.getResult()); // Should show: { value: 3 } + console.log(poller.isDone()); // Should be: true + return [2 /*return*/]; + } + }); + }); +} +main().catch(function (err) { + console.log("error code: ", err.code); + console.log("error message: ", err.message); + console.log("error stack: ", err.stack); +}); +//# sourceMappingURL=samplesClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js.map b/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js.map new file mode 100644 index 000000000..a5c3d1563 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/samples/typescript/samplesClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"samplesClient.js","sourceRoot":"","sources":["../../../samples/typescript/samplesClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,iCAAkF;AAClF,8CAAyC;AAuCzC;;GAEG;AACH,SAAS,uBAAuB,CAAC,KAA+B;IAC9D,OAAO;QACL;;WAEG;QACH,KAAK,wCACA,KAAK,KACR,iBAAiB,yBAAM,KAAK,CAAC,iBAAiB,IAC/C;QACD;;;WAGG;QACG,MAAM,EAAZ;;;;;;4BACQ,KAAK,wBACN,IAAI,CAAC,KAAK,CACd,CAAC;iCAEE,CAAC,KAAK,CAAC,SAAS,EAAhB,wBAAgB;4BAClB,KAAA,KAAK,CAAA;4BAAU,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,EAA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CAAC;oBAC5B,qBAAM,MAAM,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,EAAA;;oBAApE,MAAM,GAAG,SAA2D,CAAC;oBACrE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,4BAA4B;oBAC7D,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAA;;oBAAnB,SAAmB,CAAC;oBACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,4BAA4B;oBAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,kBAAkB;;;;;CACjD;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,UAAC,GAAG;IACf,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/index.js b/node_modules/@azure/core-lro/dist-esm/src/index.js new file mode 100644 index 000000000..a93658d9f --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/index.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export * from "./poller"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/index.js.map b/node_modules/@azure/core-lro/dist-esm/src/index.js.map new file mode 100644 index 000000000..1526655aa --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,cAAc,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport * from \"./pollOperation\";\nexport * from \"./poller\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js b/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js new file mode 100644 index 000000000..19cf9ec86 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=pollOperation.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js.map b/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js.map new file mode 100644 index 000000000..b9aec245b --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/pollOperation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pollOperation.js","sourceRoot":"","sources":["../../src/pollOperation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * PollOperationState contains an opinionated list of the smallest set of properties needed\n * to define any long running operation poller.\n *\n * While the Poller class works as the local control mechanism to start triggering, wait for,\n * and potentially cancel a long running operation, the PollOperationState documents the status\n * of the remote long running operation.\n *\n * It should be updated at least when the operation starts, when it's finished, and when it's cancelled.\n * Though, implementations can have any other number of properties that can be updated by other reasons.\n */\nexport interface PollOperationState {\n /**\n * True if the operation has started.\n */\n isStarted?: boolean;\n /**\n * True if the operation has been completed.\n */\n isCompleted?: boolean;\n /**\n * True if the operation has been cancelled.\n */\n isCancelled?: boolean;\n /**\n * Will exist if the operation encountered any error.\n */\n error?: Error;\n /**\n * Will exist if the operation concluded in a result of an expected type.\n */\n result?: TResult;\n}\n\n/**\n * PollOperation is an interface that defines how to update the local reference of the state of the remote\n * long running operation, just as well as how to request the cancellation of the same operation.\n *\n * It also has a method to serialize the operation so that it can be stored and resumed at any time.\n */\nexport interface PollOperation {\n /**\n * The state of the operation.\n * It will be used to store the basic properties of PollOperationState,\n * plus any custom property that the implementation may require.\n */\n state: TState;\n\n /**\n * Defines how to request the remote service for updates on the status of the long running operation.\n *\n * It optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n * Also optionally receives a \"fireProgress\" function, which, if called, is responsible for triggering the\n * poller's onProgress callbacks.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n update(options?: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: TState) => void;\n }): Promise>;\n\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * It returns a promise that should be resolved with an updated version of the poller's operation.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n cancel(options?: { abortSignal?: AbortSignalLike }): Promise>;\n\n /**\n * Serializes the operation.\n * Useful when wanting to create a poller that monitors an existing operation.\n */\n toString(): string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/poller.js b/node_modules/@azure/core-lro/dist-esm/src/poller.js new file mode 100644 index 000000000..f7924db63 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/poller.js @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +/** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ +var PollerStoppedError = /** @class */ (function (_super) { + __extends(PollerStoppedError, _super); + function PollerStoppedError(message) { + var _this = _super.call(this, message) || this; + _this.name = "PollerStoppedError"; + Object.setPrototypeOf(_this, PollerStoppedError.prototype); + return _this; + } + return PollerStoppedError; +}(Error)); +export { PollerStoppedError }; +/** + * When a poller is cancelled through the `cancelOperation` method, + * the poller will be rejected with an instance of the PollerCancelledError. + */ +var PollerCancelledError = /** @class */ (function (_super) { + __extends(PollerCancelledError, _super); + function PollerCancelledError(message) { + var _this = _super.call(this, message) || this; + _this.name = "PollerCancelledError"; + Object.setPrototypeOf(_this, PollerCancelledError.prototype); + return _this; + } + return PollerCancelledError; +}(Error)); +export { PollerCancelledError }; +/** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ +var Poller = /** @class */ (function () { + /** + * A poller needs to be initialized by passing in at least the basic properties of the PollOperation. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation Must contain the basic properties of PollOperation. + */ + function Poller(operation) { + var _this = this; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise(function (resolve, reject) { + _this.resolve = resolve; + _this.reject = reject; + }); + // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. + // The above warning would get thrown if `poller.poll` is called, it returns an error, + // and pullUntilDone did not have a .catch or await try/catch on it's return value. + this.promise.catch(function () { }); + } + /** + * @internal + * @ignore + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + Poller.prototype.startPolling = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.stopped) { + this.stopped = false; + } + _a.label = 1; + case 1: + if (!(!this.isStopped() && !this.isDone())) return [3 /*break*/, 4]; + return [4 /*yield*/, this.poll()]; + case 2: + _a.sent(); + return [4 /*yield*/, this.delay()]; + case 3: + _a.sent(); + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + /** + * @internal + * @ignore + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.pollOnce = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var state, _a, e_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + state = this.operation.state; + _b.label = 1; + case 1: + _b.trys.push([1, 4, , 5]); + if (!!this.isDone()) return [3 /*break*/, 3]; + _a = this; + return [4 /*yield*/, this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + })]; + case 2: + _a.operation = _b.sent(); + if (this.isDone() && this.resolve) { + this.resolve(state.result); + } + _b.label = 3; + case 3: return [3 /*break*/, 5]; + case 4: + e_1 = _b.sent(); + state.error = e_1; + if (this.reject) { + this.reject(e_1); + } + throw e_1; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * @internal + * @ignore + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state The current operation state. + */ + Poller.prototype.fireProgress = function (state) { + for (var _i = 0, _a = this.pollProgressCallbacks; _i < _a.length; _i++) { + var callback = _a[_i]; + callback(state); + } + }; + /** + * @internal + * @ignore + * Invokes the underlying operation's cancel method, and rejects the + * pollUntilDone promise. + */ + Poller.prototype.cancelOnce = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, this.operation.cancel(options)]; + case 1: + _a.operation = _b.sent(); + if (this.reject) { + this.reject(new PollerCancelledError("Poller cancelled")); + } + return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.poll = function (options) { + var _this = this; + if (options === void 0) { options = {}; } + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + var clearPollOncePromise = function () { + _this.pollOncePromise = undefined; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise); + } + return this.pollOncePromise; + }; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + Poller.prototype.pollUntilDone = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (this.stopped) { + this.startPolling().catch(this.reject); + } + return [2 /*return*/, this.promise]; + }); + }); + }; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + Poller.prototype.onProgress = function (callback) { + var _this = this; + this.pollProgressCallbacks.push(callback); + return function () { + _this.pollProgressCallbacks = _this.pollProgressCallbacks.filter(function (c) { return c !== callback; }); + }; + }; + /** + * Returns true if the poller has finished polling. + */ + Poller.prototype.isDone = function () { + var state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + }; + /** + * Stops the poller from continuing to poll. + */ + Poller.prototype.stopPolling = function () { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + }; + /** + * Returns true if the poller is stopped. + */ + Poller.prototype.isStopped = function () { + return this.stopped; + }; + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.cancelOperation = function (options) { + if (options === void 0) { options = {}; } + if (!this.stopped) { + this.stopped = true; + } + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } + else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + }; + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + Poller.prototype.getOperationState = function () { + return this.operation.state; + }; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + Poller.prototype.getResult = function () { + var state = this.operation.state; + return state.result; + }; + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + Poller.prototype.toString = function () { + return this.operation.toString(); + }; + return Poller; +}()); +export { Poller }; +//# sourceMappingURL=poller.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/src/poller.js.map b/node_modules/@azure/core-lro/dist-esm/src/poller.js.map new file mode 100644 index 000000000..560f223dc --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/src/poller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../src/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAC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AED;;;;;OAKG;IACI,0BAAS,GAAhB;QACE,IAAM,KAAK,GAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAChE,OAAO,KAAK,CAAC,MAAM,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,yBAAQ,GAAf;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;IACH,aAAC;AAAD,CAAC,AArWD,IAqWC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState } from \"./pollOperation\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * CancelOnProgress is used as the return value of a Poller's onProgress method.\n * When a user invokes onProgress, they're required to pass in a function that will be\n * called as a callback with the new data received each time the poll operation is updated.\n * onProgress returns a function that will prevent any further update to reach the original callback.\n */\nexport type CancelOnProgress = () => void;\n\n/**\n * PollProgressCallback is the type of the callback functions sent to onProgress.\n * These functions will receive a TState that is defined by your implementation of\n * the Poller class.\n */\nexport type PollProgressCallback = (state: TState) => void;\n\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nexport class PollerStoppedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n\n/**\n * When a poller is cancelled through the `cancelOperation` method,\n * the poller will be rejected with an instance of the PollerCancelledError.\n */\nexport class PollerCancelledError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike, TResult> {\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(): Promise;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Stops the poller. After this, no manual or automated requests can be sent.\n */\n stopPolling(): void;\n /**\n * Returns true if the poller is stopped.\n */\n isStopped(): boolean;\n /**\n * Attempts to cancel the underlying operation.\n */\n cancelOperation(options?: { abortSignal?: AbortSignalLike }): Promise;\n /**\n * Returns the state of the operation.\n * The TState defined in PollerLike can be a subset of the TState defined in\n * the Poller implementation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n toString(): string;\n}\n\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\nexport abstract class Poller, TResult>\n implements PollerLike {\n private stopped: boolean = true;\n private resolve?: (value?: TResult) => void;\n private reject?: (error: PollerStoppedError | PollerCancelledError | Error) => void;\n private pollOncePromise?: Promise;\n private cancelPromise?: Promise;\n private promise: Promise;\n private pollProgressCallbacks: PollProgressCallback[] = [];\n\n /**\n * The poller's operation is available in full to any of the methods of the Poller class\n * and any class extending the Poller class.\n */\n protected operation: PollOperation;\n\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the PollOperation.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation Must contain the basic properties of PollOperation.\n */\n constructor(operation: PollOperation) {\n this.operation = operation;\n this.promise = new Promise(\n (\n resolve: (result?: TResult) => void,\n reject: (error: PollerStoppedError | PollerCancelledError | Error) => void\n ) => {\n this.resolve = resolve;\n this.reject = reject;\n }\n );\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {});\n }\n\n /**\n * Defines how much to wait between each poll request.\n * This has to be implemented by your custom poller.\n *\n * @azure/core-http has a simple implementation of a delay function that waits as many milliseconds as specified.\n * This can be used as follows:\n *\n * ```ts\n * import { delay } from \"@azure/core-http\";\n *\n * export class MyPoller extends Poller {\n * // The other necessary definitions.\n *\n * async delay(): Promise {\n * const milliseconds = 1000;\n * return delay(milliseconds);\n * }\n * }\n * ```\n *\n */\n protected abstract async delay(): Promise;\n\n /**\n * @internal\n * @ignore\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n private async startPolling(): Promise {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll();\n await this.delay();\n }\n }\n\n /**\n * @internal\n * @ignore\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n private async pollOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n const state: PollOperationState = this.operation.state;\n try {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this)\n });\n if (this.isDone() && this.resolve) {\n this.resolve(state.result);\n }\n }\n } catch (e) {\n state.error = e;\n if (this.reject) {\n this.reject(e);\n }\n throw e;\n }\n }\n\n /**\n * @internal\n * @ignore\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state The current operation state.\n */\n private fireProgress(state: TState): void {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n\n /**\n * @internal\n * @ignore\n * Invokes the underlying operation's cancel method, and rejects the\n * pollUntilDone promise.\n */\n private async cancelOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n this.operation = await this.operation.cancel(options);\n if (this.reject) {\n this.reject(new PollerCancelledError(\"Poller cancelled\"));\n }\n }\n\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n public poll(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = (): void => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise);\n }\n return this.pollOncePromise;\n }\n\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n public async pollUntilDone(): Promise {\n if (this.stopped) {\n this.startPolling().catch(this.reject);\n }\n return this.promise;\n }\n\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n public onProgress(callback: (state: TState) => void): CancelOnProgress {\n this.pollProgressCallbacks.push(callback);\n return (): void => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n\n /**\n * Returns true if the poller has finished polling.\n */\n public isDone(): boolean {\n const state: PollOperationState = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n\n /**\n * Stops the poller from continuing to poll.\n */\n public stopPolling(): void {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n\n /**\n * Returns true if the poller is stopped.\n */\n public isStopped(): boolean {\n return this.stopped;\n }\n\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n public cancelOperation(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.stopped) {\n this.stopped = true;\n }\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n } else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n public getOperationState(): TState {\n return this.operation.state;\n }\n\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n public getResult(): TResult | undefined {\n const state: PollOperationState = this.operation.state;\n return state.result;\n }\n\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n public toString(): string {\n return this.operation.toString();\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/abort.test.js b/node_modules/@azure/core-lro/dist-esm/test/abort.test.js new file mode 100644 index 000000000..2333bdc8a --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/abort.test.js @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __generator, __spreadArrays } from "tslib"; +import assert from "assert"; +import { delay, WebResource, HttpHeaders } from "@azure/core-http"; +import { TestClient } from "./utils/testClient"; +import { AbortController } from "@azure/abort-controller"; +import { PollerStoppedError } from "../src"; +import { TestTokenCredential } from "./utils/testTokenCredential"; +var testHttpHeaders = new HttpHeaders(); +var testHttpRequest = new WebResource(); +var basicResponseStructure = { + headers: testHttpHeaders, + parsedBody: {}, + request: testHttpRequest, + status: 200 +}; +var initialResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + started: true + } }); +var doFinalResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + doFinalResponse: true + } }); +var finalResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + finished: true + } }); +describe("Long Running Operations - working with abort signals", function () { + it("should support an abort signal sent through the constructor", function () { + return __awaiter(this, void 0, void 0, function () { + var client, abortController, poller, pollError, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([ + initialResponse + ], Array(20).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ])); + abortController = new AbortController(); + return [4 /*yield*/, client.startLRO({ + requestOptions: { + abortSignal: abortController.signal + } + })]; + case 1: + poller = _a.sent(); + poller.pollUntilDone().catch(function (e) { + pollError = e; + }); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + abortController.abort(); + return [4 /*yield*/, delay(50)]; + case 6: + _a.sent(); + assert.equal(pollError.message, "The operation was aborted."); + assert.equal(client.totalSentRequests, 11); + return [2 /*return*/]; + } + }); + }); + }); + it("should support an abort signal sent through the parameters of poll()", function () { + return __awaiter(this, void 0, void 0, function () { + var client, abortController, poller, donePromise, pollError, e_1, doneError, e_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([ + initialResponse + ], Array(20).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ])); + abortController = new AbortController(); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + donePromise = poller.pollUntilDone(); + return [4 /*yield*/, poller.poll()]; + case 2: + _a.sent(); + assert.equal(client.totalSentRequests, 2); + abortController.abort(); + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, poller.poll({ + abortSignal: abortController.signal + })]; + case 4: + _a.sent(); + return [3 /*break*/, 6]; + case 5: + e_1 = _a.sent(); + pollError = e_1; + return [3 /*break*/, 6]; + case 6: + assert.equal(pollError.message, "The operation was aborted."); + _a.label = 7; + case 7: + _a.trys.push([7, 9, , 10]); + return [4 /*yield*/, donePromise]; + case 8: + _a.sent(); + return [3 /*break*/, 10]; + case 9: + e_2 = _a.sent(); + doneError = e_2; + return [3 /*break*/, 10]; + case 10: + assert.equal(doneError.message, "The operation was aborted."); + assert.equal(client.totalSentRequests, 2); + assert.ok(poller.isDone()); + return [2 /*return*/]; + } + }); + }); + }); + it("can abort the cancel method (when cancellation is supported) by with an abortSignal sent from the constructor", function () { + return __awaiter(this, void 0, void 0, function () { + var client, abortController, poller, i, cancelError, e_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([ + initialResponse + ], Array(20).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ])); + abortController = new AbortController(); + return [4 /*yield*/, client.startLRO({ + requestOptions: { + abortSignal: abortController.signal + } + })]; + case 1: + poller = _a.sent(); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + abortController.abort(); + _a.label = 6; + case 6: + _a.trys.push([6, 8, , 9]); + return [4 /*yield*/, poller.cancelOperation()]; + case 7: + _a.sent(); + return [3 /*break*/, 9]; + case 8: + e_3 = _a.sent(); + cancelError = e_3; + return [3 /*break*/, 9]; + case 9: + assert.ok(poller.isStopped()); + assert.equal(cancelError.message, "The operation was aborted."); + return [2 /*return*/]; + } + }); + }); + }); + it("can abort the cancel method (when cancellation is supported) by with an abortSignal sent as a parameter to cancelOperation()", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, i, abortController, cancelError, e_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([ + initialResponse + ], Array(20).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ])); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + assert.equal(client.totalSentRequests, 1); + // Testing subscriptions to the poll errors + poller.pollUntilDone().catch(function (e) { + assert.ok(e instanceof PollerStoppedError); + assert.equal(e.name, "PollerStoppedError"); + assert.equal(e.message, "This poller is already stopped"); + }); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + abortController = new AbortController(); + abortController.abort(); + _a.label = 6; + case 6: + _a.trys.push([6, 8, , 9]); + return [4 /*yield*/, poller.cancelOperation({ + abortSignal: abortController.signal + })]; + case 7: + _a.sent(); + return [3 /*break*/, 9]; + case 8: + e_4 = _a.sent(); + cancelError = e_4; + return [3 /*break*/, 9]; + case 9: + assert.equal(cancelError.message, "The operation was aborted."); + poller.stopPolling(); + return [2 /*return*/]; + } + }); + }); + }); +}); +//# sourceMappingURL=abort.test.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/abort.test.js.map b/node_modules/@azure/core-lro/dist-esm/test/abort.test.js.map new file mode 100644 index 000000000..d9ebd5889 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/abort.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abort.test.js","sourceRoot":"","sources":["../../test/abort.test.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,IAAM,eAAe,GAAgB,IAAI,WAAW,EAAE,CAAC;AACvD,IAAM,eAAe,GAAgB,IAAI,WAAW,EAAE,CAAC;AACvD,IAAM,s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B,MAAM,CAAC,KAAK,CAAC,WAAY,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC;wBACjE,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport assert from \"assert\";\nimport { delay, WebResource, HttpHeaders } from \"@azure/core-http\";\nimport { TestClient } from \"./utils/testClient\";\nimport { AbortController } from \"@azure/abort-controller\";\nimport { PollerStoppedError } from \"../src\";\nimport { TestTokenCredential } from \"./utils/testTokenCredential\";\n\nconst testHttpHeaders: HttpHeaders = new HttpHeaders();\nconst testHttpRequest: WebResource = new WebResource();\nconst basicResponseStructure = {\n headers: testHttpHeaders,\n parsedBody: {},\n request: testHttpRequest,\n status: 200\n};\nconst initialResponse = {\n ...basicResponseStructure,\n parsedBody: {\n started: true\n }\n};\nconst doFinalResponse = {\n ...basicResponseStructure,\n parsedBody: {\n doFinalResponse: true\n }\n};\nconst finalResponse = {\n ...basicResponseStructure,\n parsedBody: {\n finished: true\n }\n};\n\ndescribe(\"Long Running Operations - working with abort signals\", function() {\n it(\"should support an abort signal sent through the constructor\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([\n initialResponse,\n ...Array(20).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ]);\n\n const abortController = new AbortController();\n const poller = await client.startLRO({\n requestOptions: {\n abortSignal: abortController.signal\n }\n });\n\n // Testing subscriptions to the poll errors\n let pollError: Error | undefined;\n poller.pollUntilDone().catch((e) => {\n pollError = e;\n });\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n abortController.abort();\n await delay(50);\n\n assert.equal(pollError!.message, \"The operation was aborted.\");\n assert.equal(client.totalSentRequests, 11);\n });\n\n it(\"should support an abort signal sent through the parameters of poll()\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([\n initialResponse,\n ...Array(20).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ]);\n\n const abortController = new AbortController();\n const poller = await client.startLRO();\n\n const donePromise = poller.pollUntilDone();\n\n await poller.poll();\n assert.equal(client.totalSentRequests, 2);\n\n abortController.abort();\n\n let pollError: Error | undefined;\n try {\n await poller.poll({\n abortSignal: abortController.signal\n });\n } catch (e) {\n pollError = e;\n }\n assert.equal(pollError!.message, \"The operation was aborted.\");\n\n let doneError: Error | undefined;\n try {\n await donePromise;\n } catch (e) {\n doneError = e;\n }\n assert.equal(doneError!.message, \"The operation was aborted.\");\n\n assert.equal(client.totalSentRequests, 2);\n assert.ok(poller.isDone());\n });\n\n it(\"can abort the cancel method (when cancellation is supported) by with an abortSignal sent from the constructor\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([\n initialResponse,\n ...Array(20).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ]);\n\n const abortController = new AbortController();\n const poller = await client.startLRO({\n requestOptions: {\n abortSignal: abortController.signal\n }\n });\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n\n abortController.abort();\n let cancelError: Error | undefined;\n try {\n await poller.cancelOperation();\n } catch (e) {\n cancelError = e;\n }\n\n assert.ok(poller.isStopped());\n assert.equal(cancelError!.message, \"The operation was aborted.\");\n });\n\n it(\"can abort the cancel method (when cancellation is supported) by with an abortSignal sent as a parameter to cancelOperation()\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([\n initialResponse,\n ...Array(20).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ]);\n\n const poller = await client.startLRO();\n assert.equal(client.totalSentRequests, 1);\n\n // Testing subscriptions to the poll errors\n poller.pollUntilDone().catch((e) => {\n assert.ok(e instanceof PollerStoppedError);\n assert.equal(e.name, \"PollerStoppedError\");\n assert.equal(e.message, \"This poller is already stopped\");\n });\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n\n const abortController = new AbortController();\n abortController.abort();\n\n let cancelError: Error | undefined;\n try {\n await poller.cancelOperation({\n abortSignal: abortController.signal\n });\n } catch (e) {\n cancelError = e;\n }\n\n assert.equal(cancelError!.message, \"The operation was aborted.\");\n poller.stopPolling();\n });\n});\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js b/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js new file mode 100644 index 000000000..a7cce109c --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __generator, __spreadArrays } from "tslib"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import assert from "assert"; +import { delay, WebResource, HttpHeaders, isNode } from "@azure/core-http"; +import { TestClient } from "./utils/testClient"; +import { PollerStoppedError, PollerCancelledError } from "../src"; +import { TestTokenCredential } from "./utils/testTokenCredential"; +var testHttpHeaders = new HttpHeaders(); +var testHttpRequest = new WebResource(); +var basicResponseStructure = { + headers: testHttpHeaders, + parsedBody: {}, + request: testHttpRequest, + status: 200 +}; +var initialResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + started: true + } }); +var doFinalResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + doFinalResponse: true + } }); +var finalResponse = __assign(__assign({}, basicResponseStructure), { parsedBody: { + finished: true + } }); +describe("Long Running Operations - custom client", function () { + it("can automatically poll a long running operation with one promise", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, result, serializedOperation; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses([initialResponse, doFinalResponse, finalResponse]); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + // In our tests, startLRO will do the first request for us + assert.equal(client.totalSentRequests, 1); + return [4 /*yield*/, poller.pollUntilDone()]; + case 2: + result = _a.sent(); + serializedOperation = JSON.parse(poller.toString()); + assert.ok(serializedOperation.state.isStarted); + assert.ok(poller.initialResponse.parsedBody.started); + assert.ok(poller.previousResponse.parsedBody.finished); + assert.ok(poller.getOperationState().isCompleted); + assert.equal(result, "Done"); + return [2 /*return*/]; + } + }); + }); + }); + if (isNode) { + it("won't throw UnhandledPromiseRejectionWarnings when poll called without pollUntilDone", function () { + return __awaiter(this, void 0, void 0, function () { + var client, foundUnhandled, checker, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + foundUnhandled = false; + checker = function () { + foundUnhandled = true; + }; + process.once("unhandledRejection", checker); + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 5]); + return [4 /*yield*/, client.startLRO()]; + case 2: + _a.sent(); + throw new Error("Test failure"); + case 3: + err_1 = _a.sent(); + assert.notEqual(err_1.message, "Test failure", "client.startLRO did not throw an error."); + // delay(0) gives the event loop a chance emit the UnhandledPromiseRejectionWarning so we can catch it. + return [4 /*yield*/, delay(0)]; + case 4: + // delay(0) gives the event loop a chance emit the UnhandledPromiseRejectionWarning so we can catch it. + _a.sent(); + assert.equal(foundUnhandled, false, "An UnhandledPromiseRejectionWarning was thrown."); + return [3 /*break*/, 5]; + case 5: return [2 /*return*/]; + } + }); + }); + }); + } + it("can poll a long running operation with more than one promise", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses([initialResponse, doFinalResponse, finalResponse]); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + return [4 /*yield*/, poller.poll()]; + case 2: + _a.sent(); + assert.ok(poller.previousResponse.parsedBody.doFinalResponse); + return [4 /*yield*/, poller.getResult()]; + case 3: + result = _a.sent(); + assert.equal(result, undefined); + return [4 /*yield*/, poller.pollUntilDone()]; + case 4: + _a.sent(); + assert.ok(poller.previousResponse.parsedBody.finished); + assert.ok(poller.getOperationState().isCompleted); + return [4 /*yield*/, poller.getResult()]; + case 5: + result = _a.sent(); + assert.equal(result, "Done"); + return [2 /*return*/]; + } + }); + }); + }); + it("can cancel the operation (when cancellation is supported)", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([initialResponse], Array(20).fill(basicResponseStructure))); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + assert.equal(client.totalSentRequests, 1); + // Testing the cancelled error + poller.pollUntilDone().catch(function (e) { + assert.ok(e instanceof PollerCancelledError); + assert.equal(e.name, "PollerCancelledError"); + assert.equal(e.message, "Poller cancelled"); + }); + // The poller will appear as unstopped, since we're waiting until finishes + assert.ok(!poller.isStopped()); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + return [4 /*yield*/, poller.cancelOperation()]; + case 6: + _a.sent(); + assert.ok(poller.getOperationState().isCancelled); + // Cancelling a poller stops it + assert.ok(poller.isStopped()); + return [2 /*return*/]; + } + }); + }); + }); + it("fails to cancel the operation (when cancellation is not supported)", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, i, error, e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([initialResponse], Array(20).fill(basicResponseStructure))); + return [4 /*yield*/, client.startNonCancellableLRO()]; + case 1: + poller = _a.sent(); + assert.equal(client.totalSentRequests, 1); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + _a.label = 6; + case 6: + _a.trys.push([6, 8, , 9]); + return [4 /*yield*/, poller.cancelOperation()]; + case 7: + _a.sent(); + return [3 /*break*/, 9]; + case 8: + e_1 = _a.sent(); + error = e_1; + return [3 /*break*/, 9]; + case 9: + assert.equal(error.message, "Cancellation not supported"); + return [2 /*return*/]; + } + }); + }); + }); + it("can stop polling the operation", function () { + return __awaiter(this, void 0, void 0, function () { + var client, poller, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([initialResponse], Array(20).fill(basicResponseStructure))); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + assert.equal(client.totalSentRequests, 1); + poller.pollUntilDone().catch(function (e) { + assert.ok(e instanceof PollerStoppedError); + assert.equal(e.name, "PollerStoppedError"); + assert.equal(e.message, "This poller is already stopped"); + }); + return [4 /*yield*/, poller.poll()]; + case 2: + _a.sent(); + assert.equal(client.totalSentRequests, 2); + i = 1; + _a.label = 3; + case 3: + if (!(i <= 10)) return [3 /*break*/, 6]; + return [4 /*yield*/, poller.poll()]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + i++; + return [3 /*break*/, 3]; + case 6: + assert.equal(client.totalSentRequests, 12); + poller.stopPolling(); + return [4 /*yield*/, delay(100)]; + case 7: + _a.sent(); + assert.equal(client.totalSentRequests, 12); + return [2 /*return*/]; + } + }); + }); + }); + it("can document progress", function () { + return __awaiter(this, void 0, void 0, function () { + var client, totalOperationUpdates, poller, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + client.setResponses(__spreadArrays([ + initialResponse + ], Array(10).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ])); + totalOperationUpdates = 0; + return [4 /*yield*/, client.startLRO({ + onProgress: function (_) { + totalOperationUpdates++; + } + })]; + case 1: + poller = _a.sent(); + return [4 /*yield*/, poller.pollUntilDone()]; + case 2: + result = _a.sent(); + assert.equal(result, "Done"); + assert.equal(poller.getResult(), "Done"); + // Progress only after the poller has started and before the poller is done + assert.equal(totalOperationUpdates, 11); + return [2 /*return*/]; + } + }); + }); + }); + it("can reuse one poller state to instantiate another poller", function () { + return __awaiter(this, void 0, void 0, function () { + var client, responses, poller, i, serialized, client2, poller2, result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = new TestClient(new TestTokenCredential("my-test-token")); + responses = __spreadArrays([ + initialResponse + ], Array(10).fill(basicResponseStructure), [ + doFinalResponse, + finalResponse + ]); + client.setResponses(responses); + return [4 /*yield*/, client.startLRO()]; + case 1: + poller = _a.sent(); + i = 1; + _a.label = 2; + case 2: + if (!(i <= 10)) return [3 /*break*/, 5]; + return [4 /*yield*/, poller.poll()]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: + assert.equal(client.totalSentRequests, 11); + serialized = poller.toString(); + client2 = new TestClient(new TestTokenCredential("my-test-token")); + client2.setResponses(responses); + return [4 /*yield*/, client2.startLRO({ + baseOperation: serialized + })]; + case 6: + poller2 = _a.sent(); + assert.equal(client2.totalSentRequests, 1); + return [4 /*yield*/, poller2.pollUntilDone()]; + case 7: + result = _a.sent(); + assert.equal(result, "Done"); + // The second client doesn't do the first request and goes all the way to the end. + assert.equal(client2.totalSentRequests, 12); + return [2 /*return*/]; + } + }); + }); + }); +}); +//# sourceMappingURL=testClient.test.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js.map b/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js.map new file mode 100644 index 000000000..1d566ca4e --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/testClient.test.js.map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AChB,qBAAM,OAAO,CAAC,QAAQ,CAAC;gCACrC,aAAa,EAAE,UAAU;6BAC1B,CAAC,EAAA;;wBAFI,OAAO,GAAG,SAEd;wBAEF,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;wBAE5B,qBAAM,OAAO,CAAC,aAAa,EAAE,EAAA;;wBAAtC,MAAM,GAAG,SAA6B;wBAC5C,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;wBAE7B,kFAAkF;wBAClF,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;;;;;KAC7C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport assert from \"assert\";\nimport { delay, WebResource, HttpHeaders, isNode } from \"@azure/core-http\";\nimport { TestClient } from \"./utils/testClient\";\nimport { PollerStoppedError, PollerCancelledError } from \"../src\";\nimport { TestTokenCredential } from \"./utils/testTokenCredential\";\nimport { TestOperationState } from \"./utils/testOperation\";\n\nconst testHttpHeaders: HttpHeaders = new HttpHeaders();\nconst testHttpRequest: WebResource = new WebResource();\nconst basicResponseStructure = {\n headers: testHttpHeaders,\n parsedBody: {},\n request: testHttpRequest,\n status: 200\n};\nconst initialResponse = {\n ...basicResponseStructure,\n parsedBody: {\n started: true\n }\n};\nconst doFinalResponse = {\n ...basicResponseStructure,\n parsedBody: {\n doFinalResponse: true\n }\n};\nconst finalResponse = {\n ...basicResponseStructure,\n parsedBody: {\n finished: true\n }\n};\n\ndescribe(\"Long Running Operations - custom client\", function() {\n it(\"can automatically poll a long running operation with one promise\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([initialResponse, doFinalResponse, finalResponse]);\n\n const poller = await client.startLRO();\n\n // In our tests, startLRO will do the first request for us\n assert.equal(client.totalSentRequests, 1);\n\n // Waiting until the operation completes\n const result = await poller.pollUntilDone();\n\n // Checking the serialized version of the operation\n let serializedOperation: { state: TestOperationState } = JSON.parse(poller.toString());\n assert.ok(serializedOperation.state.isStarted);\n\n assert.ok(poller.initialResponse!.parsedBody.started);\n assert.ok(poller.previousResponse!.parsedBody.finished);\n assert.ok(poller.getOperationState().isCompleted);\n assert.equal(result, \"Done\");\n });\n\n if (isNode) {\n it(\"won't throw UnhandledPromiseRejectionWarnings when poll called without pollUntilDone\", async function() {\n // NOTE: Don't set any responses so that poller.poll throws an error\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n let foundUnhandled = false;\n const checker = () => {\n foundUnhandled = true;\n };\n\n process.once(\"unhandledRejection\", checker);\n try {\n await client.startLRO();\n throw new Error(\"Test failure\");\n } catch (err) {\n assert.notEqual(err.message, \"Test failure\", \"client.startLRO did not throw an error.\");\n // delay(0) gives the event loop a chance emit the UnhandledPromiseRejectionWarning so we can catch it.\n await delay(0);\n assert.equal(foundUnhandled, false, \"An UnhandledPromiseRejectionWarning was thrown.\");\n }\n });\n }\n\n it(\"can poll a long running operation with more than one promise\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([initialResponse, doFinalResponse, finalResponse]);\n\n const poller = await client.startLRO();\n\n await poller.poll();\n assert.ok(poller.previousResponse!.parsedBody.doFinalResponse);\n\n let result = await poller.getResult();\n assert.equal(result, undefined);\n\n await poller.pollUntilDone();\n assert.ok(poller.previousResponse!.parsedBody.finished);\n assert.ok(poller.getOperationState().isCompleted);\n\n result = await poller.getResult();\n assert.equal(result, \"Done\");\n });\n\n it(\"can cancel the operation (when cancellation is supported)\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([initialResponse, ...Array(20).fill(basicResponseStructure)]);\n\n const poller = await client.startLRO();\n\n assert.equal(client.totalSentRequests, 1);\n\n // Testing the cancelled error\n poller.pollUntilDone().catch((e) => {\n assert.ok(e instanceof PollerCancelledError);\n assert.equal(e.name, \"PollerCancelledError\");\n assert.equal(e.message, \"Poller cancelled\");\n });\n // The poller will appear as unstopped, since we're waiting until finishes\n assert.ok(!poller.isStopped());\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n\n await poller.cancelOperation();\n assert.ok(poller.getOperationState().isCancelled);\n\n // Cancelling a poller stops it\n assert.ok(poller.isStopped());\n });\n\n it(\"fails to cancel the operation (when cancellation is not supported)\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([initialResponse, ...Array(20).fill(basicResponseStructure)]);\n\n const poller = await client.startNonCancellableLRO();\n assert.equal(client.totalSentRequests, 1);\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n\n let error: any;\n try {\n await poller.cancelOperation();\n } catch (e) {\n error = e;\n }\n assert.equal(error.message, \"Cancellation not supported\");\n });\n\n it(\"can stop polling the operation\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([initialResponse, ...Array(20).fill(basicResponseStructure)]);\n\n const poller = await client.startLRO();\n assert.equal(client.totalSentRequests, 1);\n\n poller.pollUntilDone().catch((e) => {\n assert.ok(e instanceof PollerStoppedError);\n assert.equal(e.name, \"PollerStoppedError\");\n assert.equal(e.message, \"This poller is already stopped\");\n });\n\n await poller.poll();\n assert.equal(client.totalSentRequests, 2);\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 12);\n\n poller.stopPolling();\n\n await delay(100);\n\n assert.equal(client.totalSentRequests, 12);\n });\n\n it(\"can document progress\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client.setResponses([\n initialResponse,\n ...Array(10).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ]);\n\n let totalOperationUpdates = 0;\n const poller = await client.startLRO({\n onProgress: (_) => {\n totalOperationUpdates++;\n }\n });\n\n const result = await poller.pollUntilDone();\n assert.equal(result, \"Done\");\n assert.equal(poller.getResult(), \"Done\");\n\n // Progress only after the poller has started and before the poller is done\n assert.equal(totalOperationUpdates, 11);\n });\n\n it(\"can reuse one poller state to instantiate another poller\", async function() {\n const client = new TestClient(new TestTokenCredential(\"my-test-token\"));\n\n // A total of 13 expected responses.\n const responses = [\n initialResponse,\n ...Array(10).fill(basicResponseStructure),\n doFinalResponse,\n finalResponse\n ];\n client.setResponses(responses);\n\n const poller = await client.startLRO();\n\n // Waiting for 10 poller loops\n for (let i = 1; i <= 10; i++) {\n await poller.poll();\n }\n\n assert.equal(client.totalSentRequests, 11);\n\n // Let's try to resume this with a new poller.\n const serialized = poller.toString();\n const client2 = new TestClient(new TestTokenCredential(\"my-test-token\"));\n client2.setResponses(responses);\n const poller2 = await client2.startLRO({\n baseOperation: serialized\n });\n\n assert.equal(client2.totalSentRequests, 1);\n\n const result = await poller2.pollUntilDone();\n assert.equal(result, \"Done\");\n\n // The second client doesn't do the first request and goes all the way to the end.\n assert.equal(client2.totalSentRequests, 12);\n });\n});\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js new file mode 100644 index 000000000..25bbfe72c --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { TestServiceClient } from "./testServiceClient"; +import { TestPoller } from "./testPoller"; +import { TestNonCancellablePoller } from "./testNonCancellablePoller"; +var TestClient = /** @class */ (function (_super) { + __extends(TestClient, _super); + function TestClient(credentials, options) { + return _super.call(this, credentials, options) || this; + } + TestClient.prototype.startLRO = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var poller; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + poller = new TestPoller(this, options.intervalInMs, options.requestOptions, options.baseOperation, options.onProgress); + return [4 /*yield*/, poller.poll()]; + case 1: + _a.sent(); // Initial request + return [2 /*return*/, poller]; + } + }); + }); + }; + TestClient.prototype.startNonCancellableLRO = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var poller; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + poller = new TestNonCancellablePoller(this, options.intervalInMs, options.requestOptions, options.baseOperation, options.onProgress); + return [4 /*yield*/, poller.poll()]; + case 1: + _a.sent(); // Initial request + return [2 /*return*/, poller]; + } + }); + }); + }; + return TestClient; +}(TestServiceClient)); +export { TestClient }; +//# sourceMappingURL=testClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js.map new file mode 100644 index 000000000..d045b570d --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testClient.js","sourceRoot":"","sources":["../../../test/utils/testClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAQlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAUtE;IAAgC,8BAAiB;IAC/C,oBACE,WAAuD,EACvD,OAA8B;eAE9B,kBAAM,WAAW,EAAE,OAAO,CAAC;IAC7B,CAAC;IAEY,6BAAQ,GAArB,UAAsB,OAA6B;QAA7B,wBAAA,EAAA,YAA6B;;;;;;wBAC3C,MAAM,GAAG,IAAI,UAAU,CAC3B,IAAI,EACJ,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,UAAU,CACnB,CAAC;wBACF,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAA;;wBAAnB,SAAmB,CAAC,CAAC,kBAAkB;wBACvC,sBAAO,MAAM,EAAC;;;;KACf;IAEY,2CAAsB,GAAnC,UACE,OAA6B;QAA7B,wBAAA,EAAA,YAA6B;;;;;;wBAEvB,MAAM,GAAG,IAAI,wBAAwB,CACzC,IAAI,EACJ,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,cAAc,EACtB,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,UAAU,CACnB,CAAC;wBACF,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAA;;wBAAnB,SAAmB,CAAC,CAAC,kBAAkB;wBACvC,sBAAO,MAAM,EAAC;;;;KACf;IACH,iBAAC;AAAD,CAAC,AAjCD,CAAgC,iBAAiB,GAiChD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n ServiceClientCredentials,\n ServiceClientOptions,\n TokenCredential,\n RequestOptionsBase\n} from \"@azure/core-http\";\nimport { TestServiceClient } from \"./testServiceClient\";\nimport { TestPoller } from \"./testPoller\";\nimport { TestNonCancellablePoller } from \"./testNonCancellablePoller\";\nimport { TestOperationState } from \"./testOperation\";\n\ninterface StartLROOptions {\n intervalInMs?: number;\n requestOptions?: RequestOptionsBase;\n baseOperation?: string;\n onProgress?: (state: TestOperationState) => void;\n}\n\nexport class TestClient extends TestServiceClient {\n constructor(\n credentials: TokenCredential | ServiceClientCredentials,\n options?: ServiceClientOptions\n ) {\n super(credentials, options);\n }\n\n public async startLRO(options: StartLROOptions = {}): Promise {\n const poller = new TestPoller(\n this,\n options.intervalInMs,\n options.requestOptions,\n options.baseOperation,\n options.onProgress\n );\n await poller.poll(); // Initial request\n return poller;\n }\n\n public async startNonCancellableLRO(\n options: StartLROOptions = {}\n ): Promise {\n const poller = new TestNonCancellablePoller(\n this,\n options.intervalInMs,\n options.requestOptions,\n options.baseOperation,\n options.onProgress\n );\n await poller.poll(); // Initial request\n return poller;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js new file mode 100644 index 000000000..0a68177d8 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { delay } from "@azure/core-http"; +import { Poller } from "../../src"; +import { makeOperation } from "./testOperation"; +var TestNonCancellablePoller = /** @class */ (function (_super) { + __extends(TestNonCancellablePoller, _super); + function TestNonCancellablePoller(client, intervalInMs, requestOptions, baseOperation, onProgress) { + if (intervalInMs === void 0) { intervalInMs = 10; } + var _this = this; + var state = { + client: client + }; + if (baseOperation) { + state = __assign(__assign({}, JSON.parse(baseOperation).state), state); + } + var operation = makeOperation(__assign(__assign({}, state), { client: client, + requestOptions: requestOptions, unsupportedCancel: true })); + _this = _super.call(this, operation) || this; + if (onProgress) { + _this.onProgress(onProgress); + } + _this.intervalInMs = intervalInMs; + return _this; + } + Object.defineProperty(TestNonCancellablePoller.prototype, "initialResponse", { + get: function () { + return this.operation.state.initialResponse; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TestNonCancellablePoller.prototype, "previousResponse", { + get: function () { + return this.operation.state.previousResponse; + }, + enumerable: true, + configurable: true + }); + TestNonCancellablePoller.prototype.delay = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, delay(this.intervalInMs)]; + }); + }); + }; + /** + * Can be used to get a publicly safe version of the poller state. + */ + TestNonCancellablePoller.prototype.getOperationState = function () { + return this.operation.state; + }; + return TestNonCancellablePoller; +}(Poller)); +export { TestNonCancellablePoller }; +//# sourceMappingURL=testNonCancellablePoller.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js.map new file mode 100644 index 000000000..5f782254f --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testNonCancellablePoller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testNonCancellablePoller.js","sourceRoot":"","sources":["../../../test/utils/testNonCancellablePoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,KAAK,EAA6C,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AAEpE;IAA8C,4CAAkC;IAG9E,kCACE,MAAyB,EACzB,YAAyB,EACzB,cAAmC,EACnC,aAAsB,EACtB,UAAgD;QAHhD,6BAAA,EAAA,iBAAyB;QAF3B,iBA+BC;QAxBC,IAAI,KAAK,GAAuB;YAC9B,MAAM,QAAA;SACP,CAAC;QAEF,IAAI,aAAa,EAAE;YACjB,KAAK,yBACA,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,GAC/B,KAAK,CACT,CAAC;SACH;QAED,IAAM,SAAS,GAAG,aAAa,uBAC1B,KAAK,KACR,MAAM,QAAA;YACN,cAAc,gBAAA,EACd,iBAAiB,EAAE,IAAI,IACvB,CAAC;QAEH,QAAA,kBAAM,SAAS,CAAC,SAAC;QAEjB,IAAI,UAAU,EAAE;YACd,KAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;SAC7B;QACD,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;;IACnC,CAAC;IAED,sBAAW,qDAAe;aAA1B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC;QAC9C,CAAC;;;OAAA;IAED,sBAAW,sDAAgB;aAA3B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC/C,CAAC;;;OAAA;IAEK,wCAAK,GAAX;;;gBACE,sBAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,EAAC;;;KACjC;IAED;;OAEG;IACI,oDAAiB,GAAxB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IACH,+BAAC;AAAD,CAAC,AAtDD,CAA8C,MAAM,GAsDnD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { delay, RequestOptionsBase, HttpOperationResponse } from \"@azure/core-http\";\nimport { Poller } from \"../../src\";\nimport { TestServiceClient } from \"./testServiceClient\";\nimport { makeOperation, TestOperationState } from \"./testOperation\";\n\nexport class TestNonCancellablePoller extends Poller {\n public intervalInMs: number;\n\n constructor(\n client: TestServiceClient,\n intervalInMs: number = 10,\n requestOptions?: RequestOptionsBase,\n baseOperation?: string,\n onProgress?: (state: TestOperationState) => void\n ) {\n let state: TestOperationState = {\n client\n };\n\n if (baseOperation) {\n state = {\n ...JSON.parse(baseOperation).state,\n ...state\n };\n }\n\n const operation = makeOperation({\n ...state,\n client,\n requestOptions,\n unsupportedCancel: true\n });\n\n super(operation);\n\n if (onProgress) {\n this.onProgress(onProgress);\n }\n this.intervalInMs = intervalInMs;\n }\n\n public get initialResponse(): HttpOperationResponse | undefined {\n return this.operation.state.initialResponse;\n }\n\n public get previousResponse(): HttpOperationResponse | undefined {\n return this.operation.state.previousResponse;\n }\n\n async delay(): Promise {\n return delay(this.intervalInMs);\n }\n\n /**\n * Can be used to get a publicly safe version of the poller state.\n */\n public getOperationState(): TestOperationState {\n return this.operation.state;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js new file mode 100644 index 000000000..f37263863 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __generator } from "tslib"; +import { TestWebResource } from "./testWebResource"; +function update(options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, client, requestOptions, initialResponse, previousResponse, abortSignal, response, doFinalResponse; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this.state, client = _a.client, requestOptions = _a.requestOptions, initialResponse = _a.initialResponse, previousResponse = _a.previousResponse; + abortSignal = options.abortSignal || (requestOptions && requestOptions.abortSignal); + if (!client) { + // The client property is assigned to the operation state during the instantiation of the `TestPoller`. + // So the client should always exist. + // Though `PublicTestOperationState` doesn't have the client property, + // so we have to make it optional in `TestOperationState`. + throw new Error("The client property should exist"); + } + doFinalResponse = previousResponse && previousResponse.parsedBody.doFinalResponse; + if (!!initialResponse) return [3 /*break*/, 2]; + return [4 /*yield*/, client.sendInitialRequest(new TestWebResource(abortSignal))]; + case 1: + response = _b.sent(); + this.state.initialResponse = response; + this.state.isStarted = true; + return [3 /*break*/, 6]; + case 2: + if (!doFinalResponse) return [3 /*break*/, 4]; + return [4 /*yield*/, client.sendFinalRequest(new TestWebResource(abortSignal))]; + case 3: + response = _b.sent(); + this.state.isCompleted = true; + this.state.result = "Done"; + this.state.previousResponse = response; + return [3 /*break*/, 6]; + case 4: return [4 /*yield*/, client.sendRequest(new TestWebResource(abortSignal))]; + case 5: + response = _b.sent(); + this.state.previousResponse = response; + _b.label = 6; + case 6: + if (!response) { + throw new Error("Our tests must not run forever"); + } + // Progress only after the poller has started and before the poller is done + if (initialResponse && !doFinalResponse && options.fireProgress) { + options.fireProgress(this.state); + } + return [2 /*return*/, makeOperation(this.state)]; + } + }); + }); +} +function cancel(options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var requestOptions, abortSignal, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + requestOptions = this.state.requestOptions; + abortSignal = options.abortSignal || (requestOptions && requestOptions.abortSignal); + if (!(abortSignal && abortSignal.aborted)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.update({ + abortSignal: abortSignal + })]; + case 1: + // Simulating a try catch of an HTTP request that's given an aborted abortSignal. + return [2 /*return*/, _a.sent()]; // This will throw + case 2: + if (this.state.unsupportedCancel) { + throw new Error("Cancellation not supported"); + } + response = { + status: 205 + }; + return [2 /*return*/, makeOperation(__assign(__assign({}, this.state), { isCancelled: true, previousResponse: response }))]; + } + }); + }); +} +function toString() { + return JSON.stringify({ + state: this.state + }); +} +export function makeOperation(state) { + return { + state: __assign({}, state), + update: update, + cancel: cancel, + toString: toString + }; +} +//# sourceMappingURL=testOperation.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js.map new file mode 100644 index 000000000..90e575a0f --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testOperation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testOperation.js","sourceRoot":"","sources":["../../../test/utils/testOperation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAMlC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAgBpD,SAAe,MAAM,CAEnB,OAGM;IAHN,wBAAA,EAAA,YAGM;;;;;;oBAEA,KAAgE,IAAI,CAAC,KAAK,EAAxE,MAAM,YAAA,EAAE,cAAc,oBAAA,EAAE,eAAe,qBAAA,EAAE,gBAAgB,sBAAA,CAAgB;oBAC3E,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;oBAE1F,IAAI,CAAC,MAAM,EAAE;wBACX,uGAAuG;wBACvG,qCAAqC;wBACrC,sEAAsE;wBACtE,0DAA0D;wBAC1D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;qBACr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AG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;oBAC3C,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;yBAEtF,CAAA,WAAW,IAAI,WAAW,CAAC,OAAO,CAAA,EAAlC,wBAAkC;oBAE7B,qBAAM,IAAI,CAAC,MAAM,CAAC;4BACvB,WAAW,aAAA;yBACZ,CAAC,EAAA;;gBAHF,iFAAiF;gBACjF,sBAAO,SAEL,EAAC,CAAC,kBAAkB;;oBAGxB,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;wBAChC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;qBAC/C;oBAGK,QAAQ,GAAG;wBACf,MAAM,EAAE,GAAG;qBACa,CAAC;oBAE3B,sBAAO,aAAa,uBACf,IAAI,CAAC,KAAK,KACb,WAAW,EAAE,IAAI,EACjB,gBAAgB,EAAE,QAAQ,IAC1B,EAAC;;;;CACJ;AAED,SAAS,QAAQ;IACf,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO;QACL,KAAK,eACA,KAAK,CACT;QACD,MAAM,QAAA;QACN,MAAM,QAAA;QACN,QAAQ,UAAA;KACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpOperationResponse, RequestOptionsBase } from \"@azure/core-http\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { PollOperationState, PollOperation } from \"../../src\";\nimport { TestServiceClient } from \"./testServiceClient\";\nimport { TestWebResource } from \"./testWebResource\";\n\nexport interface PublicTestOperationState extends PollOperationState {\n previousResponse?: HttpOperationResponse;\n}\n\nexport interface TestOperationState extends PollOperationState {\n client?: TestServiceClient;\n requestOptions?: RequestOptionsBase;\n initialResponse?: HttpOperationResponse;\n previousResponse?: HttpOperationResponse;\n unsupportedCancel?: boolean;\n}\n\nexport interface TestOperation extends PollOperation {}\n\nasync function update(\n this: TestOperation,\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: TestOperationState) => void;\n } = {}\n): Promise {\n const { client, requestOptions, initialResponse, previousResponse } = this.state;\n const abortSignal = options.abortSignal || (requestOptions && requestOptions.abortSignal);\n\n if (!client) {\n // The client property is assigned to the operation state during the instantiation of the `TestPoller`.\n // So the client should always exist.\n // Though `PublicTestOperationState` doesn't have the client property,\n // so we have to make it optional in `TestOperationState`.\n throw new Error(\"The client property should exist\");\n }\n\n let response: HttpOperationResponse;\n const doFinalResponse = previousResponse && previousResponse.parsedBody.doFinalResponse;\n\n if (!initialResponse) {\n response = await client!.sendInitialRequest(new TestWebResource(abortSignal));\n this.state.initialResponse = response;\n this.state.isStarted = true;\n } else if (doFinalResponse) {\n response = await client!.sendFinalRequest(new TestWebResource(abortSignal));\n this.state.isCompleted = true;\n this.state.result = \"Done\";\n this.state.previousResponse = response;\n } else {\n response = await client!.sendRequest(new TestWebResource(abortSignal));\n this.state.previousResponse = response;\n }\n\n if (!response) {\n throw new Error(\"Our tests must not run forever\");\n }\n\n // Progress only after the poller has started and before the poller is done\n if (initialResponse && !doFinalResponse && options.fireProgress) {\n options.fireProgress(this.state);\n }\n\n return makeOperation(this.state);\n}\n\nasync function cancel(\n this: TestOperation,\n options: { abortSignal?: AbortSignal } = {}\n): Promise {\n const requestOptions = this.state.requestOptions;\n const abortSignal = options.abortSignal || (requestOptions && requestOptions.abortSignal);\n\n if (abortSignal && abortSignal.aborted) {\n // Simulating a try catch of an HTTP request that's given an aborted abortSignal.\n return await this.update({\n abortSignal\n }); // This will throw\n }\n\n if (this.state.unsupportedCancel) {\n throw new Error(\"Cancellation not supported\");\n }\n\n // Simulating the response of an HTTP Request\n const response = {\n status: 205\n } as HttpOperationResponse;\n\n return makeOperation({\n ...this.state,\n isCancelled: true,\n previousResponse: response\n });\n}\n\nfunction toString(this: TestOperation): string {\n return JSON.stringify({\n state: this.state\n });\n}\n\nexport function makeOperation(state: TestOperationState): TestOperation {\n return {\n state: {\n ...state\n },\n update,\n cancel,\n toString\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js new file mode 100644 index 000000000..b4efe2f20 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { delay } from "@azure/core-http"; +import { Poller } from "../../src"; +import { makeOperation } from "./testOperation"; +var TestPoller = /** @class */ (function (_super) { + __extends(TestPoller, _super); + function TestPoller(client, intervalInMs, requestOptions, baseOperation, onProgress) { + if (intervalInMs === void 0) { intervalInMs = 10; } + var _this = this; + var state = { + client: client + }; + if (baseOperation) { + state = __assign(__assign({}, JSON.parse(baseOperation).state), state); + } + var operation = makeOperation(__assign(__assign({}, state), { client: client, + requestOptions: requestOptions })); + _this = _super.call(this, operation) || this; + if (onProgress) { + _this.onProgress(onProgress); + } + _this.intervalInMs = intervalInMs; + return _this; + } + Object.defineProperty(TestPoller.prototype, "initialResponse", { + get: function () { + return this.operation.state.initialResponse; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TestPoller.prototype, "previousResponse", { + get: function () { + return this.operation.state.previousResponse; + }, + enumerable: true, + configurable: true + }); + TestPoller.prototype.delay = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, delay(this.intervalInMs)]; + }); + }); + }; + /** + * The getOperationState() from TestPoller returns an object + * with the subset of properties from TestOperationState that are + * safe to be shared with the public. + */ + TestPoller.prototype.getOperationState = function () { + var state = this.operation.state; + return { + // Properties from PollOperationState + isStarted: state.isStarted, + isCompleted: state.isCompleted, + isCancelled: state.isCancelled, + error: state.error, + result: state.result, + // The only other property needed by PublicTestOperationState. + // The other properties from TestOperationState will be hidden from the user. + previousResponse: state.previousResponse + }; + }; + return TestPoller; +}(Poller)); +export { TestPoller }; +//# sourceMappingURL=testPoller.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js.map new file mode 100644 index 000000000..ad9099ae2 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testPoller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testPoller.js","sourceRoot":"","sources":["../../../test/utils/testPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,KAAK,EAA6C,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAgD,MAAM,iBAAiB,CAAC;AAE9F;IAAgC,8BAAkC;IAGhE,oBACE,MAAyB,EACzB,YAAyB,EACzB,cAAmC,EACnC,aAAsB,EACtB,UAAgD;QAHhD,6BAAA,EAAA,iBAAyB;QAF3B,iBA8BC;QAvBC,IAAI,KAAK,GAAuB;YAC9B,MAAM,QAAA;SACP,CAAC;QAEF,IAAI,aAAa,EAAE;YACjB,KAAK,yBACA,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,GAC/B,KAAK,CACT,CAAC;SACH;QAED,IAAM,SAAS,GAAG,aAAa,uBAC1B,KAAK,KACR,MAAM,QAAA;YACN,cAAc,gBAAA,IACd,CAAC;QAEH,QAAA,kBAAM,SAAS,CAAC,SAAC;QAEjB,IAAI,UAAU,EAAE;YACd,KAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;SAC7B;QACD,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;;IACnC,CAAC;IAED,sBAAW,uCAAe;aAA1B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC;QAC9C,CAAC;;;OAAA;IAED,sBAAW,wCAAgB;aAA3B;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC/C,CAAC;;;OAAA;IAEK,0BAAK,GAAX;;;gBACE,sBAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,EAAC;;;KACjC;IAED;;;;OAIG;IACI,sCAAiB,GAAxB;QACE,IAAM,KAAK,GAA6B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAC7D,OAAO;YACL,8CAA8C;YAC9C,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YAEpB,8DAA8D;YAC9D,6EAA6E;YAC7E,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAnED,CAAgC,MAAM,GAmErC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { delay, RequestOptionsBase, HttpOperationResponse } from \"@azure/core-http\";\nimport { Poller } from \"../../src\";\nimport { TestServiceClient } from \"./testServiceClient\";\nimport { makeOperation, TestOperationState, PublicTestOperationState } from \"./testOperation\";\n\nexport class TestPoller extends Poller {\n public intervalInMs: number;\n\n constructor(\n client: TestServiceClient,\n intervalInMs: number = 10,\n requestOptions?: RequestOptionsBase,\n baseOperation?: string,\n onProgress?: (state: TestOperationState) => void\n ) {\n let state: TestOperationState = {\n client\n };\n\n if (baseOperation) {\n state = {\n ...JSON.parse(baseOperation).state,\n ...state\n };\n }\n\n const operation = makeOperation({\n ...state,\n client,\n requestOptions\n });\n\n super(operation);\n\n if (onProgress) {\n this.onProgress(onProgress);\n }\n this.intervalInMs = intervalInMs;\n }\n\n public get initialResponse(): HttpOperationResponse | undefined {\n return this.operation.state.initialResponse;\n }\n\n public get previousResponse(): HttpOperationResponse | undefined {\n return this.operation.state.previousResponse;\n }\n\n async delay(): Promise {\n return delay(this.intervalInMs);\n }\n\n /**\n * The getOperationState() from TestPoller returns an object\n * with the subset of properties from TestOperationState that are\n * safe to be shared with the public.\n */\n public getOperationState(): PublicTestOperationState {\n const state: PublicTestOperationState = this.operation.state;\n return {\n // Properties from PollOperationState\n isStarted: state.isStarted,\n isCompleted: state.isCompleted,\n isCancelled: state.isCancelled,\n error: state.error,\n result: state.result,\n\n // The only other property needed by PublicTestOperationState.\n // The other properties from TestOperationState will be hidden from the user.\n previousResponse: state.previousResponse\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js new file mode 100644 index 000000000..d61e26c53 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { ServiceClient } from "@azure/core-http"; +var TestServiceClient = /** @class */ (function (_super) { + __extends(TestServiceClient, _super); + function TestServiceClient(credentials, options) { + var _this = _super.call(this, credentials, options) || this; + _this.responses = []; + _this.credentials = credentials; + _this.totalSentRequests = 0; + return _this; + } + TestServiceClient.prototype.setResponses = function (responses) { + this.initialResponse = responses[0]; + this.responses = responses.slice(1, -1); + this.finalResponse = responses[responses.length - 1]; + }; + // Normally we would call this.client.sendRequest, from the ServiceClient class. + TestServiceClient.prototype.sendRequest = function (options) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (options && options.abortSignal && options.abortSignal.aborted) { + throw new Error("The operation was aborted."); + } + this.totalSentRequests += 1; + return [2 /*return*/, this.responses.shift()]; + }); + }); + }; + TestServiceClient.prototype.sendInitialRequest = function (options) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (options && options.abortSignal && options.abortSignal.aborted) { + throw new Error("The operation was aborted."); + } + this.totalSentRequests += 1; + return [2 /*return*/, this.initialResponse]; + }); + }); + }; + TestServiceClient.prototype.sendFinalRequest = function (options) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (options && options.abortSignal && options.abortSignal.aborted) { + throw new Error("The operation was aborted."); + } + this.totalSentRequests += 1; + return [2 /*return*/, this.finalResponse]; + }); + }); + }; + return TestServiceClient; +}(ServiceClient)); +export { TestServiceClient }; +//# sourceMappingURL=testServiceClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js.map new file mode 100644 index 000000000..95d6d8f46 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testServiceClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testServiceClient.js","sourceRoot":"","sources":["../../../test/utils/testServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAEL,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAE1B;IAAuC,qCAAa;IAOlD,2BACE,WAAuD,EACvD,OAA8B;QAFhC,YAIE,kBAAM,WAAW,EAAE,OAAO,CAAC,SAG5B;QAbO,eAAS,GAA4B,EAAE,CAAC;QAW9C,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,KAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;;IAC7B,CAAC;IAEM,wCAAY,GAAnB,UAAoB,SAAkC;QACpD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,gFAAgF;IACnE,uCAAW,GAAxB,UAAyB,OAA4B;;;gBACnD,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE;oBACjE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;iBAC/C;gBACD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBAC5B,sBAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAG,EAAC;;;KAChC;IACY,8CAAkB,GAA/B,UAAgC,OAA4B;;;gBAC1D,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE;oBACjE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;iBAC/C;gBACD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBAC5B,sBAAO,IAAI,CAAC,eAAgB,EAAC;;;KAC9B;IACY,4CAAgB,GAA7B,UAA8B,OAA4B;;;gBACxD,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE;oBACjE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;iBAC/C;gBACD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBAC5B,sBAAO,IAAI,CAAC,aAAc,EAAC;;;KAC5B;IACH,wBAAC;AAAD,CAAC,AA5CD,CAAuC,aAAa,GA4CnD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n HttpOperationResponse,\n ServiceClient,\n ServiceClientCredentials,\n ServiceClientOptions,\n TokenCredential,\n RequestOptionsBase\n} from \"@azure/core-http\";\n\nexport class TestServiceClient extends ServiceClient {\n private responses: HttpOperationResponse[] = [];\n private initialResponse?: HttpOperationResponse;\n private finalResponse?: HttpOperationResponse;\n public credentials: TokenCredential | ServiceClientCredentials;\n public totalSentRequests: number;\n\n constructor(\n credentials: TokenCredential | ServiceClientCredentials,\n options?: ServiceClientOptions\n ) {\n super(credentials, options);\n this.credentials = credentials;\n this.totalSentRequests = 0;\n }\n\n public setResponses(responses: HttpOperationResponse[]): void {\n this.initialResponse = responses[0];\n this.responses = responses.slice(1, -1);\n this.finalResponse = responses[responses.length - 1];\n }\n\n // Normally we would call this.client.sendRequest, from the ServiceClient class.\n public async sendRequest(options?: RequestOptionsBase): Promise {\n if (options && options.abortSignal && options.abortSignal.aborted) {\n throw new Error(\"The operation was aborted.\");\n }\n this.totalSentRequests += 1;\n return this.responses.shift()!;\n }\n public async sendInitialRequest(options?: RequestOptionsBase): Promise {\n if (options && options.abortSignal && options.abortSignal.aborted) {\n throw new Error(\"The operation was aborted.\");\n }\n this.totalSentRequests += 1;\n return this.initialResponse!;\n }\n public async sendFinalRequest(options?: RequestOptionsBase): Promise {\n if (options && options.abortSignal && options.abortSignal.aborted) {\n throw new Error(\"The operation was aborted.\");\n }\n this.totalSentRequests += 1;\n return this.finalResponse!;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js new file mode 100644 index 000000000..ba689754e --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __generator } from "tslib"; +var TestTokenCredential = /** @class */ (function () { + function TestTokenCredential(token, expiresOn) { + this.token = token; + this.expiresOn = expiresOn ? expiresOn.getTime() : Date.now() + 60 * 60 * 1000; + } + TestTokenCredential.prototype.getToken = function (_scopes, _options) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, { + token: this.token, + expiresOnTimestamp: this.expiresOn + }]; + }); + }); + }; + return TestTokenCredential; +}()); +export { TestTokenCredential }; +//# sourceMappingURL=testTokenCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js.map new file mode 100644 index 000000000..b29ed5ff4 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testTokenCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testTokenCredential.js","sourceRoot":"","sources":["../../../test/utils/testTokenCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC;IAIE,6BAAY,KAAa,EAAE,SAAgB;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACjF,CAAC;IAEK,sCAAQ,GAAd,UACE,OAA0B,EAC1B,QAA0B;;;gBAE1B,sBAAO;wBACL,KAAK,EAAE,IAAI,CAAC,KAAK;wBACjB,kBAAkB,EAAE,IAAI,CAAC,SAAS;qBACnC,EAAC;;;KACH;IACH,0BAAC;AAAD,CAAC,AAlBD,IAkBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-http\";\n\nexport class TestTokenCredential implements TokenCredential {\n public token: string;\n public expiresOn: number;\n\n constructor(token: string, expiresOn?: Date) {\n this.token = token;\n this.expiresOn = expiresOn ? expiresOn.getTime() : Date.now() + 60 * 60 * 1000;\n }\n\n async getToken(\n _scopes: string | string[],\n _options?: GetTokenOptions\n ): Promise {\n return {\n token: this.token,\n expiresOnTimestamp: this.expiresOn\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js b/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js new file mode 100644 index 000000000..bc5acb903 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { WebResource } from "@azure/core-http"; +var TestWebResource = /** @class */ (function (_super) { + __extends(TestWebResource, _super); + function TestWebResource(abortSignal) { + return _super.call(this, undefined, // url?: string, + undefined, // method?: HttpMethods, + undefined, // body?: any, + undefined, // query?: { [key: string]: any }, + undefined, // headers?: { [key: string]: any } | HttpHeaders, + undefined, // streamResponseBody?: boolean, + undefined, // withCredentials?: boolean, + abortSignal, // abortSignal?: AbortSignalLike, + undefined, // timeout?: number, + undefined, // onUploadProgress?: (progress: TransferProgressEvent) => void, + undefined, // onDownloadProgress?: (progress: TransferProgressEvent) => void, + undefined, // proxySettings?: ProxySettings, + undefined // keepAlive?: boolean + ) || this; + } + return TestWebResource; +}(WebResource)); +export { TestWebResource }; +//# sourceMappingURL=testWebResource.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js.map b/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js.map new file mode 100644 index 000000000..39056cc82 --- /dev/null +++ b/node_modules/@azure/core-lro/dist-esm/test/utils/testWebResource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testWebResource.js","sourceRoot":"","sources":["../../../test/utils/testWebResource.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;IAAqC,mCAAW;IAC9C,yBAAY,WAA6B;eACvC,kBACE,SAAS,EAAE,gBAAgB;QAC3B,SAAS,EAAE,wBAAwB;QACnC,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,kCAAkC;QAC7C,SAAS,EAAE,kDAAkD;QAC7D,SAAS,EAAE,gCAAgC;QAC3C,SAAS,EAAE,6BAA6B;QACxC,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,oBAAoB;QAC/B,SAAS,EAAE,gEAAgE;QAC3E,SAAS,EAAE,kEAAkE;QAC7E,SAAS,EAAE,iCAAiC;QAC5C,SAAS,CAAC,sBAAsB;SACjC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAlBD,CAAqC,WAAW,GAkB/C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { WebResource } from \"@azure/core-http\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport class TestWebResource extends WebResource {\n constructor(abortSignal?: AbortSignalLike) {\n super(\n undefined, // url?: string,\n undefined, // method?: HttpMethods,\n undefined, // body?: any,\n undefined, // query?: { [key: string]: any },\n undefined, // headers?: { [key: string]: any } | HttpHeaders,\n undefined, // streamResponseBody?: boolean,\n undefined, // withCredentials?: boolean,\n abortSignal, // abortSignal?: AbortSignalLike,\n undefined, // timeout?: number,\n undefined, // onUploadProgress?: (progress: TransferProgressEvent) => void,\n undefined, // onDownloadProgress?: (progress: TransferProgressEvent) => void,\n undefined, // proxySettings?: ProxySettings,\n undefined // keepAlive?: boolean\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/dist/index.js b/node_modules/@azure/core-lro/dist/index.js new file mode 100644 index 000000000..ab26af3e3 --- /dev/null +++ b/node_modules/@azure/core-lro/dist/index.js @@ -0,0 +1,466 @@ +/*! + * Copyright (c) Microsoft and contributors. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Azure Core LRO SDK for JavaScript - 1.0.2 + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var tslib = require('tslib'); + +// Copyright (c) Microsoft Corporation. +/** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ +var PollerStoppedError = /** @class */ (function (_super) { + tslib.__extends(PollerStoppedError, _super); + function PollerStoppedError(message) { + var _this = _super.call(this, message) || this; + _this.name = "PollerStoppedError"; + Object.setPrototypeOf(_this, PollerStoppedError.prototype); + return _this; + } + return PollerStoppedError; +}(Error)); +/** + * When a poller is cancelled through the `cancelOperation` method, + * the poller will be rejected with an instance of the PollerCancelledError. + */ +var PollerCancelledError = /** @class */ (function (_super) { + tslib.__extends(PollerCancelledError, _super); + function PollerCancelledError(message) { + var _this = _super.call(this, message) || this; + _this.name = "PollerCancelledError"; + Object.setPrototypeOf(_this, PollerCancelledError.prototype); + return _this; + } + return PollerCancelledError; +}(Error)); +/** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ +var Poller = /** @class */ (function () { + /** + * A poller needs to be initialized by passing in at least the basic properties of the PollOperation. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation Must contain the basic properties of PollOperation. + */ + function Poller(operation) { + var _this = this; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise(function (resolve, reject) { + _this.resolve = resolve; + _this.reject = reject; + }); + // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. + // The above warning would get thrown if `poller.poll` is called, it returns an error, + // and pullUntilDone did not have a .catch or await try/catch on it's return value. + this.promise.catch(function () { }); + } + /** + * @internal + * @ignore + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + Poller.prototype.startPolling = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.stopped) { + this.stopped = false; + } + _a.label = 1; + case 1: + if (!(!this.isStopped() && !this.isDone())) return [3 /*break*/, 4]; + return [4 /*yield*/, this.poll()]; + case 2: + _a.sent(); + return [4 /*yield*/, this.delay()]; + case 3: + _a.sent(); + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }); + }; + /** + * @internal + * @ignore + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.pollOnce = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var state, _a, e_1; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + state = this.operation.state; + _b.label = 1; + case 1: + _b.trys.push([1, 4, , 5]); + if (!!this.isDone()) return [3 /*break*/, 3]; + _a = this; + return [4 /*yield*/, this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + })]; + case 2: + _a.operation = _b.sent(); + if (this.isDone() && this.resolve) { + this.resolve(state.result); + } + _b.label = 3; + case 3: return [3 /*break*/, 5]; + case 4: + e_1 = _b.sent(); + state.error = e_1; + if (this.reject) { + this.reject(e_1); + } + throw e_1; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * @internal + * @ignore + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state The current operation state. + */ + Poller.prototype.fireProgress = function (state) { + for (var _i = 0, _a = this.pollProgressCallbacks; _i < _a.length; _i++) { + var callback = _a[_i]; + callback(state); + } + }; + /** + * @internal + * @ignore + * Invokes the underlying operation's cancel method, and rejects the + * pollUntilDone promise. + */ + Poller.prototype.cancelOnce = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, this.operation.cancel(options)]; + case 1: + _a.operation = _b.sent(); + if (this.reject) { + this.reject(new PollerCancelledError("Poller cancelled")); + } + return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.poll = function (options) { + var _this = this; + if (options === void 0) { options = {}; } + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + var clearPollOncePromise = function () { + _this.pollOncePromise = undefined; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise); + } + return this.pollOncePromise; + }; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + Poller.prototype.pollUntilDone = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + if (this.stopped) { + this.startPolling().catch(this.reject); + } + return [2 /*return*/, this.promise]; + }); + }); + }; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + Poller.prototype.onProgress = function (callback) { + var _this = this; + this.pollProgressCallbacks.push(callback); + return function () { + _this.pollProgressCallbacks = _this.pollProgressCallbacks.filter(function (c) { return c !== callback; }); + }; + }; + /** + * Returns true if the poller has finished polling. + */ + Poller.prototype.isDone = function () { + var state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + }; + /** + * Stops the poller from continuing to poll. + */ + Poller.prototype.stopPolling = function () { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + }; + /** + * Returns true if the poller is stopped. + */ + Poller.prototype.isStopped = function () { + return this.stopped; + }; + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options Optional properties passed to the operation's update method. + */ + Poller.prototype.cancelOperation = function (options) { + if (options === void 0) { options = {}; } + if (!this.stopped) { + this.stopped = true; + } + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } + else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + }; + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + Poller.prototype.getOperationState = function () { + return this.operation.state; + }; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + Poller.prototype.getResult = function () { + var state = this.operation.state; + return state.result; + }; + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + Poller.prototype.toString = function () { + return this.operation.toString(); + }; + return Poller; +}()); + +exports.Poller = Poller; +exports.PollerCancelledError = PollerCancelledError; +exports.PollerStoppedError = PollerStoppedError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/core-lro/dist/index.js.map b/node_modules/@azure/core-lro/dist/index.js.map new file mode 100644 index 000000000..6ae81335f --- /dev/null +++ b/node_modules/@azure/core-lro/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/poller.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState } from \"./pollOperation\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * CancelOnProgress is used as the return value of a Poller's onProgress method.\n * When a user invokes onProgress, they're required to pass in a function that will be\n * called as a callback with the new data received each time the poll operation is updated.\n * onProgress returns a function that will prevent any further update to reach the original callback.\n */\nexport type CancelOnProgress = () => void;\n\n/**\n * PollProgressCallback is the type of the callback functions sent to onProgress.\n * These functions will receive a TState that is defined by your implementation of\n * the Poller class.\n */\nexport type PollProgressCallback = (state: TState) => void;\n\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nexport class PollerStoppedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n\n/**\n * When a poller is cancelled through the `cancelOperation` method,\n * the poller will be rejected with an instance of the PollerCancelledError.\n */\nexport class PollerCancelledError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike, TResult> {\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(): Promise;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Stops the poller. After this, no manual or automated requests can be sent.\n */\n stopPolling(): void;\n /**\n * Returns true if the poller is stopped.\n */\n isStopped(): boolean;\n /**\n * Attempts to cancel the underlying operation.\n */\n cancelOperation(options?: { abortSignal?: AbortSignalLike }): Promise;\n /**\n * Returns the state of the operation.\n * The TState defined in PollerLike can be a subset of the TState defined in\n * the Poller implementation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n toString(): string;\n}\n\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\nexport abstract class Poller, TResult>\n implements PollerLike {\n private stopped: boolean = true;\n private resolve?: (value?: TResult) => void;\n private reject?: (error: PollerStoppedError | PollerCancelledError | Error) => void;\n private pollOncePromise?: Promise;\n private cancelPromise?: Promise;\n private promise: Promise;\n private pollProgressCallbacks: PollProgressCallback[] = [];\n\n /**\n * The poller's operation is available in full to any of the methods of the Poller class\n * and any class extending the Poller class.\n */\n protected operation: PollOperation;\n\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the PollOperation.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation Must contain the basic properties of PollOperation.\n */\n constructor(operation: PollOperation) {\n this.operation = operation;\n this.promise = new Promise(\n (\n resolve: (result?: TResult) => void,\n reject: (error: PollerStoppedError | PollerCancelledError | Error) => void\n ) => {\n this.resolve = resolve;\n this.reject = reject;\n }\n );\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {});\n }\n\n /**\n * Defines how much to wait between each poll request.\n * This has to be implemented by your custom poller.\n *\n * @azure/core-http has a simple implementation of a delay function that waits as many milliseconds as specified.\n * This can be used as follows:\n *\n * ```ts\n * import { delay } from \"@azure/core-http\";\n *\n * export class MyPoller extends Poller {\n * // The other necessary definitions.\n *\n * async delay(): Promise {\n * const milliseconds = 1000;\n * return delay(milliseconds);\n * }\n * }\n * ```\n *\n */\n protected abstract async delay(): Promise;\n\n /**\n * @internal\n * @ignore\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n private async startPolling(): Promise {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll();\n await this.delay();\n }\n }\n\n /**\n * @internal\n * @ignore\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n private async pollOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n const state: PollOperationState = this.operation.state;\n try {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this)\n });\n if (this.isDone() && this.resolve) {\n this.resolve(state.result);\n }\n }\n } catch (e) {\n state.error = e;\n if (this.reject) {\n this.reject(e);\n }\n throw e;\n }\n }\n\n /**\n * @internal\n * @ignore\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state The current operation state.\n */\n private fireProgress(state: TState): void {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n\n /**\n * @internal\n * @ignore\n * Invokes the underlying operation's cancel method, and rejects the\n * pollUntilDone promise.\n */\n private async cancelOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n this.operation = await this.operation.cancel(options);\n if (this.reject) {\n this.reject(new PollerCancelledError(\"Poller cancelled\"));\n }\n }\n\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n public poll(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = (): void => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise);\n }\n return this.pollOncePromise;\n }\n\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n public async pollUntilDone(): Promise {\n if (this.stopped) {\n this.startPolling().catch(this.reject);\n }\n return this.promise;\n }\n\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n public onProgress(callback: (state: TState) => void): CancelOnProgress {\n this.pollProgressCallbacks.push(callback);\n return (): void => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n\n /**\n * Returns true if the poller has finished polling.\n */\n public isDone(): boolean {\n const state: PollOperationState = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n\n /**\n * Stops the poller from continuing to poll.\n */\n public stopPolling(): void {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n\n /**\n * Returns true if the poller is stopped.\n */\n public isStopped(): boolean {\n return this.stopped;\n }\n\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options Optional properties passed to the operation's update method.\n */\n public cancelOperation(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.stopped) {\n this.stopped = true;\n }\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n } else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n public getOperationState(): TState {\n return this.operation.state;\n }\n\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n public getResult(): TResult | undefined {\n const state: PollOperationState = this.operation.state;\n return state.result;\n }\n\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n public toString(): string {\n return this.operation.toString();\n }\n}\n"],"names":["__extends"],"mappings":";;;;;;;;;;;;;AAAA;AAqBA;;;;;IAIwCA,4CAAK;IAC3C,4BAAY,OAAe;QAA3B,YACE,kBAAM,OAAO,CAAC,SAGf;QAFC,KAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;;KAC3D;IACH,yBAAC;AAAD,CANA,CAAwC,KAAK,GAM5C;AAED;;;;;IAI0CA,8CAAK;IAC7C,8BAAY,OAAe;QAA3B,YACE,kBAAM,OAAO,CAAC,SAGf;QAFC,KAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;;KAC7D;IACH,2BAAC;AAAD,CANA,CAA0C,KAAK,GAM9C;AA0DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8IE,gBAAY,SAAyC;QAArD,iBAeC;QA9FO,YAAO,GAAY,IAAI,CAAC;QAMxB,0BAAqB,GAAmC,EAAE,CAAC;QA0EjE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CACxB,UACE,OAAmC,EACnC,MAA0E;YAE1E,KAAI,CAAC,OAAO,GAAG,O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C,KAAK,CAAC;KAC7B;;;;;;;IAQM,0BAAS,GAAhB;QACE,IAAM,KAAK,GAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QAChE,OAAO,KAAK,CAAC,MAAM,CAAC;KACrB;;;;;IAMM,yBAAQ,GAAf;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAClC;IACH,aAAC;AAAD,CAAC;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/core-lro/package.json b/node_modules/@azure/core-lro/package.json new file mode 100644 index 000000000..51a6e0e88 --- /dev/null +++ b/node_modules/@azure/core-lro/package.json @@ -0,0 +1,173 @@ +{ + "_from": "@azure/core-lro@^1.0.2", + "_id": "@azure/core-lro@1.0.2", + "_inBundle": false, + "_integrity": "sha512-Yr0JD7GKryOmbcb5wHCQoQ4KCcH5QJWRNorofid+UvudLaxnbCfvKh/cUfQsGUqRjO9L/Bw4X7FP824DcHdMxw==", + "_location": "/@azure/core-lro", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/core-lro@^1.0.2", + "name": "@azure/core-lro", + "escapedName": "@azure%2fcore-lro", + "scope": "@azure", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.2.tgz", + "_shasum": "b7b51ff7b84910b7eb152a706b0531d020864f31", + "_spec": "@azure/core-lro@^1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation", + "email": "azsdkteam@microsoft.com", + "url": "https://github.com/Azure/azure-sdk-for-js" + }, + "browser": { + "os": false, + "process": false + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^1.1.1", + "events": "^3.0.0", + "tslib": "^1.10.0" + }, + "deprecated": false, + "description": "LRO Polling strtegy for the Azure SDK in TypeScript", + "devDependencies": { + "@microsoft/api-extractor": "7.7.11", + "@opentelemetry/api": "^0.6.1", + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/chai": "^4.1.6", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "chai": "^4.2.0", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "karma": "^4.0.1", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-junit-reporter": "^2.0.1", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-istanbul": "^0.6.0", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "npm-run-all": "^4.1.5", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-shim": "^1.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^3.1.1", + "ts-node": "^8.3.0", + "typescript": "~3.7.5", + "uglify-js": "^3.4.9" + }, + "files": [ + "types/core-lro.d.ts", + "dist/", + "dist-esm/", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-lro", + "keywords": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "lro", + "polling" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "dist-esm/src/index.js", + "name": "@azure/core-lro", + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "coverage/**/*", + "**/*.d.ts", + "**/*.js" + ], + "reporter": [ + "text", + "html", + "cobertura" + ], + "all": true + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "npm run build:es6 && npm run build:nodebrowser && npm run build:samples && npm run extract-api", + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build:samples": "tsc -p tsconfig.samples.json", + "build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\" \"samples/**/*.ts\"", + "clean": "rimraf dist dist-esm dist-test types *.log browser statistics.html coverage src/**/*.js test/**/*.js", + "execute:samples": "echo skipped", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\" \"samples/**/*.ts\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint -c ../../.eslintrc.old.json src test --ext .ts -f html -o core-lro-lintReport.html || exit 0", + "lint:fix": "eslint -c ../../.eslintrc.old.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "lint:terminal": "eslint -c ../../.eslintrc.old.json src test --ext .ts", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run build:test && karma start --single-run", + "unit-test:node": "npm run build:test && nyc mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace dist-test/index.node.js" + }, + "sdk-type": "client", + "sideEffects": false, + "tags": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "lro", + "polling" + ], + "types": "./types/core-lro.d.ts", + "version": "1.0.2" +} diff --git a/node_modules/@azure/core-lro/types/core-lro.d.ts b/node_modules/@azure/core-lro/types/core-lro.d.ts new file mode 100644 index 000000000..f6fb78b87 --- /dev/null +++ b/node_modules/@azure/core-lro/types/core-lro.d.ts @@ -0,0 +1,448 @@ +import { AbortSignalLike } from '@azure/abort-controller'; + +/** + * CancelOnProgress is used as the return value of a Poller's onProgress method. + * When a user invokes onProgress, they're required to pass in a function that will be + * called as a callback with the new data received each time the poll operation is updated. + * onProgress returns a function that will prevent any further update to reach the original callback. + */ +export declare type CancelOnProgress = () => void; + +/** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ +export declare abstract class Poller, TResult> implements PollerLike { + private stopped; + private resolve?; + private reject?; + private pollOncePromise?; + private cancelPromise?; + private promise; + private pollProgressCallbacks; + /** + * The poller's operation is available in full to any of the methods of the Poller class + * and any class extending the Poller class. + */ + protected operation: PollOperation; + /** + * A poller needs to be initialized by passing in at least the basic properties of the PollOperation. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation Must contain the basic properties of PollOperation. + */ + constructor(operation: PollOperation); + /** + * Defines how much to wait between each poll request. + * This has to be implemented by your custom poller. + * + * @azure/core-http has a simple implementation of a delay function that waits as many milliseconds as specified. + * This can be used as follows: + * + * ```ts + * import { delay } from "@azure/core-http"; + * + * export class MyPoller extends Poller { + * // The other necessary definitions. + * + * async delay(): Promise { + * const milliseconds = 1000; + * return delay(milliseconds); + * } + * } + * ``` + * + */ + protected abstract delay(): Promise; + /* Excluded from this release type: startPolling */ + /* Excluded from this release type: pollOnce */ + /* Excluded from this release type: fireProgress */ + /* Excluded from this release type: cancelOnce */ + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * @param options Optional properties passed to the operation's update method. + */ + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Stops the poller from continuing to poll. + */ + stopPolling(): void; + /** + * Returns true if the poller is stopped. + */ + isStopped(): boolean; + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options Optional properties passed to the operation's update method. + */ + cancelOperation(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString(): string; +} + +/** + * When a poller is cancelled through the `cancelOperation` method, + * the poller will be rejected with an instance of the PollerCancelledError. + */ +export declare class PollerCancelledError extends Error { + constructor(message: string); +} + +/** + * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with. + */ +export declare interface PollerLike, TResult> { + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Stops the poller. After this, no manual or automated requests can be sent. + */ + stopPolling(): void; + /** + * Returns true if the poller is stopped. + */ + isStopped(): boolean; + /** + * Attempts to cancel the underlying operation. + */ + cancelOperation(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + /** + * Returns the state of the operation. + * The TState defined in PollerLike can be a subset of the TState defined in + * the Poller implementation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString(): string; +} + +/** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ +export declare class PollerStoppedError extends Error { + constructor(message: string); +} + +/** + * PollOperation is an interface that defines how to update the local reference of the state of the remote + * long running operation, just as well as how to request the cancellation of the same operation. + * + * It also has a method to serialize the operation so that it can be stored and resumed at any time. + */ +export declare interface PollOperation { + /** + * The state of the operation. + * It will be used to store the basic properties of PollOperationState, + * plus any custom property that the implementation may require. + */ + state: TState; + /** + * Defines how to request the remote service for updates on the status of the long running operation. + * + * It optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * Also optionally receives a "fireProgress" function, which, if called, is responsible for triggering the + * poller's onProgress callbacks. + * + * @param options Optional properties passed to the operation's update method. + */ + update(options?: { + abortSignal?: AbortSignalLike; + fireProgress?: (state: TState) => void; + }): Promise>; + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. + * + * It returns a promise that should be resolved with an updated version of the poller's operation. + * + * @param options Optional properties passed to the operation's update method. + */ + cancel(options?: { + abortSignal?: AbortSignalLike; + }): Promise>; + /** + * Serializes the operation. + * Useful when wanting to create a poller that monitors an existing operation. + */ + toString(): string; +} + +/** + * PollOperationState contains an opinionated list of the smallest set of properties needed + * to define any long running operation poller. + * + * While the Poller class works as the local control mechanism to start triggering, wait for, + * and potentially cancel a long running operation, the PollOperationState documents the status + * of the remote long running operation. + * + * It should be updated at least when the operation starts, when it's finished, and when it's cancelled. + * Though, implementations can have any other number of properties that can be updated by other reasons. + */ +export declare interface PollOperationState { + /** + * True if the operation has started. + */ + isStarted?: boolean; + /** + * True if the operation has been completed. + */ + isCompleted?: boolean; + /** + * True if the operation has been cancelled. + */ + isCancelled?: boolean; + /** + * Will exist if the operation encountered any error. + */ + error?: Error; + /** + * Will exist if the operation concluded in a result of an expected type. + */ + result?: TResult; +} + +/** + * PollProgressCallback is the type of the callback functions sent to onProgress. + * These functions will receive a TState that is defined by your implementation of + * the Poller class. + */ +export declare type PollProgressCallback = (state: TState) => void; + +export { } diff --git a/node_modules/@azure/core-paging/CHANGELOG.md b/node_modules/@azure/core-paging/CHANGELOG.md new file mode 100644 index 000000000..78dbe63e7 --- /dev/null +++ b/node_modules/@azure/core-paging/CHANGELOG.md @@ -0,0 +1,26 @@ +# Release History + +## 1.1.3 (2020-09-30) + +- Also pack `esm` build in addition to `commonjs` build. This fixes the warning about `core-paging` in Angular 10 applications [Issue 11550](https://github.com/Azure/azure-sdk-for-js/issues/11550). + +## 1.1.2 (2020-09-02) + +- Provided down-leveled type declaration files to support older TypeScript versions 3.1 to 3.6. + [PR 10599](https://github.com/Azure/azure-sdk-for-js/pull/10599) + +## 1.1.1 (2020-04-02) + +- The generic argument `PageT` now has default type of `T[]`. (PR #7569) + +## 1.1.0 (2020-02-28) + +- Added new generic argument to `PagedAsyncIterableIterator` for custom `PageSettings` for services that use client-driven paging or other paging patterns. + +## 1.0.0 (2019-10-29) + +This release marks the general availability of the `@azure/core-paging` package. + +## 1.0.0-preview.2 (2019-09-09) + +Updates `PagedAsyncIterableIterator.next` return type to be compatible with TypeScript 3.6.x. (PR #4928) diff --git a/node_modules/@azure/core-paging/LICENSE b/node_modules/@azure/core-paging/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-paging/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-paging/README.md b/node_modules/@azure/core-paging/README.md new file mode 100644 index 000000000..c2f6b2cca --- /dev/null +++ b/node_modules/@azure/core-paging/README.md @@ -0,0 +1,61 @@ +# Azure Core Paging client library for JavaScript + +This library provides core types for paging async iterable iterators. + +## Getting started + +### Installation + +If using this as part of another project in the [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo, +then run `rush install` after cloning the repo. + +Otherwise, use npm to install this package in your application as follows + +```javascript +npm install @azure/core-paging +``` + +## Key concepts + +You can find an explanation of how this repository's code works by going to our [architecture overview](https://github.com/Azure/ms-rest-js/blob/master/docs/architectureOverview.md). + +## Examples + +Example of building with the types: + +```typescript + public listSecrets( + options: ListSecretsOptions = {} + ): PagedAsyncIterableIterator { + const iter = this.listSecretsAll(options); + return { + async next() { return iter.next(); }, + [Symbol.asyncIterator]() { return this; }, + byPage: (settings: PageSettings = {}) => this.listSecretsPage(settings, options), + }; + } +``` + +And using the types: + +``` + for await (let page of client.listSecrets().byPage({ maxPageSize: 2 })) { + for (const secret of page) { + console.log("secret: ", secret); + } + } +``` + +## Next steps + +Try out this package in your application when dealing with async iterable iterators and provide feedback! + +## Troubleshooting + +Log an issue at https://github.com/Azure/azure-sdk-for-js/issues + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-paging%2FREADME.png) diff --git a/node_modules/@azure/core-paging/dist-esm/src/index.js b/node_modules/@azure/core-paging/dist-esm/src/index.js new file mode 100644 index 000000000..d769995a2 --- /dev/null +++ b/node_modules/@azure/core-paging/dist-esm/src/index.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import "@azure/core-asynciterator-polyfill"; diff --git a/node_modules/@azure/core-paging/dist/index.js b/node_modules/@azure/core-paging/dist/index.js new file mode 100644 index 000000000..f0dd657f8 --- /dev/null +++ b/node_modules/@azure/core-paging/dist/index.js @@ -0,0 +1,5 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", { value: true }); +require("@azure/core-asynciterator-polyfill"); diff --git a/node_modules/@azure/core-paging/package.json b/node_modules/@azure/core-paging/package.json new file mode 100644 index 000000000..ac90eb20e --- /dev/null +++ b/node_modules/@azure/core-paging/package.json @@ -0,0 +1,109 @@ +{ + "_from": "@azure/core-paging@^1.1.1", + "_id": "@azure/core-paging@1.1.3", + "_inBundle": false, + "_integrity": "sha512-his7Ah40ThEYORSpIAwuh6B8wkGwO/zG7gqVtmSE4WAJ46e36zUDXTKReUCLBDc6HmjjApQQxxcRFy5FruG79A==", + "_location": "/@azure/core-paging", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/core-paging@^1.1.1", + "name": "@azure/core-paging", + "escapedName": "@azure%2fcore-paging", + "scope": "@azure", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.1.3.tgz", + "_shasum": "3587c9898a0530cacb64bab216d7318468aa5efc", + "_spec": "@azure/core-paging@^1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@azure/core-asynciterator-polyfill": "^1.0.0" + }, + "deprecated": false, + "description": "Core types for paging async iterable iterators", + "devDependencies": { + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@types/node": "^8.0.0", + "eslint": "^6.1.0", + "prettier": "^1.16.4", + "typescript": "~3.9.3" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "types/latest/core-paging.d.ts", + "types/3.1", + "dist/index.js", + "dist-esm/src/index.js", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-paging/README.md", + "keywords": [ + "microsoft", + "clientruntime", + "azure", + "cloud" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "dist-esm/src/index.js", + "name": "@azure/core-paging", + "private": false, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p tsconfig.json && tsc -p tsconfig.es.json", + "build:test": "echo skipped", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm", + "execute:samples": "echo skipped", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json src --ext .ts", + "lint:fix": "eslint package.json src --ext .ts --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "echo skipped" + }, + "sdk-type": "client", + "sideEffects": true, + "tags": [ + "microsoft", + "clientruntime" + ], + "types": "./types/latest/core-paging.d.ts", + "typesVersions": { + "<3.6": { + "types/latest/*": [ + "types/3.1/*" + ] + } + }, + "version": "1.1.3" +} diff --git a/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts b/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts new file mode 100644 index 000000000..bede1b5a7 --- /dev/null +++ b/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts @@ -0,0 +1,33 @@ +import "@azure/core-asynciterator-polyfill"; +/** + * @interface + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * @member {string} [continuationToken] The token that keeps track of where to continue the iterator + */ + continuationToken?: string; + /** + * @member {number} [pageSize] The size of the page during paged iteration + */ + maxPageSize?: number; +} +/** + * @interface + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: PageSettingsT) => AsyncIterableIterator; +} diff --git a/node_modules/@azure/core-paging/types/latest/core-paging.d.ts b/node_modules/@azure/core-paging/types/latest/core-paging.d.ts new file mode 100644 index 000000000..ee04a39bf --- /dev/null +++ b/node_modules/@azure/core-paging/types/latest/core-paging.d.ts @@ -0,0 +1,33 @@ +import "@azure/core-asynciterator-polyfill"; +/** + * @interface + * An interface that tracks the settings for paged iteration + */ +export interface PageSettings { + /** + * @member {string} [continuationToken] The token that keeps track of where to continue the iterator + */ + continuationToken?: string; + /** + * @member {number} [pageSize] The size of the page during paged iteration + */ + maxPageSize?: number; +} +/** + * @interface + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: PageSettingsT) => AsyncIterableIterator; +} diff --git a/node_modules/@azure/core-tracing/CHANGELOG.md b/node_modules/@azure/core-tracing/CHANGELOG.md new file mode 100644 index 000000000..5ff5179b3 --- /dev/null +++ b/node_modules/@azure/core-tracing/CHANGELOG.md @@ -0,0 +1,42 @@ +# Release History + +## 1.0.0-preview.9 (2020-08-04) + +- Update `@opentelemetry/api` to version 0.10.2 [PR 10393](https://github.com/Azure/azure-sdk-for-js/pull/10393) + +## 1.0.0-preview.8 (2020-04-28) + +- Update `TestSpan` to allow setting span attributes [PR link](https://github.com/Azure/azure-sdk-for-js/pull/6565). +- [BREAKING] Migrate to OpenTelemetry 0.6 using the new `@opentelemetry/api` package. There were a few breaking changes: + - `SpanContext` now requires traceFlags to be set. + - `Tracer` has removed `recordSpanData`, `getBinaryFormat`, and `getHttpTextFormat`. + - `Tracer.getCurrentSpan` returns `undefined` instead of `null` when unset. + - `Link` objects renamed `spanContext` property to `context`. + +## 1.0.0-preview.7 (2019-12-03) + +- Updated the behavior of how incompatible versions of OpenTelemetry Tracer are handled. Now, errors will be thrown only if the user has manually set a Tracer. This means that incompatible versions will be silently ignored when tracing is not enabled. +- Updated to use OpenTelemetry 0.2 via the `@opentelemetry/types` package. There were two breaking changes in this update: + - `isRecordingEvents` on `Span` was renamed to `isRecording`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/454) + - `addLink` was removed from `Span` as links are now only allowed to be added during span creation. This is possible by specifying any necessary links inside `SpanOptions`. [PR link](https://github.com/open-telemetry/opentelemetry-js/pull/449) + +## 1.0.0-preview.5 (2019-10-22) + +- Fixes issue where loading multiple copies of this module could result in the tracer set by `setTracer()` being reset. + +## 1.0.0-preview.4 (2019-10-08) + +- Remove dependency on the `debug` module to ensure compatibility with IE11 + +## 1.0.0-preview.3 (2019-10-07) + +- Updated to use the latest types from OpenTelemetry (PR [#5182](https://github.com/Azure/azure-sdk-for-js/pull/5182)) +- Clean up and refactored code for easier usage and testability. (PR [#5233](https://github.com/Azure/azure-sdk-for-js/pull/5233) and PR [#5283](https://github.com/Azure/azure-sdk-for-js/pull/5283)) + +## 1.0.0-preview.2 (2019-09-09) + +Updated the `OpenCensusSpanPlugin` & the `NoOpSpanPlugin` to support for retrieving span context. This allows updating of request headers with the right [span context](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format). (PR [#4712](https://github.com/Azure/azure-sdk-for-js/pull/4712)) + +## 1.0.0-preview.1 (2019-08-05) + +Provides low-level interfaces and helper methods for tracing in Azure SDK diff --git a/node_modules/@azure/core-tracing/LICENSE b/node_modules/@azure/core-tracing/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/core-tracing/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/core-tracing/README.md b/node_modules/@azure/core-tracing/README.md new file mode 100644 index 000000000..30aa19f1f --- /dev/null +++ b/node_modules/@azure/core-tracing/README.md @@ -0,0 +1,90 @@ +# Azure Core tracing library for JavaScript + +This is the core tracing library that provides low-level interfaces and helper methods for tracing in Azure SDK JavaScript libraries which work in the browser and Node.js. + +## Getting started + +### Installation + +Install this library using npm as follows + +``` +npm install @azure/core-tracing +``` + +## Key Concepts + +The `@azure/core-tracing` package supports enabling tracing for Azure SDK packages, using an [OpenTelemetry](https://opentelemetry.io/) `Tracer`. If you are using [OpenCensus](https://opencensus.io/) instead, we provide an `OpenCensusTracerWrapper` that allows you to convert an OpenCensus `Tracer` into an OpenTelemetry `Tracer`. + +By default, all libraries log with a `NoOpTracer` that takes no action. +To change this, you have to use `setTracer` to set a new default `Tracer`. + +## Examples + +### Example 1 - Setting an OpenTelemetry Tracer + +```js +const opentelemetry = require("@opentelemetry/core"); +const { BasicTracer, SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin"); +const { setTracer } = require("@azure/core-tracing"); + +const exporter = new ZipkinExporter({ + serviceName: "azure-tracing-sample" +}); +const tracer = new BasicTracer(); +tracer.addSpanProcessor(new SimpleSpanProcessor(exporter)); + +opentelemetry.initGlobalTracer(tracer); + +const rootSpan = opentelemetry.getTracer().startSpan("root"); + +// Call some client library methods and pass rootSpan via tracingOptions. + +rootSpan.end(); +exporter.shutdown(); +``` + +### Example 2 - Setting an OpenCensus Tracer + +```js +const tracing = require("@opencensus/nodejs"); +const { ZipkinTraceExporter } = require("@opencensus/exporter-zipkin"); +const { + setTracer, + OpenCensusTracerWrapper, + OpenCensusSpanWrapper +} = require("@azure/core-tracing"); + +const tracer = tracing.start({ samplingRate: 1 }).tracer; + +tracer.registerSpanEventListener( + new ZipkinTraceExporter({ + serviceName: "azure-tracing-sample", + bufferTimeout: 2 + }) +); +setTracer(new OpenCensusTracerWrapper(tracer)); +tracer.startRootSpan({ name: "root" }, async (rootSpanEx) => { + const rootSpan = new OpenCensusSpanWrapper(rootSpanEx); + // Call some client library methods and pass rootSpan via tracingOptions. + rootSpanEx.end(); // rootSpan.end() should work as well +}); +``` + +### Example 3 - Passing parent Spans to library operations + +```js +// Given a BlobClient from @azure/storage-blob +const result = await blobClient.download(undefined, undefined, { + tracingOptions: { + spanOptions: { parent: rootSpan } + } +}); +``` + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-tracing%2FREADME.png) diff --git a/node_modules/@azure/core-tracing/dist-esm/src/index.js b/node_modules/@azure/core-tracing/dist-esm/src/index.js new file mode 100644 index 000000000..8d9af3913 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/index.js @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { getTracer, setTracer } from "./tracerProxy"; +// Tracers and wrappers +export { NoOpSpan } from "./tracers/noop/noOpSpan"; +export { NoOpTracer } from "./tracers/noop/noOpTracer"; +export { OpenCensusSpanWrapper } from "./tracers/opencensus/openCensusSpanWrapper"; +export { OpenCensusTracerWrapper } from "./tracers/opencensus/openCensusTracerWrapper"; +export { TestTracer } from "./tracers/test/testTracer"; +export { TestSpan } from "./tracers/test/testSpan"; +// Utilities +export { extractSpanContextFromTraceParentHeader, getTraceParentHeader } from "./utils/traceParentHeader"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/index.js.map b/node_modules/@azure/core-tracing/dist-esm/src/index.js.map new file mode 100644 index 000000000..236a8dcac --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErD,uBAAuB;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,UAAU,EAA4B,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAQnD,YAAY;AACZ,OAAO,EACL,uCAAuC,EACvC,oBAAoB,EACrB,MAAM,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { getTracer, setTracer } from \"./tracerProxy\";\n\n// Tracers and wrappers\nexport { NoOpSpan } from \"./tracers/noop/noOpSpan\";\nexport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nexport { OpenCensusSpanWrapper } from \"./tracers/opencensus/openCensusSpanWrapper\";\nexport { OpenCensusTracerWrapper } from \"./tracers/opencensus/openCensusTracerWrapper\";\nexport { TestTracer, SpanGraph, SpanGraphNode } from \"./tracers/test/testTracer\";\nexport { TestSpan } from \"./tracers/test/testSpan\";\n\n// Shared interfaces\nexport { SpanContext, SpanOptions, TraceFlags } from \"./interfaces\";\n\n// OT interfaces\nexport { SpanContext as OTSpanContext, SpanOptions as OTSpanOptions } from \"@opentelemetry/api\";\n\n// Utilities\nexport {\n extractSpanContextFromTraceParentHeader,\n getTraceParentHeader\n} from \"./utils/traceParentHeader\";\n\n// OpenCensus Interfaces\nexport { Tracer as OpenCensusTracer, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nexport { OperationTracingOptions } from \"./interfaces\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js b/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js new file mode 100644 index 000000000..d3f6eb95f --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map b/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map new file mode 100644 index 000000000..6811f51fc --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Shorthand enum for common traceFlags values inside SpanContext\n */\nexport const enum TraceFlags {\n /** No flag set. */\n NONE = 0x0,\n /** Caller is collecting trace information. */\n SAMPLED = 0x1\n}\n\n/**\n * A light interface that tries to be structurally compatible with OpenTelemetry\n */\nexport interface SpanContext {\n /**\n * UUID of a trace.\n */\n traceId: string;\n /**\n * UUID of a Span.\n */\n spanId: string;\n /**\n * https://www.w3.org/TR/trace-context/#trace-flags\n */\n traceFlags: number;\n}\n\n/**\n * An interface that enables manual propagation of Spans\n */\nexport interface SpanOptions {\n /**\n * The SpanContext that refers to a parent span, if any.\n * A null value indicates that this should be a new root span,\n * rather than potentially detecting a span via a context manager.\n */\n parent?: SpanContext | null;\n /**\n * Attributes to set on the Span\n */\n attributes?: { [key: string]: unknown };\n}\n\n/**\n * Tracing options to set on an operation.\n */\nexport interface OperationTracingOptions {\n /**\n * OpenTelemetry SpanOptions used to create a span when tracing is enabled.\n */\n spanOptions?: SpanOptions;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js b/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js new file mode 100644 index 000000000..f7f94c2be --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { NoOpTracer } from "./tracers/noop/noOpTracer"; +import { getCache } from "./utils/cache"; +var defaultTracer; +function getDefaultTracer() { + if (!defaultTracer) { + defaultTracer = new NoOpTracer(); + } + return defaultTracer; +} +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +export function setTracer(tracer) { + var cache = getCache(); + cache.tracer = tracer; +} +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +export function getTracer() { + var cache = getCache(); + if (!cache.tracer) { + return getDefaultTracer(); + } + return cache.tracer; +} +//# sourceMappingURL=tracerProxy.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map new file mode 100644 index 000000000..321fadb6c --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracerProxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracerProxy.js","sourceRoot":"","sources":["../../src/tracerProxy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,IAAI,aAAqB,CAAC;AAE1B,SAAS,gBAAgB;IACvB,IAAI,CAAC,aAAa,EAAE;QAClB,aAAa,GAAG,IAAI,UAAU,EAAE,CAAC;KAClC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,IAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS;IACvB,IAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB,OAAO,gBAAgB,EAAE,CAAC;KAC3B;IACD,OAAO,KAAK,CAAC,MAAM,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getCache } from \"./utils/cache\";\n\nlet defaultTracer: Tracer;\n\nfunction getDefaultTracer(): Tracer {\n if (!defaultTracer) {\n defaultTracer = new NoOpTracer();\n }\n return defaultTracer;\n}\n\n/**\n * Sets the global tracer, enabling tracing for the Azure SDK.\n * @param tracer An OpenTelemetry Tracer instance.\n */\nexport function setTracer(tracer: Tracer): void {\n const cache = getCache();\n cache.tracer = tracer;\n}\n\n/**\n * Retrieves the active tracer, or returns a\n * no-op implementation if one is not set.\n */\nexport function getTracer(): Tracer {\n const cache = getCache();\n if (!cache.tracer) {\n return getDefaultTracer();\n }\n return cache.tracer;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js new file mode 100644 index 000000000..65dbdcbb8 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { TraceFlags } from "@opentelemetry/api"; +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +var NoOpSpan = /** @class */ (function () { + function NoOpSpan() { + } + /** + * Returns the SpanContext associated with this Span. + */ + NoOpSpan.prototype.context = function () { + return { + spanId: "", + traceId: "", + traceFlags: TraceFlags.NONE + }; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + NoOpSpan.prototype.end = function (_endTime) { + /* Noop */ + }; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + NoOpSpan.prototype.setAttribute = function (_key, _value) { + return this; + }; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + NoOpSpan.prototype.setAttributes = function (_attributes) { + return this; + }; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + NoOpSpan.prototype.addEvent = function (_name, _attributes) { + return this; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + NoOpSpan.prototype.setStatus = function (_status) { + return this; + }; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + NoOpSpan.prototype.updateName = function (_name) { + return this; + }; + /** + * Returns whether this span will be recorded + */ + NoOpSpan.prototype.isRecording = function () { + return false; + }; + return NoOpSpan; +}()); +export { NoOpSpan }; +//# sourceMappingURL=noOpSpan.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map new file mode 100644 index 000000000..b94a88798 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noOpSpan.js","sourceRoot":"","sources":["../../../../src/tracers/noop/noOpSpan.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAyC,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvF;;GAEG;AACH;IAAA;IAqEA,CAAC;IApEC;;OAEG;IACH,0BAAO,GAAP;QACE,OAAO;YACL,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,UAAU,CAAC,IAAI;SAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,sBAAG,GAAH,UAAI,QAAiB;QACnB,UAAU;IACZ,CAAC;IAED;;;;OAIG;IACH,+BAAY,GAAZ,UAAa,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,gCAAa,GAAb,UAAc,WAAuB;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,2BAAQ,GAAR,UAAS,KAAa,EAAE,WAAwB;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,4BAAS,GAAT,UAAU,OAAe;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,6BAAU,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,8BAAW,GAAX;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IACH,eAAC;AAAD,CAAC,AArED,IAqEC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Span, SpanContext, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Span that can safely be used without side-effects.\n */\nexport class NoOpSpan implements Span {\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return {\n spanId: \"\",\n traceId: \"\",\n traceFlags: TraceFlags.NONE\n };\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n /* Noop */\n }\n\n /**\n * Sets an attribute on the Span\n * @param _key the attribute key\n * @param _value the attribute value\n */\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param _attributes the attributes to add\n */\n setAttributes(_attributes: Attributes): this {\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param _name The name of the event\n * @param _attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n return this;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param _status The status to set.\n */\n setStatus(_status: Status): this {\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param _name the new Span name\n */\n updateName(_name: string): this {\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js new file mode 100644 index 000000000..1781c33ec --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { NoOpSpan } from "./noOpSpan"; +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +var NoOpTracer = /** @class */ (function () { + function NoOpTracer() { + } + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + NoOpTracer.prototype.startSpan = function (_name, _options) { + return new NoOpSpan(); + }; + /** + * Returns the current Span from the current context, if available. + */ + NoOpTracer.prototype.getCurrentSpan = function () { + return new NoOpSpan(); + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + NoOpTracer.prototype.withSpan = function (_span, fn) { + return fn(); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + NoOpTracer.prototype.bind = function (target, _span) { + return target; + }; + return NoOpTracer; +}()); +export { NoOpTracer }; +//# sourceMappingURL=noOpTracer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map new file mode 100644 index 000000000..08f93cec5 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/noop/noOpTracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noOpTracer.js","sourceRoot":"","sources":["../../../../src/tracers/noop/noOpTracer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;GAGG;AACH;IAAA;IAkCA,CAAC;IAjCC;;;;OAIG;IACH,8BAAS,GAAT,UAAU,KAAa,EAAE,QAAsB;QAC7C,OAAO,IAAI,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,mCAAc,GAAd;QACE,OAAO,IAAI,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,6BAAQ,GAAR,UAA0D,KAAW,EAAE,EAAK;QAC1E,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,yBAAI,GAAJ,UAAQ,MAAS,EAAE,KAAY;QAC7B,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AAlCD,IAkCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NoOpSpan } from \"./noOpSpan\";\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Tracer that can be used when tracing\n * is disabled.\n */\nexport class NoOpTracer implements Tracer {\n /**\n * Starts a new Span.\n * @param _name The name of the span.\n * @param _options The SpanOptions used during Span creation.\n */\n startSpan(_name: string, _options?: SpanOptions): Span {\n return new NoOpSpan();\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span {\n return new NoOpSpan();\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param fn The function to be executed.\n */\n withSpan ReturnType>(_span: Span, fn: T): ReturnType {\n return fn();\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(target: T, _span?: Span): T {\n return target;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js new file mode 100644 index 000000000..8b7a49f66 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { OpenCensusTraceStateWrapper } from "./openCensusTraceStateWrapper"; +function isWrappedSpan(span) { + return !!span && span.getWrappedSpan !== undefined; +} +function isTracer(tracerOrSpan) { + return tracerOrSpan.getWrappedTracer !== undefined; +} +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +var OpenCensusSpanWrapper = /** @class */ (function () { + function OpenCensusSpanWrapper(tracerOrSpan, name, options) { + if (name === void 0) { name = ""; } + if (options === void 0) { options = {}; } + if (isTracer(tracerOrSpan)) { + var parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined; + this._span = tracerOrSpan.getWrappedTracer().startChildSpan({ + name: name, + childOf: parent + }); + this._span.start(); + if (options.links) { + for (var _i = 0, _a = options.links; _i < _a.length; _i++) { + var link = _a[_i]; + // Since there is no way to set the link relationship, leave it as Unspecified. + this._span.addLink(link.context.traceId, link.context.spanId, 0 /* LinkType.UNSPECIFIED */, link.attributes); + } + } + } + else { + this._span = tracerOrSpan; + } + } + /** + * The underlying OpenCensus Span + */ + OpenCensusSpanWrapper.prototype.getWrappedSpan = function () { + return this._span; + }; + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + OpenCensusSpanWrapper.prototype.end = function (_endTime) { + this._span.end(); + }; + /** + * Returns the SpanContext associated with this Span. + */ + OpenCensusSpanWrapper.prototype.context = function () { + var openCensusSpanContext = this._span.spanContext; + return { + spanId: openCensusSpanContext.spanId, + traceId: openCensusSpanContext.traceId, + traceFlags: openCensusSpanContext.options, + traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState) + }; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + OpenCensusSpanWrapper.prototype.setAttribute = function (key, value) { + this._span.addAttribute(key, value); + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + OpenCensusSpanWrapper.prototype.setAttributes = function (attributes) { + this._span.attributes = attributes; + return this; + }; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + OpenCensusSpanWrapper.prototype.addEvent = function (_name, _attributes) { + throw new Error("Method not implemented."); + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + OpenCensusSpanWrapper.prototype.setStatus = function (status) { + this._span.setStatus(status.code, status.message); + return this; + }; + /** + * Updates the name of the Span + * @param name the new Span name + */ + OpenCensusSpanWrapper.prototype.updateName = function (name) { + this._span.name = name; + return this; + }; + /** + * Returns whether this span will be recorded + */ + OpenCensusSpanWrapper.prototype.isRecording = function () { + // NoRecordSpans have an empty traceId + return !!this._span.traceId; + }; + return OpenCensusSpanWrapper; +}()); +export { OpenCensusSpanWrapper }; +//# sourceMappingURL=openCensusSpanWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map new file mode 100644 index 000000000..d5338ebb9 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusSpanWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusSpanWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusSpanWrapper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAI5E,SAAS,aAAa,CAAC,IAAgC;IACrD,OAAO,CAAC,CAAC,IAAI,IAAK,IAA8B,CAAC,cAAc,KAAK,SAAS,CAAC;AAChF,CAAC;AAED,SAAS,QAAQ,CACf,YAAsD;IAEtD,OAAQ,YAAwC,CAAC,gBAAgB,KAAK,SAAS,CAAC;AAClF,CAAC;AAED;;GAEG;AACH;IAsBE,+BACE,YAAsD,EACtD,IAAiB,EACjB,OAAyB;QADzB,qBAAA,EAAA,SAAiB;QACjB,wBAAA,EAAA,YAAyB;QAEzB,IAAI,QAAQ,CAAC,YAAY,CAAC,EAAE;YAC1B,IAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3F,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC;gBAC1D,IAAI,MAAA;gBACJ,OAAO,EAAE,MAAM;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACnB,IAAI,OAAO,CAAC,KAAK,EAAE;gBACjB,KAAmB,UAAa,EAAb,KAAA,OAAO,CAAC,KAAK,EAAb,cAAa,EAAb,IAAa,EAAE;oBAA7B,IAAM,IAAI,SAAA;oBACb,+EAA+E;oBAC/E,IAAI,CAAC,KAAK,CAAC,OAAO,CAChB,IAAI,CAAC,OAAO,CAAC,OAAO,EACpB,IAAI,CAAC,OAAO,CAAC,MAAM,EACnB,CAAC,CAAC,0BAA0B,EAC5B,IAAI,CAAC,UA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IAAY;QACrB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,2CAAW,GAAX;QACE,sCAAsC;QACtC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9B,CAAC;IACH,4BAAC;AAAD,CAAC,AA9HD,IA8HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SpanContext, Span, SpanOptions, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\nimport { OpenCensusTraceStateWrapper } from \"./openCensusTraceStateWrapper\";\nimport { OpenCensusTracerWrapper } from \"./openCensusTracerWrapper\";\nimport { Attributes as OpenCensusAttributes, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nfunction isWrappedSpan(span?: Span | SpanContext | null): span is OpenCensusSpanWrapper {\n return !!span && (span as OpenCensusSpanWrapper).getWrappedSpan !== undefined;\n}\n\nfunction isTracer(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan\n): tracerOrSpan is OpenCensusTracerWrapper {\n return (tracerOrSpan as OpenCensusTracerWrapper).getWrappedTracer !== undefined;\n}\n\n/**\n * An implementation of OpenTelemetry Span that wraps an OpenCensus Span.\n */\nexport class OpenCensusSpanWrapper implements Span {\n private _span: OpenCensusSpan;\n\n /**\n * The underlying OpenCensus Span\n */\n public getWrappedSpan(): OpenCensusSpan {\n return this._span;\n }\n\n /**\n * Wraps an existing OpenCensus Span\n * @param span A Span or RootSpan from OpenCensus\n */\n constructor(span: OpenCensusSpan);\n /**\n * Create a new OpenCensus Span and wrap it.\n * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper\n * @param name The name of the Span\n * @param options Options for the Span\n */\n constructor(tracer: OpenCensusTracerWrapper, name: string, options?: SpanOptions);\n constructor(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan,\n name: string = \"\",\n options: SpanOptions = {}\n ) {\n if (isTracer(tracerOrSpan)) {\n const parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined;\n this._span = tracerOrSpan.getWrappedTracer().startChildSpan({\n name,\n childOf: parent\n });\n this._span.start();\n if (options.links) {\n for (const link of options.links) {\n // Since there is no way to set the link relationship, leave it as Unspecified.\n this._span.addLink(\n link.context.traceId,\n link.context.spanId,\n 0 /* LinkType.UNSPECIFIED */,\n link.attributes as OpenCensusAttributes\n );\n }\n }\n } else {\n this._span = tracerOrSpan;\n }\n }\n\n /**\n * Marks the end of Span execution.\n * @param endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this._span.end();\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n const openCensusSpanContext = this._span.spanContext;\n\n return {\n spanId: openCensusSpanContext.spanId,\n traceId: openCensusSpanContext.traceId,\n traceFlags: openCensusSpanContext.options as TraceFlags,\n traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState)\n };\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this._span.addAttribute(key, value as any);\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n this._span.attributes = attributes as OpenCensusAttributes;\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param name The name of the event\n * @param attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this._span.setStatus(status.code, status.message);\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param name the new Span name\n */\n updateName(name: string): this {\n this._span.name = name;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n // NoRecordSpans have an empty traceId\n return !!this._span.traceId;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js new file mode 100644 index 000000000..e4b091fc0 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * @ignore + * @internal + */ +var OpenCensusTraceStateWrapper = /** @class */ (function () { + function OpenCensusTraceStateWrapper(state) { + this._state = state; + } + OpenCensusTraceStateWrapper.prototype.get = function (_key) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.set = function (_key, _value) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.unset = function (_key) { + throw new Error("Method not implemented"); + }; + OpenCensusTraceStateWrapper.prototype.serialize = function () { + return this._state || ""; + }; + return OpenCensusTraceStateWrapper; +}()); +export { OpenCensusTraceStateWrapper }; +//# sourceMappingURL=openCensusTraceStateWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map new file mode 100644 index 000000000..225f67a55 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTraceStateWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusTraceStateWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusTraceStateWrapper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH;IAGE,qCAAY,KAAc;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,yCAAG,GAAH,UAAI,IAAY;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,yCAAG,GAAH,UAAI,IAAY,EAAE,MAAc;QAC9B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,2CAAK,GAAL,UAAM,IAAY;QAChB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IAED,+CAAS,GAAT;QACE,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IAC3B,CAAC;IACH,kCAAC;AAAD,CAAC,AAtBD,IAsBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TraceState } from \"@opentelemetry/api\";\n\n/**\n * @ignore\n * @internal\n */\nexport class OpenCensusTraceStateWrapper implements TraceState {\n private readonly _state?: string;\n\n constructor(state?: string) {\n this._state = state;\n }\n\n get(_key: string): string | undefined {\n throw new Error(\"Method not implemented.\");\n }\n\n set(_key: string, _value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n\n unset(_key: string): void {\n throw new Error(\"Method not implemented\");\n }\n\n serialize(): string {\n return this._state || \"\";\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js new file mode 100644 index 000000000..5611ccc40 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { OpenCensusSpanWrapper } from "./openCensusSpanWrapper"; +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +var OpenCensusTracerWrapper = /** @class */ (function () { + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + function OpenCensusTracerWrapper(tracer) { + this._tracer = tracer; + } + /** + * The wrapped OpenCensus Tracer + */ + OpenCensusTracerWrapper.prototype.getWrappedTracer = function () { + return this._tracer; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + OpenCensusTracerWrapper.prototype.startSpan = function (name, options) { + return new OpenCensusSpanWrapper(this, name, options); + }; + /** + * Returns the current Span from the current context, if available. + */ + OpenCensusTracerWrapper.prototype.getCurrentSpan = function () { + return undefined; + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + OpenCensusTracerWrapper.prototype.withSpan = function (_span, _fn) { + throw new Error("Method not implemented."); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + OpenCensusTracerWrapper.prototype.bind = function (_target, _span) { + throw new Error("Method not implemented."); + }; + return OpenCensusTracerWrapper; +}()); +export { OpenCensusTracerWrapper }; +//# sourceMappingURL=openCensusTracerWrapper.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map new file mode 100644 index 000000000..f408cc965 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/opencensus/openCensusTracerWrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openCensusTracerWrapper.js","sourceRoot":"","sources":["../../../../src/tracers/opencensus/openCensusTracerWrapper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH;IAUE;;;OAGG;IACH,iCAAmB,MAAwB;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAbD;;OAEG;IACI,kDAAgB,GAAvB;QACE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAUD;;;;OAIG;IACH,2CAAS,GAAT,UAAU,IAAY,EAAE,OAAqB;QAC3C,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,gDAAc,GAAd;QACE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,0CAAQ,GAAR,UAAoD,KAAW,EAAE,GAAM;QACrE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,sCAAI,GAAJ,UAAQ,OAAU,EAAE,KAAY;QAC9B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACH,8BAAC;AAAD,CAAC,AAnDD,IAmDC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\nimport { OpenCensusSpanWrapper } from \"./openCensusSpanWrapper\";\nimport { TracerBase as OpenCensusTracer } from \"@opencensus/web-types\";\n\n/**\n * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer.\n */\nexport class OpenCensusTracerWrapper implements Tracer {\n private _tracer: OpenCensusTracer;\n\n /**\n * The wrapped OpenCensus Tracer\n */\n public getWrappedTracer(): OpenCensusTracer {\n return this._tracer;\n }\n\n /**\n * Create a new wrapper around a given OpenCensus Tracer.\n * @param tracer The OpenCensus Tracer to wrap.\n */\n public constructor(tracer: OpenCensusTracer) {\n this._tracer = tracer;\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options?: SpanOptions): Span {\n return new OpenCensusSpanWrapper(this, name, options);\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span | undefined {\n return undefined;\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param _fn The function to be executed.\n */\n withSpan unknown>(_span: Span, _fn: T): ReturnType {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(_target: T, _span?: Span): T {\n throw new Error(\"Method not implemented.\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js new file mode 100644 index 000000000..80623b21e --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { CanonicalCode } from "@opentelemetry/api"; +import { NoOpSpan } from "../noop/noOpSpan"; +/** + * A mock span useful for testing. + */ +var TestSpan = /** @class */ (function (_super) { + __extends(TestSpan, _super); + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + function TestSpan(parentTracer, name, context, kind, parentSpanId, startTime) { + if (startTime === void 0) { startTime = Date.now(); } + var _this = _super.call(this) || this; + _this._tracer = parentTracer; + _this.name = name; + _this.kind = kind; + _this.startTime = startTime; + _this.parentSpanId = parentSpanId; + _this.status = { + code: CanonicalCode.OK + }; + _this.endCalled = false; + _this._context = context; + _this.attributes = {}; + return _this; + } + /** + * Returns the Tracer that created this Span + */ + TestSpan.prototype.tracer = function () { + return this._tracer; + }; + /** + * Returns the SpanContext associated with this Span. + */ + TestSpan.prototype.context = function () { + return this._context; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + TestSpan.prototype.end = function (_endTime) { + this.endCalled = true; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + TestSpan.prototype.setStatus = function (status) { + this.status = status; + return this; + }; + /** + * Returns whether this span will be recorded + */ + TestSpan.prototype.isRecording = function () { + return true; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + TestSpan.prototype.setAttribute = function (key, value) { + this.attributes[key] = value; + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + TestSpan.prototype.setAttributes = function (attributes) { + for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) { + var key = _a[_i]; + this.attributes[key] = attributes[key]; + } + return this; + }; + return TestSpan; +}(NoOpSpan)); +export { TestSpan }; +//# sourceMappingURL=testSpan.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map new file mode 100644 index 000000000..9bc12de06 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testSpan.js","sourceRoot":"","sources":["../../../../src/tracers/test/testSpan.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAML,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;GAEG;AACH;IAA8B,4BAAQ;IAuCpC;;;;;;;;OAQG;IACH,kBACE,YAAoB,EACpB,IAAY,EACZ,OAAoB,EACpB,IAAc,EACd,YAAqB,EACrB,SAAiC;QAAjC,0BAAA,EAAA,YAAuB,IAAI,CAAC,GAAG,EAAE;QANnC,YAQE,iBAAO,SAYR;QAXC,KAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,KAAI,CAAC,YAAY,GAAG,YAAY,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racer,\n SpanKind,\n Status,\n SpanContext,\n CanonicalCode,\n Attributes\n} from \"@opentelemetry/api\";\nimport { NoOpSpan } from \"../noop/noOpSpan\";\n\n/**\n * A mock span useful for testing.\n */\nexport class TestSpan extends NoOpSpan {\n /**\n * The Span's current name\n */\n name: string;\n\n /**\n * The Span's current status\n */\n status: Status;\n\n /**\n * The Span's kind\n */\n kind: SpanKind;\n\n /**\n * True if end() has been called on the Span\n */\n endCalled: boolean;\n\n /**\n * The start time of the Span\n */\n readonly startTime: TimeInput;\n\n /**\n * The id of the parent Span, if any.\n */\n readonly parentSpanId?: string;\n\n /**\n * Known attributes, if any.\n */\n readonly attributes: Attributes;\n\n private _context: SpanContext;\n private readonly _tracer: Tracer;\n\n /**\n * Starts a new Span.\n * @param parentTracer The tracer that created this Span\n * @param name The name of the span.\n * @param context The SpanContext this span belongs to\n * @param kind The SpanKind of this Span\n * @param parentSpanId The identifier of the parent Span\n * @param startTime The startTime of the event (defaults to now)\n */\n constructor(\n parentTracer: Tracer,\n name: string,\n context: SpanContext,\n kind: SpanKind,\n parentSpanId?: string,\n startTime: TimeInput = Date.now()\n ) {\n super();\n this._tracer = parentTracer;\n this.name = name;\n this.kind = kind;\n this.startTime = startTime;\n this.parentSpanId = parentSpanId;\n this.status = {\n code: CanonicalCode.OK\n };\n this.endCalled = false;\n this._context = context;\n this.attributes = {};\n }\n\n /**\n * Returns the Tracer that created this Span\n */\n tracer(): Tracer {\n return this._tracer;\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return this._context;\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this.endCalled = true;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this.status = status;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return true;\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this.attributes[key] = value;\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n for (const key of Object.keys(attributes)) {\n this.attributes[key] = attributes[key];\n }\n return this;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js new file mode 100644 index 000000000..c3ba6ea93 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __extends } from "tslib"; +import { TestSpan } from "./testSpan"; +import { NoOpTracer } from "../noop/noOpTracer"; +import { SpanKind, TraceFlags } from "@opentelemetry/api"; +/** + * A mock tracer useful for testing + */ +var TestTracer = /** @class */ (function (_super) { + __extends(TestTracer, _super); + function TestTracer() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.traceIdCounter = 0; + _this.spanIdCounter = 0; + _this.rootSpans = []; + _this.knownSpans = []; + return _this; + } + TestTracer.prototype.getNextTraceId = function () { + this.traceIdCounter++; + return String(this.traceIdCounter); + }; + TestTracer.prototype.getNextSpanId = function () { + this.spanIdCounter++; + return String(this.spanIdCounter); + }; + /** + * Returns all Spans that were created without a parent + */ + TestTracer.prototype.getRootSpans = function () { + return this.rootSpans; + }; + /** + * Returns all Spans this Tracer knows about + */ + TestTracer.prototype.getKnownSpans = function () { + return this.knownSpans; + }; + /** + * Returns all Spans where end() has not been called + */ + TestTracer.prototype.getActiveSpans = function () { + return this.knownSpans.filter(function (span) { + return !span.endCalled; + }); + }; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + TestTracer.prototype.getSpanGraph = function (traceId) { + var traceSpans = this.knownSpans.filter(function (span) { + return span.context().traceId === traceId; + }); + var roots = []; + var nodeMap = new Map(); + for (var _i = 0, traceSpans_1 = traceSpans; _i < traceSpans_1.length; _i++) { + var span = traceSpans_1[_i]; + var spanId = span.context().spanId; + var node = { + name: span.name, + children: [] + }; + nodeMap.set(spanId, node); + if (span.parentSpanId) { + var parent = nodeMap.get(span.parentSpanId); + if (!parent) { + throw new Error("Span with name " + node.name + " has an unknown parentSpan with id " + span.parentSpanId); + } + parent.children.push(node); + } + else { + roots.push(node); + } + } + return { + roots: roots + }; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + TestTracer.prototype.startSpan = function (name, options) { + if (options === void 0) { options = {}; } + var parentContext = this._getParentContext(options); + var traceId; + var isRootSpan = false; + if (parentContext && parentContext.traceId) { + traceId = parentContext.traceId; + } + else { + traceId = this.getNextTraceId(); + isRootSpan = true; + } + var context = { + traceId: traceId, + spanId: this.getNextSpanId(), + traceFlags: TraceFlags.NONE + }; + var span = new TestSpan(this, name, context, options.kind || SpanKind.INTERNAL, parentContext ? parentContext.spanId : undefined, options.startTime); + this.knownSpans.push(span); + if (isRootSpan) { + this.rootSpans.push(span); + } + return span; + }; + TestTracer.prototype._getParentContext = function (options) { + var parent = options.parent; + var result; + if (parent) { + if ("traceId" in parent) { + result = parent; + } + else { + result = parent.context(); + } + } + return result; + }; + return TestTracer; +}(NoOpTracer)); +export { TestTracer }; +//# sourceMappingURL=testTracer.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map new file mode 100644 index 000000000..e5931f8bb --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/tracers/test/testTracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"testTracer.js","sourceRoot":"","sources":["../../../../src/tracers/test/testTracer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO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UAAU,EAAE,UAAU,CAAC,IAAI;SAC5B,CAAC;QACF,IAAM,IAAI,GAAG,IAAI,QAAQ,CACvB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,QAAQ,EACjC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAChD,OAAO,CAAC,SAAS,CAClB,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sCAAiB,GAAzB,UAA0B,OAAoB;QAC5C,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,MAA+B,CAAC;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,SAAS,IAAI,MAAM,EAAE;gBACvB,MAAM,GAAG,MAAM,CAAC;aACjB;iBAAM;gBACL,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;aAC3B;SACF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AA/HD,CAAgC,UAAU,GA+HzC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TestSpan } from \"./testSpan\";\nimport { NoOpTracer } from \"../noop/noOpTracer\";\nimport { SpanContext, SpanKind, SpanOptions, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * Simple representation of a Span that only has name and child relationships.\n * Children should be arranged in the order they were created.\n */\nexport interface SpanGraphNode {\n /**\n * The Span name\n */\n name: string;\n /**\n * All child Spans of this Span\n */\n children: SpanGraphNode[];\n}\n\n/**\n * Contains all the spans for a particular TraceID\n * starting at unparented roots\n */\nexport interface SpanGraph {\n /**\n * All Spans without a parentSpanId\n */\n roots: SpanGraphNode[];\n}\n\n/**\n * A mock tracer useful for testing\n */\nexport class TestTracer extends NoOpTracer {\n private traceIdCounter = 0;\n private getNextTraceId(): string {\n this.traceIdCounter++;\n return String(this.traceIdCounter);\n }\n\n private spanIdCounter = 0;\n private getNextSpanId(): string {\n this.spanIdCounter++;\n return String(this.spanIdCounter);\n }\n\n private rootSpans: TestSpan[] = [];\n private knownSpans: TestSpan[] = [];\n\n /**\n * Returns all Spans that were created without a parent\n */\n getRootSpans(): TestSpan[] {\n return this.rootSpans;\n }\n\n /**\n * Returns all Spans this Tracer knows about\n */\n getKnownSpans(): TestSpan[] {\n return this.knownSpans;\n }\n\n /**\n * Returns all Spans where end() has not been called\n */\n getActiveSpans(): TestSpan[] {\n return this.knownSpans.filter((span) => {\n return !span.endCalled;\n });\n }\n\n /**\n * Return all Spans for a particular trace, grouped by their\n * parent Span in a tree-like structure\n * @param traceId The traceId to return the graph for\n */\n getSpanGraph(traceId: string): SpanGraph {\n const traceSpans = this.knownSpans.filter((span) => {\n return span.context().traceId === traceId;\n });\n\n const roots: SpanGraphNode[] = [];\n const nodeMap: Map = new Map();\n\n for (const span of traceSpans) {\n const spanId = span.context().spanId;\n const node: SpanGraphNode = {\n name: span.name,\n children: []\n };\n nodeMap.set(spanId, node);\n if (span.parentSpanId) {\n const parent = nodeMap.get(span.parentSpanId);\n if (!parent) {\n throw new Error(\n `Span with name ${node.name} has an unknown parentSpan with id ${span.parentSpanId}`\n );\n }\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n return {\n roots\n };\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options: SpanOptions = {}): TestSpan {\n const parentContext = this._getParentContext(options);\n\n let traceId: string;\n let isRootSpan = false;\n\n if (parentContext && parentContext.traceId) {\n traceId = parentContext.traceId;\n } else {\n traceId = this.getNextTraceId();\n isRootSpan = true;\n }\n\n const context: SpanContext = {\n traceId,\n spanId: this.getNextSpanId(),\n traceFlags: TraceFlags.NONE\n };\n const span = new TestSpan(\n this,\n name,\n context,\n options.kind || SpanKind.INTERNAL,\n parentContext ? parentContext.spanId : undefined,\n options.startTime\n );\n this.knownSpans.push(span);\n if (isRootSpan) {\n this.rootSpans.push(span);\n }\n return span;\n }\n\n private _getParentContext(options: SpanOptions): SpanContext | undefined {\n const parent = options.parent;\n let result: SpanContext | undefined;\n if (parent) {\n if (\"traceId\" in parent) {\n result = parent;\n } else {\n result = parent.context();\n }\n }\n return result;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js b/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js new file mode 100644 index 000000000..f3059ea8a --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { getGlobalObject } from "./global"; +// V1 = OpenTelemetry 0.1 +// V2 = OpenTelemetry 0.2 +// V3 = OpenTelemetry 0.6.1 +var GLOBAL_TRACER_VERSION = 3; +// preview5 shipped with @azure/core-tracing.tracerCache +// and didn't have smart detection for collisions +var GLOBAL_TRACER_SYMBOL = Symbol.for("@azure/core-tracing.tracerCache2"); +var cache; +function loadTracerCache() { + var globalObj = getGlobalObject(); + var existingCache = globalObj[GLOBAL_TRACER_SYMBOL]; + var setGlobalCache = true; + if (existingCache) { + if (existingCache.version === GLOBAL_TRACER_VERSION) { + cache = existingCache; + } + else { + setGlobalCache = false; + if (existingCache.tracer) { + throw new Error("Two incompatible versions of @azure/core-tracing have been loaded.\n This library is " + GLOBAL_TRACER_VERSION + ", existing is " + existingCache.version + "."); + } + } + } + if (!cache) { + cache = { + tracer: undefined, + version: GLOBAL_TRACER_VERSION + }; + } + if (setGlobalCache) { + globalObj[GLOBAL_TRACER_SYMBOL] = cache; + } +} +export function getCache() { + if (!cache) { + loadTracerCache(); + } + return cache; +} +//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map b/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map new file mode 100644 index 000000000..9a90f6fb6 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/utils/cache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,yBAAyB;AACzB,yBAAyB;AACzB,2BAA2B;AAC3B,IAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,wDAAwD;AACxD,iDAAiD;AACjD,IAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAO5E,IAAI,KAAkB,CAAC;AAEvB,SAAS,eAAe;IACtB,IAAM,SAAS,GAAG,eAAe,EAAE,CAAC;IACpC,IAAM,aAAa,GAAgB,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACnE,IAAI,cAAc,GAAG,IAAI,CAAC;IAC1B,IAAI,aAAa,EAAE;QACjB,IAAI,aAAa,CAAC,OAAO,KAAK,qBAAqB,EAAE;YACnD,KAAK,GAAG,aAAa,CAAC;SACvB;aAAM;YACL,cAAc,GAAG,KAAK,CAAC;YACvB,IAAI,aAAa,CAAC,MAAM,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,mGACkB,qBAAqB,sBAAiB,aAAa,CAAC,OAAO,MAAG,CACjF,CAAC;aACH;SACF;KACF;IAED,IAAI,CAAC,KAAK,EAAE;QACV,KAAK,GAAG;YACN,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,qBAAqB;SAC/B,CAAC;KACH;IACD,IAAI,cAAc,EAAE;QAClB,SAAS,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC;KACzC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,IAAI,CAAC,KAAK,EAAE;QACV,eAAe,EAAE,CAAC;KACnB;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getGlobalObject } from \"./global\";\n\n// V1 = OpenTelemetry 0.1\n// V2 = OpenTelemetry 0.2\n// V3 = OpenTelemetry 0.6.1\nconst GLOBAL_TRACER_VERSION = 3;\n// preview5 shipped with @azure/core-tracing.tracerCache\n// and didn't have smart detection for collisions\nconst GLOBAL_TRACER_SYMBOL = Symbol.for(\"@azure/core-tracing.tracerCache2\");\n\nexport interface TracerCache {\n version: number;\n tracer?: Tracer;\n}\n\nlet cache: TracerCache;\n\nfunction loadTracerCache(): void {\n const globalObj = getGlobalObject();\n const existingCache: TracerCache = globalObj[GLOBAL_TRACER_SYMBOL];\n let setGlobalCache = true;\n if (existingCache) {\n if (existingCache.version === GLOBAL_TRACER_VERSION) {\n cache = existingCache;\n } else {\n setGlobalCache = false;\n if (existingCache.tracer) {\n throw new Error(\n `Two incompatible versions of @azure/core-tracing have been loaded.\n This library is ${GLOBAL_TRACER_VERSION}, existing is ${existingCache.version}.`\n );\n }\n }\n }\n\n if (!cache) {\n cache = {\n tracer: undefined,\n version: GLOBAL_TRACER_VERSION\n };\n }\n if (setGlobalCache) {\n globalObj[GLOBAL_TRACER_SYMBOL] = cache;\n }\n}\n\nexport function getCache(): TracerCache {\n if (!cache) {\n loadTracerCache();\n }\n return cache;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js new file mode 100644 index 000000000..b3f3fda61 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export function getGlobalObject() { + return self; +} +//# sourceMappingURL=global.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map new file mode 100644 index 000000000..2a3101e1e --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.browser.js","sourceRoot":"","sources":["../../../src/utils/global.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function getGlobalObject(): any {\n return self;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js new file mode 100644 index 000000000..3a106245d --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export function getGlobalObject() { + return global; +} +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map new file mode 100644 index 000000000..85f7a3cf4 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/utils/global.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,UAAU,eAAe;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function getGlobalObject(): any {\n return global;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js b/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js new file mode 100644 index 000000000..461c9f8ca --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var VERSION = "00"; +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +export function extractSpanContextFromTraceParentHeader(traceParentHeader) { + var parts = traceParentHeader.split("-"); + if (parts.length !== 4) { + return; + } + var version = parts[0], traceId = parts[1], spanId = parts[2], traceOptions = parts[3]; + if (version !== VERSION) { + return; + } + var traceFlags = parseInt(traceOptions, 16); + var spanContext = { + spanId: spanId, + traceId: traceId, + traceFlags: traceFlags + }; + return spanContext; +} +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +export function getTraceParentHeader(spanContext) { + var missingFields = []; + if (!spanContext.traceId) { + missingFields.push("traceId"); + } + if (!spanContext.spanId) { + missingFields.push("spanId"); + } + if (missingFields.length) { + return; + } + var flags = spanContext.traceFlags || 0 /* NONE */; + var hexFlags = flags.toString(16); + var traceFlags = hexFlags.length === 1 ? "0" + hexFlags : hexFlags; + // https://www.w3.org/TR/trace-context/#traceparent-header-field-values + return VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-" + traceFlags; +} +//# sourceMappingURL=traceParentHeader.js.map \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map b/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map new file mode 100644 index 000000000..ff6a3975a --- /dev/null +++ b/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"traceParentHeader.js","sourceRoot":"","sources":["../../../src/utils/traceParentHeader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,IAAM,OAAO,GA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,WAAW,CAAC,MAAM,SAAI,UAAY,CAAC;AACjF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SpanContext, TraceFlags } from \"../interfaces\";\n\nconst VERSION = \"00\";\n\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nexport function extractSpanContextFromTraceParentHeader(\n traceParentHeader: string\n): SpanContext | undefined {\n const parts = traceParentHeader.split(\"-\");\n\n if (parts.length !== 4) {\n return;\n }\n\n const [version, traceId, spanId, traceOptions] = parts;\n\n if (version !== VERSION) {\n return;\n }\n\n const traceFlags = parseInt(traceOptions, 16);\n\n const spanContext: SpanContext = {\n spanId,\n traceId,\n traceFlags\n };\n\n return spanContext;\n}\n\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nexport function getTraceParentHeader(spanContext: SpanContext): string | undefined {\n const missingFields: string[] = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n\n if (missingFields.length) {\n return;\n }\n\n const flags = spanContext.traceFlags || TraceFlags.NONE;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/dist/index.js b/node_modules/@azure/core-tracing/dist/index.js new file mode 100644 index 000000000..61637b365 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist/index.js @@ -0,0 +1,648 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var api = require('@opentelemetry/api'); +var tslib = require('tslib'); + +// Copyright (c) Microsoft Corporation. +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +var NoOpSpan = /** @class */ (function () { + function NoOpSpan() { + } + /** + * Returns the SpanContext associated with this Span. + */ + NoOpSpan.prototype.context = function () { + return { + spanId: "", + traceId: "", + traceFlags: api.TraceFlags.NONE + }; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + NoOpSpan.prototype.end = function (_endTime) { + /* Noop */ + }; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + NoOpSpan.prototype.setAttribute = function (_key, _value) { + return this; + }; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + NoOpSpan.prototype.setAttributes = function (_attributes) { + return this; + }; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + NoOpSpan.prototype.addEvent = function (_name, _attributes) { + return this; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + NoOpSpan.prototype.setStatus = function (_status) { + return this; + }; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + NoOpSpan.prototype.updateName = function (_name) { + return this; + }; + /** + * Returns whether this span will be recorded + */ + NoOpSpan.prototype.isRecording = function () { + return false; + }; + return NoOpSpan; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +var NoOpTracer = /** @class */ (function () { + function NoOpTracer() { + } + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + NoOpTracer.prototype.startSpan = function (_name, _options) { + return new NoOpSpan(); + }; + /** + * Returns the current Span from the current context, if available. + */ + NoOpTracer.prototype.getCurrentSpan = function () { + return new NoOpSpan(); + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + NoOpTracer.prototype.withSpan = function (_span, fn) { + return fn(); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + NoOpTracer.prototype.bind = function (target, _span) { + return target; + }; + return NoOpTracer; +}()); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +function getGlobalObject() { + return global; +} + +// Copyright (c) Microsoft Corporation. +// V1 = OpenTelemetry 0.1 +// V2 = OpenTelemetry 0.2 +// V3 = OpenTelemetry 0.6.1 +var GLOBAL_TRACER_VERSION = 3; +// preview5 shipped with @azure/core-tracing.tracerCache +// and didn't have smart detection for collisions +var GLOBAL_TRACER_SYMBOL = Symbol.for("@azure/core-tracing.tracerCache2"); +var cache; +function loadTracerCache() { + var globalObj = getGlobalObject(); + var existingCache = globalObj[GLOBAL_TRACER_SYMBOL]; + var setGlobalCache = true; + if (existingCache) { + if (existingCache.version === GLOBAL_TRACER_VERSION) { + cache = existingCache; + } + else { + setGlobalCache = false; + if (existingCache.tracer) { + throw new Error("Two incompatible versions of @azure/core-tracing have been loaded.\n This library is " + GLOBAL_TRACER_VERSION + ", existing is " + existingCache.version + "."); + } + } + } + if (!cache) { + cache = { + tracer: undefined, + version: GLOBAL_TRACER_VERSION + }; + } + if (setGlobalCache) { + globalObj[GLOBAL_TRACER_SYMBOL] = cache; + } +} +function getCache() { + if (!cache) { + loadTracerCache(); + } + return cache; +} + +// Copyright (c) Microsoft Corporation. +var defaultTracer; +function getDefaultTracer() { + if (!defaultTracer) { + defaultTracer = new NoOpTracer(); + } + return defaultTracer; +} +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +function setTracer(tracer) { + var cache = getCache(); + cache.tracer = tracer; +} +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +function getTracer() { + var cache = getCache(); + if (!cache.tracer) { + return getDefaultTracer(); + } + return cache.tracer; +} + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +/** + * @ignore + * @internal + */ +var OpenCensusTraceStateWrapper = /** @class */ (function () { + function OpenCensusTraceStateWrapper(state) { + this._state = state; + } + OpenCensusTraceStateWrapper.prototype.get = function (_key) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.set = function (_key, _value) { + throw new Error("Method not implemented."); + }; + OpenCensusTraceStateWrapper.prototype.unset = function (_key) { + throw new Error("Method not implemented"); + }; + OpenCensusTraceStateWrapper.prototype.serialize = function () { + return this._state || ""; + }; + return OpenCensusTraceStateWrapper; +}()); + +// Copyright (c) Microsoft Corporation. +function isWrappedSpan(span) { + return !!span && span.getWrappedSpan !== undefined; +} +function isTracer(tracerOrSpan) { + return tracerOrSpan.getWrappedTracer !== undefined; +} +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +var OpenCensusSpanWrapper = /** @class */ (function () { + function OpenCensusSpanWrapper(tracerOrSpan, name, options) { + if (name === void 0) { name = ""; } + if (options === void 0) { options = {}; } + if (isTracer(tracerOrSpan)) { + var parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined; + this._span = tracerOrSpan.getWrappedTracer().startChildSpan({ + name: name, + childOf: parent + }); + this._span.start(); + if (options.links) { + for (var _i = 0, _a = options.links; _i < _a.length; _i++) { + var link = _a[_i]; + // Since there is no way to set the link relationship, leave it as Unspecified. + this._span.addLink(link.context.traceId, link.context.spanId, 0 /* LinkType.UNSPECIFIED */, link.attributes); + } + } + } + else { + this._span = tracerOrSpan; + } + } + /** + * The underlying OpenCensus Span + */ + OpenCensusSpanWrapper.prototype.getWrappedSpan = function () { + return this._span; + }; + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + OpenCensusSpanWrapper.prototype.end = function (_endTime) { + this._span.end(); + }; + /** + * Returns the SpanContext associated with this Span. + */ + OpenCensusSpanWrapper.prototype.context = function () { + var openCensusSpanContext = this._span.spanContext; + return { + spanId: openCensusSpanContext.spanId, + traceId: openCensusSpanContext.traceId, + traceFlags: openCensusSpanContext.options, + traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState) + }; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + OpenCensusSpanWrapper.prototype.setAttribute = function (key, value) { + this._span.addAttribute(key, value); + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + OpenCensusSpanWrapper.prototype.setAttributes = function (attributes) { + this._span.attributes = attributes; + return this; + }; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + OpenCensusSpanWrapper.prototype.addEvent = function (_name, _attributes) { + throw new Error("Method not implemented."); + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + OpenCensusSpanWrapper.prototype.setStatus = function (status) { + this._span.setStatus(status.code, status.message); + return this; + }; + /** + * Updates the name of the Span + * @param name the new Span name + */ + OpenCensusSpanWrapper.prototype.updateName = function (name) { + this._span.name = name; + return this; + }; + /** + * Returns whether this span will be recorded + */ + OpenCensusSpanWrapper.prototype.isRecording = function () { + // NoRecordSpans have an empty traceId + return !!this._span.traceId; + }; + return OpenCensusSpanWrapper; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +var OpenCensusTracerWrapper = /** @class */ (function () { + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + function OpenCensusTracerWrapper(tracer) { + this._tracer = tracer; + } + /** + * The wrapped OpenCensus Tracer + */ + OpenCensusTracerWrapper.prototype.getWrappedTracer = function () { + return this._tracer; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + OpenCensusTracerWrapper.prototype.startSpan = function (name, options) { + return new OpenCensusSpanWrapper(this, name, options); + }; + /** + * Returns the current Span from the current context, if available. + */ + OpenCensusTracerWrapper.prototype.getCurrentSpan = function () { + return undefined; + }; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + OpenCensusTracerWrapper.prototype.withSpan = function (_span, _fn) { + throw new Error("Method not implemented."); + }; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + OpenCensusTracerWrapper.prototype.bind = function (_target, _span) { + throw new Error("Method not implemented."); + }; + return OpenCensusTracerWrapper; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * A mock span useful for testing. + */ +var TestSpan = /** @class */ (function (_super) { + tslib.__extends(TestSpan, _super); + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + function TestSpan(parentTracer, name, context, kind, parentSpanId, startTime) { + if (startTime === void 0) { startTime = Date.now(); } + var _this = _super.call(this) || this; + _this._tracer = parentTracer; + _this.name = name; + _this.kind = kind; + _this.startTime = startTime; + _this.parentSpanId = parentSpanId; + _this.status = { + code: api.CanonicalCode.OK + }; + _this.endCalled = false; + _this._context = context; + _this.attributes = {}; + return _this; + } + /** + * Returns the Tracer that created this Span + */ + TestSpan.prototype.tracer = function () { + return this._tracer; + }; + /** + * Returns the SpanContext associated with this Span. + */ + TestSpan.prototype.context = function () { + return this._context; + }; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + TestSpan.prototype.end = function (_endTime) { + this.endCalled = true; + }; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + TestSpan.prototype.setStatus = function (status) { + this.status = status; + return this; + }; + /** + * Returns whether this span will be recorded + */ + TestSpan.prototype.isRecording = function () { + return true; + }; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + TestSpan.prototype.setAttribute = function (key, value) { + this.attributes[key] = value; + return this; + }; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + TestSpan.prototype.setAttributes = function (attributes) { + for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) { + var key = _a[_i]; + this.attributes[key] = attributes[key]; + } + return this; + }; + return TestSpan; +}(NoOpSpan)); + +// Copyright (c) Microsoft Corporation. +/** + * A mock tracer useful for testing + */ +var TestTracer = /** @class */ (function (_super) { + tslib.__extends(TestTracer, _super); + function TestTracer() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.traceIdCounter = 0; + _this.spanIdCounter = 0; + _this.rootSpans = []; + _this.knownSpans = []; + return _this; + } + TestTracer.prototype.getNextTraceId = function () { + this.traceIdCounter++; + return String(this.traceIdCounter); + }; + TestTracer.prototype.getNextSpanId = function () { + this.spanIdCounter++; + return String(this.spanIdCounter); + }; + /** + * Returns all Spans that were created without a parent + */ + TestTracer.prototype.getRootSpans = function () { + return this.rootSpans; + }; + /** + * Returns all Spans this Tracer knows about + */ + TestTracer.prototype.getKnownSpans = function () { + return this.knownSpans; + }; + /** + * Returns all Spans where end() has not been called + */ + TestTracer.prototype.getActiveSpans = function () { + return this.knownSpans.filter(function (span) { + return !span.endCalled; + }); + }; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + TestTracer.prototype.getSpanGraph = function (traceId) { + var traceSpans = this.knownSpans.filter(function (span) { + return span.context().traceId === traceId; + }); + var roots = []; + var nodeMap = new Map(); + for (var _i = 0, traceSpans_1 = traceSpans; _i < traceSpans_1.length; _i++) { + var span = traceSpans_1[_i]; + var spanId = span.context().spanId; + var node = { + name: span.name, + children: [] + }; + nodeMap.set(spanId, node); + if (span.parentSpanId) { + var parent = nodeMap.get(span.parentSpanId); + if (!parent) { + throw new Error("Span with name " + node.name + " has an unknown parentSpan with id " + span.parentSpanId); + } + parent.children.push(node); + } + else { + roots.push(node); + } + } + return { + roots: roots + }; + }; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + TestTracer.prototype.startSpan = function (name, options) { + if (options === void 0) { options = {}; } + var parentContext = this._getParentContext(options); + var traceId; + var isRootSpan = false; + if (parentContext && parentContext.traceId) { + traceId = parentContext.traceId; + } + else { + traceId = this.getNextTraceId(); + isRootSpan = true; + } + var context = { + traceId: traceId, + spanId: this.getNextSpanId(), + traceFlags: api.TraceFlags.NONE + }; + var span = new TestSpan(this, name, context, options.kind || api.SpanKind.INTERNAL, parentContext ? parentContext.spanId : undefined, options.startTime); + this.knownSpans.push(span); + if (isRootSpan) { + this.rootSpans.push(span); + } + return span; + }; + TestTracer.prototype._getParentContext = function (options) { + var parent = options.parent; + var result; + if (parent) { + if ("traceId" in parent) { + result = parent; + } + else { + result = parent.context(); + } + } + return result; + }; + return TestTracer; +}(NoOpTracer)); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var VERSION = "00"; +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +function extractSpanContextFromTraceParentHeader(traceParentHeader) { + var parts = traceParentHeader.split("-"); + if (parts.length !== 4) { + return; + } + var version = parts[0], traceId = parts[1], spanId = parts[2], traceOptions = parts[3]; + if (version !== VERSION) { + return; + } + var traceFlags = parseInt(traceOptions, 16); + var spanContext = { + spanId: spanId, + traceId: traceId, + traceFlags: traceFlags + }; + return spanContext; +} +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +function getTraceParentHeader(spanContext) { + var missingFields = []; + if (!spanContext.traceId) { + missingFields.push("traceId"); + } + if (!spanContext.spanId) { + missingFields.push("spanId"); + } + if (missingFields.length) { + return; + } + var flags = spanContext.traceFlags || 0 /* NONE */; + var hexFlags = flags.toString(16); + var traceFlags = hexFlags.length === 1 ? "0" + hexFlags : hexFlags; + // https://www.w3.org/TR/trace-context/#traceparent-header-field-values + return VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-" + traceFlags; +} + +exports.NoOpSpan = NoOpSpan; +exports.NoOpTracer = NoOpTracer; +exports.OpenCensusSpanWrapper = OpenCensusSpanWrapper; +exports.OpenCensusTracerWrapper = OpenCensusTracerWrapper; +exports.TestSpan = TestSpan; +exports.TestTracer = TestTracer; +exports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader; +exports.getTraceParentHeader = getTraceParentHeader; +exports.getTracer = getTracer; +exports.setTracer = setTracer; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/core-tracing/dist/index.js.map b/node_modules/@azure/core-tracing/dist/index.js.map new file mode 100644 index 000000000..6fa110be8 --- /dev/null +++ b/node_modules/@azure/core-tracing/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/tracers/noop/noOpSpan.ts","../src/tracers/noop/noOpTracer.ts","../src/utils/global.ts","../src/utils/cache.ts","../src/tracerProxy.ts","../src/tracers/opencensus/openCensusTraceStateWrapper.ts","../src/tracers/opencensus/openCensusSpanWrapper.ts","../src/tracers/opencensus/openCensusTracerWrapper.ts","../src/tracers/test/testSpan.ts","../src/tracers/test/testTracer.ts","../src/utils/traceParentHeader.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Span, SpanContext, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Span that can safely be used without side-effects.\n */\nexport class NoOpSpan implements Span {\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return {\n spanId: \"\",\n traceId: \"\",\n traceFlags: TraceFlags.NONE\n };\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n /* Noop */\n }\n\n /**\n * Sets an attribute on the Span\n * @param _key the attribute key\n * @param _value the attribute value\n */\n setAttribute(_key: string, _value: unknown): this {\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param _attributes the attributes to add\n */\n setAttributes(_attributes: Attributes): this {\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param _name The name of the event\n * @param _attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n return this;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param _status The status to set.\n */\n setStatus(_status: Status): this {\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param _name the new Span name\n */\n updateName(_name: string): this {\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return false;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NoOpSpan } from \"./noOpSpan\";\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\n\n/**\n * A no-op implementation of Tracer that can be used when tracing\n * is disabled.\n */\nexport class NoOpTracer implements Tracer {\n /**\n * Starts a new Span.\n * @param _name The name of the span.\n * @param _options The SpanOptions used during Span creation.\n */\n startSpan(_name: string, _options?: SpanOptions): Span {\n return new NoOpSpan();\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span {\n return new NoOpSpan();\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param fn The function to be executed.\n */\n withSpan ReturnType>(_span: Span, fn: T): ReturnType {\n return fn();\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(target: T, _span?: Span): T {\n return target;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport function getGlobalObject(): any {\n return global;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getGlobalObject } from \"./global\";\n\n// V1 = OpenTelemetry 0.1\n// V2 = OpenTelemetry 0.2\n// V3 = OpenTelemetry 0.6.1\nconst GLOBAL_TRACER_VERSION = 3;\n// preview5 shipped with @azure/core-tracing.tracerCache\n// and didn't have smart detection for collisions\nconst GLOBAL_TRACER_SYMBOL = Symbol.for(\"@azure/core-tracing.tracerCache2\");\n\nexport interface TracerCache {\n version: number;\n tracer?: Tracer;\n}\n\nlet cache: TracerCache;\n\nfunction loadTracerCache(): void {\n const globalObj = getGlobalObject();\n const existingCache: TracerCache = globalObj[GLOBAL_TRACER_SYMBOL];\n let setGlobalCache = true;\n if (existingCache) {\n if (existingCache.version === GLOBAL_TRACER_VERSION) {\n cache = existingCache;\n } else {\n setGlobalCache = false;\n if (existingCache.tracer) {\n throw new Error(\n `Two incompatible versions of @azure/core-tracing have been loaded.\n This library is ${GLOBAL_TRACER_VERSION}, existing is ${existingCache.version}.`\n );\n }\n }\n }\n\n if (!cache) {\n cache = {\n tracer: undefined,\n version: GLOBAL_TRACER_VERSION\n };\n }\n if (setGlobalCache) {\n globalObj[GLOBAL_TRACER_SYMBOL] = cache;\n }\n}\n\nexport function getCache(): TracerCache {\n if (!cache) {\n loadTracerCache();\n }\n return cache;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { NoOpTracer } from \"./tracers/noop/noOpTracer\";\nimport { Tracer } from \"@opentelemetry/api\";\nimport { getCache } from \"./utils/cache\";\n\nlet defaultTracer: Tracer;\n\nfunction getDefaultTracer(): Tracer {\n if (!defaultTracer) {\n defaultTracer = new NoOpTracer();\n }\n return defaultTracer;\n}\n\n/**\n * Sets the global tracer, enabling tracing for the Azure SDK.\n * @param tracer An OpenTelemetry Tracer instance.\n */\nexport function setTracer(tracer: Tracer): void {\n const cache = getCache();\n cache.tracer = tracer;\n}\n\n/**\n * Retrieves the active tracer, or returns a\n * no-op implementation if one is not set.\n */\nexport function getTracer(): Tracer {\n const cache = getCache();\n if (!cache.tracer) {\n return getDefaultTracer();\n }\n return cache.tracer;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TraceState } from \"@opentelemetry/api\";\n\n/**\n * @ignore\n * @internal\n */\nexport class OpenCensusTraceStateWrapper implements TraceState {\n private readonly _state?: string;\n\n constructor(state?: string) {\n this._state = state;\n }\n\n get(_key: string): string | undefined {\n throw new Error(\"Method not implemented.\");\n }\n\n set(_key: string, _value: string): void {\n throw new Error(\"Method not implemented.\");\n }\n\n unset(_key: string): void {\n throw new Error(\"Method not implemented\");\n }\n\n serialize(): string {\n return this._state || \"\";\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SpanContext, Span, SpanOptions, Attributes, Status, TraceFlags } from \"@opentelemetry/api\";\nimport { OpenCensusTraceStateWrapper } from \"./openCensusTraceStateWrapper\";\nimport { OpenCensusTracerWrapper } from \"./openCensusTracerWrapper\";\nimport { Attributes as OpenCensusAttributes, Span as OpenCensusSpan } from \"@opencensus/web-types\";\n\nfunction isWrappedSpan(span?: Span | SpanContext | null): span is OpenCensusSpanWrapper {\n return !!span && (span as OpenCensusSpanWrapper).getWrappedSpan !== undefined;\n}\n\nfunction isTracer(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan\n): tracerOrSpan is OpenCensusTracerWrapper {\n return (tracerOrSpan as OpenCensusTracerWrapper).getWrappedTracer !== undefined;\n}\n\n/**\n * An implementation of OpenTelemetry Span that wraps an OpenCensus Span.\n */\nexport class OpenCensusSpanWrapper implements Span {\n private _span: OpenCensusSpan;\n\n /**\n * The underlying OpenCensus Span\n */\n public getWrappedSpan(): OpenCensusSpan {\n return this._span;\n }\n\n /**\n * Wraps an existing OpenCensus Span\n * @param span A Span or RootSpan from OpenCensus\n */\n constructor(span: OpenCensusSpan);\n /**\n * Create a new OpenCensus Span and wrap it.\n * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper\n * @param name The name of the Span\n * @param options Options for the Span\n */\n constructor(tracer: OpenCensusTracerWrapper, name: string, options?: SpanOptions);\n constructor(\n tracerOrSpan: OpenCensusTracerWrapper | OpenCensusSpan,\n name: string = \"\",\n options: SpanOptions = {}\n ) {\n if (isTracer(tracerOrSpan)) {\n const parent = isWrappedSpan(options.parent) ? options.parent.getWrappedSpan() : undefined;\n this._span = tracerOrSpan.getWrappedTracer().startChildSpan({\n name,\n childOf: parent\n });\n this._span.start();\n if (options.links) {\n for (const link of options.links) {\n // Since there is no way to set the link relationship, leave it as Unspecified.\n this._span.addLink(\n link.context.traceId,\n link.context.spanId,\n 0 /* LinkType.UNSPECIFIED */,\n link.attributes as OpenCensusAttributes\n );\n }\n }\n } else {\n this._span = tracerOrSpan;\n }\n }\n\n /**\n * Marks the end of Span execution.\n * @param endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this._span.end();\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n const openCensusSpanContext = this._span.spanContext;\n\n return {\n spanId: openCensusSpanContext.spanId,\n traceId: openCensusSpanContext.traceId,\n traceFlags: openCensusSpanContext.options as TraceFlags,\n traceState: new OpenCensusTraceStateWrapper(openCensusSpanContext.traceState)\n };\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this._span.addAttribute(key, value as any);\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n this._span.attributes = attributes as OpenCensusAttributes;\n return this;\n }\n\n /**\n * Adds an event to the Span\n * @param name The name of the event\n * @param attributes The associated attributes to add for this event\n */\n addEvent(_name: string, _attributes?: Attributes): this {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this._span.setStatus(status.code, status.message);\n return this;\n }\n\n /**\n * Updates the name of the Span\n * @param name the new Span name\n */\n updateName(name: string): this {\n this._span.name = name;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n // NoRecordSpans have an empty traceId\n return !!this._span.traceId;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Tracer, Span, SpanOptions } from \"@opentelemetry/api\";\nimport { OpenCensusSpanWrapper } from \"./openCensusSpanWrapper\";\nimport { TracerBase as OpenCensusTracer } from \"@opencensus/web-types\";\n\n/**\n * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer.\n */\nexport class OpenCensusTracerWrapper implements Tracer {\n private _tracer: OpenCensusTracer;\n\n /**\n * The wrapped OpenCensus Tracer\n */\n public getWrappedTracer(): OpenCensusTracer {\n return this._tracer;\n }\n\n /**\n * Create a new wrapper around a given OpenCensus Tracer.\n * @param tracer The OpenCensus Tracer to wrap.\n */\n public constructor(tracer: OpenCensusTracer) {\n this._tracer = tracer;\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options?: SpanOptions): Span {\n return new OpenCensusSpanWrapper(this, name, options);\n }\n\n /**\n * Returns the current Span from the current context, if available.\n */\n getCurrentSpan(): Span | undefined {\n return undefined;\n }\n\n /**\n * Executes the given function within the context provided by a Span.\n * @param _span The span that provides the context.\n * @param _fn The function to be executed.\n */\n withSpan unknown>(_span: Span, _fn: T): ReturnType {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Bind a Span as the target's scope\n * @param target An object to bind the scope.\n * @param _span A specific Span to use. Otherwise, use the current one.\n */\n bind(_target: T, _span?: Span): T {\n throw new Error(\"Method not implemented.\");\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TimeInput,\n Tracer,\n SpanKind,\n Status,\n SpanContext,\n CanonicalCode,\n Attributes\n} from \"@opentelemetry/api\";\nimport { NoOpSpan } from \"../noop/noOpSpan\";\n\n/**\n * A mock span useful for testing.\n */\nexport class TestSpan extends NoOpSpan {\n /**\n * The Span's current name\n */\n name: string;\n\n /**\n * The Span's current status\n */\n status: Status;\n\n /**\n * The Span's kind\n */\n kind: SpanKind;\n\n /**\n * True if end() has been called on the Span\n */\n endCalled: boolean;\n\n /**\n * The start time of the Span\n */\n readonly startTime: TimeInput;\n\n /**\n * The id of the parent Span, if any.\n */\n readonly parentSpanId?: string;\n\n /**\n * Known attributes, if any.\n */\n readonly attributes: Attributes;\n\n private _context: SpanContext;\n private readonly _tracer: Tracer;\n\n /**\n * Starts a new Span.\n * @param parentTracer The tracer that created this Span\n * @param name The name of the span.\n * @param context The SpanContext this span belongs to\n * @param kind The SpanKind of this Span\n * @param parentSpanId The identifier of the parent Span\n * @param startTime The startTime of the event (defaults to now)\n */\n constructor(\n parentTracer: Tracer,\n name: string,\n context: SpanContext,\n kind: SpanKind,\n parentSpanId?: string,\n startTime: TimeInput = Date.now()\n ) {\n super();\n this._tracer = parentTracer;\n this.name = name;\n this.kind = kind;\n this.startTime = startTime;\n this.parentSpanId = parentSpanId;\n this.status = {\n code: CanonicalCode.OK\n };\n this.endCalled = false;\n this._context = context;\n this.attributes = {};\n }\n\n /**\n * Returns the Tracer that created this Span\n */\n tracer(): Tracer {\n return this._tracer;\n }\n\n /**\n * Returns the SpanContext associated with this Span.\n */\n context(): SpanContext {\n return this._context;\n }\n\n /**\n * Marks the end of Span execution.\n * @param _endTime The time to use as the Span's end time. Defaults to\n * the current time.\n */\n end(_endTime?: number): void {\n this.endCalled = true;\n }\n\n /**\n * Sets a status on the span. Overrides the default of CanonicalCode.OK.\n * @param status The status to set.\n */\n setStatus(status: Status): this {\n this.status = status;\n return this;\n }\n\n /**\n * Returns whether this span will be recorded\n */\n isRecording(): boolean {\n return true;\n }\n\n /**\n * Sets an attribute on the Span\n * @param key the attribute key\n * @param value the attribute value\n */\n setAttribute(key: string, value: unknown): this {\n this.attributes[key] = value;\n return this;\n }\n\n /**\n * Sets attributes on the Span\n * @param attributes the attributes to add\n */\n setAttributes(attributes: Attributes): this {\n for (const key of Object.keys(attributes)) {\n this.attributes[key] = attributes[key];\n }\n return this;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TestSpan } from \"./testSpan\";\nimport { NoOpTracer } from \"../noop/noOpTracer\";\nimport { SpanContext, SpanKind, SpanOptions, TraceFlags } from \"@opentelemetry/api\";\n\n/**\n * Simple representation of a Span that only has name and child relationships.\n * Children should be arranged in the order they were created.\n */\nexport interface SpanGraphNode {\n /**\n * The Span name\n */\n name: string;\n /**\n * All child Spans of this Span\n */\n children: SpanGraphNode[];\n}\n\n/**\n * Contains all the spans for a particular TraceID\n * starting at unparented roots\n */\nexport interface SpanGraph {\n /**\n * All Spans without a parentSpanId\n */\n roots: SpanGraphNode[];\n}\n\n/**\n * A mock tracer useful for testing\n */\nexport class TestTracer extends NoOpTracer {\n private traceIdCounter = 0;\n private getNextTraceId(): string {\n this.traceIdCounter++;\n return String(this.traceIdCounter);\n }\n\n private spanIdCounter = 0;\n private getNextSpanId(): string {\n this.spanIdCounter++;\n return String(this.spanIdCounter);\n }\n\n private rootSpans: TestSpan[] = [];\n private knownSpans: TestSpan[] = [];\n\n /**\n * Returns all Spans that were created without a parent\n */\n getRootSpans(): TestSpan[] {\n return this.rootSpans;\n }\n\n /**\n * Returns all Spans this Tracer knows about\n */\n getKnownSpans(): TestSpan[] {\n return this.knownSpans;\n }\n\n /**\n * Returns all Spans where end() has not been called\n */\n getActiveSpans(): TestSpan[] {\n return this.knownSpans.filter((span) => {\n return !span.endCalled;\n });\n }\n\n /**\n * Return all Spans for a particular trace, grouped by their\n * parent Span in a tree-like structure\n * @param traceId The traceId to return the graph for\n */\n getSpanGraph(traceId: string): SpanGraph {\n const traceSpans = this.knownSpans.filter((span) => {\n return span.context().traceId === traceId;\n });\n\n const roots: SpanGraphNode[] = [];\n const nodeMap: Map = new Map();\n\n for (const span of traceSpans) {\n const spanId = span.context().spanId;\n const node: SpanGraphNode = {\n name: span.name,\n children: []\n };\n nodeMap.set(spanId, node);\n if (span.parentSpanId) {\n const parent = nodeMap.get(span.parentSpanId);\n if (!parent) {\n throw new Error(\n `Span with name ${node.name} has an unknown parentSpan with id ${span.parentSpanId}`\n );\n }\n parent.children.push(node);\n } else {\n roots.push(node);\n }\n }\n\n return {\n roots\n };\n }\n\n /**\n * Starts a new Span.\n * @param name The name of the span.\n * @param options The SpanOptions used during Span creation.\n */\n startSpan(name: string, options: SpanOptions = {}): TestSpan {\n const parentContext = this._getParentContext(options);\n\n let traceId: string;\n let isRootSpan = false;\n\n if (parentContext && parentContext.traceId) {\n traceId = parentContext.traceId;\n } else {\n traceId = this.getNextTraceId();\n isRootSpan = true;\n }\n\n const context: SpanContext = {\n traceId,\n spanId: this.getNextSpanId(),\n traceFlags: TraceFlags.NONE\n };\n const span = new TestSpan(\n this,\n name,\n context,\n options.kind || SpanKind.INTERNAL,\n parentContext ? parentContext.spanId : undefined,\n options.startTime\n );\n this.knownSpans.push(span);\n if (isRootSpan) {\n this.rootSpans.push(span);\n }\n return span;\n }\n\n private _getParentContext(options: SpanOptions): SpanContext | undefined {\n const parent = options.parent;\n let result: SpanContext | undefined;\n if (parent) {\n if (\"traceId\" in parent) {\n result = parent;\n } else {\n result = parent.context();\n }\n }\n return result;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SpanContext, TraceFlags } from \"../interfaces\";\n\nconst VERSION = \"00\";\n\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nexport function extractSpanContextFromTraceParentHeader(\n traceParentHeader: string\n): SpanContext | undefined {\n const parts = traceParentHeader.split(\"-\");\n\n if (parts.length !== 4) {\n return;\n }\n\n const [version, traceId, spanId, traceOptions] = parts;\n\n if (version !== VERSION) {\n return;\n }\n\n const traceFlags = parseInt(traceOptions, 16);\n\n const spanContext: SpanContext = {\n spanId,\n traceId,\n traceFlags\n };\n\n return spanContext;\n}\n\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nexport function getTraceParentHeader(spanContext: SpanContext): string | undefined {\n const missingFields: string[] = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n\n if (missingFields.length) {\n return;\n }\n\n const flags = spanContext.traceFlags || TraceFlags.NONE;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n"],"names":["TraceFlags","__extends","CanonicalCode","SpanKind"],"mappings":";;;;;;;AAAA;AAKA;;;;IAGA;KAqEC;;;;IAjEC,0BAAO,GAAP;QACE,OAAO;YACL,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,UAAU,EAAEA,cAAU,CAAC,IAAI;SAC5B,CAAC;KACH;;;;;;IAOD,sBAAG,GAAH,UAAI,QAAiB;;KAEpB;;;;;;IAOD,+BAAY,GAAZ,UAAa,IAAY,EAAE,MAAe;QACxC,OAAO,IAAI,CAAC;KACb;;;;;IAMD,gCAAa,GAAb,UAAc,WAAuB;QACnC,OAAO,IAAI,CAAC;KACb;;;;;;IAOD,2BAAQ,GAAR,UAAS,KAAa,EAAE,WAAwB;QAC9C,OAAO,IAAI,CAAC;KACb;;;;;IAMD,4BAAS,GAAT,UAAU,OAAe;QACvB,OAAO,IAAI,CAAC;KACb;;;;;IAMD,6BAAU,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,CAAC;KACb;;;;IAKD,8BAAW,GAAX;QACE,OAAO,KAAK,CAAC;KACd;IACH,eAAC;AAAD,CAAC;;AC7ED;AACA,AAKA;;;;AAIA;IAAA;KAkCC;;;;;;IA5BC,8BAAS,GAAT,UAAU,KAAa,EAAE,QAAsB;QAC7C,OAAO,IAAI,QAAQ,EAAE,CAAC;KACvB;;;;IAKD,mCAAc,GAAd;QACE,OAAO,IAAI,QAAQ,EAAE,CAAC;KACvB;;;;;;IAOD,6BAAQ,GAAR,UA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GAAvB,EAAE,YAAY,GAAI,KAAK,GAAT,CAAU;IAEvD,IAAI,OAAO,KAAK,OAAO,EAAE;QACvB,OAAO;KACR;IAED,IAAM,UAAU,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE9C,IAAM,WAAW,GAAgB;QAC/B,MAAM,QAAA;QACN,OAAO,SAAA;QACP,UAAU,YAAA;KACX,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;AAKA,SAAgB,oBAAoB,CAAC,WAAwB;IAC3D,IAAM,aAAa,GAAa,EAAE,CAAC;IACnC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;QACxB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC/B;IACD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;QACvB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC9B;IAED,IAAI,aAAa,CAAC,MAAM,EAAE;QACxB,OAAO;KACR;IAED,IAAM,KAAK,GAAG,WAAW,CAAC,UAAU,iBAAoB;IACxD,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACpC,IAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,GAAG,MAAI,QAAU,GAAG,QAAQ,CAAC;;IAGrE,OAAU,OAAO,SAAI,WAAW,CAAC,OAAO,SAAI,WAAW,CAAC,MAAM,SAAI,UAAY,CAAC;AACjF,CAAC;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/CopyrightNotice.txt b/node_modules/@azure/core-tracing/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 000000000..3d4c82348 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt b/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt new file mode 100644 index 000000000..bfe6430cb --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/README.md b/node_modules/@azure/core-tracing/node_modules/tslib/README.md new file mode 100644 index 000000000..49c001420 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/README.md @@ -0,0 +1,154 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 3.9.2 or later +npm install tslib + +# TypeScript 3.8.4 or earlier +npm install tslib@^1 + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 3.9.2 or later +yarn add tslib + +# TypeScript 3.8.4 or earlier +yarn add tslib@^1 + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 3.9.2 or later +bower install tslib + +# TypeScript 3.8.4 or earlier +bower install tslib@^1 + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 3.9.2 or later +jspm install tslib + +# TypeScript 3.8.4 or earlier +jspm install tslib@^1 + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js b/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js new file mode 100644 index 000000000..d241d0422 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json b/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json new file mode 100644 index 000000000..aafa0e4b4 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/package.json b/node_modules/@azure/core-tracing/node_modules/tslib/package.json new file mode 100644 index 000000000..9a616ae7a --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/package.json @@ -0,0 +1,64 @@ +{ + "_from": "tslib@^2.0.0", + "_id": "tslib@2.0.3", + "_inBundle": false, + "_integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "_location": "/@azure/core-tracing/tslib", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tslib@^2.0.0", + "name": "tslib", + "escapedName": "tslib", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@azure/core-tracing" + ], + "_resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "_shasum": "8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c", + "_spec": "tslib@^2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-tracing", + "author": { + "name": "Microsoft Corp." + }, + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Runtime library for TypeScript helper functions", + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + }, + "homepage": "https://www.typescriptlang.org/", + "jsnext:main": "tslib.es6.js", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "license": "0BSD", + "main": "tslib.js", + "module": "tslib.es6.js", + "name": "tslib", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/tslib.git" + }, + "sideEffects": false, + "typings": "tslib.d.ts", + "version": "2.0.3" +} diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts new file mode 100644 index 000000000..9e43edcda --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, o: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html new file mode 100644 index 000000000..b122e41b0 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js new file mode 100644 index 000000000..c60aa609f --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.es6.js @@ -0,0 +1,227 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __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]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html new file mode 100644 index 000000000..44c9ba51e --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js new file mode 100644 index 000000000..fcf619a47 --- /dev/null +++ b/node_modules/@azure/core-tracing/node_modules/tslib/tslib.js @@ -0,0 +1,292 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __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]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@azure/core-tracing/package.json b/node_modules/@azure/core-tracing/package.json new file mode 100644 index 000000000..fbde0d38a --- /dev/null +++ b/node_modules/@azure/core-tracing/package.json @@ -0,0 +1,130 @@ +{ + "_from": "@azure/core-tracing@1.0.0-preview.9", + "_id": "@azure/core-tracing@1.0.0-preview.9", + "_inBundle": false, + "_integrity": "sha512-zczolCLJ5QG42AEPQ+Qg9SRYNUyB+yZ5dzof4YEc+dyWczO9G2sBqbAjLB7IqrsdHN2apkiB2oXeDKCsq48jug==", + "_location": "/@azure/core-tracing", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@azure/core-tracing@1.0.0-preview.9", + "name": "@azure/core-tracing", + "escapedName": "@azure%2fcore-tracing", + "scope": "@azure", + "rawSpec": "1.0.0-preview.9", + "saveSpec": null, + "fetchSpec": "1.0.0-preview.9" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.9.tgz", + "_shasum": "84f3b85572013f9d9b85e1e5d89787aa180787eb", + "_spec": "@azure/core-tracing@1.0.0-preview.9", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation" + }, + "browser": { + "./dist-esm/src/utils/global.js": "./dist-esm/src/utils/global.browser.js" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@opencensus/web-types": "0.0.7", + "@opentelemetry/api": "^0.10.2", + "tslib": "^2.0.0" + }, + "deprecated": false, + "description": "Provides low-level interfaces and helper methods for tracing in Azure SDK", + "devDependencies": { + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "cross-env": "^7.0.2", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "inherits": "^2.0.3", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "prettier": "^1.16.4", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "typescript": "~3.9.3", + "util": "^0.12.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "dist/", + "dist-esm/src/", + "types/core-tracing.d.ts", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-tracing/README.md", + "keywords": [ + "azure", + "tracing", + "Azure", + "cloud" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "dist-esm/src/index.js", + "name": "@azure/core-tracing", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local", + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "cd samples && tsc -p .", + "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o core-tracing-lintReport.html", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "mocha test-dist/**/*.js --reporter ../../../common/tools/mocha-multi-reporter.js" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "types/core-tracing.d.ts", + "version": "1.0.0-preview.9" +} diff --git a/node_modules/@azure/core-tracing/types/core-tracing.d.ts b/node_modules/@azure/core-tracing/types/core-tracing.d.ts new file mode 100644 index 000000000..04d521860 --- /dev/null +++ b/node_modules/@azure/core-tracing/types/core-tracing.d.ts @@ -0,0 +1,420 @@ +import { Attributes } from '@opentelemetry/api'; +import { Span as OpenCensusSpan } from '@opencensus/web-types'; +import { Tracer as OpenCensusTracer } from '@opencensus/web-types'; +import { SpanContext as OTSpanContext } from '@opentelemetry/api'; +import { SpanOptions as OTSpanOptions } from '@opentelemetry/api'; +import { Span } from '@opentelemetry/api'; +import { SpanKind } from '@opentelemetry/api'; +import { Status } from '@opentelemetry/api'; +import { TimeInput } from '@opentelemetry/api'; +import { Tracer } from '@opentelemetry/api'; +import { TracerBase } from '@opencensus/web-types'; + +/** + * Generates a `SpanContext` given a `traceparent` header value. + * @param traceParent Serialized span context data as a `traceparent` header value. + * @returns The `SpanContext` generated from the `traceparent` value. + */ +export declare function extractSpanContextFromTraceParentHeader(traceParentHeader: string): SpanContext | undefined; + +/** + * Generates a `traceparent` value given a span context. + * @param spanContext Contains context for a specific span. + * @returns The `spanContext` represented as a `traceparent` value. + */ +export declare function getTraceParentHeader(spanContext: SpanContext): string | undefined; + +/** + * Retrieves the active tracer, or returns a + * no-op implementation if one is not set. + */ +export declare function getTracer(): Tracer; + +/** + * A no-op implementation of Span that can safely be used without side-effects. + */ +export declare class NoOpSpan implements Span { + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Sets an attribute on the Span + * @param _key the attribute key + * @param _value the attribute value + */ + setAttribute(_key: string, _value: unknown): this; + /** + * Sets attributes on the Span + * @param _attributes the attributes to add + */ + setAttributes(_attributes: Attributes): this; + /** + * Adds an event to the Span + * @param _name The name of the event + * @param _attributes The associated attributes to add for this event + */ + addEvent(_name: string, _attributes?: Attributes): this; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param _status The status to set. + */ + setStatus(_status: Status): this; + /** + * Updates the name of the Span + * @param _name the new Span name + */ + updateName(_name: string): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; +} + +/** + * A no-op implementation of Tracer that can be used when tracing + * is disabled. + */ +export declare class NoOpTracer implements Tracer { + /** + * Starts a new Span. + * @param _name The name of the span. + * @param _options The SpanOptions used during Span creation. + */ + startSpan(_name: string, _options?: OTSpanOptions): Span; + /** + * Returns the current Span from the current context, if available. + */ + getCurrentSpan(): Span; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param fn The function to be executed. + */ + withSpan ReturnType>(_span: Span, fn: T): ReturnType; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + bind(target: T, _span?: Span): T; +} +export { OpenCensusSpan } + +/** + * An implementation of OpenTelemetry Span that wraps an OpenCensus Span. + */ +export declare class OpenCensusSpanWrapper implements Span { + private _span; + /** + * The underlying OpenCensus Span + */ + getWrappedSpan(): OpenCensusSpan; + /** + * Wraps an existing OpenCensus Span + * @param span A Span or RootSpan from OpenCensus + */ + constructor(span: OpenCensusSpan); + /** + * Create a new OpenCensus Span and wrap it. + * @param tracer The OpenCensus tracer that has been wrapped in OpenCensusTracerWrapper + * @param name The name of the Span + * @param options Options for the Span + */ + constructor(tracer: OpenCensusTracerWrapper, name: string, options?: OTSpanOptions); + /** + * Marks the end of Span execution. + * @param endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + setAttributes(attributes: Attributes): this; + /** + * Adds an event to the Span + * @param name The name of the event + * @param attributes The associated attributes to add for this event + */ + addEvent(_name: string, _attributes?: Attributes): this; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + setStatus(status: Status): this; + /** + * Updates the name of the Span + * @param name the new Span name + */ + updateName(name: string): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; +} +export { OpenCensusTracer } + +/** + * An implementation of OpenTelemetry Tracer that wraps an OpenCensus Tracer. + */ +export declare class OpenCensusTracerWrapper implements Tracer { + private _tracer; + /** + * The wrapped OpenCensus Tracer + */ + getWrappedTracer(): TracerBase; + /** + * Create a new wrapper around a given OpenCensus Tracer. + * @param tracer The OpenCensus Tracer to wrap. + */ + constructor(tracer: TracerBase); + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + startSpan(name: string, options?: OTSpanOptions): Span; + /** + * Returns the current Span from the current context, if available. + */ + getCurrentSpan(): Span | undefined; + /** + * Executes the given function within the context provided by a Span. + * @param _span The span that provides the context. + * @param _fn The function to be executed. + */ + withSpan unknown>(_span: Span, _fn: T): ReturnType; + /** + * Bind a Span as the target's scope + * @param target An object to bind the scope. + * @param _span A specific Span to use. Otherwise, use the current one. + */ + bind(_target: T, _span?: Span): T; +} + +/** + * Tracing options to set on an operation. + */ +export declare interface OperationTracingOptions { + /** + * OpenTelemetry SpanOptions used to create a span when tracing is enabled. + */ + spanOptions?: SpanOptions; +} +export { OTSpanContext } +export { OTSpanOptions } + +/** + * Sets the global tracer, enabling tracing for the Azure SDK. + * @param tracer An OpenTelemetry Tracer instance. + */ +export declare function setTracer(tracer: Tracer): void; + +/** + * A light interface that tries to be structurally compatible with OpenTelemetry + */ +export declare interface SpanContext { + /** + * UUID of a trace. + */ + traceId: string; + /** + * UUID of a Span. + */ + spanId: string; + /** + * https://www.w3.org/TR/trace-context/#trace-flags + */ + traceFlags: number; +} + +/** + * Contains all the spans for a particular TraceID + * starting at unparented roots + */ +export declare interface SpanGraph { + /** + * All Spans without a parentSpanId + */ + roots: SpanGraphNode[]; +} + +/** + * Simple representation of a Span that only has name and child relationships. + * Children should be arranged in the order they were created. + */ +export declare interface SpanGraphNode { + /** + * The Span name + */ + name: string; + /** + * All child Spans of this Span + */ + children: SpanGraphNode[]; +} + +/** + * An interface that enables manual propagation of Spans + */ +export declare interface SpanOptions { + /** + * The SpanContext that refers to a parent span, if any. + * A null value indicates that this should be a new root span, + * rather than potentially detecting a span via a context manager. + */ + parent?: SpanContext | null; + /** + * Attributes to set on the Span + */ + attributes?: { + [key: string]: unknown; + }; +} + +/** + * A mock span useful for testing. + */ +export declare class TestSpan extends NoOpSpan { + /** + * The Span's current name + */ + name: string; + /** + * The Span's current status + */ + status: Status; + /** + * The Span's kind + */ + kind: SpanKind; + /** + * True if end() has been called on the Span + */ + endCalled: boolean; + /** + * The start time of the Span + */ + readonly startTime: TimeInput; + /** + * The id of the parent Span, if any. + */ + readonly parentSpanId?: string; + /** + * Known attributes, if any. + */ + readonly attributes: Attributes; + private _context; + private readonly _tracer; + /** + * Starts a new Span. + * @param parentTracer The tracer that created this Span + * @param name The name of the span. + * @param context The SpanContext this span belongs to + * @param kind The SpanKind of this Span + * @param parentSpanId The identifier of the parent Span + * @param startTime The startTime of the event (defaults to now) + */ + constructor(parentTracer: Tracer, name: string, context: OTSpanContext, kind: SpanKind, parentSpanId?: string, startTime?: TimeInput); + /** + * Returns the Tracer that created this Span + */ + tracer(): Tracer; + /** + * Returns the SpanContext associated with this Span. + */ + context(): OTSpanContext; + /** + * Marks the end of Span execution. + * @param _endTime The time to use as the Span's end time. Defaults to + * the current time. + */ + end(_endTime?: number): void; + /** + * Sets a status on the span. Overrides the default of CanonicalCode.OK. + * @param status The status to set. + */ + setStatus(status: Status): this; + /** + * Returns whether this span will be recorded + */ + isRecording(): boolean; + /** + * Sets an attribute on the Span + * @param key the attribute key + * @param value the attribute value + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes on the Span + * @param attributes the attributes to add + */ + setAttributes(attributes: Attributes): this; +} + +/** + * A mock tracer useful for testing + */ +export declare class TestTracer extends NoOpTracer { + private traceIdCounter; + private getNextTraceId; + private spanIdCounter; + private getNextSpanId; + private rootSpans; + private knownSpans; + /** + * Returns all Spans that were created without a parent + */ + getRootSpans(): TestSpan[]; + /** + * Returns all Spans this Tracer knows about + */ + getKnownSpans(): TestSpan[]; + /** + * Returns all Spans where end() has not been called + */ + getActiveSpans(): TestSpan[]; + /** + * Return all Spans for a particular trace, grouped by their + * parent Span in a tree-like structure + * @param traceId The traceId to return the graph for + */ + getSpanGraph(traceId: string): SpanGraph; + /** + * Starts a new Span. + * @param name The name of the span. + * @param options The SpanOptions used during Span creation. + */ + startSpan(name: string, options?: OTSpanOptions): TestSpan; + private _getParentContext; +} + +/** + * Shorthand enum for common traceFlags values inside SpanContext + */ +export declare const enum TraceFlags { + /** No flag set. */ + NONE = 0, + /** Caller is collecting trace information. */ + SAMPLED = 1 +} + +export { } diff --git a/node_modules/@azure/logger/Changelog.md b/node_modules/@azure/logger/Changelog.md new file mode 100644 index 000000000..0dccfe9bd --- /dev/null +++ b/node_modules/@azure/logger/Changelog.md @@ -0,0 +1,11 @@ +# 1.0.0 - 2019-10-29 + +This release marks the general availability of the `@azure/logging` package. + +- Removed the browser bundle. A browser-compatible library can still be created through the use of a bundler such as Rollup, Webpack, or Parcel. + ([#5860](https://github.com/Azure/azure-sdk-for-js/pull/5860)) + +# 1.0.0-preview.1 - 2019-10-22 + +Provides methods to set log levels that enable logs in Azure SDKs that support logging. +Also supports redirecting log outputs via a method override. diff --git a/node_modules/@azure/logger/LICENSE b/node_modules/@azure/logger/LICENSE new file mode 100644 index 000000000..21071075c --- /dev/null +++ b/node_modules/@azure/logger/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@azure/logger/README.md b/node_modules/@azure/logger/README.md new file mode 100644 index 000000000..b2f824fba --- /dev/null +++ b/node_modules/@azure/logger/README.md @@ -0,0 +1,90 @@ +# Azure Logger library for JS + +The `@azure/logger` package can be used to enable logging in the Azure SDKs for JavaScript. + +Logging can be enabled for the Azure SDK in the following ways: + +- Setting the AZURE_LOG_LEVEL environment variable +- Calling setLogLevel imported from "@azure/logger" +- Calling enable() on specific loggers +- Using the `DEBUG` environment variable. + +Note that AZURE_LOG_LEVEL, if set, takes precedence over DEBUG. Only use DEBUG without specifying AZURE_LOG_LEVEL or calling setLogLevel. + +## Getting started + +### Installation + +Install this libray using npm as follows + +``` +npm install @azure/logger +``` + +## Key Concepts + +The `@azure/logger` package supports the following log levels +specified in order of most verbose to least verbose: + +- verbose +- info +- warning +- error + +When setting a log level, either programmitcally or via the `AZURE_LOG_LEVEL` environment variable, +any logs that are written using a log level equal to or less than the one you choose +will be emitted. + +For example, setting the log level to `warning` will cause all logs that have the log +level `warning` or `error` to be emitted. + +## Examples + +### Example 1 - basic usage + +```js +const { EventHubClient } = require('@azure/event-hubs'); + +const logger = require('@azure/logger'); +logger.setLogLevel('info'); + +// operations will now emit info, warning, and error logs +const client = new EventHubClient(/* params */); +client.getPartitionIds() + .then(ids => { /* do work */ }) + .catch(e => { /* do work */ }); +}); +``` + +### Example 2 - redirect log ouput + +```js +const { AzureLogger, setLogLevel } = require('@azure/logger'); + +setLogLevel("verbose"); + +// override logging to output to console.log (default location is stderr) +AzureLogger.log = (...args) => { + console.log(...args); +}; +``` + +Using `AzureLogger`, it is possible to redirect the logging output from the Azure SDKs by +overriding the `AzureLogger.log` method. This may be useful if you want to redirect logs to +a location other than stderr. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor +License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your +contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and +decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. +You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/64a0cf353678b313bc1c27b430803db431e49c4e/CONTRIBUTING.md) to learn more about how to build and test the code. + +This project has adopted the Microsoft Open Source Code of Conduct. +For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional +questions or comments. diff --git a/node_modules/@azure/logger/dist-esm/src/debug.js b/node_modules/@azure/logger/dist-esm/src/debug.js new file mode 100644 index 000000000..7d1563048 --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/debug.js @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __read, __spread, __values } from "tslib"; +import { log } from "./log"; +var debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; +var enabledString; +var enabledNamespaces = []; +var skippedNamespaces = []; +var debuggers = []; +if (debugEnvVariable) { + enable(debugEnvVariable); +} +function enable(namespaces) { + var e_1, _a, e_2, _b; + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + var wildcard = /\*/g; + var namespaceList = namespaces.split(",").map(function (ns) { return ns.trim().replace(wildcard, ".*?"); }); + try { + for (var namespaceList_1 = __values(namespaceList), namespaceList_1_1 = namespaceList_1.next(); !namespaceList_1_1.done; namespaceList_1_1 = namespaceList_1.next()) { + var ns = namespaceList_1_1.value; + if (ns.startsWith("-")) { + skippedNamespaces.push(new RegExp("^" + ns.substr(1) + "$")); + } + else { + enabledNamespaces.push(new RegExp("^" + ns + "$")); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (namespaceList_1_1 && !namespaceList_1_1.done && (_a = namespaceList_1.return)) _a.call(namespaceList_1); + } + finally { if (e_1) throw e_1.error; } + } + try { + for (var debuggers_1 = __values(debuggers), debuggers_1_1 = debuggers_1.next(); !debuggers_1_1.done; debuggers_1_1 = debuggers_1.next()) { + var instance = debuggers_1_1.value; + instance.enabled = enabled(instance.namespace); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (debuggers_1_1 && !debuggers_1_1.done && (_b = debuggers_1.return)) _b.call(debuggers_1); + } + finally { if (e_2) throw e_2.error; } + } +} +function enabled(namespace) { + var e_3, _a, e_4, _b; + if (namespace.endsWith("*")) { + return true; + } + try { + for (var skippedNamespaces_1 = __values(skippedNamespaces), skippedNamespaces_1_1 = skippedNamespaces_1.next(); !skippedNamespaces_1_1.done; skippedNamespaces_1_1 = skippedNamespaces_1.next()) { + var skipped = skippedNamespaces_1_1.value; + if (skipped.test(namespace)) { + return false; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (skippedNamespaces_1_1 && !skippedNamespaces_1_1.done && (_a = skippedNamespaces_1.return)) _a.call(skippedNamespaces_1); + } + finally { if (e_3) throw e_3.error; } + } + try { + for (var enabledNamespaces_1 = __values(enabledNamespaces), enabledNamespaces_1_1 = enabledNamespaces_1.next(); !enabledNamespaces_1_1.done; enabledNamespaces_1_1 = enabledNamespaces_1.next()) { + var enabled_1 = enabledNamespaces_1_1.value; + if (enabled_1.test(namespace)) { + return true; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (enabledNamespaces_1_1 && !enabledNamespaces_1_1.done && (_b = enabledNamespaces_1.return)) _b.call(enabledNamespaces_1); + } + finally { if (e_4) throw e_4.error; } + } + return false; +} +function disable() { + var result = enabledString || ""; + enable(""); + return result; +} +function createDebugger(namespace) { + function debug() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (!newDebugger.enabled) { + return; + } + if (args.length > 0) { + args[0] = namespace + " " + args[0]; + } + newDebugger.log.apply(newDebugger, __spread(args)); + } + var newDebugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy: destroy, + log: debugObj.log, + namespace: namespace, + extend: extend + }); + debuggers.push(newDebugger); + return newDebugger; +} +function destroy() { + var index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; + } + return false; +} +function extend(namespace) { + var newDebugger = createDebugger(this.namespace + ":" + namespace); + newDebugger.log = this.log; + return newDebugger; +} +var debugObj = Object.assign(function (namespace) { + return createDebugger(namespace); +}, { + enable: enable, + enabled: enabled, + disable: disable, + log: log +}); +export default debugObj; +//# sourceMappingURL=debug.js.map \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/debug.js.map b/node_modules/@azure/logger/dist-esm/src/debug.js.map new file mode 100644 index 000000000..9d8f8a3bc --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/debug.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAgE5B,IAAM,gBAAgB,GACpB,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;AAEpF,IAAI,aAAiC,CAAC;AACtC,IAAI,iBAAiB,GAAa,EAAE,CAAC;AACrC,IAAI,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AC;IACtC,IAAI,KAAK,IAAI,CAAC,EAAE;QACd,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAiB,SAAiB;IAC/C,IAAM,WAAW,GAAG,cAAc,CAAI,IAAI,CAAC,SAAS,SAAI,SAAW,CAAC,CAAC;IACrE,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAC3B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,IAAM,QAAQ,GAAU,MAAM,CAAC,MAAM,CACnC,UAAC,SAAiB;IAChB,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AACnC,CAAC,EACD;IACE,MAAM,QAAA;IACN,OAAO,SAAA;IACP,OAAO,SAAA;IACP,GAAG,KAAA;CACJ,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/log.browser.js b/node_modules/@azure/logger/dist-esm/src/log.browser.js new file mode 100644 index 000000000..ca447548a --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/log.browser.js @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __read, __spread } from "tslib"; +var logFunction = console.debug || console.log; +export function log() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + logFunction.apply(void 0, __spread(args)); +} +//# sourceMappingURL=log.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/log.browser.js.map b/node_modules/@azure/logger/dist-esm/src/log.browser.js.map new file mode 100644 index 000000000..2078a76d5 --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/log.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.browser.js","sourceRoot":"","sources":["../../src/log.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;AACjD,MAAM,UAAU,GAAG;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAChC,WAAW,wBAAI,IAAI,GAAE;AACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/log.js b/node_modules/@azure/logger/dist-esm/src/log.js new file mode 100644 index 000000000..1093fd974 --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/log.js @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __read, __spread } from "tslib"; +import util from "util"; +import { EOL } from "os"; +export function log(message) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + process.stderr.write("" + util.format.apply(util, __spread([message], args)) + EOL); +} +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/log.js.map b/node_modules/@azure/logger/dist-esm/src/log.js.map new file mode 100644 index 000000000..a99b9f4a9 --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/log.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AAEzB,MAAM,UAAU,GAAG,CAAC,OAAY;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAC9C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAG,IAAI,CAAC,MAAM,OAAX,IAAI,YAAQ,OAAO,GAAK,IAAI,KAAI,GAAK,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/logger.js b/node_modules/@azure/logger/dist-esm/src/logger.js new file mode 100644 index 000000000..a2f452cce --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/logger.js @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __read, __spread, __values } from "tslib"; +import debug from "./debug"; +var registeredLoggers = new Set(); +var logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; +var azureLogLevel; +/** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ +export var AzureLogger = debug("azure"); +AzureLogger.log = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + debug.log.apply(debug, __spread(args)); +}; +var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; +if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isAzureLogLevel(logLevelFromEnv)) { + setLogLevel(logLevelFromEnv); + } + else { + console.error("AZURE_LOG_LEVEL set to unknown log level '" + logLevelFromEnv + "'; logging is not enabled. Acceptable values: " + AZURE_LOG_LEVELS.join(", ") + "."); + } +} +/** + * Immediately enables logging at the specified log level. + * @param level The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +export function setLogLevel(level) { + var e_1, _a; + if (level && !isAzureLogLevel(level)) { + throw new Error("Unknown log level '" + level + "'. Acceptable values: " + AZURE_LOG_LEVELS.join(",")); + } + azureLogLevel = level; + var enabledNamespaces = []; + try { + for (var registeredLoggers_1 = __values(registeredLoggers), registeredLoggers_1_1 = registeredLoggers_1.next(); !registeredLoggers_1_1.done; registeredLoggers_1_1 = registeredLoggers_1.next()) { + var logger = registeredLoggers_1_1.value; + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (registeredLoggers_1_1 && !registeredLoggers_1_1.done && (_a = registeredLoggers_1.return)) _a.call(registeredLoggers_1); + } + finally { if (e_1) throw e_1.error; } + } + debug.enable(enabledNamespaces.join(",")); +} +/** + * Retrieves the currently specified log level. + */ +export function getLogLevel() { + return azureLogLevel; +} +var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 +}; +/** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace The name of the SDK package. + * @ignore + */ +export function createClientLogger(namespace) { + var clientRootLogger = AzureLogger.extend(namespace); + patchLogMethod(AzureLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; +} +function patchLogMethod(parent, child) { + child.log = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + parent.log.apply(parent, __spread(args)); + }; +} +function createLogger(parent, level) { + var logger = Object.assign(parent.extend(level), { + level: level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + var enabledNamespaces = debug.disable(); + debug.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; +} +function shouldEnable(logger) { + if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) { + return true; + } + else { + return false; + } +} +function isAzureLogLevel(logLevel) { + return AZURE_LOG_LEVELS.includes(logLevel); +} +//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/node_modules/@azure/logger/dist-esm/src/logger.js.map b/node_modules/@azure/logger/dist-esm/src/logger.js.map new file mode 100644 index 000000000..ef7c4324f --- /dev/null +++ b/node_modules/@azure/logger/dist-esm/src/logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,KAAmB,MAAM,SAAS,CAAC;AAG1C,IAAM,iBAAi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C;IAE/B,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;QACxB,IAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;QAC1C,KAAK,CAAC,MAAM,CAAC,iBAAiB,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;KAC1D;IAED,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE9B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,MAAqB;IACzC,IAAI,aAAa,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE;QACtE,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAe,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/logger/dist/index.js b/node_modules/@azure/logger/dist/index.js new file mode 100644 index 000000000..ea078e389 --- /dev/null +++ b/node_modules/@azure/logger/dist/index.js @@ -0,0 +1,280 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var tslib = require('tslib'); +var util = _interopDefault(require('util')); +var os = require('os'); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function log(message) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + process.stderr.write("" + util.format.apply(util, tslib.__spread([message], args)) + os.EOL); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; +var enabledString; +var enabledNamespaces = []; +var skippedNamespaces = []; +var debuggers = []; +if (debugEnvVariable) { + enable(debugEnvVariable); +} +function enable(namespaces) { + var e_1, _a, e_2, _b; + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + var wildcard = /\*/g; + var namespaceList = namespaces.split(",").map(function (ns) { return ns.trim().replace(wildcard, ".*?"); }); + try { + for (var namespaceList_1 = tslib.__values(namespaceList), namespaceList_1_1 = namespaceList_1.next(); !namespaceList_1_1.done; namespaceList_1_1 = namespaceList_1.next()) { + var ns = namespaceList_1_1.value; + if (ns.startsWith("-")) { + skippedNamespaces.push(new RegExp("^" + ns.substr(1) + "$")); + } + else { + enabledNamespaces.push(new RegExp("^" + ns + "$")); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (namespaceList_1_1 && !namespaceList_1_1.done && (_a = namespaceList_1.return)) _a.call(namespaceList_1); + } + finally { if (e_1) throw e_1.error; } + } + try { + for (var debuggers_1 = tslib.__values(debuggers), debuggers_1_1 = debuggers_1.next(); !debuggers_1_1.done; debuggers_1_1 = debuggers_1.next()) { + var instance = debuggers_1_1.value; + instance.enabled = enabled(instance.namespace); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (debuggers_1_1 && !debuggers_1_1.done && (_b = debuggers_1.return)) _b.call(debuggers_1); + } + finally { if (e_2) throw e_2.error; } + } +} +function enabled(namespace) { + var e_3, _a, e_4, _b; + if (namespace.endsWith("*")) { + return true; + } + try { + for (var skippedNamespaces_1 = tslib.__values(skippedNamespaces), skippedNamespaces_1_1 = skippedNamespaces_1.next(); !skippedNamespaces_1_1.done; skippedNamespaces_1_1 = skippedNamespaces_1.next()) { + var skipped = skippedNamespaces_1_1.value; + if (skipped.test(namespace)) { + return false; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (skippedNamespaces_1_1 && !skippedNamespaces_1_1.done && (_a = skippedNamespaces_1.return)) _a.call(skippedNamespaces_1); + } + finally { if (e_3) throw e_3.error; } + } + try { + for (var enabledNamespaces_1 = tslib.__values(enabledNamespaces), enabledNamespaces_1_1 = enabledNamespaces_1.next(); !enabledNamespaces_1_1.done; enabledNamespaces_1_1 = enabledNamespaces_1.next()) { + var enabled_1 = enabledNamespaces_1_1.value; + if (enabled_1.test(namespace)) { + return true; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (enabledNamespaces_1_1 && !enabledNamespaces_1_1.done && (_b = enabledNamespaces_1.return)) _b.call(enabledNamespaces_1); + } + finally { if (e_4) throw e_4.error; } + } + return false; +} +function disable() { + var result = enabledString || ""; + enable(""); + return result; +} +function createDebugger(namespace) { + function debug() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (!newDebugger.enabled) { + return; + } + if (args.length > 0) { + args[0] = namespace + " " + args[0]; + } + newDebugger.log.apply(newDebugger, tslib.__spread(args)); + } + var newDebugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy: destroy, + log: debugObj.log, + namespace: namespace, + extend: extend + }); + debuggers.push(newDebugger); + return newDebugger; +} +function destroy() { + var index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; + } + return false; +} +function extend(namespace) { + var newDebugger = createDebugger(this.namespace + ":" + namespace); + newDebugger.log = this.log; + return newDebugger; +} +var debugObj = Object.assign(function (namespace) { + return createDebugger(namespace); +}, { + enable: enable, + enabled: enabled, + disable: disable, + log: log +}); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var registeredLoggers = new Set(); +var logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; +var azureLogLevel; +/** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ +var AzureLogger = debugObj("azure"); +AzureLogger.log = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + debugObj.log.apply(debugObj, tslib.__spread(args)); +}; +var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; +if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isAzureLogLevel(logLevelFromEnv)) { + setLogLevel(logLevelFromEnv); + } + else { + console.error("AZURE_LOG_LEVEL set to unknown log level '" + logLevelFromEnv + "'; logging is not enabled. Acceptable values: " + AZURE_LOG_LEVELS.join(", ") + "."); + } +} +/** + * Immediately enables logging at the specified log level. + * @param level The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +function setLogLevel(level) { + var e_1, _a; + if (level && !isAzureLogLevel(level)) { + throw new Error("Unknown log level '" + level + "'. Acceptable values: " + AZURE_LOG_LEVELS.join(",")); + } + azureLogLevel = level; + var enabledNamespaces = []; + try { + for (var registeredLoggers_1 = tslib.__values(registeredLoggers), registeredLoggers_1_1 = registeredLoggers_1.next(); !registeredLoggers_1_1.done; registeredLoggers_1_1 = registeredLoggers_1.next()) { + var logger = registeredLoggers_1_1.value; + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (registeredLoggers_1_1 && !registeredLoggers_1_1.done && (_a = registeredLoggers_1.return)) _a.call(registeredLoggers_1); + } + finally { if (e_1) throw e_1.error; } + } + debugObj.enable(enabledNamespaces.join(",")); +} +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return azureLogLevel; +} +var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 +}; +/** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace The name of the SDK package. + * @ignore + */ +function createClientLogger(namespace) { + var clientRootLogger = AzureLogger.extend(namespace); + patchLogMethod(AzureLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; +} +function patchLogMethod(parent, child) { + child.log = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + parent.log.apply(parent, tslib.__spread(args)); + }; +} +function createLogger(parent, level) { + var logger = Object.assign(parent.extend(level), { + level: level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + var enabledNamespaces = debugObj.disable(); + debugObj.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; +} +function shouldEnable(logger) { + if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) { + return true; + } + else { + return false; + } +} +function isAzureLogLevel(logLevel) { + return AZURE_LOG_LEVELS.includes(logLevel); +} + +exports.AzureLogger = AzureLogger; +exports.createClientLogger = createClientLogger; +exports.getLogLevel = getLogLevel; +exports.setLogLevel = setLogLevel; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/logger/dist/index.js.map b/node_modules/@azure/logger/dist/index.js.map new file mode 100644 index 000000000..df039f4e2 --- /dev/null +++ b/node_modules/@azure/logger/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/log.ts","../src/debug.ts","../src/logger.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport util from \"util\";\nimport { EOL } from \"os\";\n\nexport function log(message: any, ...args: any[]) {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { log } from \"./log\";\n\n/**\n * A simple mechanism for enabling logging.\n * Intended to mimic the publicly available `debug` package.\n */\nexport interface Debug {\n /**\n * Creates a new logger with the given namespace.\n */\n (namespace: string): Debugger;\n /**\n * The default log method (defaults to console)\n */\n log: (...args: any[]) => void;\n /**\n * Enables a particular set of namespaces.\n * To enable multiple separate them with commas, e.g. \"info,debug\".\n * Supports wildcards, e.g. \"azure:*\"\n * Supports skip syntax, e.g. \"azure:*,-azure:storage:*\" will enable\n * everything under azure except for things under azure:storage.\n */\n enable: (namespaces: string) => void;\n /**\n * Checks if a particular namespace is enabled.\n */\n enabled: (namespace: string) => boolean;\n /**\n * Disables all logging, returns what was previously enabled.\n */\n disable: () => string;\n}\n\n/**\n * A log function that can be dynamically enabled and redirected.\n */\nexport interface Debugger {\n /**\n * Logs the given arguments to the `log` method.\n */\n (...args: any[]): void;\n /**\n * True if this logger is active and logging.\n */\n enabled: boolean;\n /**\n * Used to cleanup/remove this logger.\n */\n destroy: () => boolean;\n /**\n * The current log method. Can be overridden to redirect output.\n */\n log: (...args: any[]) => void;\n /**\n * The namespace of this logger.\n */\n namespace: string;\n /**\n * Extends this logger with a child namespace.\n * Namespaces are separated with a ':' character.\n */\n extend: (namespace: string) => Debugger;\n}\n\nconst debugEnvVariable =\n (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\n\nlet enabledString: string | undefined;\nlet enabledNamespaces: RegExp[] = [];\nlet skippedNamespaces: RegExp[] = [];\nconst debuggers: Debugger[] = [];\n\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\n\nfunction enable(namespaces: string): void {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n } else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\n\nfunction enabled(namespace: string): boolean {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabled of enabledNamespaces) {\n if (enabled.test(namespace)) {\n return true;\n }\n }\n return false;\n}\n\nfunction disable(): string {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\n\nfunction createDebugger(namespace: string): Debugger {\n function debug(...args: any[]) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n\n const newDebugger: Debugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend\n });\n\n debuggers.push(newDebugger);\n\n return newDebugger;\n}\n\nfunction destroy(this: Debugger): boolean {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\n\nfunction extend(this: Debugger, namespace: string): Debugger {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\n\nconst debugObj: Debug = Object.assign(\n (namespace: string): Debugger => {\n return createDebugger(namespace);\n },\n {\n enable,\n enabled,\n disable,\n log\n }\n);\n\nexport default debugObj;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport debug, { Debugger } from \"./debug\";\nexport { Debugger } from \"./debug\";\n\nconst registeredLoggers = new Set();\nconst logLevelFromEnv =\n (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\n\nlet azureLogLevel: AzureLogLevel | undefined;\n\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger: AzureClientLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\n\n/**\n * The log levels supported by the logger.\n * The log levels in order of most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport type AzureLogLevel = \"verbose\" | \"info\" | \"warning\" | \"error\";\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\n\ntype AzureDebugger = Debugger & { level: AzureLogLevel };\n\n/**\n * An AzureClientLogger is a function that can log to an appropriate severity level.\n */\nexport type AzureClientLogger = Debugger;\n\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n } else {\n console.error(\n `AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\n \", \"\n )}.`\n );\n }\n}\n\n/**\n * Immediately enables logging at the specified log level.\n * @param level The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level?: AzureLogLevel) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(\n `Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`\n );\n }\n azureLogLevel = level;\n\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n\n debug.enable(enabledNamespaces.join(\",\"));\n}\n\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel() {\n return azureLogLevel;\n}\n\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100\n};\n\n/**\n * Defines the methods available on the SDK-facing logger.\n */\nexport interface AzureLogger {\n /**\n * Used for failures the program is unlikely to recover from,\n * such as Out of Memory.\n */\n error: Debugger;\n /**\n * Used when a function fails to perform its intended task.\n * Usually this means the function will throw an exception.\n * Not used for self-healing events (e.g. automatic retry)\n */\n warning: Debugger;\n /**\n * Used when a function operates normally.\n */\n info: Debugger;\n /**\n * Used for detailed trbouleshooting scenarios. This is\n * intended for use by developers / system administrators\n * for diagnosing specific failures.\n */\n verbose: Debugger;\n}\n\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace The name of the SDK package.\n * @ignore\n */\nexport function createClientLogger(namespace: string): AzureLogger {\n const clientRootLogger: AzureClientLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\")\n };\n}\n\nfunction patchLogMethod(parent: AzureClientLogger, child: AzureClientLogger | AzureDebugger): void {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\n\nfunction createLogger(parent: AzureClientLogger, level: AzureLogLevel): AzureDebugger {\n const logger: AzureDebugger = Object.assign(parent.extend(level), {\n level\n });\n\n patchLogMethod(parent, logger);\n\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n\n registeredLoggers.add(logger);\n\n return logger;\n}\n\nfunction shouldEnable(logger: AzureDebugger) {\n if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction isAzureLogLevel(logLevel: string): logLevel is AzureLogLevel {\n return AZURE_LOG_LEVELS.includes(logLevel as any);\n}\n"],"names":["EOL","__values","debug"],"mappings":";;;;;;;;;;AAAA;AACA,SAKgB,GAAG,CAAC,OAAY;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAC9C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAG,IAAI,CAAC,MAAM,OAAX,IAAI,kBAAQ,OAAO,GAAK,IAAI,KAAIA,MAAK,CAAC,CAAC;CAChE;;ACRD;AACA,AAkEA,IAAM,gBAAgB,GACpB,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC;AAEpF,IAAI,aAAiC,CAAC;AACtC,IAAI,iBAAiB,GAAa,EAAE,CAAC;AACrC,IAAI,iBAAiB,GAAa,EAAE,CAAC;AACrC,IAAM,SAAS,GAAe,EAAE,CAAC;AAEjC,IAAI,gBAAgB,EAAE;IACpB,MAAM,CAAC,gBAAgB,CAAC,CAAC;CAC1B;AAED,SAAS,MAAM,CAAC,UAAkB;;IAChC,aAAa,GAA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MAAM,iBAAQ,IAAI,GAAE;KACrB,CAAC;CACH;AAED,SAAS,YAAY,CAAC,MAAyB,EAAE,KAAoB;IACnE,IAAM,MAAM,GAAkB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QAChE,KAAK,OAAA;KACN,CAAC,CAAC;IAEH,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/B,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;QACxB,IAAM,iBAAiB,GAAGA,QAAK,CAAC,OAAO,EAAE,CAAC;QAC1CA,QAAK,CAAC,MAAM,CAAC,iBAAiB,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;KAC1D;IAED,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE9B,OAAO,MAAM,CAAC;CACf;AAED,SAAS,YAAY,CAAC,MAAqB;IACzC,IAAI,aAAa,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE;QACtE,OAAO,IAAI,CAAC;KACb;SAAM;QACL,OAAO,KAAK,CAAC;KACd;CACF;AAED,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAe,CAAC,CAAC;CACnD;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/logger/package.json b/node_modules/@azure/logger/package.json new file mode 100644 index 000000000..f6ff5f8c5 --- /dev/null +++ b/node_modules/@azure/logger/package.json @@ -0,0 +1,149 @@ +{ + "_from": "@azure/logger@^1.0.0", + "_id": "@azure/logger@1.0.0", + "_inBundle": false, + "_integrity": "sha512-g2qLDgvmhyIxR3JVS8N67CyIOeFRKQlX/llxYJQr1OSGQqM3HTpVP8MjmjcEKbL/OIt2N9C9UFaNQuKOw1laOA==", + "_location": "/@azure/logger", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/logger@^1.0.0", + "name": "@azure/logger", + "escapedName": "@azure%2flogger", + "scope": "@azure", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.0.tgz", + "_shasum": "48b371dfb34288c8797e5c104f6c4fb45bf1772c", + "_spec": "@azure/logger@^1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corporation" + }, + "browser": { + "./dist/index.js": "./browser/logger.js", + "./dist-esm/src/log.js": "./dist-esm/src/log.browser.js", + "process": false + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "tslib": "^1.9.3" + }, + "deprecated": false, + "description": "Microsoft Azure SDK for JavaScript - Logger", + "devDependencies": { + "@microsoft/api-extractor": "^7.1.5", + "@types/chai": "^4.1.6", + "@types/mocha": "^5.2.5", + "@types/node": "^8.0.0", + "@types/sinon": "^7.0.13", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "assert": "^1.4.1", + "chai": "^4.2.0", + "cross-env": "^5.2.0", + "delay": "^4.2.0", + "dotenv": "^8.0.0", + "eslint": "^6.1.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "karma": "^4.0.1", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-junit-reporter": "^1.2.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-coverage": "^0.1.5", + "mocha": "^6.2.2", + "mocha-junit-reporter": "^1.18.0", + "mocha-multi": "^1.1.3", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "puppeteer": "^1.11.0", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-multi-entry": "^2.1.0", + "rollup-plugin-node-resolve": "^5.0.2", + "rollup-plugin-replace": "^2.1.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "sinon": "^7.1.0", + "ts-node": "^8.3.0", + "typescript": "^3.2.2" + }, + "engine": { + "node": ">=8.0.0" + }, + "files": [ + "dist/", + "dist-esm/src/", + "src/", + "types/logger.d.ts", + "tsconfig.json" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger", + "keywords": [ + "Azure", + "Log", + "Logger", + "Logging", + "Node.js", + "TypeScript", + "JavaScript", + "Browser" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/logger.js", + "name": "@azure/logger", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "npm run build:es6 && npm run build:nodebrowser && npm run extract-api", + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build:test": "rollup -c rollup.test.config.js 2>&1", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm dist-test types temp browser/*.js* browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint -c ../../.eslintrc.json src test --ext .ts -f html -o logger-lintReport.html || exit 0", + "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "pretest": "npm run build:test", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" mocha --require ts-node/register --require source-map-support/register --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=- --full-trace --no-timeouts test/*.spec.ts" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "./types/logger.d.ts", + "version": "1.0.0" +} diff --git a/node_modules/@azure/logger/src/debug.ts b/node_modules/@azure/logger/src/debug.ts new file mode 100644 index 000000000..8f5744f4d --- /dev/null +++ b/node_modules/@azure/logger/src/debug.ts @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { log } from "./log"; + +/** + * A simple mechanism for enabling logging. + * Intended to mimic the publicly available `debug` package. + */ +export interface Debug { + /** + * Creates a new logger with the given namespace. + */ + (namespace: string): Debugger; + /** + * The default log method (defaults to console) + */ + log: (...args: any[]) => void; + /** + * Enables a particular set of namespaces. + * To enable multiple separate them with commas, e.g. "info,debug". + * Supports wildcards, e.g. "azure:*" + * Supports skip syntax, e.g. "azure:*,-azure:storage:*" will enable + * everything under azure except for things under azure:storage. + */ + enable: (namespaces: string) => void; + /** + * Checks if a particular namespace is enabled. + */ + enabled: (namespace: string) => boolean; + /** + * Disables all logging, returns what was previously enabled. + */ + disable: () => string; +} + +/** + * A log function that can be dynamically enabled and redirected. + */ +export interface Debugger { + /** + * Logs the given arguments to the `log` method. + */ + (...args: any[]): void; + /** + * True if this logger is active and logging. + */ + enabled: boolean; + /** + * Used to cleanup/remove this logger. + */ + destroy: () => boolean; + /** + * The current log method. Can be overridden to redirect output. + */ + log: (...args: any[]) => void; + /** + * The namespace of this logger. + */ + namespace: string; + /** + * Extends this logger with a child namespace. + * Namespaces are separated with a ':' character. + */ + extend: (namespace: string) => Debugger; +} + +const debugEnvVariable = + (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; + +let enabledString: string | undefined; +let enabledNamespaces: RegExp[] = []; +let skippedNamespaces: RegExp[] = []; +const debuggers: Debugger[] = []; + +if (debugEnvVariable) { + enable(debugEnvVariable); +} + +function enable(namespaces: string): void { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const wildcard = /\*/g; + const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); + } else { + enabledNamespaces.push(new RegExp(`^${ns}$`)); + } + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } +} + +function enabled(namespace: string): boolean { + if (namespace.endsWith("*")) { + return true; + } + + for (const skipped of skippedNamespaces) { + if (skipped.test(namespace)) { + return false; + } + } + for (const enabled of enabledNamespaces) { + if (enabled.test(namespace)) { + return true; + } + } + return false; +} + +function disable(): string { + const result = enabledString || ""; + enable(""); + return result; +} + +function createDebugger(namespace: string): Debugger { + function debug(...args: any[]) { + if (!newDebugger.enabled) { + return; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); + } + + const newDebugger: Debugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend + }); + + debuggers.push(newDebugger); + + return newDebugger; +} + +function destroy(this: Debugger): boolean { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; + } + return false; +} + +function extend(this: Debugger, namespace: string): Debugger { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; +} + +const debugObj: Debug = Object.assign( + (namespace: string): Debugger => { + return createDebugger(namespace); + }, + { + enable, + enabled, + disable, + log + } +); + +export default debugObj; diff --git a/node_modules/@azure/logger/src/log.browser.ts b/node_modules/@azure/logger/src/log.browser.ts new file mode 100644 index 000000000..9539f4a5e --- /dev/null +++ b/node_modules/@azure/logger/src/log.browser.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +const logFunction = console.debug || console.log; +export function log(...args: any[]) { + logFunction(...args); +} diff --git a/node_modules/@azure/logger/src/log.ts b/node_modules/@azure/logger/src/log.ts new file mode 100644 index 000000000..5600f73d5 --- /dev/null +++ b/node_modules/@azure/logger/src/log.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import util from "util"; +import { EOL } from "os"; + +export function log(message: any, ...args: any[]) { + process.stderr.write(`${util.format(message, ...args)}${EOL}`); +} diff --git a/node_modules/@azure/logger/src/logger.ts b/node_modules/@azure/logger/src/logger.ts new file mode 100644 index 000000000..bf5966633 --- /dev/null +++ b/node_modules/@azure/logger/src/logger.ts @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import debug, { Debugger } from "./debug"; +export { Debugger } from "./debug"; + +const registeredLoggers = new Set(); +const logLevelFromEnv = + (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; + +let azureLogLevel: AzureLogLevel | undefined; + +/** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ +export const AzureLogger: AzureClientLogger = debug("azure"); +AzureLogger.log = (...args) => { + debug.log(...args); +}; + +/** + * The log levels supported by the logger. + * The log levels in order of most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +export type AzureLogLevel = "verbose" | "info" | "warning" | "error"; +const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + +type AzureDebugger = Debugger & { level: AzureLogLevel }; + +/** + * An AzureClientLogger is a function that can log to an appropriate severity level. + */ +export type AzureClientLogger = Debugger; + +if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isAzureLogLevel(logLevelFromEnv)) { + setLogLevel(logLevelFromEnv); + } else { + console.error( + `AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join( + ", " + )}.` + ); + } +} + +/** + * Immediately enables logging at the specified log level. + * @param level The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +export function setLogLevel(level?: AzureLogLevel) { + if (level && !isAzureLogLevel(level)) { + throw new Error( + `Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}` + ); + } + azureLogLevel = level; + + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); + } + } + + debug.enable(enabledNamespaces.join(",")); +} + +/** + * Retrieves the currently specified log level. + */ +export function getLogLevel() { + return azureLogLevel; +} + +const levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 +}; + +/** + * Defines the methods available on the SDK-facing logger. + */ +export interface AzureLogger { + /** + * Used for failures the program is unlikely to recover from, + * such as Out of Memory. + */ + error: Debugger; + /** + * Used when a function fails to perform its intended task. + * Usually this means the function will throw an exception. + * Not used for self-healing events (e.g. automatic retry) + */ + warning: Debugger; + /** + * Used when a function operates normally. + */ + info: Debugger; + /** + * Used for detailed trbouleshooting scenarios. This is + * intended for use by developers / system administrators + * for diagnosing specific failures. + */ + verbose: Debugger; +} + +/** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace The name of the SDK package. + * @ignore + */ +export function createClientLogger(namespace: string): AzureLogger { + const clientRootLogger: AzureClientLogger = AzureLogger.extend(namespace); + patchLogMethod(AzureLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; +} + +function patchLogMethod(parent: AzureClientLogger, child: AzureClientLogger | AzureDebugger): void { + child.log = (...args) => { + parent.log(...args); + }; +} + +function createLogger(parent: AzureClientLogger, level: AzureLogLevel): AzureDebugger { + const logger: AzureDebugger = Object.assign(parent.extend(level), { + level + }); + + patchLogMethod(parent, logger); + + if (shouldEnable(logger)) { + const enabledNamespaces = debug.disable(); + debug.enable(enabledNamespaces + "," + logger.namespace); + } + + registeredLoggers.add(logger); + + return logger; +} + +function shouldEnable(logger: AzureDebugger) { + if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) { + return true; + } else { + return false; + } +} + +function isAzureLogLevel(logLevel: string): logLevel is AzureLogLevel { + return AZURE_LOG_LEVELS.includes(logLevel as any); +} diff --git a/node_modules/@azure/logger/tsconfig.json b/node_modules/@azure/logger/tsconfig.json new file mode 100644 index 000000000..2a274ef0d --- /dev/null +++ b/node_modules/@azure/logger/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + /* Basic Options */ + "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "lib": [] /* lib dependencies are triple-slash directives in lib/index.ts */, + "declaration": true /* Generates corresponding '.d.ts' file. */, + "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, + "sourceMap": true /* Generates corresponding '.map' file. */, + "outDir": "./dist-esm" /* Redirect output structure to the directory. */, + "stripInternal": true /* Do not emit declarations for code with @internal annotation*/, + "declarationDir": "./types" /* Output directory for generated declaration files.*/, + "importHelpers": true /* Import emit helpers from 'tslib'. */, + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + /* Additional Checks */ + "noUnusedLocals": true /* Report errors on unused locals. */, + /* Module Resolution Options */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + /* Experimental Options */ + "forceConsistentCasingInFileNames": true, + /* Other options */ + "newLine": "LF" /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).”*/, + "allowJs": false /* Don't allow JavaScript files to be compiled.*/, + "downlevelIteration": true + }, + "compileOnSave": true, + "exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"] +} diff --git a/node_modules/@azure/logger/types/logger.d.ts b/node_modules/@azure/logger/types/logger.d.ts new file mode 100644 index 000000000..8a4728257 --- /dev/null +++ b/node_modules/@azure/logger/types/logger.d.ts @@ -0,0 +1,105 @@ + +/** + * An AzureClientLogger is a function that can log to an appropriate severity level. + */ +export declare type AzureClientLogger = Debugger; + +/** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ +export declare const AzureLogger: AzureClientLogger; + +/** + * Defines the methods available on the SDK-facing logger. + */ +export declare interface AzureLogger { + /** + * Used for failures the program is unlikely to recover from, + * such as Out of Memory. + */ + error: Debugger; + /** + * Used when a function fails to perform its intended task. + * Usually this means the function will throw an exception. + * Not used for self-healing events (e.g. automatic retry) + */ + warning: Debugger; + /** + * Used when a function operates normally. + */ + info: Debugger; + /** + * Used for detailed trbouleshooting scenarios. This is + * intended for use by developers / system administrators + * for diagnosing specific failures. + */ + verbose: Debugger; +} + +/** + * The log levels supported by the logger. + * The log levels in order of most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +export declare type AzureLogLevel = "verbose" | "info" | "warning" | "error"; + +/** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace The name of the SDK package. + * @ignore + */ +export declare function createClientLogger(namespace: string): AzureLogger; + +/** + * A log function that can be dynamically enabled and redirected. + */ +export declare interface Debugger { + /** + * Logs the given arguments to the `log` method. + */ + (...args: any[]): void; + /** + * True if this logger is active and logging. + */ + enabled: boolean; + /** + * Used to cleanup/remove this logger. + */ + destroy: () => boolean; + /** + * The current log method. Can be overridden to redirect output. + */ + log: (...args: any[]) => void; + /** + * The namespace of this logger. + */ + namespace: string; + /** + * Extends this logger with a child namespace. + * Namespaces are separated with a ':' character. + */ + extend: (namespace: string) => Debugger; +} + +/** + * Retrieves the currently specified log level. + */ +export declare function getLogLevel(): "verbose" | "info" | "warning" | "error" | undefined; + +/** + * Immediately enables logging at the specified log level. + * @param level The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +export declare function setLogLevel(level?: AzureLogLevel): void; + +export { } diff --git a/node_modules/@azure/ms-rest-js/Changelog.md b/node_modules/@azure/ms-rest-js/Changelog.md new file mode 100644 index 000000000..b9d8183b4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/Changelog.md @@ -0,0 +1,285 @@ +# Changelog +## 2.1.0 - 2020-10-08 +- Add support for custom http/https agent (PR [#403](https://github.com/Azure/ms-rest-js/pull/403)) +- Fix WebResource clone to include extra settings (Issue [#405](https://github.com/Azure/ms-rest-js/issue/403)) + +## 2.0.8 - 2020-07-23 +- [BugFix] - Fixed loading of proxyPolicy.browser.js in the HTML files.(PR [#397](https://github.com/Azure/ms-rest-js/pull/397)) + +## 2.0.7 - 2020-04-30 +- Fixes encoding query parameters in an array before joining them.(PR [#382](https://github.com/Azure/ms-rest-js/pull/382)) +- Replace public usage of `RequestPolicyOptions` to an interface `RequestPolicyOptionsLike` to avoid compatibility issues with private members. +- Fix issue with null/undefined values in array and tabs/space delimiter arrays during sendOperationRequest. [PR #390](https://github.com/Azure/ms-rest-js/pull/390) +- Fix in flattenResponse when expecting an array, checking for parsedBody to be an array before proceeding with flattening. (PR [#385](https://github.com/Azure/ms-rest-js/pull/385)) + +## 2.0.6 - 2020-04-15 +- A new interface `WebResourceLike` was introduced to avoid a direct dependency on the class `WebResource` in public interfaces. `HttpHeadersLike` was also added to replace references to `HttpHeaders`. This change was added to improve compatibility between `@azure/core-http` and `@azure/ms-rest-nodeauth`. + +## 2.0.5 - 2020-01-07 +- Fix node-fetch bundling when using Webpack (PR [#376](https://github.com/Azure/ms-rest-js/pull/376)). + +## 2.0.4 - 2019-07-30 +- Ensure that a primitive type (string, number, boolean, null, undefined) response body with or without a `bodyMapper` is not flattened. + +## 2.0.3 - 2019-07-11 +- Added support to not send default values while sending the request. +- Added support to populate entities with it's default value if it is present in the mapper while deserializing the response. +- During deserialization, if the service does not provide the discriminator property then we set it. While setting the discriminator property, we compare model property name and the `clientName` of the `polymorphicDiscriminator` instead of the `serializedName` of the `polymorphicDiscriminator`. +- Added tests for serializing and deserializing additional properties. + +## 2.0.2 - 2019-07-08 +- Updated `cookieJar.setCookie()` with `{ ignoreError: true }` for `NodeFetchHttpClient`. This should silently ignore things like parse errors and invalid domains. This should resolve issues where customers using the `@azure/arm-appservice` package get an error due to mismatch in the domain [Azure/azure-sdk-for-js#1008](https://github.com/Azure/azure-sdk-for-js/issues/1008). This behavior makes it consistent with the old package [azure-arm-website](https://www.npmjs.com/package/azure-arm-website) which depends on the runtime [ms-rest](https://www.npmjs.com/package/ms-rest) that depends on the [request](https://www.npmjs.com/package/request) library which uses the [tough-cookie](https://www.npmjs.com/package/tough-cookie) package in `{ looseMode: true }` by [default](https://github.com/request/request/blob/536f0e76b249e4545c3ba2ac75e643146ebf3824/lib/cookies.js#L21) with `{ ignoreError: true }` as can be seen [here](https://github.com/request/request/blob/df346d8531ac4b8c360df301f228d5767d0e374e/request.js#L969). + +## 2.0.1 - 2019-06-26 +- Updated tests to include Pattern constraint + +## 2.0.0 - 2019-06-21 + +- Change default HTTP client in Node.js environment from `axios`-based to `node-fetch`-based. +- Add `keepAlive` option to `WebResource` which sets proper header in Node.js HTTP client. +- **Breaking changes**: + - AbortController + - added required `dispatchEvent` method + - added required (or null) `onabort` method + - enforce type `Event` for `ev` parameter in `listener` in `addEventListener` and `removeEventListener` + +## 1.8.13 - 2019-06-12 + +- Added DomainCredentials class for providing credentials to publish to an Azure EventGrid domain. + +## 1.8.12 - 2019-06-07 + +- Added back the workaround of uppercasing method names otherwise axios causes issues with signing requests for storage data plane libraries. + +## 1.8.11 - 2019-06-06 + +- Moved testing dependent projects from a script to Azure Devops Pipeline + +## 1.8.10 - 2019-06-05 + +- `axios` changed the way it treats properties of the request config in `0.19.0`. Previously we were setting `trasnformResponse` to `undefined`. This would indicate `axios` to not transform (`JSON.parse()`) the response body. In `0.19.0`, they are setting the default response transformer if transformResponse is set to `undefined`. This breaks our pasrsing logic where we are doing `JSON.parse()` on `operationResponse.bodyAsText`. Moreover, we are exposing the `bodyAsText` property in the generated clients. +Not populating this property or setting the value of this property to a parsed JSON would be a breaking change for our users. +Hence we are setting the `transformResponse` property in the request config to an indentity function that returns the response body as-is. + +## 1.8.9 - 2019-06-04 + +- Added build job to CI pipeline + +## 1.8.8 - 2019-06-03 + +- Fixed vulnerabilities by bumping `axios` to `^0.19.0`. +- New version of axios fixed some issues hence removed one of the workarounds of uppercasing method names while following redirects [axios PR](https://github.com/axios/axios/pull/1758). + +## 1.8.7 - 2019-05-16 + +- Fixed issue [#347](https://github.com/Azure/ms-rest-js/issues/347), [#348](https://github.com/Azure/ms-rest-js/issues/348) in PR [#349](https://github.com/Azure/ms-rest-js/pull/349) + +## 1.8.6 - 2019-05-10 + +- Added script to run tests on dependent projects [#345](https://github.com/Azure/ms-rest-js/pull/345) + +## 1.8.4 - 2019-05-07 + +- Fixed incorrect undefined check in Axios client [62b65d](https://github.com/Azure/ms-rest-js/commit/ea7ceb86f1e6e6f7879e7e7ddfe791113762b65d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) +- Added TSLint check. Fix TSLint errors [#344](https://github.com/Azure/ms-rest-js/pull/344) + +## 1.8.2 - 2019-04-25 + +- Fixed http over https bug [#341](https://github.com/Azure/ms-rest-js/pull/341) + +## 1.8.1 - 2019-04-01 + +- Fixed serialization issue when required object is empty [#337](https://github.com/Azure/ms-rest-js/pull/337) + +## 1.8.0 - 2019-03-18 + +- Added exports to several request policy factory methods [#336](https://github.com/Azure/ms-rest-js/pull/336) + +## 1.7.0 - 2019-02-11 + +- Added userAgentHeaderName to ServiceClientOptions [#330](https://github.com/Azure/ms-rest-js/pull/330) + +## 1.6.0 - 2019-01-30 + +- Fixed including proxy policy in browser [0c552f](https://github.com/Azure/ms-rest-js/commit/fafa26180e591db43d43c9cf0c7e93c8030c552f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) + +## 1.5.3 - 2019-01-25 + +- Brought Axios interceptors back [c33602](https://github.com/Azure/ms-rest-js/commit/c1742fe6a80ed9b794115362633e0a8307c33602#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) + +## 1.5.2 - 2019-01-25 + +- Added HTTP(S) over HTTP(S) proxy support [2b1844](https://github.com/Azure/ms-rest-js/commit/1ee5a40d5016e286a7492c8cbd7b08d5c92b1844#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) +- Added `@types/tunnel` [0865a2](https://github.com/Azure/ms-rest-js/commit/7a9b496d04294446f940f1549fb0a44dd9b94c01#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) + +## 1.5.1 - 2019-01-22 + +- Fixed default HTTP client tests [c75b87](https://github.com/Azure/ms-rest-js/commit/4c2b1c5390deab989b5ec9cadb84891de9c75b87#diff-b9cfc7f2cdf78a7f4b91a753d10865a2) + +## 1.5.0 - 2019-01-15 + +- Added support to specify proxy setting in ServiceClientOptions. + +## 1.4.1 - 2019-01-15 + +- Movec browser-environment tests to Karma. + +## 1.4.0 - 2019-10-15 + +- Allowed ServiceClientOptions.requestPolicyFactories to be a function. + +## 1.3.0 - 2019-01-15 + +- Allowed ServiceClientOptions.userAgent property to be a function. + +## 1.1.1 - 2018-11-13 + +- Improved debugging by adding rollup-plugin-sourcemaps. + +## 1.1.0 - 2018-11-09 + +- Renamed NPM package to @azure/ms-rest-js. + +## 1.0.0 - 2018-10-04 + +- Moved to Rollup for node and browser bundles +- Moved browser bundle from ./msRestBundle.js to ./dist/msRest.browser.js. + +## 0.22.1 - 2018-09-27 + +- Added Authenticator type. + +## 0.22.0 - 2018-09-05 + +- Added support for EventGrid TopicCredentials object. + +## 0.21.0 - 2018-08-30 + +- Flatten response body properties, headers, etc. into one object for convenience + +## 0.20.0 - 2018-08-24 + +- Fixed bug where operationSpec.baseUrl might get mutated +- Fixed some edge cases in response headers parsing in browser +- Refinements to support LRO work in ms-rest-azure-js + +## 0.19.0 - 2018-08-22 + +- Improved type definitions of generated operation responses + +## 0.18.0 - 2018-08-08 + +- Replaced RequestPolicyCreator function with RequestPolicyFactory interface with create() method. + +## 0.17.0 - 2018-08-03 + +- Refactored mappers interfaces +- Added "sideEffects": false to package.json + +## 0.16.0 - 2018-07-26 + +- Added timeout parameter to request options +- Call onDownload/UploadProgress callbacks in nodejs + +## 0.15.0 - 2018-07-16 + +- Support x-nullable in Swagger +- Added architecture overview in docs/ folder +- Added withCredentials flag to request options + +## 0.12.0, 0.13.0, 0.14.0 - 2018-06-25 + +- Moved header deserialization to runtime +- Using XhrHttpClient in browser +- Miscellaneous internal breaking changes + +## 0.11.0 - 2018-06-21 + +- Support x-ms-header-collection-prefix in Swagger + +## 0.10.0 - 2018-06-18 + +- Export RequestPolicyOptions + +## 0.9.0 - 2018-06-14 + +- Fix base64 encoding in browser +- Add es6 module build +- withCredentials fixes +- Allow bundling individual operation groups instead of all operations + +## 0.8.0 - 2018-05-31 + +- Add onDownloadProgress/onUploadProgress handlers for browser + +## 0.7.0 - 2018-05-25 + +- Add parsed response headers support + +## 0.6.0 - 2018-05-22 + +- Added URLBuilder to parse and build URLs +- Removed fetch responses from public APIs +- Added AbortSignal optional parameter to operations for cancellation + +## 0.5.0 - 2018-05-08 + +- Replaced BaseFilter type with RequestPolicy. +- Removed ServiceClient.pipeline() in favor of ServiceClient.sendRequest(). +- Started work on OperationSpecs to replace the imperative generated operations. + +## 0.4.0 - 2018-05-03 + +- Added isomorphic-xml2js dependency to reduce browser package size +- Removed moment.js dependency, instead passing ISO 8601 strings for durations. + +## 0.2.8 - 2018-04-02 + +- Relaxed validation for object types +- Relaxed handling of unrecognized polymorphic discriminator +- Added ApiKeyCredentials type + +## 0.2.7 - 2018-03-23 + +- Updated moment to 2.21.0 +- Added support to ensure that the provided Duration is a Duration like object. (based on ms-rest 2.3.2 in https://github.com/Azure/azure-sdk-for-node) + +## 0.2.6 - 2018-02-22 + +- Added support for [de]serializing an "any" type (case when type is not present for an entity in the open api spec.). Resolves https://github.com/Azure/autorest/issues/2855 +- Updated dependency versions + +## 0.2.5 - 2018-01-25 + +- Compiled target to `ES5` for supporting IE11 #13. + +## 0.2.4 - 2018-01-24 + +- Removed dependency on detect-node and added a utility method to detect whether the app is being executed in a node.js environment. Fixes #10. + +## 0.2.3 - 2017-10-25 + +- We will return the actual response when the return type of a method in the generated code is `stream`. Hence, removing `bodyAsStream` property from `HttpOperationResponse`. + +## 0.2.2 - 2017-10-17 + +- replacing eval by traversing recursively in the object. + +## 0.2.1 - 2017-10-10 + +- moment version 2.19.0 has lot of issues. Hence fixing the dependency strictly to 2.18.1. + +## 0.2.0 - 2017-10-10 + +- Reverting the change made in #2. + +## 0.1.0 - 2017-09-16 + +- Initial version of ms-rest-js + - Provides support for basic credentials + - Supports serialization and deserialization of basic and complex types + - Supports sending requests in the node environment and also in the browser + - Builds the request pipeline by adding predefined filters + - Provides mechanism to add custom flters in the pipeline + - Provides a bundled file named [msRestBundle.js](./msRestBundle.js) that can be used in the browser + - Please take a look at the [samples](./samples) directory for node and browser samples diff --git a/node_modules/@azure/ms-rest-js/LICENSE b/node_modules/@azure/ms-rest-js/LICENSE new file mode 100644 index 000000000..21071075c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@azure/ms-rest-js/README.md b/node_modules/@azure/ms-rest-js/README.md new file mode 100644 index 000000000..d9de70498 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/README.md @@ -0,0 +1,40 @@ +# ms-rest-js + +[![Build Status](https://dev.azure.com/azure-public/azsdk/_apis/build/status/public.Azure.ms-rest-js%20-%20CI)](https://dev.azure.com/azure-public/azsdk/_build/latest?definitionId=39) + +Runtime for isomorphic javascript libraries (that work in the browser and node.js environment) generated via [Autorest](https://github.com/Azure/Autorest). + +## Requirements +- node.js version > 6.x +- npm install -g typescript + +## Installation +- After cloning the repo, execute `npm install` + +## Execution + +### node.js +- Set the subscriptionId and token +- Run `node samples/node-sample.js` + +### In the browser +- Set the subscriptionId and token and then run +- Open index.html file in the browser. It should show the response from GET request on the storage account. From Chrome type Ctrl + Shift + I and you can see the logs in console. + +## Architecture Overview + +You can find an explanation of how this repository's code works by going to our [architecture overview](https://github.com/Azure/ms-rest-js/blob/master/docs/architectureOverview.md). + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/node_modules/@azure/ms-rest-js/ThirdPartyNotices.txt b/node_modules/@azure/ms-rest-js/ThirdPartyNotices.txt new file mode 100644 index 000000000..8c622df8b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/ThirdPartyNotices.txt @@ -0,0 +1,35 @@ +Third Party Notices for ms-rest-js + +This project incorporates material from the project(s) listed below (collectively, Third Party Code). +Microsoft, Inc. Microsoft is not the original author of the Third Party Code. +The original copyright notice and license, under which Microsoft received such Third Party Code, +are set out below. This Third Party Code is licensed to you under their original license terms set forth below. +Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + +1. uuid (https://github.com/kelektiv/node-uuid) + +%% uuid NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF uuid NOTICES AND INFORMATION \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/dist/msRest.browser.js b/node_modules/@azure/ms-rest-js/dist/msRest.browser.js new file mode 100644 index 000000000..84c15b7e4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/dist/msRest.browser.js @@ -0,0 +1,4164 @@ +/** @license ms-rest-js + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.msRest = {})); +}(this, (function (exports) { 'use strict'; + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + /** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ + function getHeaderKey(headerName) { + return headerName.toLowerCase(); + } + function isHttpHeadersLike(object) { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function") { + return true; + } + return false; + } + /** + * A collection of HTTP header key/value pairs. + */ + var HttpHeaders = /** @class */ (function () { + function HttpHeaders(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (var headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + HttpHeaders.prototype.set = function (headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() }; + }; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + HttpHeaders.prototype.get = function (headerName) { + var header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + }; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + HttpHeaders.prototype.contains = function (headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + }; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + HttpHeaders.prototype.remove = function (headerName) { + var result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + }; + /** + * Get the headers that are contained this collection as an object. + */ + HttpHeaders.prototype.rawHeaders = function () { + var result = {}; + for (var headerKey in this._headersMap) { + var header = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + }; + /** + * Get the headers that are contained in this collection as an array. + */ + HttpHeaders.prototype.headersArray = function () { + var headers = []; + for (var headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerNames = function () { + var headerNames = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerValues = function () { + var headerValues = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + }; + /** + * Get the JSON object representation of this HTTP header collection. + */ + HttpHeaders.prototype.toJson = function () { + return this.rawHeaders(); + }; + /** + * Get the string representation of this HTTP header collection. + */ + HttpHeaders.prototype.toString = function () { + return JSON.stringify(this.toJson()); + }; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + HttpHeaders.prototype.clone = function () { + return new HttpHeaders(this.rawHeaders()); + }; + return HttpHeaders; + }()); + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + /** + * Encodes a string in base64 format. + * @param value the string to encode + */ + function encodeString(value) { + return btoa(value); + } + /** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ + function encodeByteArray(value) { + var str = ""; + for (var i = 0; i < value.length; i++) { + str += String.fromCharCode(value[i]); + } + return btoa(str); + } + /** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ + function decodeString(value) { + var byteString = atob(value); + var arr = new Uint8Array(byteString.length); + for (var i = 0; i < byteString.length; i++) { + arr[i] = byteString.charCodeAt(i); + } + return arr; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var rngBrowser = createCommonjsModule(function (module) { + // Unique ID creation requires a high quality random # generator. In the + // browser this is a little complicated due to unknown quality of Math.random() + // and inconsistent support for the `crypto` API. We do the best we can via + // feature-detection + + // getRandomValues needs to be invoked in a context where "this" is a Crypto + // implementation. Also, find the complete implementation of crypto on IE11. + var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + + if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; + } else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; + } + }); + + /** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + var byteToHex = []; + for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); + } + + function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); + } + + var bytesToUuid_1 = bytesToUuid; + + function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rngBrowser)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid_1(rnds); + } + + var v4_1 = v4; + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + var Constants = { + /** + * The ms-rest version + * @const + * @type {string} + */ + msRestVersion: "2.1.0", + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + StatusCodes: { + TooManyRequests: 429 + } + }, + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + AUTHORIZATION_SCHEME: "Bearer", + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } + }; + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * A constant that indicates whether the environment is node.js or browser based. + */ + var isNode = (typeof process !== "undefined") && !!process.version && !!process.versions && !!process.versions.node; + /** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ + function encodeUri(uri) { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); + } + /** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ + function stripResponse(response) { + var strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; + } + /** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResource} request The Http Request object + * + * @return {WebResource} The stripped version of Http Request. + */ + function stripRequest(request) { + var strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; + } + /** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ + function isValidUuid(uuid) { + var validUuidRegex = new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "ig"); + return validUuidRegex.test(uuid); + } + /** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ + function generateUuid() { + return v4_1(); + } + /** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ + function executePromisesSequentially(promiseFactories, kickstart) { + var result = Promise.resolve(kickstart); + promiseFactories.forEach(function (promiseFactory) { + result = result.then(promiseFactory); + }); + return result; + } + /** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ + function delay(t, value) { + return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); }); + } + /** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ + function promiseToCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + cb(undefined, data); + }, function (err) { + cb(err); + }); + }; + } + /** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ + function promiseToServiceCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + process.nextTick(cb, undefined, data.parsedBody, data.request, data); + }, function (err) { + process.nextTick(cb, err); + }); + }; + } + function prepareXMLRootList(obj, elementName) { + var _a; + if (!Array.isArray(obj)) { + obj = [obj]; + } + return _a = {}, _a[elementName] = obj, _a; + } + /** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ + function applyMixins(targetCtor, sourceCtors) { + sourceCtors.forEach(function (sourceCtors) { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(function (name) { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); + } + var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + /** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ + function isDuration(value) { + return validateISODuration.test(value); + } + /** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + /** + * Determines whether the given enity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param value Any entity + * @return boolean - true is it is primitive type, false otherwise. + */ + function isPrimitiveType(value) { + return (typeof value !== "object" && typeof value !== "function") || value === null; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + var Serializer = /** @class */ (function () { + function Serializer(modelMappers, isXML) { + if (modelMappers === void 0) { modelMappers = {}; } + this.modelMappers = modelMappers; + this.isXML = isXML; + } + Serializer.prototype.validateConstraints = function (mapper, value, objectName) { + var failValidation = function (constraintName, constraintValue) { + throw new Error("\"" + objectName + "\" with value \"" + value + "\" should satisfy the constraint \"" + constraintName + "\": " + constraintValue + "."); + }; + if (mapper.constraints && (value != undefined)) { + var _a = mapper.constraints, ExclusiveMaximum = _a.ExclusiveMaximum, ExclusiveMinimum = _a.ExclusiveMinimum, InclusiveMaximum = _a.InclusiveMaximum, InclusiveMinimum = _a.InclusiveMinimum, MaxItems = _a.MaxItems, MaxLength = _a.MaxLength, MinItems = _a.MinItems, MinLength = _a.MinLength, MultipleOf = _a.MultipleOf, Pattern = _a.Pattern, UniqueItems = _a.UniqueItems; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + var pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if ((typeof value !== "string") || (value.match(pattern) === null)) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && value.some(function (item, i, ar) { return ar.indexOf(item) !== i; })) { + failValidation("UniqueItems", UniqueItems); + } + } + }; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + Serializer.prototype.serialize = function (mapper, object, objectName) { + var payload = {}; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/ig) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + var required = mapper.required, nullable = mapper.nullable; + if (required && nullable && object === undefined) { + throw new Error(objectName + " cannot be undefined."); + } + if (required && !nullable && object == undefined) { + throw new Error(objectName + " cannot be null or undefined."); + } + if (!required && nullable === false && object === null) { + throw new Error(objectName + " cannot be null."); + } + if (object == undefined) { + payload = object; + } + else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/ig) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/ig) !== null) { + var enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Composite$/ig) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName); + } + } + return payload; + }; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + Serializer.prototype.deserialize = function (mapper, responseBody, objectName) { + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + var payload; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/ig) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName); + } + else { + if (this.isXML) { + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$") and body ("_") properties, then just reduce the responseBody value to + * the body ("_") property. + */ + if (responseBody["$"] != undefined && responseBody["_"] != undefined) { + responseBody = responseBody["_"]; + } + } + if (mapperType.match(/^Number$/ig) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/ig) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/ig) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + }; + return Serializer; + }()); + function trimEnd(str, ch) { + var len = str.length; + while ((len - 1) >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); + } + function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error("Please provide an input of type Uint8Array for converting to Base64Url."); + } + // Uint8Array to Base64. + var str = encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); + } + function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/\-/g, "+").replace(/\_/g, "/"); + // Base64 to Uint8Array. + return decodeString(str); + } + function splitSerializeName(prop) { + var classes = []; + var partialclass = ""; + if (prop) { + var subwords = prop.split("."); + for (var _i = 0, subwords_1 = subwords; _i < subwords_1.length; _i++) { + var item = subwords_1[_i]; + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; + } + function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); + } + function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); + } + function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/ig) !== null) { + if (typeof value !== "number") { + throw new Error(objectName + " with value " + value + " must be of type number."); + } + } + else if (typeName.match(/^String$/ig) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(objectName + " with value \"" + value + "\" must be of type string."); + } + } + else if (typeName.match(/^Uuid$/ig) !== null) { + if (!(typeof value.valueOf() === "string" && isValidUuid(value))) { + throw new Error(objectName + " with value \"" + value + "\" must be of type string and a valid uuid."); + } + } + else if (typeName.match(/^Boolean$/ig) !== null) { + if (typeof value !== "boolean") { + throw new Error(objectName + " with value " + value + " must be of type boolean."); + } + } + else if (typeName.match(/^Stream$/ig) !== null) { + var objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !(typeof Blob === "function" && value instanceof Blob)) { + throw new Error(objectName + " must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."); + } + } + } + return value; + } + function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error("Please provide a set of allowedValues to validate " + objectName + " as an Enum Type."); + } + var isPresent = allowedValues.some(function (item) { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(value + " is not a valid value for " + objectName + ". The valid values are: " + JSON.stringify(allowedValues) + "."); + } + return value; + } + function serializeByteArrayType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = encodeByteArray(value); + } + return value; + } + function serializeBase64UrlType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = bufferToBase64Url(value); + } + return value; + } + function serializeDateTypes(typeName, value, objectName) { + if (value != undefined) { + if (typeName.match(/^Date$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123 format."); + } + value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123/ISO8601 format " + + "for it to be serialized in UnixTime/Epoch format."); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/ig) !== null) { + if (!isDuration(value)) { + throw new Error(objectName + " must be a string in ISO 8601 format. Instead was \"" + value + "\"."); + } + value = value; + } + } + return value; + } + function serializeSequenceType(serializer, mapper, object, objectName) { + if (!Array.isArray(object)) { + throw new Error(objectName + " must be of type Array."); + } + var elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempArray = []; + for (var i = 0; i < object.length; i++) { + tempArray[i] = serializer.serialize(elementType, object[i], objectName); + } + return tempArray; + } + function serializeDictionaryType(serializer, mapper, object, objectName) { + if (typeof object !== "object") { + throw new Error(objectName + " must be of type object."); + } + var valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + "." + key); + } + return tempDictionary; + } + /** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ + function resolveModelProperties(serializer, mapper, objectName) { + var modelProps = mapper.type.modelProperties; + if (!modelProps) { + var className = mapper.type.className; + if (!className) { + throw new Error("Class name for model \"" + objectName + "\" is not provided in the mapper \"" + JSON.stringify(mapper, undefined, 2) + "\"."); + } + var modelMapper = serializer.modelMappers[className]; + if (!modelMapper) { + throw new Error("mapper() cannot be null or undefined for model \"" + className + "\"."); + } + modelProps = modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error("modelProperties cannot be null or undefined in the " + + ("mapper \"" + JSON.stringify(modelMapper) + "\" of type \"" + className + "\" for object \"" + objectName + "\".")); + } + } + return modelProps; + } + function serializeCompositeType(serializer, mapper, object, objectName) { + var _a; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object != undefined) { + var payload = {}; + var modelProps = resolveModelProperties(serializer, mapper, objectName); + for (var _i = 0, _b = Object.keys(modelProps); _i < _b.length; _i++) { + var key = _b[_i]; + var propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + var propName = void 0; + var parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + var paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (var _c = 0, paths_1 = paths; _c < paths_1.length; _c++) { + var pathName = paths_1[_c]; + var childObject = parentObject[pathName]; + if ((childObject == undefined) && (object[key] != undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject != undefined) { + var propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + var toSerialize = object[key]; + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + var serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName); + if (serializedValue !== undefined && propName != undefined) { + if (propertyMapper.xmlIsAttribute) { + // $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject.$ = parentObject.$ || {}; + parentObject.$[propName] = serializedValue; + } + else if (propertyMapper.xmlIsWrapped) { + parentObject[propName] = (_a = {}, _a[propertyMapper.xmlElementName] = serializedValue, _a); + } + else { + parentObject[propName] = serializedValue; + } + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var propNames = Object.keys(modelProps); + var _loop_1 = function (clientPropName) { + var isAdditionalProperty = propNames.every(function (pn) { return pn !== clientPropName; }); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]'); + } + }; + for (var clientPropName in object) { + _loop_1(clientPropName); + } + } + return payload; + } + return object; + } + function isSpecialXmlProperty(propertyName) { + return ["$", "_"].includes(propertyName); + } + function deserializeCompositeType(serializer, mapper, responseBody, objectName) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + var modelProps = resolveModelProperties(serializer, mapper, objectName); + var instance = {}; + var handledPropertyNames = []; + for (var _i = 0, _a = Object.keys(modelProps); _i < _a.length; _i++) { + var key = _a[_i]; + var propertyMapper = modelProps[key]; + var paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + var serializedName = propertyMapper.serializedName, xmlName = propertyMapper.xmlName, xmlElementName = propertyMapper.xmlElementName; + var propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + var headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + var dictionary = {}; + for (var _b = 0, _c = Object.keys(responseBody); _b < _c.length; _b++) { + var headerKey = _c[_b]; + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody.$) { + instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName], propertyObjectName); + } + else { + var propertyName = xmlElementName || xmlName || serializedName; + var unwrappedProperty = responseBody[propertyName]; + if (propertyMapper.xmlIsWrapped) { + unwrappedProperty = responseBody[xmlName]; + unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName]; + var isEmptyWrappedList = unwrappedProperty === undefined; + if (isEmptyWrappedList) { + unwrappedProperty = []; + } + } + instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName); + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + var propertyInstance = void 0; + var res = responseBody; + // traversing the object step by step. + for (var _d = 0, paths_2 = paths; _d < paths_2.length; _d++) { + var item = paths_2[_d]; + if (!res) + break; + res = res[item]; + } + propertyInstance = res; + var polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + var serializedValue = void 0; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + instance[key] = serializedValue; + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var isAdditionalProperty = function (responsePropName) { + for (var clientPropName in modelProps) { + var paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (var responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]'); + } + } + } + else if (responseBody) { + for (var _e = 0, _f = Object.keys(responseBody); _e < _f.length; _e++) { + var key = _f[_e]; + if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) { + instance[key] = responseBody[key]; + } + } + } + return instance; + } + function deserializeDictionaryType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(responseBody); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName); + } + return tempDictionary; + } + return responseBody; + } + function deserializeSequenceType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + var tempArray = []; + for (var i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], objectName + "[" + i + "]"); + } + return tempArray; + } + return responseBody; + } + function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + var discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + var discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + var typeName = mapper.type.uberParent || mapper.type.className; + var indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + var polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; + } + function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return mapper.type.polymorphicDiscriminator + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); + } + function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator); + } + // TODO: why is this here? + function serializeObject(toSerialize) { + if (toSerialize == undefined) + return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + var array = []; + for (var i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } + else if (typeof toSerialize === "object") { + var dictionary = {}; + for (var property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; + } + /** + * Utility function to create a K:V from a list of strings + */ + function strEnum(o) { + var result = {}; + for (var _i = 0, o_1 = o; _i < o_1.length; _i++) { + var key = o_1[_i]; + result[key] = key; + } + return result; + } + var MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" + ]); + + // Copyright (c) Microsoft Corporation. All rights reserved. + function isWebResourceLike(object) { + if (typeof object !== "object") { + return false; + } + if (typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function") { + return true; + } + return false; + } + /** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ + var WebResource = /** @class */ (function () { + function WebResource(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, agentSettings) { + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers)); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.agentSettings = agentSettings; + } + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + WebResource.prototype.validateRequestProperties = function () { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + }; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + WebResource.prototype.prepare = function (options) { + if (!options) { + throw new Error("options object is required"); + } + if (options.method == undefined || typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && (options.url == undefined || typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error("options.url must be of type \"string\"."); + } + this.url = options.url; + } + // set the method + if (options.method) { + var validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error("The provided method \"" + options.method + "\" is invalid. Supported HTTP methods are: " + JSON.stringify(validMethods)); + } + } + this.method = options.method.toUpperCase(); + // construct the url if path template is provided + if (options.pathTemplate) { + var pathTemplate_1 = options.pathTemplate, pathParameters_1 = options.pathParameters; + if (typeof pathTemplate_1 !== "string") { + throw new Error("options.pathTemplate must be of type \"string\"."); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + var baseUrl = options.baseUrl; + var url_1 = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + (pathTemplate_1.startsWith("/") ? pathTemplate_1.slice(1) : pathTemplate_1); + var segments = url_1.match(/({\w*\s*\w*})/ig); + if (segments && segments.length) { + if (!pathParameters_1) { + throw new Error("pathTemplate: " + pathTemplate_1 + " has been provided. Hence, options.pathParameters must also be provided."); + } + segments.forEach(function (item) { + var pathParamName = item.slice(1, -1); + var pathParam = pathParameters_1[pathParamName]; + if (pathParam === null || pathParam === undefined || !(typeof pathParam === "string" || typeof pathParam === "object")) { + throw new Error("pathTemplate: " + pathTemplate_1 + " contains the path parameter " + pathParamName + + (" however, it is not present in " + pathParameters_1 + " - " + JSON.stringify(pathParameters_1, undefined, 2) + ".") + + ("The value of the path parameter can either be a \"string\" of the form { " + pathParamName + ": \"some sample value\" } or ") + + ("it can be an \"object\" of the form { \"" + pathParamName + "\": { value: \"some sample value\", skipUrlEncoding: true } }.")); + } + if (typeof pathParam.valueOf() === "string") { + url_1 = url_1.replace(item, encodeURIComponent(pathParam)); + } + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error("options.pathParameters[" + pathParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (pathParam.skipUrlEncoding) { + url_1 = url_1.replace(item, pathParam.value); + } + else { + url_1 = url_1.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url_1; + } + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + var queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error("options.queryParameters must be of type object. It should be a JSON object " + + "of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. " + + "The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }."); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + var queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (var queryParamName in queryParameters) { + var queryParam = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error("options.queryParameters[" + queryParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } + else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + } // end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + // add headers to the request if they are provided + if (options.headers) { + var headers = options.headers; + for (var _i = 0, _a = Object.keys(options.headers); _i < _a.length; _i++) { + var headerName = _a[_i]; + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", generateUuid()); + } + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body != undefined) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } + else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + return this; + }; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + WebResource.prototype.clone = function () { + var result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.agentSettings); + if (this.formData) { + result.formData = this.formData; + } + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + return result; + }; + return WebResource; + }()); + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + var RestError = /** @class */ (function (_super) { + __extends(RestError, _super); + function RestError(message, code, statusCode, request, response, body) { + var _this = _super.call(this, message) || this; + _this.code = code; + _this.statusCode = statusCode; + _this.request = request; + _this.response = response; + _this.body = body; + Object.setPrototypeOf(_this, RestError.prototype); + return _this; + } + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.REQUEST_ABORTED_ERROR = "REQUEST_ABORTED_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + return RestError; + }(Error)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ + var XhrHttpClient = /** @class */ (function () { + function XhrHttpClient() { + } + XhrHttpClient.prototype.sendRequest = function (request) { + var xhr = new XMLHttpRequest(); + if (request.agentSettings) { + throw new Error("HTTP agent settings not supported in browser environment"); + } + if (request.proxySettings) { + throw new Error("HTTP proxy is not supported in browser environment"); + } + var abortSignal = request.abortSignal; + if (abortSignal) { + var listener_1 = function () { + xhr.abort(); + }; + abortSignal.addEventListener("abort", listener_1); + xhr.addEventListener("readystatechange", function () { + if (xhr.readyState === XMLHttpRequest.DONE) { + abortSignal.removeEventListener("abort", listener_1); + } + }); + } + addProgressListener(xhr.upload, request.onUploadProgress); + addProgressListener(xhr, request.onDownloadProgress); + if (request.formData) { + var formData = request.formData; + var requestForm_1 = new FormData(); + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (var _i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + var formKey = _a[_i]; + var formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + request.body = requestForm_1; + request.formData = undefined; + var contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + // browser will automatically apply a suitable content-type header + request.headers.remove("Content-Type"); + } + } + xhr.open(request.method, request.url); + xhr.timeout = request.timeout; + xhr.withCredentials = request.withCredentials; + for (var _b = 0, _c = request.headers.headersArray(); _b < _c.length; _b++) { + var header = _c[_b]; + xhr.setRequestHeader(header.name, header.value); + } + xhr.responseType = request.streamResponseBody ? "blob" : "text"; + // tslint:disable-next-line:no-null-keyword + xhr.send(request.body === undefined ? null : request.body); + if (request.streamResponseBody) { + return new Promise(function (resolve, reject) { + xhr.addEventListener("readystatechange", function () { + // Resolve as soon as headers are loaded + if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { + var blobBody = new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { + resolve(xhr.response); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + blobBody: blobBody + }); + } + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + else { + return new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { return resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + bodyAsText: xhr.responseText + }); }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + }; + return XhrHttpClient; + }()); + function addProgressListener(xhr, listener) { + if (listener) { + xhr.addEventListener("progress", function (rawEvent) { return listener({ + loadedBytes: rawEvent.loaded + }); }); + } + } + // exported locally for testing + function parseHeaders(xhr) { + var responseHeaders = new HttpHeaders(); + var headerLines = xhr.getAllResponseHeaders().trim().split(/[\r\n]+/); + for (var _i = 0, headerLines_1 = headerLines; _i < headerLines_1.length; _i++) { + var line = headerLines_1[_i]; + var index = line.indexOf(":"); + var headerName = line.slice(0, index); + var headerValue = line.slice(index + 2); + responseHeaders.set(headerName, headerValue); + } + return responseHeaders; + } + function rejectOnTerminalEvent(request, xhr, reject) { + xhr.addEventListener("error", function () { return reject(new RestError("Failed to send request to " + request.url, RestError.REQUEST_SEND_ERROR, undefined, request)); }); + xhr.addEventListener("abort", function () { return reject(new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, request)); }); + xhr.addEventListener("timeout", function () { return reject(new RestError("timeout of " + xhr.timeout + "ms exceeded", RestError.REQUEST_SEND_ERROR, undefined, request)); }); + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + (function (HttpPipelineLogLevel) { + /** + * A log level that indicates that no logs will be logged. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + /** + * An error log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + /** + * A warning log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; + /** + * An information log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; + })(exports.HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = {})); + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + /** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ + function getPathStringFromParameter(parameter) { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); + } + function getPathStringFromParameterPath(parameterPath, mapper) { + var result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function isStreamOperation(operationSpec) { + var result = false; + for (var statusCode in operationSpec.responses) { + var operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + var parser = new DOMParser(); + function parseXML(str) { + try { + var dom = parser.parseFromString(str, "application/xml"); + throwIfError(dom); + var obj = domToObject(dom.childNodes[0]); + return Promise.resolve(obj); + } + catch (err) { + return Promise.reject(err); + } + } + var errorNS = ""; + try { + errorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0].namespaceURI; + } + catch (ignored) { + // Most browsers will return a document containing , but IE will throw. + } + function throwIfError(dom) { + if (errorNS) { + var parserErrors = dom.getElementsByTagNameNS(errorNS, "parsererror"); + if (parserErrors.length) { + throw new Error(parserErrors.item(0).innerHTML); + } + } + } + function isElement(node) { + return !!node.attributes; + } + /** + * Get the Element-typed version of the provided Node if the provided node is an element with + * attributes. If it isn't, then undefined is returned. + */ + function asElementWithAttributes(node) { + return isElement(node) && node.hasAttributes() ? node : undefined; + } + function domToObject(node) { + var result = {}; + var childNodeCount = node.childNodes.length; + var firstChildNode = node.childNodes[0]; + var onlyChildTextValue = (firstChildNode && childNodeCount === 1 && firstChildNode.nodeType === Node.TEXT_NODE && firstChildNode.nodeValue) || undefined; + var elementWithAttributes = asElementWithAttributes(node); + if (elementWithAttributes) { + result["$"] = {}; + for (var i = 0; i < elementWithAttributes.attributes.length; i++) { + var attr = elementWithAttributes.attributes[i]; + result["$"][attr.nodeName] = attr.nodeValue; + } + if (onlyChildTextValue) { + result["_"] = onlyChildTextValue; + } + } + else if (childNodeCount === 0) { + result = ""; + } + else if (onlyChildTextValue) { + result = onlyChildTextValue; + } + if (!onlyChildTextValue) { + for (var i = 0; i < childNodeCount; i++) { + var child = node.childNodes[i]; + // Ignore leading/trailing whitespace nodes + if (child.nodeType !== Node.TEXT_NODE) { + var childObject = domToObject(child); + if (!result[child.nodeName]) { + result[child.nodeName] = childObject; + } + else if (Array.isArray(result[child.nodeName])) { + result[child.nodeName].push(childObject); + } + else { + result[child.nodeName] = [result[child.nodeName], childObject]; + } + } + } + } + return result; + } + // tslint:disable-next-line:no-null-keyword + var doc = document.implementation.createDocument(null, null, null); + var serializer = new XMLSerializer(); + function stringifyXML(obj, opts) { + var rootName = opts && opts.rootName || "root"; + var dom = buildNode(obj, rootName)[0]; + return '' + serializer.serializeToString(dom); + } + function buildAttributes(attrs) { + var result = []; + for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) { + var key = _a[_i]; + var attr = doc.createAttribute(key); + attr.value = attrs[key].toString(); + result.push(attr); + } + return result; + } + function buildNode(obj, elementName) { + if (typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean") { + var elem = doc.createElement(elementName); + elem.textContent = obj.toString(); + return [elem]; + } + else if (Array.isArray(obj)) { + var result = []; + for (var _i = 0, obj_1 = obj; _i < obj_1.length; _i++) { + var arrayElem = obj_1[_i]; + for (var _a = 0, _b = buildNode(arrayElem, elementName); _a < _b.length; _a++) { + var child = _b[_a]; + result.push(child); + } + } + return result; + } + else if (typeof obj === "object") { + var elem = doc.createElement(elementName); + for (var _c = 0, _d = Object.keys(obj); _c < _d.length; _c++) { + var key = _d[_c]; + if (key === "$") { + for (var _e = 0, _f = buildAttributes(obj[key]); _e < _f.length; _e++) { + var attr = _f[_e]; + elem.attributes.setNamedItem(attr); + } + } + else { + for (var _g = 0, _h = buildNode(obj[key], key); _g < _h.length; _g++) { + var child = _h[_g]; + elem.appendChild(child); + } + } + } + return [elem]; + } + else { + throw new Error("Illegal value passed to buildObject: " + obj); + } + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + var BaseRequestPolicy = /** @class */ (function () { + function BaseRequestPolicy(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + BaseRequestPolicy.prototype.shouldLog = function (logLevel) { + return this._options.shouldLog(logLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + BaseRequestPolicy.prototype.log = function (logLevel, message) { + this._options.log(logLevel, message); + }; + return BaseRequestPolicy; + }()); + /** + * Optional properties that can be used when creating a RequestPolicy. + */ + var RequestPolicyOptions = /** @class */ (function () { + function RequestPolicyOptions(_logger) { + this._logger = _logger; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + RequestPolicyOptions.prototype.shouldLog = function (logLevel) { + return !!this._logger && + logLevel !== exports.HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel; + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + RequestPolicyOptions.prototype.log = function (logLevel, message) { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + }; + return RequestPolicyOptions; + }()); + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ + function deserializationPolicy(deserializationContentTypes) { + return { + create: function (nextPolicy, options) { + return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options); + } + }; + } + var defaultJsonContentTypes = ["application/json", "text/json"]; + var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; + /** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ + var DeserializationPolicy = /** @class */ (function (_super) { + __extends(DeserializationPolicy, _super); + function DeserializationPolicy(nextPolicy, deserializationContentTypes, options) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes; + _this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes; + return _this; + } + DeserializationPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(request).then(function (response) { return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response); })]; + }); + }); + }; + return DeserializationPolicy; + }(BaseRequestPolicy)); + function getOperationResponse(parsedResponse) { + var result; + var request = parsedResponse.request; + var operationSpec = request.operationSpec; + if (operationSpec) { + var operationResponseGetter = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; + } + function shouldDeserializeResponse(parsedResponse) { + var shouldDeserialize = parsedResponse.request.shouldDeserialize; + var result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; + } + function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response) { + return parse(jsonContentTypes, xmlContentTypes, response).then(function (parsedResponse) { + var shouldDeserialize = shouldDeserializeResponse(parsedResponse); + if (shouldDeserialize) { + var operationSpec = parsedResponse.request.operationSpec; + if (operationSpec && operationSpec.responses) { + var statusCode = parsedResponse.status; + var expectedStatusCodes = Object.keys(operationSpec.responses); + var hasNoExpectedStatusCodes = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); + var responseSpec = getOperationResponse(parsedResponse); + var isExpectedStatusCode = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec; + if (!isExpectedStatusCode) { + var defaultResponseSpec = operationSpec.responses.default; + if (defaultResponseSpec) { + var initialErrorMessage = isStreamOperation(operationSpec) + ? "Unexpected status code: " + statusCode + : parsedResponse.bodyAsText; + var error = new RestError(initialErrorMessage); + error.statusCode = statusCode; + error.request = stripRequest(parsedResponse.request); + error.response = stripResponse(parsedResponse); + var parsedErrorResponse = parsedResponse.parsedBody; + try { + if (parsedErrorResponse) { + var defaultResponseBodyMapper = defaultResponseSpec.bodyMapper; + if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === "CloudError") { + if (parsedErrorResponse.error) { + parsedErrorResponse = parsedErrorResponse.error; + } + if (parsedErrorResponse.code) { + error.code = parsedErrorResponse.code; + } + if (parsedErrorResponse.message) { + error.message = parsedErrorResponse.message; + } + } + else { + var internalError = parsedErrorResponse; + if (parsedErrorResponse.error) { + internalError = parsedErrorResponse.error; + } + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + } + if (defaultResponseBodyMapper) { + var valueToDeserialize = parsedErrorResponse; + if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof parsedErrorResponse === "object" + ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName] + : []; + } + error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, "error.body"); + } + } + } + catch (defaultError) { + error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response."; + } + return Promise.reject(error); + } + } + else if (responseSpec) { + if (responseSpec.bodyMapper) { + var valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody"); + } + catch (error) { + var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText); + restError.request = stripRequest(parsedResponse.request); + restError.response = stripResponse(parsedResponse); + return Promise.reject(restError); + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + } + } + return Promise.resolve(parsedResponse); + }); + } + function parse(jsonContentTypes, xmlContentTypes, operationResponse) { + var errorHandler = function (err) { + var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + "."; + var errCode = err.code || RestError.PARSE_ERROR; + var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText); + return Promise.reject(e); + }; + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + var text_1 = operationResponse.bodyAsText; + var contentType = operationResponse.headers.get("Content-Type") || ""; + var contentComponents = !contentType ? [] : contentType.split(";").map(function (component) { return component.toLowerCase(); }); + if (contentComponents.length === 0 || contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) { + return new Promise(function (resolve) { + operationResponse.parsedBody = JSON.parse(text_1); + resolve(operationResponse); + }).catch(errorHandler); + } + else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) { + return parseXML(text_1) + .then(function (body) { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + return Promise.resolve(operationResponse); + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function exponentialRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; + } + var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; + var DEFAULT_CLIENT_RETRY_COUNT = 3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; + var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + /** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ + var ExponentialRetryPolicy = /** @class */ (function (_super) { + __extends(ExponentialRetryPolicy, _super); + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + function isNumber(n) { return typeof n === "number"; } + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + ExponentialRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return retry(_this, request, response); }) + .catch(function (error) { return retry(_this, request, error.response, undefined, error); }); + }; + return ExponentialRetryPolicy; + }(BaseRequestPolicy)); + /** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ + function shouldRetry(policy, statusCode, retryData) { + if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) { + return false; + } + var currentCount; + if (!retryData) { + throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); + } + /** + * Updates the retry data for the next attempt. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {RetryData} retryData The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ + function updateRetryData(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; + } + function retry(policy, request, response, retryData, requestError) { + retryData = updateRetryData(policy, retryData, requestError); + var isAborted = request.abortSignal && request.abortSignal.aborted; + if (!isAborted && shouldRetry(policy, response && response.status, retryData)) { + return delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry(policy, request, res, retryData, undefined); }) + .catch(function (err) { return retry(policy, request, response, retryData, err); }); + } + else if (isAborted || requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + var err = retryData.error || + new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response); + return Promise.reject(err); + } + else { + return Promise.resolve(response); + } + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function generateClientRequestIdPolicy(requestIdHeaderName) { + if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; } + return { + create: function (nextPolicy, options) { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; + } + var GenerateClientRequestIdPolicy = /** @class */ (function (_super) { + __extends(GenerateClientRequestIdPolicy, _super); + function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._requestIdHeaderName = _requestIdHeaderName; + return _this; + } + GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, generateUuid()); + } + return this._nextPolicy.sendRequest(request); + }; + return GenerateClientRequestIdPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + // Licensed under the MIT License. See License.txt in the project root for license information. + function getDefaultUserAgentKey() { + return "x-ms-command-name"; + } + function getPlatformSpecificData() { + var navigator = window.navigator; + var osInfo = { + key: "OS", + value: (navigator.oscpu || navigator.platform).replace(" ", "") + }; + return [osInfo]; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function getRuntimeInfo() { + var msRestRuntime = { + key: "ms-rest-js", + value: Constants.msRestVersion + }; + return [msRestRuntime]; + } + function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) { + if (keySeparator === void 0) { keySeparator = " "; } + if (valueSeparator === void 0) { valueSeparator = "/"; } + return telemetryInfo.map(function (info) { + var value = info.value ? "" + valueSeparator + info.value : ""; + return "" + info.key + value; + }).join(keySeparator); + } + var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; + function getDefaultUserAgentValue() { + var runtimeInfo = getRuntimeInfo(); + var platformSpecificData = getPlatformSpecificData(); + var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; + } + function userAgentPolicy(userAgentData) { + var key = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key; + var value = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value; + return { + create: function (nextPolicy, options) { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; + } + var UserAgentPolicy = /** @class */ (function (_super) { + __extends(UserAgentPolicy, _super); + function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) { + var _this = _super.call(this, _nextPolicy, _options) || this; + _this._nextPolicy = _nextPolicy; + _this._options = _options; + _this.headerKey = headerKey; + _this.headerValue = headerValue; + return _this; + } + UserAgentPolicy.prototype.sendRequest = function (request) { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + }; + UserAgentPolicy.prototype.addUserAgentHeader = function (request) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + }; + return UserAgentPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * A class that handles the query portion of a URLBuilder. + */ + var URLQuery = /** @class */ (function () { + function URLQuery() { + this._rawQuery = {}; + } + /** + * Get whether or not there any query parameters in this URLQuery. + */ + URLQuery.prototype.any = function () { + return Object.keys(this._rawQuery).length > 0; + }; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + URLQuery.prototype.set = function (parameterName, parameterValue) { + if (parameterName) { + if (parameterValue != undefined) { + var newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } + else { + delete this._rawQuery[parameterName]; + } + } + }; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + URLQuery.prototype.get = function (parameterName) { + return parameterName ? this._rawQuery[parameterName] : undefined; + }; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + URLQuery.prototype.toString = function () { + var result = ""; + for (var parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + var parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + var parameterStrings = []; + for (var _i = 0, parameterValue_1 = parameterValue; _i < parameterValue_1.length; _i++) { + var parameterValueElement = parameterValue_1[_i]; + parameterStrings.push(parameterName + "=" + parameterValueElement); + } + result += parameterStrings.join("&"); + } + else { + result += parameterName + "=" + parameterValue; + } + } + return result; + }; + /** + * Parse a URLQuery from the provided text. + */ + URLQuery.parse = function (text) { + var result = new URLQuery(); + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + var currentState = "ParameterName"; + var parameterName = ""; + var parameterValue = ""; + for (var i = 0; i < text.length; ++i) { + var currentCharacter = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + case "&": + parameterName = ""; + parameterValue = ""; + break; + default: + parameterName += currentCharacter; + break; + } + break; + case "ParameterValue": + switch (currentCharacter) { + case "=": + parameterName = ""; + parameterValue = ""; + currentState = "Invalid"; + break; + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + default: + parameterValue += currentCharacter; + break; + } + break; + case "Invalid": + if (currentCharacter === "&") { + currentState = "ParameterName"; + } + break; + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + return result; + }; + return URLQuery; + }()); + /** + * A class that handles creating, modifying, and parsing URLs. + */ + var URLBuilder = /** @class */ (function () { + function URLBuilder() { + } + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setScheme = function (scheme) { + if (!scheme) { + this._scheme = undefined; + } + else { + this.set(scheme, "SCHEME"); + } + }; + /** + * Get the scheme that has been set in this URL. + */ + URLBuilder.prototype.getScheme = function () { + return this._scheme; + }; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setHost = function (host) { + if (!host) { + this._host = undefined; + } + else { + this.set(host, "SCHEME_OR_HOST"); + } + }; + /** + * Get the host that has been set in this URL. + */ + URLBuilder.prototype.getHost = function () { + return this._host; + }; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setPort = function (port) { + if (port == undefined || port === "") { + this._port = undefined; + } + else { + this.set(port.toString(), "PORT"); + } + }; + /** + * Get the port that has been set in this URL. + */ + URLBuilder.prototype.getPort = function () { + return this._port; + }; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + URLBuilder.prototype.setPath = function (path) { + if (!path) { + this._path = undefined; + } + else { + if (path.indexOf("://") !== -1) { + this.set(path, "SCHEME"); + } + else { + this.set(path, "PATH"); + } + } + }; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + URLBuilder.prototype.appendPath = function (path) { + if (path) { + var currentPath = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + if (path.startsWith("/")) { + path = path.substring(1); + } + path = currentPath + path; + } + this.set(path, "PATH"); + } + }; + /** + * Get the path that has been set in this URL. + */ + URLBuilder.prototype.getPath = function () { + return this._path; + }; + /** + * Set the query in this URL. + */ + URLBuilder.prototype.setQuery = function (query) { + if (!query) { + this._query = undefined; + } + else { + this._query = URLQuery.parse(query); + } + }; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + URLBuilder.prototype.setQueryParameter = function (queryParameterName, queryParameterValue) { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + }; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + URLBuilder.prototype.getQueryParameterValue = function (queryParameterName) { + return this._query ? this._query.get(queryParameterName) : undefined; + }; + /** + * Get the query in this URL. + */ + URLBuilder.prototype.getQuery = function () { + return this._query ? this._query.toString() : undefined; + }; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + URLBuilder.prototype.set = function (text, startState) { + var tokenizer = new URLTokenizer(text, startState); + while (tokenizer.next()) { + var token = tokenizer.current(); + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + case "HOST": + this._host = token.text || undefined; + break; + case "PORT": + this._port = token.text || undefined; + break; + case "PATH": + var tokenPath = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + default: + throw new Error("Unrecognized URLTokenType: " + token.type); + } + } + } + }; + URLBuilder.prototype.toString = function () { + var result = ""; + if (this._scheme) { + result += this._scheme + "://"; + } + if (this._host) { + result += this._host; + } + if (this._port) { + result += ":" + this._port; + } + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + if (this._query && this._query.any()) { + result += "?" + this._query.toString(); + } + return result; + }; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + URLBuilder.prototype.replaceAll = function (searchValue, replaceValue) { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + }; + URLBuilder.parse = function (text) { + var result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + }; + return URLBuilder; + }()); + var URLToken = /** @class */ (function () { + function URLToken(text, type) { + this.text = text; + this.type = type; + } + URLToken.scheme = function (text) { + return new URLToken(text, "SCHEME"); + }; + URLToken.host = function (text) { + return new URLToken(text, "HOST"); + }; + URLToken.port = function (text) { + return new URLToken(text, "PORT"); + }; + URLToken.path = function (text) { + return new URLToken(text, "PATH"); + }; + URLToken.query = function (text) { + return new URLToken(text, "QUERY"); + }; + return URLToken; + }()); + /** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ + function isAlphaNumericCharacter(character) { + var characterCode = character.charCodeAt(0); + return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) || + (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) || + (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */); + } + /** + * A class that tokenizes URL strings. + */ + var URLTokenizer = /** @class */ (function () { + function URLTokenizer(_text, state) { + this._text = _text; + this._textLength = _text ? _text.length : 0; + this._currentState = state != undefined ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + URLTokenizer.prototype.current = function () { + return this._currentToken; + }; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + URLTokenizer.prototype.next = function () { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } + else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + case "HOST": + nextHost(this); + break; + case "PORT": + nextPort(this); + break; + case "PATH": + nextPath(this); + break; + case "QUERY": + nextQuery(this); + break; + default: + throw new Error("Unrecognized URLTokenizerState: " + this._currentState); + } + } + return !!this._currentToken; + }; + return URLTokenizer; + }()); + /** + * Read the remaining characters from this Tokenizer's character stream. + */ + function readRemaining(tokenizer) { + var result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; + } + /** + * Whether or not this URLTokenizer has a current character. + */ + function hasCurrentCharacter(tokenizer) { + return tokenizer._currentIndex < tokenizer._textLength; + } + /** + * Get the character in the text string at the current index. + */ + function getCurrentCharacter(tokenizer) { + return tokenizer._text[tokenizer._currentIndex]; + } + /** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ + function nextCharacter(tokenizer, step) { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } + } + /** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ + function peekCharacters(tokenizer, charactersToPeek) { + var endIndex = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); + } + /** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ + function readWhile(tokenizer, condition) { + var result = ""; + while (hasCurrentCharacter(tokenizer)) { + var currentCharacter = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } + else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + return result; + } + /** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ + function readWhileLetterOrDigit(tokenizer) { + return readWhile(tokenizer, function (character) { return isAlphaNumericCharacter(character); }); + } + /** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ + function readUntilCharacter(tokenizer) { + var terminatingCharacters = []; + for (var _i = 1; _i < arguments.length; _i++) { + terminatingCharacters[_i - 1] = arguments[_i]; + } + return readWhile(tokenizer, function (character) { return terminatingCharacters.indexOf(character) === -1; }); + } + function nextScheme(tokenizer) { + var scheme = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "HOST"; + } + } + function nextSchemeOrHost(tokenizer) { + var schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } + } + function nextHost(tokenizer) { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + var host = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } + function nextPort(tokenizer) { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + var port = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } + function nextPath(tokenizer) { + var path = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "QUERY"; + } + } + function nextQuery(tokenizer) { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + var query = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function redirectPolicy(maximumRetries) { + if (maximumRetries === void 0) { maximumRetries = 20; } + return { + create: function (nextPolicy, options) { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; + } + var RedirectPolicy = /** @class */ (function (_super) { + __extends(RedirectPolicy, _super); + function RedirectPolicy(nextPolicy, options, maxRetries) { + if (maxRetries === void 0) { maxRetries = 20; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.maxRetries = maxRetries; + return _this; + } + RedirectPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return handleRedirect(_this, response, 0); }); + }; + return RedirectPolicy; + }(BaseRequestPolicy)); + function handleRedirect(policy, response, currentRetries) { + var request = response.request, status = response.status; + var locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || status === 307 || (status === 303 && request.method === "POST")) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + var builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + } + return policy._nextPolicy.sendRequest(request) + .then(function (res) { return handleRedirect(policy, res, currentRetries + 1); }); + } + return Promise.resolve(response); + } + + function rpRegistrationPolicy(retryTimeout) { + if (retryTimeout === void 0) { retryTimeout = 30; } + return { + create: function (nextPolicy, options) { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; + } + var RPRegistrationPolicy = /** @class */ (function (_super) { + __extends(RPRegistrationPolicy, _super); + function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) { + if (_retryTimeout === void 0) { _retryTimeout = 30; } + var _this = _super.call(this, nextPolicy, options) || this; + _this._retryTimeout = _retryTimeout; + return _this; + } + RPRegistrationPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return registerIfNeeded(_this, request, response); }); + }; + return RPRegistrationPolicy; + }(BaseRequestPolicy)); + function registerIfNeeded(policy, request, response) { + if (response.status === 409) { + var rpName = checkRPNotRegisteredError(response.bodyAsText); + if (rpName) { + var urlPrefix = extractSubscriptionUrl(request.url); + return registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(function () { return false; }) + .then(function (registrationStatus) { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + }); + } + } + return Promise.resolve(response); + } + /** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ + function getRequestEssentials(originalRequest, reuseUrlToo) { + if (reuseUrlToo === void 0) { reuseUrlToo = false; } + var reqOptions = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", generateUuid()); + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + return reqOptions; + } + /** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ + function checkRPNotRegisteredError(body) { + var result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } + catch (err) { + // do nothing; + } + if (responseBody && responseBody.error && responseBody.error.message && + responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") { + var matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; + } + /** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ + function extractSubscriptionUrl(url) { + var result; + var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } + else { + throw new Error("Unable to extract subscriptionId from the given url - " + url + "."); + } + return result; + } + /** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ + function registerRP(policy, urlPrefix, provider, originalRequest) { + var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01"; + var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01"; + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + return policy._nextPolicy.sendRequest(reqOptions) + .then(function (response) { + if (response.status !== 200) { + throw new Error("Autoregistration of " + provider + " failed. Please try registering manually."); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); + } + /** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ + function getRegistrationStatus(policy, url, originalRequest) { + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + return policy._nextPolicy.sendRequest(reqOptions).then(function (res) { + var obj = res.parsedBody; + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } + else { + return delay(policy._retryTimeout * 1000).then(function () { return getRegistrationStatus(policy, url, originalRequest); }); + } + }); + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function signingPolicy(authenticationProvider) { + return { + create: function (nextPolicy, options) { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; + } + var SigningPolicy = /** @class */ (function (_super) { + __extends(SigningPolicy, _super); + function SigningPolicy(nextPolicy, options, authenticationProvider) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.authenticationProvider = authenticationProvider; + return _this; + } + SigningPolicy.prototype.signRequest = function (request) { + return this.authenticationProvider.signRequest(request); + }; + SigningPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this.signRequest(request).then(function (nextRequest) { return _this._nextPolicy.sendRequest(nextRequest); }); + }; + return SigningPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; + } + /** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ + var SystemErrorRetryPolicy = /** @class */ (function (_super) { + __extends(SystemErrorRetryPolicy, _super); + function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; + _this.DEFAULT_CLIENT_RETRY_COUNT = 3; + _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; + _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + _this.retryCount = typeof retryCount === "number" ? retryCount : _this.DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = typeof retryInterval === "number" ? retryInterval : _this.DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = typeof minRetryInterval === "number" ? minRetryInterval : _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = typeof maxRetryInterval === "number" ? maxRetryInterval : _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + SystemErrorRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()).then(function (response) { return retry$1(_this, request, response); }); + }; + return SystemErrorRetryPolicy; + }(BaseRequestPolicy)); + /** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ + function shouldRetry$1(policy, retryData) { + var currentCount; + if (!retryData) { + throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); + } + /** + * Updates the retry data for the next attempt. + * + * @param {RetryData} retryData The retry data. + * @param {object} err The operation"s error, if any. + */ + function updateRetryData$1(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; + } + function retry$1(policy, request, operationResponse, retryData, err) { + retryData = updateRetryData$1(policy, retryData, err); + if (err && err.code && shouldRetry$1(policy, retryData) && + (err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || err.code === "ENOENT")) { + // If previous operation ended with an error and the policy allows a retry, do that + return delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry$1(policy, request, res, retryData, err); }) + .catch(function (err) { return retry$1(policy, request, operationResponse, retryData, err); }); + } + else { + if (err != undefined) { + // If the operation failed in the end, return all errors instead of just the last one + err = retryData.error; + return Promise.reject(err); + } + return Promise.resolve(operationResponse); + } + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + (function (QueryCollectionFormat) { + QueryCollectionFormat["Csv"] = ","; + QueryCollectionFormat["Ssv"] = " "; + QueryCollectionFormat["Tsv"] = "\t"; + QueryCollectionFormat["Pipes"] = "|"; + QueryCollectionFormat["Multi"] = "Multi"; + })(exports.QueryCollectionFormat || (exports.QueryCollectionFormat = {})); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var agentNotSupportedInBrowser = new Error("AgentPolicy is not supported in browser environment"); + function agentPolicy(_agentSettings) { + return { + create: function (_nextPolicy, _options) { + throw agentNotSupportedInBrowser; + } + }; + } + var AgentPolicy = /** @class */ (function (_super) { + __extends(AgentPolicy, _super); + function AgentPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw agentNotSupportedInBrowser; + } + AgentPolicy.prototype.sendRequest = function (_request) { + throw agentNotSupportedInBrowser; + }; + return AgentPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment"); + function getDefaultProxySettings(_proxyUrl) { + return undefined; + } + function proxyPolicy(_proxySettings) { + return { + create: function (_nextPolicy, _options) { + throw proxyNotSupportedInBrowser; + } + }; + } + var ProxyPolicy = /** @class */ (function (_super) { + __extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw proxyNotSupportedInBrowser; + } + ProxyPolicy.prototype.sendRequest = function (_request) { + throw proxyNotSupportedInBrowser; + }; + return ProxyPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var StatusCodes = Constants.HttpConstants.StatusCodes; + function throttlingRetryPolicy() { + return { + create: function (nextPolicy, options) { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; + } + /** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ + var ThrottlingRetryPolicy = /** @class */ (function (_super) { + __extends(ThrottlingRetryPolicy, _super); + function ThrottlingRetryPolicy(nextPolicy, options, _handleResponse) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._handleResponse = _handleResponse || _this._defaultResponseHandler; + return _this; + } + ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } + else { + return _this._handleResponse(httpRequest, response); + } + })]; + }); + }); + }; + ThrottlingRetryPolicy.prototype._defaultResponseHandler = function (httpRequest, httpResponse) { + return __awaiter(this, void 0, void 0, function () { + var retryAfterHeader, delayInMs; + var _this = this; + return __generator(this, function (_a) { + retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + if (retryAfterHeader) { + delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return [2 /*return*/, delay(delayInMs).then(function (_) { return _this._nextPolicy.sendRequest(httpRequest); })]; + } + } + return [2 /*return*/, httpResponse]; + }); + }); + }; + ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) { + var retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } + else { + return retryAfterInSeconds * 1000; + } + }; + ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) { + try { + var now = Date.now(); + var date = Date.parse(headerValue); + var diff = date - now; + return Number.isNaN(diff) ? undefined : diff; + } + catch (error) { + return undefined; + } + }; + return ThrottlingRetryPolicy; + }(BaseRequestPolicy)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * @class + * Initializes a new instance of the ServiceClient. + */ + var ServiceClient = /** @class */ (function () { + /** + * The ServiceClient constructor + * @constructor + * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication. + * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client. + */ + function ServiceClient(credentials, options) { + if (!options) { + options = {}; + } + if (credentials && !credentials.signRequest) { + throw new Error("credentials argument needs to implement signRequest method"); + } + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new XhrHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + var requestPolicyFactories; + if (Array.isArray(options.requestPolicyFactories)) { + requestPolicyFactories = options.requestPolicyFactories; + } + else { + requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options); + if (options.requestPolicyFactories) { + var newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + /** + * Send the provided httpRequest. + */ + ServiceClient.prototype.sendRequest = function (options) { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + var httpRequest; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } + else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } + catch (error) { + return Promise.reject(error); + } + var httpPipeline = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (var i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + }; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + ServiceClient.prototype.sendOperationRequest = function (operationArguments, operationSpec, callback) { + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + var httpRequest = new WebResource(); + var result; + try { + var baseUri = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + var requestUrl = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (var _i = 0, _a = operationSpec.urlParameters; _i < _a.length; _i++) { + var urlParameter = _a[_i]; + var urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter)); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll("{" + (urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)) + "}", urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (var _b = 0, _c = operationSpec.queryParameters; _b < _c.length; _b++) { + var queryParameter = _c[_b]; + var queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue != undefined) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter)); + if (queryParameter.collectionFormat != undefined) { + if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + queryParameterValue = ""; + } + else { + for (var index in queryParameterValue) { + var item = queryParameterValue[index]; + queryParameterValue[index] = item == undefined ? "" : item.toString(); + } + } + } + else if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Ssv || queryParameter.collectionFormat === exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (var index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Multi && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + var contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + if (operationSpec.headerParameters) { + for (var _d = 0, _e = operationSpec.headerParameters; _d < _e.length; _d++) { + var headerParameter = _e[_d]; + var headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue != undefined) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter)); + var headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + for (var _f = 0, _g = Object.keys(headerValue); _f < _g.length; _f++) { + var key = _g[_f]; + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + var options = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (var customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + } + httpRequest.withCredentials = this._withCredentials; + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + if (httpRequest.streamResponseBody == undefined) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + result = this.sendRequest(httpRequest) + .then(function (res) { return flattenResponse(res, operationSpec.responses[res.status]); }); + } + catch (error) { + result = Promise.reject(error); + } + var cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(function (res) { return cb(null, res._response.parsedBody, res._response.request, res._response); }) + .catch(function (err) { return cb(err); }); + } + return result; + }; + return ServiceClient; + }()); + function serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) { + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + var bodyMapper = operationSpec.requestBody.mapper; + var required = bodyMapper.required, xmlName = bodyMapper.xmlName, xmlElementName = bodyMapper.xmlElementName, serializedName = bodyMapper.serializedName; + var typeName = bodyMapper.type.name; + try { + if (httpRequest.body != undefined || required) { + var requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString); + var isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName), { rootName: xmlName || serializedName }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName }); + } + } + else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } + catch (error) { + throw new Error("Error \"" + error.message + "\" occurred in serializing the payload - " + JSON.stringify(serializedName, undefined, " ") + "."); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (var _i = 0, _a = operationSpec.formDataParameters; _i < _a.length; _i++) { + var formDataParameter = _a[_i]; + var formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue != undefined) { + var formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter)); + } + } + } + } + function isRequestPolicyFactory(instance) { + return typeof instance.create === "function"; + } + function getValueOrFunctionResult(value, defaultValueCreator) { + var result; + if (typeof value === "string") { + result = value; + } + else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; + } + function createDefaultRequestPolicyFactories(credentials, options) { + var factories = []; + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + if (credentials) { + if (isRequestPolicyFactory(credentials)) { + factories.push(credentials); + } + else { + factories.push(signingPolicy(credentials)); + } + } + var userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + var userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + factories.push(deserializationPolicy(options.deserializationContentTypes)); + var proxySettings = options.proxySettings || getDefaultProxySettings(); + if (proxySettings) { + factories.push(proxyPolicy()); + } + if (options.agentSettings) { + factories.push(agentPolicy(options.agentSettings)); + } + return factories; + } + function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); + } + function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { + var value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + var propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + var useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = parameterMapper.required || (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + // Serialize just for validation purposes. + var parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString); + } + } + else { + if (parameterMapper.required) { + value = {}; + } + for (var propertyName in parameterPath) { + var propertyMapper = parameterMapper.type.modelProperties[propertyName]; + var propertyPath = parameterPath[propertyName]; + var propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + var propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; + } + function getPropertyFromParameterPath(parent, parameterPath) { + var result = { propertyFound: false }; + var i = 0; + for (; i < parameterPath.length; ++i) { + var parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent != undefined && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; + } + function flattenResponse(_response, responseSpec) { + var parsedHeaders = _response.parsedHeaders; + var bodyMapper = responseSpec && responseSpec.bodyMapper; + var addOperationResponse = function (obj) { + return Object.defineProperty(obj, "_response", { + value: _response + }); + }; + if (bodyMapper) { + var typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody })); + } + var modelProperties_1 = typeName === "Composite" && bodyMapper.type.modelProperties || {}; + var isPageableResponse = Object.keys(modelProperties_1).some(function (k) { return modelProperties_1[k].serializedName === ""; }); + if (typeName === "Sequence" || isPageableResponse) { + // We're expecting a sequece(array) make sure that the response body is in the + // correct format, if not make it an empty array [] + var parsedBody = Array.isArray(_response.parsedBody) + ? _response.parsedBody + : []; + var arrayResponse = __spreadArrays(parsedBody); + for (var _i = 0, _a = Object.keys(modelProperties_1); _i < _a.length; _i++) { + var key = _a[_i]; + if (modelProperties_1[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + if (parsedHeaders) { + for (var _b = 0, _c = Object.keys(parsedHeaders); _b < _c.length; _b++) { + var key = _c[_b]; + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); + } + } + if (bodyMapper || _response.request.method === "HEAD" || isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse(__assign(__assign({}, parsedHeaders), { body: _response.parsedBody })); + } + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + function logPolicy(logger) { + if (logger === void 0) { logger = console.log; } + return { + create: function (nextPolicy, options) { + return new LogPolicy(nextPolicy, options, logger); + } + }; + } + var LogPolicy = /** @class */ (function (_super) { + __extends(LogPolicy, _super); + function LogPolicy(nextPolicy, options, logger) { + if (logger === void 0) { logger = console.log; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.logger = logger; + return _this; + } + LogPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return logResponse(_this, response); }); + }; + return LogPolicy; + }(BaseRequestPolicy)); + function logResponse(policy, response) { + policy.logger(">> Request: " + JSON.stringify(response.request, undefined, 2)); + policy.logger(">> Response status code: " + response.status); + var responseBody = response.bodyAsText; + policy.logger(">> Body: " + responseBody); + return Promise.resolve(response); + } + + // Copyright (c) Microsoft Corporation. All rights reserved. + var HeaderConstants = Constants.HeaderConstants; + var DEFAULT_AUTHORIZATION_SCHEME = "Bearer"; + /** + * A credentials object that uses a token string and a authorzation scheme to authenticate. + */ + var TokenCredentials = /** @class */ (function () { + /** + * Creates a new TokenCredentials object. + * + * @constructor + * @param {string} token The token. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function TokenCredentials(token, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (!token) { + throw new Error("token cannot be null or undefined."); + } + this.token = token; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @return {Promise} The signed request object. + */ + TokenCredentials.prototype.signRequest = function (webResource) { + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, this.authorizationScheme + " " + this.token); + return Promise.resolve(webResource); + }; + return TokenCredentials; + }()); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var HeaderConstants$1 = Constants.HeaderConstants; + var DEFAULT_AUTHORIZATION_SCHEME$1 = "Basic"; + var BasicAuthenticationCredentials = /** @class */ (function () { + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function BasicAuthenticationCredentials(userName, password, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME$1; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME$1; + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + BasicAuthenticationCredentials.prototype.signRequest = function (webResource) { + var credentials = this.userName + ":" + this.password; + var encodedCredentials = this.authorizationScheme + " " + encodeString(credentials); + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants$1.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + }; + return BasicAuthenticationCredentials; + }()); + + // Copyright (c) Microsoft Corporation. All rights reserved. + /** + * Authenticates to a service using an API key. + */ + var ApiKeyCredentials = /** @class */ (function () { + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + function ApiKeyCredentials(options) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error("options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided."); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResource} webResource The WebResource to be signed. + * @returns {Promise} The signed request object. + */ + ApiKeyCredentials.prototype.signRequest = function (webResource) { + if (!webResource) { + return Promise.reject(new Error("webResource cannot be null or undefined and must be of type \"object\".")); + } + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (var headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error("url cannot be null in the request object.")); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (var key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += key + "=" + this.inQuery[key]; + } + } + return Promise.resolve(webResource); + }; + return ApiKeyCredentials; + }()); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var TopicCredentials = /** @class */ (function (_super) { + __extends(TopicCredentials, _super); + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + function TopicCredentials(topicKey) { + var _this = this; + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return TopicCredentials; + }(ApiKeyCredentials)); + + // Copyright (c) Microsoft Corporation. All rights reserved. + var DomainCredentials = /** @class */ (function (_super) { + __extends(DomainCredentials, _super); + /** + * Creates a new EventGrid DomainCredentials object. + * + * @constructor + * @param {string} domainKey The EventGrid domain key + */ + function DomainCredentials(domainKey) { + var _this = this; + if (!domainKey || (domainKey && typeof domainKey !== "string")) { + throw new Error("domainKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": domainKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return DomainCredentials; + }(ApiKeyCredentials)); + + exports.ApiKeyCredentials = ApiKeyCredentials; + exports.BaseRequestPolicy = BaseRequestPolicy; + exports.BasicAuthenticationCredentials = BasicAuthenticationCredentials; + exports.Constants = Constants; + exports.DefaultHttpClient = XhrHttpClient; + exports.DomainCredentials = DomainCredentials; + exports.HttpHeaders = HttpHeaders; + exports.MapperType = MapperType; + exports.RequestPolicyOptions = RequestPolicyOptions; + exports.RestError = RestError; + exports.Serializer = Serializer; + exports.ServiceClient = ServiceClient; + exports.TokenCredentials = TokenCredentials; + exports.TopicCredentials = TopicCredentials; + exports.URLBuilder = URLBuilder; + exports.URLQuery = URLQuery; + exports.WebResource = WebResource; + exports.agentPolicy = agentPolicy; + exports.applyMixins = applyMixins; + exports.delay = delay; + exports.deserializationPolicy = deserializationPolicy; + exports.deserializeResponseBody = deserializeResponseBody; + exports.encodeUri = encodeUri; + exports.executePromisesSequentially = executePromisesSequentially; + exports.exponentialRetryPolicy = exponentialRetryPolicy; + exports.flattenResponse = flattenResponse; + exports.generateClientRequestIdPolicy = generateClientRequestIdPolicy; + exports.generateUuid = generateUuid; + exports.getDefaultProxySettings = getDefaultProxySettings; + exports.getDefaultUserAgentValue = getDefaultUserAgentValue; + exports.isDuration = isDuration; + exports.isNode = isNode; + exports.isValidUuid = isValidUuid; + exports.logPolicy = logPolicy; + exports.promiseToCallback = promiseToCallback; + exports.promiseToServiceCallback = promiseToServiceCallback; + exports.proxyPolicy = proxyPolicy; + exports.redirectPolicy = redirectPolicy; + exports.serializeObject = serializeObject; + exports.signingPolicy = signingPolicy; + exports.stripRequest = stripRequest; + exports.stripResponse = stripResponse; + exports.systemErrorRetryPolicy = systemErrorRetryPolicy; + exports.throttlingRetryPolicy = throttlingRetryPolicy; + exports.userAgentPolicy = userAgentPolicy; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=msRest.browser.js.map diff --git a/node_modules/@azure/ms-rest-js/dist/msRest.browser.js.map b/node_modules/@azure/ms-rest-js/dist/msRest.browser.js.map new file mode 100644 index 000000000..2e03d8236 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/dist/msRest.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRest.browser.js","sources":["../lib/httpHeaders.ts","../lib/util/base64.browser.ts","../node_modules/uuid/lib/rng-browser.js","../node_modules/uuid/lib/bytesToUuid.js","../node_modules/uuid/v4.js","../lib/util/constants.ts","../lib/util/utils.ts","../lib/serializer.ts","../lib/webResource.ts","../node_modules/tslib/tslib.es6.js","../lib/restError.ts","../lib/xhrHttpClient.ts","../lib/httpPipelineLogLevel.ts","../lib/operationParameter.ts","../lib/operationSpec.ts","../lib/util/xml.browser.ts","../lib/policies/requestPolicy.ts","../lib/policies/deserializationPolicy.ts","../lib/policies/exponentialRetryPolicy.ts","../lib/policies/generateClientRequestIdPolicy.ts","../lib/policies/msRestUserAgentPolicy.browser.ts","../lib/policies/userAgentPolicy.ts","../lib/url.ts","../lib/policies/redirectPolicy.ts","../lib/policies/rpRegistrationPolicy.ts","../lib/policies/signingPolicy.ts","../lib/policies/systemErrorRetryPolicy.ts","../lib/queryCollectionFormat.ts","../lib/policies/agentPolicy.browser.ts","../lib/policies/proxyPolicy.browser.ts","../lib/policies/throttlingRetryPolicy.ts","../lib/serviceClient.ts","../lib/policies/logPolicy.ts","../lib/credentials/tokenCredentials.ts","../lib/credentials/basicAuthenticationCredentials.ts","../lib/credentials/apiKeyCredentials.ts","../lib/credentials/topicCredentials.ts","../lib/credentials/domainCredentials.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName: string) {\n return headerName.toLowerCase();\n}\n\n/**\n * An individual header within a HttpHeaders collection.\n */\nexport interface HttpHeader {\n /**\n * The name of the header.\n */\n name: string;\n\n /**\n * The value of the header.\n */\n value: string;\n}\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport interface HttpHeadersLike {\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n set(headerName: string, headerValue: string | number): void;\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n get(headerName: string): string | undefined;\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n contains(headerName: string): boolean;\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n remove(headerName: string): boolean;\n /**\n * Get the headers that are contained this collection as an object.\n */\n rawHeaders(): RawHttpHeaders;\n /**\n * Get the headers that are contained in this collection as an array.\n */\n headersArray(): HttpHeader[];\n /**\n * Get the header names that are contained in this collection.\n */\n headerNames(): string[];\n /**\n * Get the header values that are contained in this collection.\n */\n headerValues(): string[];\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n clone(): HttpHeadersLike;\n /**\n * Get the JSON object representation of this HTTP header collection.\n * The result is the same as `rawHeaders()`.\n */\n toJson(): RawHttpHeaders;\n}\n\nexport function isHttpHeadersLike(object?: any): object is HttpHeadersLike {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n\n if (\n typeof object.rawHeaders === \"function\" &&\n typeof object.clone === \"function\" &&\n typeof object.get === \"function\" &&\n typeof object.set === \"function\" &&\n typeof object.contains === \"function\" &&\n typeof object.remove === \"function\" &&\n typeof object.headersArray === \"function\" &&\n typeof object.headerValues === \"function\" &&\n typeof object.headerNames === \"function\" &&\n typeof object.toJson === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport class HttpHeaders {\n private readonly _headersMap: { [headerKey: string]: HttpHeader };\n\n constructor(rawHeaders?: RawHttpHeaders) {\n this._headersMap = {};\n if (rawHeaders) {\n for (const headerName in rawHeaders) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n public set(headerName: string, headerValue: string | number): void {\n this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() };\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n public get(headerName: string): string | undefined {\n const header: HttpHeader = this._headersMap[getHeaderKey(headerName)];\n return !header ? undefined : header.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n public contains(headerName: string): boolean {\n return !!this._headersMap[getHeaderKey(headerName)];\n }\n\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n public remove(headerName: string): boolean {\n const result: boolean = this.contains(headerName);\n delete this._headersMap[getHeaderKey(headerName)];\n return result;\n }\n\n /**\n * Get the headers that are contained this collection as an object.\n */\n public rawHeaders(): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n for (const headerKey in this._headersMap) {\n const header: HttpHeader = this._headersMap[headerKey];\n result[header.name.toLowerCase()] = header.value;\n }\n return result;\n }\n\n /**\n * Get the headers that are contained in this collection as an array.\n */\n public headersArray(): HttpHeader[] {\n const headers: HttpHeader[] = [];\n for (const headerKey in this._headersMap) {\n headers.push(this._headersMap[headerKey]);\n }\n return headers;\n }\n\n /**\n * Get the header names that are contained in this collection.\n */\n public headerNames(): string[] {\n const headerNames: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerNames.push(headers[i].name);\n }\n return headerNames;\n }\n\n /**\n * Get the header names that are contained in this collection.\n */\n public headerValues(): string[] {\n const headerValues: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerValues.push(headers[i].value);\n }\n return headerValues;\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJson(): RawHttpHeaders {\n return this.rawHeaders();\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJson());\n }\n\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n public clone(): HttpHeaders {\n return new HttpHeaders(this.rawHeaders());\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * Encodes a string in base64 format.\n * @param value the string to encode\n */\nexport function encodeString(value: string): string {\n return btoa(value);\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value the Uint8Aray to encode\n */\nexport function encodeByteArray(value: Uint8Array): string {\n let str = \"\";\n for (let i = 0; i < value.length; i++) {\n str += String.fromCharCode(value[i]);\n }\n return btoa(str);\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value the base64 string to decode\n */\nexport function decodeString(value: string): Uint8Array {\n const byteString = atob(value);\n const arr = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n arr[i] = byteString.charCodeAt(i);\n }\n return arr;\n}\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nexport const Constants = {\n /**\n * The ms-rest version\n * @const\n * @type {string}\n */\n msRestVersion: \"2.1.0\",\n\n /**\n * Specifies HTTP.\n *\n * @const\n * @type {string}\n */\n HTTP: \"http:\",\n\n /**\n * Specifies HTTPS.\n *\n * @const\n * @type {string}\n */\n HTTPS: \"https:\",\n\n /**\n * Specifies HTTP Proxy.\n *\n * @const\n * @type {string}\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n\n /**\n * Specifies HTTPS Proxy.\n *\n * @const\n * @type {string}\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n\n HttpConstants: {\n /**\n * Http Verbs\n *\n * @const\n * @enum {string}\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\"\n },\n\n StatusCodes: {\n TooManyRequests: 429\n }\n },\n\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n *\n * @const\n * @type {string}\n */\n AUTHORIZATION: \"authorization\",\n\n AUTHORIZATION_SCHEME: \"Bearer\",\n\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n *\n * @const\n * @type {string}\n */\n RETRY_AFTER: \"Retry-After\",\n\n /**\n * The UserAgent header.\n *\n * @const\n * @type {string}\n */\n USER_AGENT: \"User-Agent\"\n }\n};\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport uuidv4 from \"uuid/v4\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { RestError } from \"../restError\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"./constants\";\n\n/**\n * A constant that indicates whether the environment is node.js or browser based.\n */\nexport const isNode = (typeof process !== \"undefined\") && !!process.version && !!process.versions && !!process.versions.node;\n\n/**\n * Checks if a parsed URL is HTTPS\n *\n * @param {object} urlToCheck The url to check\n * @return {boolean} True if the URL is HTTPS; false otherwise.\n */\nexport function urlIsHTTPS(urlToCheck: { protocol: string }): boolean {\n return urlToCheck.protocol.toLowerCase() === Constants.HTTPS;\n}\n\n/**\n * Encodes an URI.\n *\n * @param {string} uri The URI to be encoded.\n * @return {string} The encoded URI.\n */\nexport function encodeUri(uri: string): string {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param {HttpOperationResponse} response The Http Response\n *\n * @return {object} The stripped version of Http Response.\n */\nexport function stripResponse(response: HttpOperationResponse): any {\n const strippedResponse: any = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param {WebResource} request The Http Request object\n *\n * @return {WebResource} The stripped version of Http Request.\n */\nexport function stripRequest(request: WebResourceLike): WebResourceLike {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n\n/**\n * Validates the given uuid as a string\n *\n * @param {string} uuid The uuid as a string that needs to be validated\n *\n * @return {boolean} True if the uuid is valid; false otherwise.\n */\nexport function isValidUuid(uuid: string): boolean {\n const validUuidRegex = new RegExp(\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\", \"ig\");\n return validUuidRegex.test(uuid);\n}\n\n/**\n * Provides an array of values of an object. For example\n * for a given object { \"a\": \"foo\", \"b\": \"bar\" }, the method returns [\"foo\", \"bar\"].\n *\n * @param {object} obj An object whose properties need to be enumerated so that it\"s values can be provided as an array\n *\n * @return {any[]} An array of values of the given object.\n */\nexport function objectValues(obj: { [key: string]: any; }): any[] {\n const result: any[] = [];\n if (obj && obj instanceof Object) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n result.push((obj)[key]);\n }\n }\n } else {\n throw new Error(`The provided object ${JSON.stringify(obj, undefined, 2)} is not a valid object that can be ` +\n `enumerated to provide its values as an array.`);\n }\n return result;\n}\n\n/**\n * Generated UUID\n *\n * @return {string} RFC4122 v4 UUID.\n */\nexport function generateUuid(): string {\n return uuidv4();\n}\n\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param {Array} promiseFactories An array of promise factories(A function that return a promise)\n *\n * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n *\n * @return A chain of resolved or rejected promises\n */\nexport function executePromisesSequentially(promiseFactories: Array, kickstart: any) {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n\n/**\n * Merges source object into the target object\n * @param {object} source The object that needs to be merged\n *\n * @param {object} target The object to be merged into\n *\n * @returns {object} Returns the merged target object.\n */\nexport function mergeObjects(source: { [key: string]: any; }, target: { [key: string]: any; }) {\n Object.keys(source).forEach((key) => {\n target[key] = source[key];\n });\n return target;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after t milliseconds.\n * @param {number} t The number of milliseconds to be delayed.\n * @param {T} value The value to be resolved with after a timeout of t milliseconds.\n * @returns {Promise} Resolved promise\n */\nexport function delay(t: number, value?: T): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\n}\n\n/**\n * Service callback that is returned for REST requests initiated by the service client.\n */\nexport interface ServiceCallback {\n /**\n * A method that will be invoked as a callback to a service function.\n * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null.\n * @param {TResult} [result] The deserialized response body if an error did not occur.\n * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur.\n * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur.\n */\n (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void;\n}\n\n/**\n * Converts a Promise to a callback.\n * @param {Promise} promise The Promise to be converted to a callback\n * @returns {Function} A function that takes the callback (cb: Function): void\n * @deprecated generated code should instead depend on responseToBody\n */\nexport function promiseToCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: Function): void => {\n promise.then((data: any) => {\n cb(undefined, data);\n }, (err: Error) => {\n cb(err);\n });\n };\n}\n\n/**\n * Converts a Promise to a service callback.\n * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void\n */\nexport function promiseToServiceCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: ServiceCallback): void => {\n promise.then((data: HttpOperationResponse) => {\n process.nextTick(cb, undefined, data.parsedBody as T, data.request, data);\n }, (err: Error) => {\n process.nextTick(cb, err);\n });\n };\n}\n\nexport function prepareXMLRootList(obj: any, elementName: string) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n return { [elementName]: obj };\n}\n\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param {object} targetCtor The target object on which the properties need to be applied.\n * @param {Array} sourceCtors An array of source objects from which the properties need to be taken.\n */\nexport function applyMixins(targetCtor: any, sourceCtors: any[]): void {\n sourceCtors.forEach(sourceCtors => {\n Object.getOwnPropertyNames(sourceCtors.prototype).forEach(name => {\n targetCtor.prototype[name] = sourceCtors.prototype[name];\n });\n });\n}\n\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param {string} value The value to be validated for ISO 8601 duration format.\n * @return {boolean} `true` if valid, `false` otherwise.\n */\nexport function isDuration(value: string): boolean {\n return validateISODuration.test(value);\n}\n\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param {string | undefined} value The value to search and replace in.\n * @param {string} searchValue The value to search for in the value argument.\n * @param {string} replaceValue The value to replace searchValue with in the value argument.\n * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue.\n */\nexport function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n\n/**\n * Determines whether the given enity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param value Any entity\n * @return boolean - true is it is primitive type, false otherwise.\n */\nexport function isPrimitiveType(value: any): boolean {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as base64 from \"./util/base64\";\nimport * as utils from \"./util/utils\";\n\nexport class Serializer {\n constructor(public readonly modelMappers: { [key: string]: any } = {}, public readonly isXML?: boolean) { }\n\n validateConstraints(mapper: Mapper, value: any, objectName: string): void {\n const failValidation = (constraintName: keyof MapperConstraints, constraintValue: any) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && (value != undefined)) {\n const {\n ExclusiveMaximum,\n ExclusiveMinimum,\n InclusiveMaximum,\n InclusiveMinimum,\n MaxItems,\n MaxLength,\n MinItems,\n MinLength,\n MultipleOf,\n Pattern,\n UniqueItems\n } = mapper.constraints;\n if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && value > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && value < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n if (MaxItems != undefined && value.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && value.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && value.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && value.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && value % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern: RegExp = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if ((typeof value !== \"string\") || (value.match(pattern) === null)) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems && value.some((item: any, i: number, ar: Array) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n\n /**\n * Serialize the given object based on its metadata defined in the mapper\n *\n * @param {Mapper} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized\n *\n * @param {string} objectName Name of the serialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object\n */\n serialize(mapper: Mapper, object: any, objectName?: string): any {\n let payload: any = {};\n const mapperType = mapper.type.name as string;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = [];\n }\n\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n\n const { required, nullable } = mapper;\n\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n\n if (object == undefined) {\n payload = object;\n } else {\n // Validate Constraints if any\n this.validateConstraints(mapper, object, objectName);\n if (mapperType.match(/^any$/ig) !== null) {\n payload = object;\n } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n } else if (mapperType.match(/^Enum$/ig) !== null) {\n const enumMapper: EnumMapper = mapper as EnumMapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = serializeByteArrayType(objectName, object);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = serializeSequenceType(this, mapper as SequenceMapper, object, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = serializeDictionaryType(this, mapper as DictionaryMapper, object, objectName);\n } else if (mapperType.match(/^Composite$/ig) !== null) {\n payload = serializeCompositeType(this, mapper as CompositeMapper, object, objectName);\n }\n }\n return payload;\n }\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper\n *\n * @param {object} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized\n *\n * @param {string} objectName Name of the deserialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object\n */\n deserialize(mapper: Mapper, responseBody: any, objectName: string): any {\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n\n let payload: any;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n\n if (mapperType.match(/^Composite$/ig) !== null) {\n payload = deserializeCompositeType(this, mapper as CompositeMapper, responseBody, objectName);\n } else {\n if (this.isXML) {\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\") and body (\"_\") properties, then just reduce the responseBody value to\n * the body (\"_\") property.\n */\n if (responseBody[\"$\"] != undefined && responseBody[\"_\"] != undefined) {\n responseBody = responseBody[\"_\"];\n }\n }\n\n if (mapperType.match(/^Number$/ig) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n } else if (mapperType.match(/^Boolean$/ig) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n } else if (responseBody === \"false\") {\n payload = false;\n } else {\n payload = responseBody;\n }\n } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) {\n payload = responseBody;\n } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) {\n payload = new Date(responseBody);\n } else if (mapperType.match(/^UnixTime$/ig) !== null) {\n payload = unixTimeToDate(responseBody);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = base64.decodeString(responseBody);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = base64UrlToByteArray(responseBody);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = deserializeSequenceType(this, mapper as SequenceMapper, responseBody, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = deserializeDictionaryType(this, mapper as DictionaryMapper, responseBody, objectName);\n }\n }\n\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n\n return payload;\n }\n}\n\nfunction trimEnd(str: string, ch: string) {\n let len = str.length;\n while ((len - 1) >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\n\nfunction bufferToBase64Url(buffer: any): string | undefined {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = base64.encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\n\nfunction base64UrlToByteArray(str: string): Uint8Array | undefined {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/\\-/g, \"+\").replace(/\\_/g, \"/\");\n // Base64 to Uint8Array.\n return base64.decodeString(str);\n}\n\nfunction splitSerializeName(prop: string | undefined): string[] {\n const classes: string[] = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n } else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n\n return classes;\n}\n\nfunction dateToUnixTime(d: string | Date): number | undefined {\n if (!d) {\n return undefined;\n }\n\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d as string);\n }\n return Math.floor((d as Date).getTime() / 1000);\n}\n\nfunction unixTimeToDate(n: number): Date | undefined {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\n\nfunction serializeBasicTypes(typeName: string, objectName: string, value: any): any {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/ig) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n } else if (typeName.match(/^String$/ig) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n } else if (typeName.match(/^Uuid$/ig) !== null) {\n if (!(typeof value.valueOf() === \"string\" && utils.isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n } else if (typeName.match(/^Boolean$/ig) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n } else if (typeName.match(/^Stream$/ig) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !(typeof Blob === \"function\" && value instanceof Blob)) {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`);\n }\n }\n }\n return value;\n}\n\nfunction serializeEnumType(objectName: string, allowedValues: Array, value: any): any {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\n\nfunction serializeByteArrayType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = base64.encodeByteArray(value);\n }\n return value;\n}\n\nfunction serializeBase64UrlType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = bufferToBase64Url(value);\n }\n return value;\n}\n\nfunction serializeDateTypes(typeName: string, value: any, objectName: string) {\n if (value != undefined) {\n if (typeName.match(/^Date$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10);\n } else if (typeName.match(/^DateTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString();\n } else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString();\n } else if (typeName.match(/^UnixTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n } else if (typeName.match(/^TimeSpan$/ig) !== null) {\n if (!utils.isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n value = value;\n }\n }\n return value;\n}\n\nfunction serializeSequenceType(serializer: Serializer, mapper: SequenceMapper, object: any, objectName: string) {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n tempArray[i] = serializer.serialize(elementType, object[i], objectName);\n }\n return tempArray;\n}\n\nfunction serializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, object: any, objectName: string) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(object)) {\n tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + \".\" + key);\n }\n return tempDictionary;\n}\n\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n */\nfunction resolveModelProperties(serializer: Serializer, mapper: CompositeMapper, objectName: string): { [propertyName: string]: Mapper } {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n\n const modelMapper = serializer.modelMappers[className];\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${className}\".`);\n }\n modelProps = modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${className}\" for object \"${objectName}\".`);\n }\n }\n\n return modelProps;\n}\n\nfunction serializeCompositeType(serializer: Serializer, mapper: CompositeMapper, object: any, objectName: string) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n\n if (object != undefined) {\n const payload: any = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n\n let propName: string | undefined;\n let parentObject: any = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n } else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n } else {\n const paths = splitSerializeName(propertyMapper.serializedName!);\n propName = paths.pop();\n\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if ((childObject == undefined) && (object[key] != undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n\n if (parentObject != undefined) {\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) {\n toSerialize = mapper.serializedName;\n }\n\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName);\n if (serializedValue !== undefined && propName != undefined) {\n if (propertyMapper.xmlIsAttribute) {\n // $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject.$ = parentObject.$ || {};\n parentObject.$[propName] = serializedValue;\n } else if (propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName!]: serializedValue };\n } else {\n parentObject[propName] = serializedValue;\n }\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every(pn => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]');\n }\n }\n }\n\n return payload;\n }\n return object;\n}\n\nfunction isSpecialXmlProperty(propertyName: string): boolean {\n return [\"$\", \"_\"].includes(propertyName);\n}\n\nfunction deserializeCompositeType(serializer: Serializer, mapper: CompositeMapper, responseBody: any, objectName: string): any {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance: { [key: string]: any } = {};\n const handledPropertyNames: string[] = [];\n\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName!);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n\n const headerCollectionPrefix = (propertyMapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary: any = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize((propertyMapper as DictionaryMapper).type.value, responseBody[headerKey], propertyObjectName);\n }\n\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n } else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody.$) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName!], propertyObjectName);\n } else {\n const propertyName = xmlElementName || xmlName || serializedName;\n let unwrappedProperty = responseBody[propertyName!];\n if (propertyMapper.xmlIsWrapped) {\n unwrappedProperty = responseBody[xmlName!];\n unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName!];\n\n const isEmptyWrappedList = unwrappedProperty === undefined;\n if (isEmptyWrappedList) {\n unwrappedProperty = [];\n }\n }\n instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName);\n }\n } else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res) break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) {\n propertyInstance = mapper.serializedName;\n }\n\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n } else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n instance[key] = serializedValue;\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName: string) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]');\n }\n }\n } else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) {\n instance[key] = responseBody[key];\n }\n }\n }\n\n return instance;\n}\n\nfunction deserializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName);\n }\n return tempDictionary;\n }\n return responseBody;\n}\n\nfunction deserializeSequenceType(serializer: Serializer, mapper: SequenceMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`);\n }\n return tempArray;\n }\n return responseBody;\n}\n\nfunction getPolymorphicMapper(serializer: Serializer, mapper: CompositeMapper, object: any, polymorphicPropertyName: \"clientName\" | \"serializedName\"): CompositeMapper {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator = discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\n\nfunction getPolymorphicDiscriminatorRecursively(serializer: Serializer, mapper: CompositeMapper): PolymorphicDiscriminator | undefined {\n return mapper.type.polymorphicDiscriminator\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent)\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className);\n}\n\nfunction getPolymorphicDiscriminatorSafely(serializer: Serializer, typeName?: string) {\n return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n\nexport interface MapperConstraints {\n InclusiveMaximum?: number;\n ExclusiveMaximum?: number;\n InclusiveMinimum?: number;\n ExclusiveMinimum?: number;\n MaxLength?: number;\n MinLength?: number;\n Pattern?: RegExp;\n MaxItems?: number;\n MinItems?: number;\n UniqueItems?: true;\n MultipleOf?: number;\n}\n\nexport type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType;\n\nexport interface SimpleMapperType {\n name: \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\nexport interface CompositeMapperType {\n name: \"Composite\";\n\n // Only one of the two below properties should be present.\n // Use className to reference another type definition,\n // and use modelProperties/additionalProperties when the reference to the other type has been resolved.\n className?: string;\n\n modelProperties?: { [propertyName: string]: Mapper };\n additionalProperties?: Mapper;\n\n uberParent?: string;\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\nexport interface SequenceMapperType {\n name: \"Sequence\";\n element: Mapper;\n}\n\nexport interface DictionaryMapperType {\n name: \"Dictionary\";\n value: Mapper;\n}\n\nexport interface EnumMapperType {\n name: \"Enum\";\n allowedValues: any[];\n}\n\nexport interface BaseMapper {\n xmlName?: string;\n xmlIsAttribute?: boolean;\n xmlElementName?: string;\n xmlIsWrapped?: boolean;\n readOnly?: boolean;\n isConstant?: boolean;\n required?: boolean;\n nullable?: boolean;\n serializedName?: string;\n type: MapperType;\n defaultValue?: any;\n constraints?: MapperConstraints;\n}\n\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\nexport interface PolymorphicDiscriminator {\n serializedName: string;\n clientName: string;\n [key: string]: string;\n}\n\nexport interface CompositeMapper extends BaseMapper {\n type: CompositeMapperType;\n}\n\nexport interface SequenceMapper extends BaseMapper {\n type: SequenceMapperType;\n}\n\nexport interface DictionaryMapper extends BaseMapper {\n type: DictionaryMapperType;\n headerCollectionPrefix?: string;\n}\n\nexport interface EnumMapper extends BaseMapper {\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n// TODO: why is this here?\nexport function serializeObject(toSerialize: any): any {\n if (toSerialize == undefined) return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = base64.encodeByteArray(toSerialize);\n return toSerialize;\n }\n else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n }\n else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n } else if (typeof toSerialize === \"object\") {\n const dictionary: { [key: string]: any } = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(toSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o: Array): { [K in T]: K } {\n const result: any = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n\nexport const MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\"\n]);\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders, HttpHeadersLike, isHttpHeadersLike } from \"./httpHeaders\";\nimport { OperationSpec } from \"./operationSpec\";\nimport { Mapper, Serializer } from \"./serializer\";\nimport { generateUuid } from \"./util/utils\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { AgentSettings, ProxySettings } from \"./serviceClient\";\n\nexport type HttpMethods = \"GET\" | \"PUT\" | \"POST\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\" | \"TRACE\";\nexport type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream);\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number\n};\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n readonly aborted: boolean;\n dispatchEvent: (event: Event) => boolean;\n onabort: ((this: AbortSignalLike, ev: Event) => any) | null;\n addEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n removeEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n}\n\n/**\n * An abstraction over a REST call.\n */\nexport interface WebResourceLike {\n /**\n * The URL being accessed by the request.\n */\n url: string;\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n /**\n * The HTTP body contents of the request.\n */\n body?: any;\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse;\n formData?: any;\n /**\n * A query string represented as an object.\n */\n query?: { [key: string]: any };\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n /**\n * If credentials (cookies) should be sent along during an XHR.\n */\n withCredentials: boolean;\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n */\n timeout: number;\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP(S) agent configuration.\n */\n agentSettings?: AgentSettings;\n /**\n * If the connection should be reused.\n */\n keepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void;\n\n /**\n * Sets options on the request.\n */\n prepare(options: RequestPrepareOptions): WebResourceLike;\n /**\n * Clone this request object.\n */\n clone(): WebResourceLike;\n}\n\nexport function isWebResourceLike(object: any): object is WebResourceLike {\n if (typeof object !== \"object\") {\n return false;\n }\n if (\n typeof object.url === \"string\" &&\n typeof object.method === \"string\" &&\n typeof object.headers === \"object\" &&\n isHttpHeadersLike(object.headers) &&\n typeof object.validateRequestProperties === \"function\" &&\n typeof object.prepare === \"function\" &&\n typeof object.clone === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n *\n * @constructor\n */\nexport class WebResource {\n url: string;\n method: HttpMethods;\n body?: any;\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse);\n formData?: any;\n query?: { [key: string]: any; };\n operationSpec?: OperationSpec;\n withCredentials: boolean;\n timeout: number;\n proxySettings?: ProxySettings;\n keepAlive?: boolean;\n agentSettings?: AgentSettings;\n\n abortSignal?: AbortSignalLike;\n\n /** Callback which fires upon upload progress. */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n constructor(\n url?: string,\n method?: HttpMethods,\n body?: any,\n query?: { [key: string]: any; },\n headers?: { [key: string]: any; } | HttpHeadersLike,\n streamResponseBody?: boolean,\n withCredentials?: boolean,\n abortSignal?: AbortSignalLike,\n timeout?: number,\n onUploadProgress?: (progress: TransferProgressEvent) => void,\n onDownloadProgress?: (progress: TransferProgressEvent) => void,\n proxySettings?: ProxySettings,\n keepAlive?: boolean,\n agentSettings?: AgentSettings) {\n\n this.streamResponseBody = streamResponseBody;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers));\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.agentSettings = agentSettings;\n }\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n\n /**\n * Prepares the request.\n * @param {RequestPrepareOptions} options Options to provide for preparing the request.\n * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options: RequestPrepareOptions): WebResource {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n\n if (options.method == undefined || typeof options.method.valueOf() !== \"string\") {\n throw new Error(\"options.method must be a string.\");\n }\n\n if (options.url && options.pathTemplate) {\n throw new Error(\"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\");\n }\n\n\n if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== \"string\") && (options.url == undefined || typeof options.url.valueOf() !== \"string\")) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error(\"options.url must be of type \\\"string\\\".\");\n }\n this.url = options.url;\n }\n\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error(\"The provided method \\\"\" + options.method + \"\\\" is invalid. Supported HTTP methods are: \" + JSON.stringify(validMethods));\n }\n }\n this.method = (options.method.toUpperCase() as HttpMethods);\n\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error(\"options.pathTemplate must be of type \\\"string\\\".\");\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url = baseUrl + (baseUrl.endsWith(\"/\") ? \"\" : \"/\") + (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({\\w*\\s*\\w*})/ig);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`);\n }\n segments.forEach(function (item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = (pathParameters as { [key: string]: any })[pathParamName];\n if (pathParam === null || pathParam === undefined || !(typeof pathParam === \"string\" || typeof pathParam === \"object\")) {\n throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in ${pathParameters} - ${JSON.stringify(pathParameters, undefined, 2)}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`);\n }\n\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(`options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n } else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`);\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam: any = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n }\n else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(`options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n } else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n }// end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", generateUuid());\n }\n\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty\n this.body = options.body;\n if (options.body != undefined) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n } else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, \"requestBody\");\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n\n return this;\n }\n\n /**\n * Clone this WebResource HTTP request object.\n * @returns {WebResource} The clone of this WebResource HTTP request object.\n */\n clone(): WebResource {\n const result = new WebResource(\n this.url,\n this.method,\n this.body,\n this.query,\n this.headers && this.headers.clone(),\n this.streamResponseBody,\n this.withCredentials,\n this.abortSignal,\n this.timeout,\n this.onUploadProgress,\n this.onDownloadProgress,\n this.proxySettings,\n this.keepAlive,\n this.agentSettings);\n\n if (this.formData) {\n result.formData = this.formData;\n }\n\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n\n return result;\n }\n}\n\nexport interface RequestPrepareOptions {\n /**\n * The HTTP request method. Valid values are \"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\",\n * or \"PATCH\".\n */\n method: HttpMethods;\n /**\n * The request url. It may or may not have query parameters in it. Either provide the \"url\" or\n * provide the \"pathTemplate\" in the options object. Both the options are mutually exclusive.\n */\n url?: string;\n /**\n * A dictionary of query parameters to be appended to the url, where\n * the \"key\" is the \"query-parameter-name\" and the \"value\" is the \"query-parameter-value\".\n * The \"query-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"query-parameter-value\".\n * Example:\n * - query-parameter-value in \"object\" format: { \"query-parameter-name\": { value: \"query-parameter-value\", skipUrlEncoding: true } }\n * - query-parameter-value in \"string\" format: { \"query-parameter-name\": \"query-parameter-value\"}.\n * Note: \"If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url.\n */\n queryParameters?: { [key: string]: any | ParameterValue };\n /**\n * The path template of the request url. Either provide the \"url\" or provide the \"pathTemplate\" in\n * the options object. Both the options are mutually exclusive.\n * Example: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}\"\n */\n pathTemplate?: string;\n /**\n * The base url of the request. Default value is: \"https://management.azure.com\". This is\n * applicable only with pathTemplate. If you are providing options.url then it is expected that\n * you provide the complete url.\n */\n baseUrl?: string;\n /**\n * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate.\n * Here the key is the \"path-parameter-name\" and the value is the \"path-parameter-value\".\n * The \"path-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"path-parameter-value\".\n * Example:\n * - path-parameter-value in \"object\" format: { \"path-parameter-name\": { value: \"path-parameter-value\", skipUrlEncoding: true } }\n * - path-parameter-value in \"string\" format: { \"path-parameter-name\": \"path-parameter-value\" }.\n */\n pathParameters?: { [key: string]: any | ParameterValue };\n formData?: { [key: string]: any };\n /**\n * A dictionary of request headers that need to be applied to the request.\n * Here the key is the \"header-name\" and the value is the \"header-value\". The header-value MUST be of type string.\n * - ContentType must be provided with the key name as \"Content-Type\". Default value \"application/json; charset=utf-8\".\n * - \"Transfer-Encoding\" is set to \"chunked\" by default if \"options.bodyIsStream\" is set to true.\n * - \"Content-Type\" is set to \"application/octet-stream\" by default if \"options.bodyIsStream\" is set to true.\n * - \"accept-language\" by default is set to \"en-US\"\n * - \"x-ms-client-request-id\" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true\n */\n headers?: { [key: string]: any };\n /**\n * When set to true, instructs the client to not set \"x-ms-client-request-id\" header to a new Guid().\n */\n disableClientRequestId?: boolean;\n /**\n * The request body. It can be of any type. This value will be serialized if it is not a stream.\n */\n body?: any;\n /**\n * Provides information on how to serialize the request body.\n */\n serializationMapper?: Mapper;\n /**\n * A dictionary of mappers that may be used while [de]serialization.\n */\n mappers?: { [x: string]: any };\n /**\n * Provides information on how to deserialize the response body.\n */\n deserializationMapper?: object;\n /**\n * Indicates whether this method should JSON.stringify() the request body. Default value: false.\n */\n disableJsonStringifyOnBody?: boolean;\n /**\n * Indicates whether the request body is a stream (useful for file upload scenarios).\n */\n bodyIsStream?: boolean;\n abortSignal?: AbortSignalLike;\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n}\n\n/**\n * The Parameter value provided for path or query parameters in RequestPrepareOptions\n */\nexport interface ParameterValue {\n value: any;\n skipUrlEncoding: boolean;\n [key: string]: any;\n}\n\n/**\n * Describes the base structure of the options object that will be used in every operation.\n */\nexport interface RequestOptionsBase {\n /**\n * @property {object} [customHeaders] User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n [key: string]: any;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\n\nexport class RestError extends Error {\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n static readonly REQUEST_ABORTED_ERROR: string = \"REQUEST_ABORTED_ERROR\";\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n code?: string;\n statusCode?: number;\n request?: WebResourceLike;\n response?: HttpOperationResponse;\n body?: any;\n constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any) {\n super(message);\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n this.body = body;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpClient } from \"./httpClient\";\nimport { HttpHeaders } from \"./httpHeaders\";\nimport { WebResourceLike, TransferProgressEvent } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { RestError } from \"./restError\";\n\n/**\n * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.\n */\nexport class XhrHttpClient implements HttpClient {\n public sendRequest(request: WebResourceLike): Promise {\n const xhr = new XMLHttpRequest();\n\n if (request.agentSettings) {\n throw new Error(\"HTTP agent settings not supported in browser environment\");\n }\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n const abortSignal = request.abortSignal;\n if (abortSignal) {\n const listener = () => {\n xhr.abort();\n };\n abortSignal.addEventListener(\"abort\", listener);\n xhr.addEventListener(\"readystatechange\", () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n abortSignal.removeEventListener(\"abort\", listener);\n }\n });\n }\n\n addProgressListener(xhr.upload, request.onUploadProgress);\n addProgressListener(xhr, request.onDownloadProgress);\n\n if (request.formData) {\n const formData = request.formData;\n const requestForm = new FormData();\n const appendFormValue = (key: string, value: any) => {\n if (value && value.hasOwnProperty(\"value\") && value.hasOwnProperty(\"options\")) {\n requestForm.append(key, value.value, value.options);\n } else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n } else {\n appendFormValue(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n // browser will automatically apply a suitable content-type header\n request.headers.remove(\"Content-Type\");\n }\n }\n\n xhr.open(request.method, request.url);\n xhr.timeout = request.timeout;\n xhr.withCredentials = request.withCredentials;\n for (const header of request.headers.headersArray()) {\n xhr.setRequestHeader(header.name, header.value);\n }\n xhr.responseType = request.streamResponseBody ? \"blob\" : \"text\";\n\n // tslint:disable-next-line:no-null-keyword\n xhr.send(request.body === undefined ? null : request.body);\n\n if (request.streamResponseBody) {\n return new Promise((resolve, reject) => {\n xhr.addEventListener(\"readystatechange\", () => {\n // Resolve as soon as headers are loaded\n if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\n const blobBody = new Promise((resolve, reject) => {\n xhr.addEventListener(\"load\", () => {\n resolve(xhr.response);\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n blobBody\n });\n }\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n } else {\n return new Promise(function (resolve, reject) {\n xhr.addEventListener(\"load\", () => resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: xhr.responseText\n }));\n rejectOnTerminalEvent(request, xhr, reject);\n });\n }\n }\n}\n\nfunction addProgressListener(xhr: XMLHttpRequestEventTarget, listener?: (progress: TransferProgressEvent) => void) {\n if (listener) {\n xhr.addEventListener(\"progress\", rawEvent => listener({\n loadedBytes: rawEvent.loaded\n }));\n }\n}\n\n// exported locally for testing\nexport function parseHeaders(xhr: XMLHttpRequest) {\n const responseHeaders = new HttpHeaders();\n const headerLines = xhr.getAllResponseHeaders().trim().split(/[\\r\\n]+/);\n for (const line of headerLines) {\n const index = line.indexOf(\":\");\n const headerName = line.slice(0, index);\n const headerValue = line.slice(index + 2);\n responseHeaders.set(headerName, headerValue);\n }\n return responseHeaders;\n}\n\nfunction rejectOnTerminalEvent(request: WebResourceLike, xhr: XMLHttpRequest, reject: (err: any) => void) {\n xhr.addEventListener(\"error\", () => reject(new RestError(`Failed to send request to ${request.url}`, RestError.REQUEST_SEND_ERROR, undefined, request)));\n xhr.addEventListener(\"abort\", () => reject(new RestError(\"The request was aborted\", RestError.REQUEST_ABORTED_ERROR, undefined, request)));\n xhr.addEventListener(\"timeout\", () => reject(new RestError(`timeout of ${xhr.timeout}ms exceeded`, RestError.REQUEST_SEND_ERROR, undefined, request)));\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexport enum HttpPipelineLogLevel {\n /**\n * A log level that indicates that no logs will be logged.\n */\n OFF,\n\n /**\n * An error log.\n */\n ERROR,\n\n /**\n * A warning log.\n */\n WARNING,\n\n /**\n * An information log.\n */\n INFO\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { Mapper } from \"./serializer\";\n\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nexport function getPathStringFromParameter(parameter: OperationParameter): string {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\n\nexport function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string {\n let result: string;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n } else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n } else {\n result = mapper.serializedName!;\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { OperationParameter, OperationQueryParameter, OperationURLParameter } from \"./operationParameter\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { MapperType, Serializer } from \"./serializer\";\nimport { HttpMethods } from \"./webResource\";\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponse };\n}\n\nexport function isStreamOperation(operationSpec: OperationSpec): boolean {\n let result = false;\n for (const statusCode in operationSpec.responses) {\n const operationResponse: OperationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result = true;\n break;\n }\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nconst parser = new DOMParser();\nexport function parseXML(str: string): Promise {\n try {\n const dom = parser.parseFromString(str, \"application/xml\");\n throwIfError(dom);\n\n const obj = domToObject(dom.childNodes[0]);\n return Promise.resolve(obj);\n } catch (err) {\n return Promise.reject(err);\n }\n}\n\nlet errorNS = \"\";\ntry {\n errorNS = parser.parseFromString(\"INVALID\", \"text/xml\").getElementsByTagName(\"parsererror\")[0].namespaceURI!;\n} catch (ignored) {\n // Most browsers will return a document containing , but IE will throw.\n}\n\nfunction throwIfError(dom: Document) {\n if (errorNS) {\n const parserErrors = dom.getElementsByTagNameNS(errorNS, \"parsererror\");\n if (parserErrors.length) {\n throw new Error(parserErrors.item(0)!.innerHTML);\n }\n }\n}\n\nfunction isElement(node: Node): node is Element {\n return !!(node as Element).attributes;\n}\n\n/**\n * Get the Element-typed version of the provided Node if the provided node is an element with\n * attributes. If it isn't, then undefined is returned.\n */\nfunction asElementWithAttributes(node: Node): Element | undefined {\n return isElement(node) && node.hasAttributes() ? node : undefined;\n}\n\nfunction domToObject(node: Node): any {\n let result: any = {};\n\n const childNodeCount: number = node.childNodes.length;\n\n const firstChildNode: Node = node.childNodes[0];\n const onlyChildTextValue: string | undefined = (firstChildNode && childNodeCount === 1 && firstChildNode.nodeType === Node.TEXT_NODE && firstChildNode.nodeValue) || undefined;\n\n const elementWithAttributes: Element | undefined = asElementWithAttributes(node);\n if (elementWithAttributes) {\n result[\"$\"] = {};\n\n for (let i = 0; i < elementWithAttributes.attributes.length; i++) {\n const attr = elementWithAttributes.attributes[i];\n result[\"$\"][attr.nodeName] = attr.nodeValue;\n }\n\n if (onlyChildTextValue) {\n result[\"_\"] = onlyChildTextValue;\n }\n } else if (childNodeCount === 0) {\n result = \"\";\n } else if (onlyChildTextValue) {\n result = onlyChildTextValue;\n }\n\n if (!onlyChildTextValue) {\n for (let i = 0; i < childNodeCount; i++) {\n const child = node.childNodes[i];\n // Ignore leading/trailing whitespace nodes\n if (child.nodeType !== Node.TEXT_NODE) {\n const childObject: any = domToObject(child);\n if (!result[child.nodeName]) {\n result[child.nodeName] = childObject;\n } else if (Array.isArray(result[child.nodeName])) {\n result[child.nodeName].push(childObject);\n } else {\n result[child.nodeName] = [result[child.nodeName], childObject];\n }\n }\n }\n }\n\n return result;\n}\n\n// tslint:disable-next-line:no-null-keyword\nconst doc = document.implementation.createDocument(null, null, null);\nconst serializer = new XMLSerializer();\n\nexport function stringifyXML(obj: any, opts?: { rootName?: string }) {\n const rootName = opts && opts.rootName || \"root\";\n const dom = buildNode(obj, rootName)[0];\n return '' + serializer.serializeToString(dom);\n}\n\nfunction buildAttributes(attrs: { [key: string]: { toString(): string; } }): Attr[] {\n const result = [];\n for (const key of Object.keys(attrs)) {\n const attr = doc.createAttribute(key);\n attr.value = attrs[key].toString();\n result.push(attr);\n }\n return result;\n}\n\nfunction buildNode(obj: any, elementName: string): Node[] {\n if (typeof obj === \"string\" || typeof obj === \"number\" || typeof obj === \"boolean\") {\n const elem = doc.createElement(elementName);\n elem.textContent = obj.toString();\n return [elem];\n }\n else if (Array.isArray(obj)) {\n const result = [];\n for (const arrayElem of obj) {\n for (const child of buildNode(arrayElem, elementName)) {\n result.push(child);\n }\n }\n return result;\n } else if (typeof obj === \"object\") {\n const elem = doc.createElement(elementName);\n for (const key of Object.keys(obj)) {\n if (key === \"$\") {\n for (const attr of buildAttributes(obj[key])) {\n elem.attributes.setNamedItem(attr);\n }\n } else {\n for (const child of buildNode(obj[key], key)) {\n elem.appendChild(child);\n }\n }\n }\n return [elem];\n }\n else {\n throw new Error(`Illegal value passed to buildObject: ${obj}`);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { HttpPipelineLogger } from \"../httpPipelineLogger\";\nimport { HttpPipelineLogLevel } from \"../httpPipelineLogLevel\";\nimport { WebResourceLike } from \"../webResource\";\n\n/**\n * Creates a new RequestPolicy per-request that uses the provided nextPolicy.\n */\nexport type RequestPolicyFactory = {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy\n};\n\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise;\n}\n\nexport abstract class BaseRequestPolicy implements RequestPolicy {\n protected constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike) {\n }\n\n public abstract sendRequest(webResource: WebResourceLike): Promise;\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return this._options.shouldLog(logLevel);\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n this._options.log(logLevel, message);\n }\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport interface RequestPolicyOptionsLike {\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport class RequestPolicyOptions implements RequestPolicyOptionsLike {\n constructor(private _logger?: HttpPipelineLogger) {\n }\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return !!this._logger &&\n logLevel !== HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel;\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { OperationResponse } from \"../operationResponse\";\nimport { OperationSpec, isStreamOperation } from \"../operationSpec\";\nimport { RestError } from \"../restError\";\nimport { Mapper, MapperType } from \"../serializer\";\nimport * as utils from \"../util/utils\";\nimport { parseXML } from \"../util/xml\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\n/**\n * The content-types that will indicate that an operation response should be deserialized in a\n * particular way.\n */\nexport interface DeserializationContentTypes {\n /**\n * The content-types that indicate that an operation response should be deserialized as JSON.\n * Defaults to [ \"application/json\", \"text/json\" ].\n */\n json?: string[];\n\n /**\n * The content-types that indicate that an operation response should be deserialized as XML.\n * Defaults to [ \"application/xml\", \"application/atom+xml\" ].\n */\n xml?: string[];\n}\n\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nexport function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options);\n }\n };\n}\n\nexport const defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nexport const defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nexport class DeserializationPolicy extends BaseRequestPolicy {\n public readonly jsonContentTypes: string[];\n public readonly xmlContentTypes: string[];\n\n constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n\n this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes;\n this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes;\n }\n\n public async sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then((response: HttpOperationResponse) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response));\n }\n}\n\nfunction getOperationResponse(parsedResponse: HttpOperationResponse): undefined | OperationResponse {\n let result: OperationResponse | undefined;\n const request: WebResourceLike = parsedResponse.request;\n const operationSpec: OperationSpec | undefined = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter: undefined | ((operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse)) = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n } else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\n\nfunction shouldDeserializeResponse(parsedResponse: HttpOperationResponse): boolean {\n const shouldDeserialize: undefined | boolean | ((response: HttpOperationResponse) => boolean) = parsedResponse.request.shouldDeserialize;\n let result: boolean;\n if (shouldDeserialize === undefined) {\n result = true;\n } else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n } else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n\nexport function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise {\n return parse(jsonContentTypes, xmlContentTypes, response).then(parsedResponse => {\n const shouldDeserialize: boolean = shouldDeserializeResponse(parsedResponse);\n if (shouldDeserialize) {\n const operationSpec: OperationSpec | undefined = parsedResponse.request.operationSpec;\n if (operationSpec && operationSpec.responses) {\n const statusCode: number = parsedResponse.status;\n\n const expectedStatusCodes: string[] = Object.keys(operationSpec.responses);\n\n const hasNoExpectedStatusCodes: boolean = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n\n const responseSpec: OperationResponse | undefined = getOperationResponse(parsedResponse);\n\n const isExpectedStatusCode: boolean = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec;\n if (!isExpectedStatusCode) {\n const defaultResponseSpec: OperationResponse = operationSpec.responses.default;\n if (defaultResponseSpec) {\n const initialErrorMessage: string = isStreamOperation(operationSpec)\n ? `Unexpected status code: ${statusCode}`\n : parsedResponse.bodyAsText as string;\n\n const error = new RestError(initialErrorMessage);\n error.statusCode = statusCode;\n error.request = utils.stripRequest(parsedResponse.request);\n error.response = utils.stripResponse(parsedResponse);\n\n let parsedErrorResponse: { [key: string]: any } = parsedResponse.parsedBody;\n try {\n if (parsedErrorResponse) {\n const defaultResponseBodyMapper: Mapper | undefined = defaultResponseSpec.bodyMapper;\n if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === \"CloudError\") {\n if (parsedErrorResponse.error) {\n parsedErrorResponse = parsedErrorResponse.error;\n }\n if (parsedErrorResponse.code) {\n error.code = parsedErrorResponse.code;\n }\n if (parsedErrorResponse.message) {\n error.message = parsedErrorResponse.message;\n }\n } else {\n let internalError: any = parsedErrorResponse;\n if (parsedErrorResponse.error) {\n internalError = parsedErrorResponse.error;\n }\n\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n }\n\n if (defaultResponseBodyMapper) {\n let valueToDeserialize: any = parsedErrorResponse;\n if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof parsedErrorResponse === \"object\"\n ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName!]\n : [];\n }\n error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, \"error.body\");\n }\n }\n } catch (defaultError) {\n error.message = `Error \\\"${defaultError.message}\\\" occurred in deserializing the responseBody - \\\"${parsedResponse.bodyAsText}\\\" for the default response.`;\n }\n return Promise.reject(error);\n }\n } else if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize: any = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof valueToDeserialize === \"object\" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName!] : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\");\n } catch (error) {\n const restError = new RestError(`Error ${error} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`);\n restError.request = utils.stripRequest(parsedResponse.request);\n restError.response = utils.stripResponse(parsedResponse);\n return Promise.reject(restError);\n }\n } else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), \"operationRes.parsedHeaders\");\n }\n }\n }\n }\n return Promise.resolve(parsedResponse);\n });\n}\n\nfunction parse(jsonContentTypes: string[], xmlContentTypes: string[], operationResponse: HttpOperationResponse): Promise {\n const errorHandler = (err: Error & { code: string }) => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText);\n return Promise.reject(e);\n };\n\n if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType: string = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents: string[] = !contentType ? [] : contentType.split(\";\").map(component => component.toLowerCase());\n if (contentComponents.length === 0 || contentComponents.some(component => jsonContentTypes.indexOf(component) !== -1)) {\n return new Promise(resolve => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n } else if (contentComponents.some(component => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text)\n .then(body => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n\n return Promise.resolve(operationResponse);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { RestError } from \"../restError\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nconst DEFAULT_CLIENT_RETRY_COUNT = 3;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nconst DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nexport class ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * The client retry count.\n */\n retryCount: number;\n /**\n * The client retry interval in milliseconds.\n */\n retryInterval: number;\n /**\n * The minimum retry interval in milliseconds.\n */\n minRetryInterval: number;\n /**\n * The maximum retry interval in milliseconds.\n */\n maxRetryInterval: number;\n\n /**\n * @constructor\n * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.\n * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy.\n * @param {number} [retryCount] The client retry count.\n * @param {number} [retryInterval] The client retry interval, in milliseconds.\n * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.\n * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n function isNumber(n: any): n is number { return typeof n === \"number\"; }\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => retry(this, request, response))\n .catch(error => retry(this, request, error.response, undefined, error));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: ExponentialRetryPolicy, statusCode: number | undefined, retryData: RetryData): boolean {\n if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) {\n return false;\n }\n\n let currentCount: number;\n if (!retryData) {\n throw new Error(\"retryData for the ExponentialRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {RetryData} retryData The retry data.\n * @param {RetryError} [err] The operation\"s error, if any.\n */\nfunction updateRetryData(policy: ExponentialRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: ExponentialRetryPolicy, request: WebResourceLike, response?: HttpOperationResponse, retryData?: RetryData, requestError?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, requestError);\n const isAborted: boolean | undefined = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy, response && response.status, retryData)) {\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, undefined))\n .catch(err => retry(policy, request, response, retryData, err));\n } else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err = retryData.error ||\n new RestError(\n \"Failed to send the request.\",\n RestError.REQUEST_SEND_ERROR,\n response && response.status,\n response && response.request,\n response);\n return Promise.reject(err);\n } else {\n return Promise.resolve(response);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function generateClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\"): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n }\n };\n}\n\nexport class GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, private _requestIdHeaderName: string) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, utils.generateUuid());\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n * and \"plugins\" section in webpack.testconfig.ts.\n */\n\nimport { TelemetryInfo } from \"./userAgentPolicy\";\n\ninterface NavigatorEx extends Navigator {\n // oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2\n readonly oscpu: string;\n}\n\nexport function getDefaultUserAgentKey(): string {\n return \"x-ms-command-name\";\n}\n\nexport function getPlatformSpecificData(): TelemetryInfo[] {\n const navigator = window.navigator as NavigatorEx;\n const osInfo = {\n key: \"OS\",\n value: (navigator.oscpu || navigator.platform).replace(\" \", \"\")\n };\n\n return [osInfo];\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { getDefaultUserAgentKey, getPlatformSpecificData } from \"./msRestUserAgentPolicy\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport type TelemetryInfo = { key?: string; value?: string };\n\nfunction getRuntimeInfo(): TelemetryInfo[] {\n const msRestRuntime = {\n key: \"ms-rest-js\",\n value: Constants.msRestVersion\n };\n\n return [msRestRuntime];\n}\n\nfunction getUserAgentString(telemetryInfo: TelemetryInfo[], keySeparator = \" \", valueSeparator = \"/\"): string {\n return telemetryInfo.map(info => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n }).join(keySeparator);\n}\n\nexport const getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n\nexport function getDefaultUserAgentValue(): string {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n\nexport function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory {\n const key: string = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key;\n const value: string = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value;\n\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n }\n };\n}\n\nexport class UserAgentPolicy extends BaseRequestPolicy {\n constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike, protected headerKey: string, protected headerValue: string) {\n super(_nextPolicy, _options);\n }\n\n sendRequest(request: WebResourceLike): Promise {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n\n addUserAgentHeader(request: WebResourceLike): void {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { replaceAll } from \"./util/utils\";\n\ntype URLQueryParseState = \"ParameterName\" | \"ParameterValue\" | \"Invalid\";\n\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nexport class URLQuery {\n private readonly _rawQuery: { [queryParameterName: string]: string | string[] } = {};\n\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n public any(): boolean {\n return Object.keys(this._rawQuery).length > 0;\n }\n\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n public set(parameterName: string, parameterValue: any): void {\n if (parameterName) {\n if (parameterValue != undefined) {\n const newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n } else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n public get(parameterName: string): string | string[] | undefined {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n public toString(): string {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n } else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n\n /**\n * Parse a URLQuery from the provided text.\n */\n public static parse(text: string): URLQuery {\n const result = new URLQuery();\n\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n\n let currentState: URLQueryParseState = \"ParameterName\";\n\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter: string = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"=\":\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"Invalid\";\n break;\n\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n\n case \"Invalid\":\n if (currentCharacter === \"&\") {\n currentState = \"ParameterName\";\n }\n break;\n\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n\n return result;\n }\n}\n\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nexport class URLBuilder {\n private _scheme: string | undefined;\n private _host: string | undefined;\n private _port: string | undefined;\n private _path: string | undefined;\n private _query: URLQuery | undefined;\n\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n public setScheme(scheme: string | undefined): void {\n if (!scheme) {\n this._scheme = undefined;\n } else {\n this.set(scheme, \"SCHEME\");\n }\n }\n\n /**\n * Get the scheme that has been set in this URL.\n */\n public getScheme(): string | undefined {\n return this._scheme;\n }\n\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n public setHost(host: string | undefined): void {\n if (!host) {\n this._host = undefined;\n } else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n\n /**\n * Get the host that has been set in this URL.\n */\n public getHost(): string | undefined {\n return this._host;\n }\n\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n public setPort(port: number | string | undefined): void {\n if (port == undefined || port === \"\") {\n this._port = undefined;\n } else {\n this.set(port.toString(), \"PORT\");\n }\n }\n\n /**\n * Get the port that has been set in this URL.\n */\n public getPort(): string | undefined {\n return this._port;\n }\n\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n public setPath(path: string | undefined): void {\n if (!path) {\n this._path = undefined;\n } else {\n if (path.indexOf(\"://\") !== -1) {\n this.set(path, \"SCHEME\");\n } else {\n this.set(path, \"PATH\");\n }\n }\n }\n\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n public appendPath(path: string | undefined): void {\n if (path) {\n let currentPath: string | undefined = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n\n /**\n * Get the path that has been set in this URL.\n */\n public getPath(): string | undefined {\n return this._path;\n }\n\n /**\n * Set the query in this URL.\n */\n public setQuery(query: string | undefined): void {\n if (!query) {\n this._query = undefined;\n } else {\n this._query = URLQuery.parse(query);\n }\n }\n\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n public setQueryParameter(queryParameterName: string, queryParameterValue: any): void {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n public getQueryParameterValue(queryParameterName: string): string | string[] | undefined {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n\n /**\n * Get the query in this URL.\n */\n public getQuery(): string | undefined {\n return this._query ? this._query.toString() : undefined;\n }\n\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n private set(text: string, startState: URLTokenizerState): void {\n const tokenizer = new URLTokenizer(text, startState);\n\n while (tokenizer.next()) {\n const token: URLToken | undefined = tokenizer.current();\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n\n case \"PATH\":\n const tokenPath: string | undefined = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n\n public toString(): string {\n let result = \"\";\n\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n\n if (this._host) {\n result += this._host;\n }\n\n if (this._port) {\n result += `:${this._port}`;\n }\n\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n\n return result;\n }\n\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n public replaceAll(searchValue: string, replaceValue: string): void {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n\n public static parse(text: string): URLBuilder {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\n\ntype URLTokenizerState = \"SCHEME\" | \"SCHEME_OR_HOST\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\" | \"DONE\";\n\ntype URLTokenType = \"SCHEME\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\";\n\nexport class URLToken {\n public constructor(public readonly text: string, public readonly type: URLTokenType) {\n }\n\n public static scheme(text: string): URLToken {\n return new URLToken(text, \"SCHEME\");\n }\n\n public static host(text: string): URLToken {\n return new URLToken(text, \"HOST\");\n }\n\n public static port(text: string): URLToken {\n return new URLToken(text, \"PORT\");\n }\n\n public static path(text: string): URLToken {\n return new URLToken(text, \"PATH\");\n }\n\n public static query(text: string): URLToken {\n return new URLToken(text, \"QUERY\");\n }\n}\n\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nexport function isAlphaNumericCharacter(character: string): boolean {\n const characterCode: number = character.charCodeAt(0);\n return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */);\n}\n\n/**\n * A class that tokenizes URL strings.\n */\nexport class URLTokenizer {\n readonly _textLength: number;\n _currentState: URLTokenizerState;\n _currentIndex: number;\n _currentToken: URLToken | undefined;\n\n public constructor(readonly _text: string, state?: URLTokenizerState) {\n this._textLength = _text ? _text.length : 0;\n this._currentState = state != undefined ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n public current(): URLToken | undefined {\n return this._currentToken;\n }\n\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n public next(): boolean {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n } else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n\n case \"HOST\":\n nextHost(this);\n break;\n\n case \"PORT\":\n nextPort(this);\n break;\n\n case \"PATH\":\n nextPath(this);\n break;\n\n case \"QUERY\":\n nextQuery(this);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n\n\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer: URLTokenizer): string {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer: URLTokenizer): boolean {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer: URLTokenizer): string {\n return tokenizer._text[tokenizer._currentIndex];\n}\n\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer: URLTokenizer, step?: number): void {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer: URLTokenizer, charactersToPeek: number): string {\n let endIndex: number = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer: URLTokenizer, condition: (character: string) => boolean): string {\n let result = \"\";\n\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter: string = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n } else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n\n return result;\n}\n\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer: URLTokenizer): string {\n return readWhile(tokenizer, (character: string) => isAlphaNumericCharacter(character));\n}\n\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer: URLTokenizer, ...terminatingCharacters: string[]): string {\n return readWhile(tokenizer, (character: string) => terminatingCharacters.indexOf(character) === -1);\n}\n\nfunction nextScheme(tokenizer: URLTokenizer): void {\n const scheme: string = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"HOST\";\n }\n}\n\nfunction nextSchemeOrHost(tokenizer: URLTokenizer): void {\n const schemeOrHost: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\n\nfunction nextHost(tokenizer: URLTokenizer): void {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n\n const host: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPort(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n\n const port: string = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPath(tokenizer: URLTokenizer): void {\n const path: string = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextQuery(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n\n const query: string = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { URLBuilder } from \"../url\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function redirectPolicy(maximumRetries = 20): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n }\n };\n}\n\nexport class RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly maxRetries = 20) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => handleRedirect(this, response, 0));\n }\n}\n\nfunction handleRedirect(policy: RedirectPolicy, response: HttpOperationResponse, currentRetries: number): Promise {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (locationHeader &&\n (status === 300 || status === 307 || (status === 303 && request.method === \"POST\")) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)) {\n\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n }\n\n return policy._nextPolicy.sendRequest(request)\n .then(res => handleRedirect(policy, res, currentRetries + 1));\n }\n\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function rpRegistrationPolicy(retryTimeout = 30): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n }\n };\n}\n\nexport class RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly _retryTimeout = 30) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => registerIfNeeded(this, request, response));\n }\n}\n\n\nfunction registerIfNeeded(policy: RPRegistrationPolicy, request: WebResourceLike, response: HttpOperationResponse): Promise {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText as string);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then(registrationStatus => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n });\n }\n }\n\n return Promise.resolve(response);\n}\n\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param {WebResourceLike} originalRequest The original request\n * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false.\n * @returns {object} A new request object with desired headers.\n */\nfunction getRequestEssentials(originalRequest: WebResourceLike, reuseUrlToo = false): WebResourceLike {\n const reqOptions: WebResourceLike = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n\n return reqOptions;\n}\n\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param {string} body The response body received after making the original request.\n * @returns {string} The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body: string): string {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n } catch (err) {\n // do nothing;\n }\n if (responseBody && responseBody.error && responseBody.error.message &&\n responseBody.error.code && responseBody.error.code === \"MissingSubscriptionRegistration\") {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} url The original request url\n * @returns {string} The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url: string): string {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//ig);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n } else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n\n/**\n * Registers the given provider.\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} provider The provider name to be registered.\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @param {registrationCallback} callback The callback that handles the RP registration\n */\nfunction registerRP(policy: RPRegistrationPolicy, urlPrefix: string, provider: string, originalRequest: WebResourceLike): Promise {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n\n return policy._nextPolicy.sendRequest(reqOptions)\n .then(response => {\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n });\n}\n\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} url The request url for polling\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns {Promise} True if RP Registration is successful.\n */\nfunction getRegistrationStatus(policy: RPRegistrationPolicy, url: string, originalRequest: WebResourceLike): Promise {\n const reqOptions: any = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n\n return policy._nextPolicy.sendRequest(reqOptions).then(res => {\n const obj = (res.parsedBody as any);\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n } else {\n return utils.delay(policy._retryTimeout * 1000).then(() => getRegistrationStatus(policy, url, originalRequest));\n }\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"../credentials/serviceClientCredentials\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n }\n };\n}\n\nexport class SigningPolicy extends BaseRequestPolicy {\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, public authenticationProvider: ServiceClientCredentials) {\n super(nextPolicy, options);\n }\n\n signRequest(request: WebResourceLike): Promise {\n return this.authenticationProvider.signRequest(request);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this.signRequest(request).then(nextRequest => this._nextPolicy.sendRequest(nextRequest));\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n *\n * @constructor\n * @param {number} retryCount The client retry count.\n * @param {number} retryInterval The client retry interval, in milliseconds.\n * @param {number} minRetryInterval The minimum retry interval, in milliseconds.\n * @param {number} maxRetryInterval The maximum retry interval, in milliseconds.\n */\nexport class SystemErrorRetryPolicy extends BaseRequestPolicy {\n retryCount: number;\n retryInterval: number;\n minRetryInterval: number;\n maxRetryInterval: number;\n DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\n DEFAULT_CLIENT_RETRY_COUNT = 3;\n DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\n DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n this.retryCount = typeof retryCount === \"number\" ? retryCount : this.DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = typeof retryInterval === \"number\" ? retryInterval : this.DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = typeof minRetryInterval === \"number\" ? minRetryInterval : this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = typeof maxRetryInterval === \"number\" ? maxRetryInterval : this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone()).then(response => retry(this, request, response));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: SystemErrorRetryPolicy, retryData: RetryData): boolean {\n let currentCount;\n if (!retryData) {\n throw new Error(\"retryData for the SystemErrorRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {RetryData} retryData The retry data.\n * @param {object} err The operation\"s error, if any.\n */\nfunction updateRetryData(policy: SystemErrorRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: SystemErrorRetryPolicy, request: WebResourceLike, operationResponse: HttpOperationResponse, retryData?: RetryData, err?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, err);\n if (err && err.code && shouldRetry(policy, retryData) &&\n (err.code === \"ETIMEDOUT\" || err.code === \"ESOCKETTIMEDOUT\" || err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" || err.code === \"ENOENT\")) {\n // If previous operation ended with an error and the policy allows a retry, do that\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, err))\n .catch(err => retry(policy, request, operationResponse, retryData, err));\n } else {\n if (err != undefined) {\n // If the operation failed in the end, return all errors instead of just the last one\n err = retryData.error;\n return Promise.reject(err);\n }\n return Promise.resolve(operationResponse);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport enum QueryCollectionFormat {\n Csv = \",\",\n Ssv = \" \",\n Tsv = \"\\t\",\n Pipes = \"|\",\n Multi = \"Multi\",\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { AgentSettings } from \"../serviceClient\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nconst agentNotSupportedInBrowser = new Error(\"AgentPolicy is not supported in browser environment\");\n\nexport function agentPolicy(_agentSettings?: AgentSettings): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => {\n throw agentNotSupportedInBrowser;\n }\n };\n}\n\nexport class AgentPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n throw agentNotSupportedInBrowser;\n }\n\n public sendRequest(_request: WebResourceLike): Promise {\n throw agentNotSupportedInBrowser;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ProxySettings } from \"../serviceClient\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nconst proxyNotSupportedInBrowser = new Error(\"ProxyPolicy is not supported in browser environment\");\n\nexport function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined {\n return undefined;\n}\n\nexport function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => {\n throw proxyNotSupportedInBrowser;\n }\n };\n}\n\nexport class ProxyPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n throw proxyNotSupportedInBrowser;\n }\n\n public sendRequest(_request: WebResourceLike): Promise {\n throw proxyNotSupportedInBrowser;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { delay } from \"../util/utils\";\n\ntype ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise;\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n\nexport function throttlingRetryPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nexport class ThrottlingRetryPolicy extends BaseRequestPolicy {\n private _handleResponse: ResponseHandler;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _handleResponse?: ResponseHandler) {\n super(nextPolicy, options);\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n\n public async sendRequest(httpRequest: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(httpRequest.clone()).then(response => {\n if (response.status !== StatusCodes.TooManyRequests) {\n return response;\n } else {\n return this._handleResponse(httpRequest, response);\n }\n });\n }\n\n private async _defaultResponseHandler(httpRequest: WebResourceLike, httpResponse: HttpOperationResponse): Promise {\n const retryAfterHeader: string | undefined = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);\n\n if (retryAfterHeader) {\n const delayInMs: number | undefined = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);\n if (delayInMs) {\n return delay(delayInMs).then((_: any) => this._nextPolicy.sendRequest(httpRequest));\n }\n }\n\n return httpResponse;\n }\n\n public static parseRetryAfterHeader(headerValue: string): number | undefined {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n } else {\n return retryAfterInSeconds * 1000;\n }\n }\n\n public static parseDateRetryAfterHeader(headerValue: string): number | undefined {\n try {\n const now: number = Date.now();\n const date: number = Date.parse(headerValue);\n const diff = date - now;\n\n return Number.isNaN(diff) ? undefined : diff;\n } catch (error) {\n return undefined;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"./credentials/serviceClientCredentials\";\nimport { DefaultHttpClient } from \"./defaultHttpClient\";\nimport { HttpClient } from \"./httpClient\";\nimport { HttpOperationResponse, RestResponse } from \"./httpOperationResponse\";\nimport { HttpPipelineLogger } from \"./httpPipelineLogger\";\nimport { OperationArguments } from \"./operationArguments\";\nimport { getPathStringFromParameter, getPathStringFromParameterPath, OperationParameter, ParameterPath } from \"./operationParameter\";\nimport { isStreamOperation, OperationSpec } from \"./operationSpec\";\nimport { deserializationPolicy, DeserializationContentTypes } from \"./policies/deserializationPolicy\";\nimport { exponentialRetryPolicy } from \"./policies/exponentialRetryPolicy\";\nimport { generateClientRequestIdPolicy } from \"./policies/generateClientRequestIdPolicy\";\nimport { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from \"./policies/userAgentPolicy\";\nimport { redirectPolicy } from \"./policies/redirectPolicy\";\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from \"./policies/requestPolicy\";\nimport { rpRegistrationPolicy } from \"./policies/rpRegistrationPolicy\";\nimport { signingPolicy } from \"./policies/signingPolicy\";\nimport { systemErrorRetryPolicy } from \"./policies/systemErrorRetryPolicy\";\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { CompositeMapper, DictionaryMapper, Mapper, MapperType, Serializer } from \"./serializer\";\nimport { URLBuilder } from \"./url\";\nimport * as utils from \"./util/utils\";\nimport { stringifyXML } from \"./util/xml\";\nimport { RequestOptionsBase, RequestPrepareOptions, WebResourceLike, isWebResourceLike, WebResource } from \"./webResource\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { ServiceCallback } from \"./util/utils\";\nimport { agentPolicy } from \"./policies/agentPolicy\";\nimport { proxyPolicy, getDefaultProxySettings } from \"./policies/proxyPolicy\";\nimport { throttlingRetryPolicy } from \"./policies/throttlingRetryPolicy\";\nimport { Agent } from \"http\";\n\n\n/**\n * HTTP proxy settings (Node.js only)\n */\nexport interface ProxySettings {\n host: string;\n port: number;\n username?: string;\n password?: string;\n}\n\n/**\n * HTTP and HTTPS agents (Node.js only)\n */\nexport interface AgentSettings {\n http: Agent;\n https: Agent;\n}\n\n/**\n * Options to be provided while creating the client.\n */\nexport interface ServiceClientOptions {\n /**\n * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP\n * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns\n * the requestPolicyFactories that will be used.\n */\n requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => (void | RequestPolicyFactory[]));\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline.\n */\n httpPipelineLogger?: HttpPipelineLogger;\n /**\n * If set to true, turn off the default retry policy.\n */\n noRetryPolicy?: boolean;\n /**\n * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30.\n */\n rpRegistrationRetryTimeout?: number;\n /**\n * Whether or not to generate a client request ID header for each HTTP request.\n */\n generateClientRequestIdHeader?: boolean;\n /**\n * Whether to include credentials in CORS requests in the browser.\n * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information.\n */\n withCredentials?: boolean;\n /**\n * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a\n * header to all outgoing requests with this header name and a random UUID as the request ID.\n */\n clientRequestIdHeaderName?: string;\n /**\n * The content-types that will be associated with JSON or XML serialization.\n */\n deserializationContentTypes?: DeserializationContentTypes;\n /**\n * The header name to use for the telemetry header while sending the request. If this is not\n * specified, then \"User-Agent\" will be used when running on Node.js and \"x-ms-command-name\" will\n * be used when running in a browser.\n */\n userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string);\n /**\n * The string to be set to the telemetry header while sending the request, or a function that\n * takes in the default user-agent string and returns the user-agent string that will be used.\n */\n userAgent?: string | ((defaultUserAgent: string) => string);\n /**\n * Proxy settings which will be used for every HTTP request (Node.js only).\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only).\n */\n agentSettings?: AgentSettings;\n}\n\n/**\n * @class\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n /**\n * If specified, this is the base URI that requests will be made against for this ServiceClient.\n * If it is not specified, then all OperationSpecs must contain a baseUrl property.\n */\n protected baseUri?: string;\n\n /**\n * The default request content type for the service.\n * Used if no requestContentType is present on an OperationSpec.\n */\n protected requestContentType?: string;\n\n\n /**\n * The HTTP client that will be used to send requests.\n */\n private readonly _httpClient: HttpClient;\n private readonly _requestPolicyOptions: RequestPolicyOptionsLike;\n\n private readonly _requestPolicyFactories: RequestPolicyFactory[];\n private readonly _withCredentials: boolean;\n\n /**\n * The ServiceClient constructor\n * @constructor\n * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication.\n * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client.\n */\n constructor(credentials?: ServiceClientCredentials, options?: ServiceClientOptions) {\n if (!options) {\n options = {};\n }\n\n if (credentials && !credentials.signRequest) {\n throw new Error(\"credentials argument needs to implement signRequest method\");\n }\n\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || new DefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n\n let requestPolicyFactories: RequestPolicyFactory[];\n if (Array.isArray(options.requestPolicyFactories)) {\n requestPolicyFactories = options.requestPolicyFactories;\n } else {\n requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options);\n if (options.requestPolicyFactories) {\n const newRequestPolicyFactories: void | RequestPolicyFactory[] = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n\n let httpRequest: WebResourceLike;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n } else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n } catch (error) {\n return Promise.reject(error);\n }\n\n let httpPipeline: RequestPolicy = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions);\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from.\n * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest.\n * @param {ServiceCallback} callback The callback to call when the response is received.\n */\n sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise {\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n\n const httpRequest = new WebResource();\n\n let result: Promise;\n try {\n const baseUri: string | undefined = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\");\n }\n\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n\n const requestUrl: URLBuilder = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue: string = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter));\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue);\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue: any = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer);\n if (queryParameterValue != undefined) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter));\n if (queryParameter.collectionFormat != undefined) {\n if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n queryParameterValue = \"\";\n } else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] = item == undefined ? \"\" : item.toString();\n }\n }\n } else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || queryParameter.collectionFormat === QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== QueryCollectionFormat.Multi && queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue: any = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer);\n if (headerValue != undefined) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter));\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n\n const options: RequestOptionsBase | undefined = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n }\n\n httpRequest.withCredentials = this._withCredentials;\n\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n\n if (httpRequest.streamResponseBody == undefined) {\n httpRequest.streamResponseBody = isStreamOperation(operationSpec);\n }\n\n result = this.sendRequest(httpRequest)\n .then(res => flattenResponse(res, operationSpec.responses[res.status]));\n } catch (error) {\n result = Promise.reject(error);\n }\n\n const cb = callback;\n if (cb) {\n result\n // tslint:disable-next-line:no-null-keyword\n .then(res => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch(err => cb(err));\n }\n\n return result;\n }\n}\n\nexport function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void {\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer);\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, xmlName, xmlElementName, serializedName } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if (httpRequest.body != undefined || required) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(operationSpec.requestBody);\n httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString);\n const isStream = typeName === MapperType.Stream;\n if (operationSpec.isXML) {\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(utils.prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName!), { rootName: xmlName || serializedName });\n }\n else if (!isStream) {\n httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName });\n }\n } else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n } catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue: any = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer);\n if (formDataParameterValue != undefined) {\n const formDataParameterPropertyName: string = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter));\n }\n }\n }\n}\n\nfunction isRequestPolicyFactory(instance: any): instance is RequestPolicyFactory {\n return typeof instance.create === \"function\";\n}\n\nfunction getValueOrFunctionResult(value: undefined | string | ((defaultValue: string) => string), defaultValueCreator: (() => string)): string {\n let result: string;\n if (typeof value === \"string\") {\n result = value;\n } else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\n\nfunction createDefaultRequestPolicyFactories(credentials: ServiceClientCredentials | RequestPolicyFactory | undefined, options: ServiceClientOptions): RequestPolicyFactory[] {\n const factories: RequestPolicyFactory[] = [];\n\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n\n if (credentials) {\n if (isRequestPolicyFactory(credentials)) {\n factories.push(credentials);\n } else {\n factories.push(signingPolicy(credentials));\n }\n }\n\n const userAgentHeaderName: string = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName);\n const userAgentHeaderValue: string = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue);\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n\n const proxySettings = options.proxySettings || getDefaultProxySettings();\n if (proxySettings) {\n factories.push(proxyPolicy(proxySettings));\n }\n\n if (options.agentSettings) {\n factories.push(agentPolicy(options.agentSettings));\n }\n\n return factories;\n}\n\nexport type PropertyParent = { [propertyName: string]: any };\n\n/**\n * Get the property parent for the property at the provided path when starting with the provided\n * parent object.\n */\nexport function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent {\n if (parent && propertyPath) {\n const propertyPathLength: number = propertyPath.length;\n for (let i = 0; i < propertyPathLength - 1; ++i) {\n const propertyName: string = propertyPath[i];\n if (!parent[propertyName]) {\n parent[propertyName] = {};\n }\n parent = parent[propertyName];\n }\n }\n return parent;\n}\n\nfunction getOperationArgumentValueFromParameter(serviceClient: ServiceClient, operationArguments: OperationArguments, parameter: OperationParameter, serializer: Serializer): any {\n return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer);\n}\n\nexport function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any {\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult: PropertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue = parameterMapper.required || (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n\n // Serialize just for validation purposes.\n const parameterPathString: string = getPathStringFromParameterPath(parameterPath, parameterMapper);\n serializer.serialize(parameterMapper, value, parameterPathString);\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![propertyName];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer);\n // Serialize just for validation purposes.\n const propertyPathString: string = getPathStringFromParameterPath(propertyPath, propertyMapper);\n serializer.serialize(propertyMapper, propertyValue, propertyPathString);\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(parent: { [parameterName: string]: any }, parameterPath: string[]): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent != undefined && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nexport function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n\n const addOperationResponse = (obj: {}) =>\n Object.defineProperty(obj, \"_response\", {\n value: _response\n });\n\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse({\n ...parsedHeaders,\n blobBody: _response.blobBody,\n readableStreamBody: _response.readableStreamBody\n });\n }\n\n const modelProperties = typeName === \"Composite\" && (bodyMapper as CompositeMapper).type.modelProperties || {};\n const isPageableResponse = Object.keys(modelProperties).some(k => modelProperties[k].serializedName === \"\");\n if (typeName === \"Sequence\" || isPageableResponse) {\n // We're expecting a sequece(array) make sure that the response body is in the\n // correct format, if not make it an empty array []\n const parsedBody =\n Array.isArray(_response.parsedBody)\n ? _response.parsedBody\n : [];\n const arrayResponse = [...parsedBody] as RestResponse & any[];\n\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n }\n }\n\n if (bodyMapper || _response.request.method === \"HEAD\" || utils.isPrimitiveType(_response.parsedBody)) {\n // primitive body types and HEAD booleans\n return addOperationResponse({\n ...parsedHeaders,\n body: _response.parsedBody\n });\n }\n\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function logPolicy(logger: any = console.log): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new LogPolicy(nextPolicy, options, logger);\n }\n };\n}\n\nexport class LogPolicy extends BaseRequestPolicy {\n logger?: any;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger: any = console.log) {\n super(nextPolicy, options);\n this.logger = logger;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => logResponse(this, response));\n }\n}\n\nfunction logResponse(policy: LogPolicy, response: HttpOperationResponse): Promise {\n policy.logger(`>> Request: ${JSON.stringify(response.request, undefined, 2)}`);\n policy.logger(`>> Response status code: ${response.status}`);\n const responseBody = response.bodyAsText;\n policy.logger(`>> Body: ${responseBody}`);\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Bearer\";\n\n/**\n * A credentials object that uses a token string and a authorzation scheme to authenticate.\n */\nexport class TokenCredentials implements ServiceClientCredentials {\n token: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new TokenCredentials object.\n *\n * @constructor\n * @param {string} token The token.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(token: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (!token) {\n throw new Error(\"token cannot be null or undefined.\");\n }\n this.token = token;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @return {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport * as base64 from \"../util/base64\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n\nexport class BasicAuthenticationCredentials implements ServiceClientCredentials {\n userName: string;\n password: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @constructor\n * @param {string} userName User name.\n * @param {string} password Password.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(userName: string, password: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${base64.encodeString(credentials)}`;\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\n/**\n * @interface ApiKeyCredentialOptions\n * Describes the options to be provided while creating an instance of ApiKeyCredentials\n */\nexport interface ApiKeyCredentialOptions {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n inQuery?: { [x: string]: any };\n}\n\n/**\n * Authenticates to a service using an API key.\n */\nexport class ApiKeyCredentials implements ServiceClientCredentials {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n private readonly inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n private readonly inQuery?: { [x: string]: any };\n\n /**\n * @constructor\n * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options: ApiKeyCredentialOptions) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(`options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`);\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param {WebResource} webResource The WebResource to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike): Promise {\n if (!webResource) {\n return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type \"object\".`));\n }\n\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n\n return Promise.resolve(webResource);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @constructor\n * @param {string} topicKey The EventGrid topic key\n */\n constructor(topicKey: string) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": topicKey\n }\n };\n super(options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class DomainCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid DomainCredentials object.\n *\n * @constructor\n * @param {string} domainKey The EventGrid domain key\n */\n constructor(domainKey: string) {\n if (!domainKey || (domainKey && typeof domainKey !== \"string\")) {\n throw new Error(\"domainKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": domainKey\n }\n };\n super(options);\n }\n}\n"],"names":["rng","bytesToUuid","uuidv4","base64.decodeString","base64.encodeByteArray","utils.isValidUuid","utils.isDuration","HttpPipelineLogLevel","utils.stripRequest","utils.stripResponse","utils.delay","utils.generateUuid","retry","shouldRetry","updateRetryData","QueryCollectionFormat","DefaultHttpClient","utils.prepareXMLRootList","utils.isPrimitiveType","HeaderConstants","DEFAULT_AUTHORIZATION_SCHEME","base64.encodeString"],"mappings":";;;;;;;;;;IAAA;IACA;IAEA;;;IAGA,SAAS,YAAY,CAAC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BAAM,OAAO,CAAC,SAAC;;SAChB;QACH,wBAAC;IAAD,CAlBA,CAAuC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js b/node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js new file mode 100644 index 000000000..e05046352 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js @@ -0,0 +1,19 @@ +/** @license ms-rest-js + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).msRest={})}(this,(function(e){"use strict";function t(e){return e.toLowerCase()}function r(e){return!(!e||"object"!=typeof e)&&("function"==typeof e.rawHeaders&&"function"==typeof e.clone&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.contains&&"function"==typeof e.remove&&"function"==typeof e.headersArray&&"function"==typeof e.headerValues&&"function"==typeof e.headerNames&&"function"==typeof e.toJson)}var n=function(){function e(e){if(this._headersMap={},e)for(var t in e)this.set(t,e[t])}return e.prototype.set=function(e,r){this._headersMap[t(e)]={name:e,value:r.toString()}},e.prototype.get=function(e){var r=this._headersMap[t(e)];return r?r.value:void 0},e.prototype.contains=function(e){return!!this._headersMap[t(e)]},e.prototype.remove=function(e){var r=this.contains(e);return delete this._headersMap[t(e)],r},e.prototype.rawHeaders=function(){var e={};for(var t in this._headersMap){var r=this._headersMap[t];e[r.name.toLowerCase()]=r.value}return e},e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap)e.push(this._headersMap[t]);return e},e.prototype.headerNames=function(){for(var e=[],t=this.headersArray(),r=0;r>>((3&t)<<3)&255;return n}}})),s=[],u=0;u<256;++u)s[u]=(u+256).toString(16).substr(1);var l=function(e,t){var r=t||0,n=s;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};var c=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||l(o)},f={msRestVersion:"2.1.0",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},p="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function h(e){var t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function d(e){var t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function y(e){return new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","ig").test(e)}function m(){return c()}function v(e,t){return new Promise((function(r){return setTimeout((function(){return r(t)}),e)}))}var g=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function b(e){return g.test(e)}function w(e,t,r){return e&&t?e.split(t).join(r||""):e}var E=function(){function e(e,t){void 0===e&&(e={}),this.modelMappers=e,this.isXML=t}return e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'+r+'" with value "'+t+'" should satisfy the constraint "'+e+'": '+n+".")};if(e.constraints&&null!=t){var o=e.constraints,i=o.ExclusiveMaximum,a=o.ExclusiveMinimum,s=o.InclusiveMaximum,u=o.InclusiveMinimum,l=o.MaxItems,c=o.MaxLength,f=o.MinItems,p=o.MinLength,h=o.MultipleOf,d=o.Pattern,y=o.UniqueItems;if(null!=i&&t>=i&&n("ExclusiveMaximum",i),null!=a&&t<=a&&n("ExclusiveMinimum",a),null!=s&&t>s&&n("InclusiveMaximum",s),null!=u&&tl&&n("MaxItems",l),null!=c&&t.length>c&&n("MaxLength",c),null!=f&&t.length=0&&e[r-1]===t;)--r;return e.substr(0,r)}(o(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)}return t}(r,t):null!==i.match(/^Sequence$/gi)?n=function(e,t,r,n){if(!Array.isArray(r))throw new Error(n+" must be of type Array.");var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n+".");for(var i=[],a=0;a0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]'+X.serializeToString(r)}function W(e){for(var t=[],r=0,n=Object.keys(e);r=200&&r.status<300);a.headersMapper&&(e.parsedHeaders=t.serializer.deserialize(a.headersMapper,e.headers.rawHeaders(),"operationRes.parsedHeaders"))}}else{var u=t.responses.default;if(u){var l=F(t)?"Unexpected status code: "+n:e.bodyAsText,c=new H(l);c.statusCode=n,c.request=d(e.request),c.response=h(e);var f=e.parsedBody;try{if(f){var p=u.bodyMapper;if(p&&"CloudError"===p.serializedName)f.error&&(f=f.error),f.code&&(c.code=f.code),f.message&&(c.message=f.message);else{var y=f;f.error&&(y=f.error),c.code=y.code,y.message&&(c.message=y.message)}if(p){var m=f;t.isXML&&p.type.name===x.Sequence&&(m="object"==typeof f?f[p.xmlElementName]:[]),c.body=t.serializer.deserialize(p,m,"error.body")}}}catch(t){c.message='Error "'+t.message+'" occurred in deserializing the responseBody - "'+e.bodyAsText+'" for the default response.'}return Promise.reject(c)}}}}return Promise.resolve(e)}))}function oe(e,t,r,n){return{create:function(o,i){return new ie(o,i,e,t,r,n)}}}var ie=function(e){function t(t,r,n,o,i,a){var s=e.call(this,t,r)||this;function u(e){return"number"==typeof e}return s.retryCount=u(n)?n:3,s.retryInterval=u(o)?o:3e4,s.minRetryInterval=u(i)?i:3e3,s.maxRetryInterval=u(a)?a:9e4,s}return q(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e.clone()).then((function(r){return ae(t,e,r)})).catch((function(r){return ae(t,e,r.response,void 0,r)}))},t}(G);function ae(e,t,r,n,o){n=function(e,t,r){t||(t={retryCount:0,retryInterval:0}),r&&(t.error&&(r.innerError=t.error),t.error=r),t.retryCount++;var n=Math.pow(2,t.retryCount)-1;return n*=.8*e.retryInterval+Math.floor(Math.random()*(1.2*e.retryInterval-.8*e.retryInterval)),t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}(e,n,o);var i=t.abortSignal&&t.abortSignal.aborted;if(!i&&function(e,t,r){if(null==t||t<500&&408!==t||501===t||505===t)return!1;if(!r)throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null.");return(r&&r.retryCount)0},e.prototype.set=function(e,t){if(e)if(null!=t){var r=Array.isArray(t)?t:t.toString();this._rawQuery[e]=r}else delete this._rawQuery[e]},e.prototype.get=function(e){return e?this._rawQuery[e]:void 0},e.prototype.toString=function(){var e="";for(var t in this._rawQuery){e&&(e+="&");var r=this._rawQuery[t];if(Array.isArray(r)){for(var n=[],o=0,i=r;o0)for(var i=this._requestPolicyFactories.length-1;i>=0;--i)o=this._requestPolicyFactories[i].create(o,this._requestPolicyOptions);return o.sendRequest(t)},t.prototype.sendOperationRequest=function(t,r,n){"function"==typeof t.options&&(n=t.options,t.options=void 0);var o,i=new N;try{var a=r.baseUrl||this.baseUri;if(!a)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");i.method=r.httpMethod,i.operationSpec=r;var s=ye.parse(a);if(r.path&&s.appendPath(r.path),r.urlParameters&&r.urlParameters.length>0)for(var u=0,l=r.urlParameters;u0)for(var p=0,h=r.queryParameters;p0){t.formData={};for(var p=0,h=n.formDataParameters;p0){if(o.isConstant)a=o.defaultValue;else{var s=Qe(r,n);s.propertyFound||(s=Qe(t,n));var u=!1;s.propertyFound||(u=o.required||"options"===n[0]&&2===n.length),a=u?o.defaultValue:s.propertyValue}var l=B(n,o);i.serialize(o,a,l)}}else for(var c in o.required&&(a={}),n){var f=o.type.modelProperties[c],p=n[c],h=e(t,r,p,f,i),d=B(p,f);i.serialize(f,h,d),void 0!==h&&(a||(a={}),a[c]=h)}return a}(e,t,r.parameterPath,r.mapper,n)}function Qe(e,t){for(var r={propertyFound:!1},n=0;n> Request: "+JSON.stringify(t.request,void 0,2)),e.logger(">> Response status code: "+t.status);var r=t.bodyAsText;return e.logger(">> Body: "+r),Promise.resolve(t)}(t,e)}))},t}(G);var Ye=f.HeaderConstants,Xe=function(){function e(e,t){if(void 0===t&&(t="Bearer"),this.authorizationScheme="Bearer",!e)throw new Error("token cannot be null or undefined.");this.token=e,this.authorizationScheme=t}return e.prototype.signRequest=function(e){return e.headers||(e.headers=new n),e.headers.set(Ye.AUTHORIZATION,this.authorizationScheme+" "+this.token),Promise.resolve(e)},e}(),Je=f.HeaderConstants,We=function(){function e(e,t,r){if(void 0===r&&(r="Basic"),this.authorizationScheme="Basic",null==e||"string"!=typeof e.valueOf())throw new Error("userName cannot be null or undefined and must be of type string.");if(null==t||"string"!=typeof t.valueOf())throw new Error("password cannot be null or undefined and must be of type string.");this.userName=e,this.password=t,this.authorizationScheme=r}return e.prototype.signRequest=function(e){var t=this.userName+":"+this.password,r=this.authorizationScheme+" "+btoa(t);return e.headers||(e.headers=new n),e.headers.set(Je.AUTHORIZATION,r),Promise.resolve(e)},e}(),Ge=function(){function e(e){if(!e||e&&!e.inHeader&&!e.inQuery)throw new Error('options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.');this.inHeader=e.inHeader,this.inQuery=e.inQuery}return e.prototype.signRequest=function(e){if(!e)return Promise.reject(new Error('webResource cannot be null or undefined and must be of type "object".'));if(this.inHeader)for(var t in e.headers||(e.headers=new n),this.inHeader)e.headers.set(t,this.inHeader[t]);if(this.inQuery){if(!e.url)return Promise.reject(new Error("url cannot be null in the request object."));for(var r in e.url.indexOf("?")<0&&(e.url+="?"),this.inQuery)e.url.endsWith("?")||(e.url+="&"),e.url+=r+"="+this.inQuery[r]}return Promise.resolve(e)},e}(),Ke=function(e){function t(t){if(!t||t&&"string"!=typeof t)throw new Error("topicKey cannot be null or undefined and must be of type string.");var r={inHeader:{"aeg-sas-key":t}};return e.call(this,r)||this}return q(t,e),t}(Ge),Ze=function(e){function t(t){if(!t||t&&"string"!=typeof t)throw new Error("domainKey cannot be null or undefined and must be of type string.");var r={inHeader:{"aeg-sas-key":t}};return e.call(this,r)||this}return q(t,e),t}(Ge);e.ApiKeyCredentials=Ge,e.BaseRequestPolicy=G,e.BasicAuthenticationCredentials=We,e.Constants=f,e.DefaultHttpClient=M,e.DomainCredentials=Ze,e.HttpHeaders=n,e.MapperType=x,e.RequestPolicyOptions=K,e.RestError=H,e.Serializer=E,e.ServiceClient=Le,e.TokenCredentials=Xe,e.TopicCredentials=Ke,e.URLBuilder=ye,e.URLQuery=de,e.WebResource=N,e.agentPolicy=Ie,e.applyMixins=function(e,t){t.forEach((function(t){Object.getOwnPropertyNames(t.prototype).forEach((function(r){e.prototype[r]=t.prototype[r]}))}))},e.delay=v,e.deserializationPolicy=Z,e.deserializeResponseBody=ne,e.encodeUri=function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/"/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},e.executePromisesSequentially=function(e,t){var r=Promise.resolve(t);return e.forEach((function(e){r=r.then(e)})),r},e.exponentialRetryPolicy=oe,e.flattenResponse=$e,e.generateClientRequestIdPolicy=se,e.generateUuid=m,e.getDefaultProxySettings=He,e.getDefaultUserAgentValue=fe,e.isDuration=b,e.isNode=p,e.isValidUuid=y,e.logPolicy=function(e){return void 0===e&&(e=console.log),{create:function(t,r){return new Ve(t,r,e)}}},e.promiseToCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then((function(e){t(void 0,e)}),(function(e){t(e)}))}},e.promiseToServiceCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then((function(e){process.nextTick(t,void 0,e.parsedBody,e.request,e)}),(function(e){process.nextTick(t,e)}))}},e.proxyPolicy=Me,e.redirectPolicy=_e,e.serializeObject=function e(t){if(null!=t){if(t instanceof Uint8Array)return t=o(t);if(t instanceof Date)return t.toISOString();if(Array.isArray(t)){for(var r=[],n=0;n>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nexport const Constants = {\n /**\n * The ms-rest version\n * @const\n * @type {string}\n */\n msRestVersion: \"2.1.0\",\n\n /**\n * Specifies HTTP.\n *\n * @const\n * @type {string}\n */\n HTTP: \"http:\",\n\n /**\n * Specifies HTTPS.\n *\n * @const\n * @type {string}\n */\n HTTPS: \"https:\",\n\n /**\n * Specifies HTTP Proxy.\n *\n * @const\n * @type {string}\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n\n /**\n * Specifies HTTPS Proxy.\n *\n * @const\n * @type {string}\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n\n HttpConstants: {\n /**\n * Http Verbs\n *\n * @const\n * @enum {string}\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\"\n },\n\n StatusCodes: {\n TooManyRequests: 429\n }\n },\n\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n *\n * @const\n * @type {string}\n */\n AUTHORIZATION: \"authorization\",\n\n AUTHORIZATION_SCHEME: \"Bearer\",\n\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n *\n * @const\n * @type {string}\n */\n RETRY_AFTER: \"Retry-After\",\n\n /**\n * The UserAgent header.\n *\n * @const\n * @type {string}\n */\n USER_AGENT: \"User-Agent\"\n }\n};\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport uuidv4 from \"uuid/v4\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { RestError } from \"../restError\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"./constants\";\n\n/**\n * A constant that indicates whether the environment is node.js or browser based.\n */\nexport const isNode = (typeof process !== \"undefined\") && !!process.version && !!process.versions && !!process.versions.node;\n\n/**\n * Checks if a parsed URL is HTTPS\n *\n * @param {object} urlToCheck The url to check\n * @return {boolean} True if the URL is HTTPS; false otherwise.\n */\nexport function urlIsHTTPS(urlToCheck: { protocol: string }): boolean {\n return urlToCheck.protocol.toLowerCase() === Constants.HTTPS;\n}\n\n/**\n * Encodes an URI.\n *\n * @param {string} uri The URI to be encoded.\n * @return {string} The encoded URI.\n */\nexport function encodeUri(uri: string): string {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param {HttpOperationResponse} response The Http Response\n *\n * @return {object} The stripped version of Http Response.\n */\nexport function stripResponse(response: HttpOperationResponse): any {\n const strippedResponse: any = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param {WebResource} request The Http Request object\n *\n * @return {WebResource} The stripped version of Http Request.\n */\nexport function stripRequest(request: WebResourceLike): WebResourceLike {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n\n/**\n * Validates the given uuid as a string\n *\n * @param {string} uuid The uuid as a string that needs to be validated\n *\n * @return {boolean} True if the uuid is valid; false otherwise.\n */\nexport function isValidUuid(uuid: string): boolean {\n const validUuidRegex = new RegExp(\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\", \"ig\");\n return validUuidRegex.test(uuid);\n}\n\n/**\n * Provides an array of values of an object. For example\n * for a given object { \"a\": \"foo\", \"b\": \"bar\" }, the method returns [\"foo\", \"bar\"].\n *\n * @param {object} obj An object whose properties need to be enumerated so that it\"s values can be provided as an array\n *\n * @return {any[]} An array of values of the given object.\n */\nexport function objectValues(obj: { [key: string]: any; }): any[] {\n const result: any[] = [];\n if (obj && obj instanceof Object) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n result.push((obj)[key]);\n }\n }\n } else {\n throw new Error(`The provided object ${JSON.stringify(obj, undefined, 2)} is not a valid object that can be ` +\n `enumerated to provide its values as an array.`);\n }\n return result;\n}\n\n/**\n * Generated UUID\n *\n * @return {string} RFC4122 v4 UUID.\n */\nexport function generateUuid(): string {\n return uuidv4();\n}\n\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param {Array} promiseFactories An array of promise factories(A function that return a promise)\n *\n * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n *\n * @return A chain of resolved or rejected promises\n */\nexport function executePromisesSequentially(promiseFactories: Array, kickstart: any) {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n\n/**\n * Merges source object into the target object\n * @param {object} source The object that needs to be merged\n *\n * @param {object} target The object to be merged into\n *\n * @returns {object} Returns the merged target object.\n */\nexport function mergeObjects(source: { [key: string]: any; }, target: { [key: string]: any; }) {\n Object.keys(source).forEach((key) => {\n target[key] = source[key];\n });\n return target;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after t milliseconds.\n * @param {number} t The number of milliseconds to be delayed.\n * @param {T} value The value to be resolved with after a timeout of t milliseconds.\n * @returns {Promise} Resolved promise\n */\nexport function delay(t: number, value?: T): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\n}\n\n/**\n * Service callback that is returned for REST requests initiated by the service client.\n */\nexport interface ServiceCallback {\n /**\n * A method that will be invoked as a callback to a service function.\n * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null.\n * @param {TResult} [result] The deserialized response body if an error did not occur.\n * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur.\n * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur.\n */\n (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void;\n}\n\n/**\n * Converts a Promise to a callback.\n * @param {Promise} promise The Promise to be converted to a callback\n * @returns {Function} A function that takes the callback (cb: Function): void\n * @deprecated generated code should instead depend on responseToBody\n */\nexport function promiseToCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: Function): void => {\n promise.then((data: any) => {\n cb(undefined, data);\n }, (err: Error) => {\n cb(err);\n });\n };\n}\n\n/**\n * Converts a Promise to a service callback.\n * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void\n */\nexport function promiseToServiceCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: ServiceCallback): void => {\n promise.then((data: HttpOperationResponse) => {\n process.nextTick(cb, undefined, data.parsedBody as T, data.request, data);\n }, (err: Error) => {\n process.nextTick(cb, err);\n });\n };\n}\n\nexport function prepareXMLRootList(obj: any, elementName: string) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n return { [elementName]: obj };\n}\n\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param {object} targetCtor The target object on which the properties need to be applied.\n * @param {Array} sourceCtors An array of source objects from which the properties need to be taken.\n */\nexport function applyMixins(targetCtor: any, sourceCtors: any[]): void {\n sourceCtors.forEach(sourceCtors => {\n Object.getOwnPropertyNames(sourceCtors.prototype).forEach(name => {\n targetCtor.prototype[name] = sourceCtors.prototype[name];\n });\n });\n}\n\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param {string} value The value to be validated for ISO 8601 duration format.\n * @return {boolean} `true` if valid, `false` otherwise.\n */\nexport function isDuration(value: string): boolean {\n return validateISODuration.test(value);\n}\n\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param {string | undefined} value The value to search and replace in.\n * @param {string} searchValue The value to search for in the value argument.\n * @param {string} replaceValue The value to replace searchValue with in the value argument.\n * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue.\n */\nexport function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n\n/**\n * Determines whether the given enity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param value Any entity\n * @return boolean - true is it is primitive type, false otherwise.\n */\nexport function isPrimitiveType(value: any): boolean {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as base64 from \"./util/base64\";\nimport * as utils from \"./util/utils\";\n\nexport class Serializer {\n constructor(public readonly modelMappers: { [key: string]: any } = {}, public readonly isXML?: boolean) { }\n\n validateConstraints(mapper: Mapper, value: any, objectName: string): void {\n const failValidation = (constraintName: keyof MapperConstraints, constraintValue: any) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && (value != undefined)) {\n const {\n ExclusiveMaximum,\n ExclusiveMinimum,\n InclusiveMaximum,\n InclusiveMinimum,\n MaxItems,\n MaxLength,\n MinItems,\n MinLength,\n MultipleOf,\n Pattern,\n UniqueItems\n } = mapper.constraints;\n if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && value > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && value < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n if (MaxItems != undefined && value.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && value.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && value.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && value.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && value % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern: RegExp = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if ((typeof value !== \"string\") || (value.match(pattern) === null)) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems && value.some((item: any, i: number, ar: Array) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n\n /**\n * Serialize the given object based on its metadata defined in the mapper\n *\n * @param {Mapper} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized\n *\n * @param {string} objectName Name of the serialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object\n */\n serialize(mapper: Mapper, object: any, objectName?: string): any {\n let payload: any = {};\n const mapperType = mapper.type.name as string;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = [];\n }\n\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n\n const { required, nullable } = mapper;\n\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n\n if (object == undefined) {\n payload = object;\n } else {\n // Validate Constraints if any\n this.validateConstraints(mapper, object, objectName);\n if (mapperType.match(/^any$/ig) !== null) {\n payload = object;\n } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n } else if (mapperType.match(/^Enum$/ig) !== null) {\n const enumMapper: EnumMapper = mapper as EnumMapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = serializeByteArrayType(objectName, object);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = serializeSequenceType(this, mapper as SequenceMapper, object, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = serializeDictionaryType(this, mapper as DictionaryMapper, object, objectName);\n } else if (mapperType.match(/^Composite$/ig) !== null) {\n payload = serializeCompositeType(this, mapper as CompositeMapper, object, objectName);\n }\n }\n return payload;\n }\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper\n *\n * @param {object} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized\n *\n * @param {string} objectName Name of the deserialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object\n */\n deserialize(mapper: Mapper, responseBody: any, objectName: string): any {\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n\n let payload: any;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n\n if (mapperType.match(/^Composite$/ig) !== null) {\n payload = deserializeCompositeType(this, mapper as CompositeMapper, responseBody, objectName);\n } else {\n if (this.isXML) {\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\") and body (\"_\") properties, then just reduce the responseBody value to\n * the body (\"_\") property.\n */\n if (responseBody[\"$\"] != undefined && responseBody[\"_\"] != undefined) {\n responseBody = responseBody[\"_\"];\n }\n }\n\n if (mapperType.match(/^Number$/ig) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n } else if (mapperType.match(/^Boolean$/ig) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n } else if (responseBody === \"false\") {\n payload = false;\n } else {\n payload = responseBody;\n }\n } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) {\n payload = responseBody;\n } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) {\n payload = new Date(responseBody);\n } else if (mapperType.match(/^UnixTime$/ig) !== null) {\n payload = unixTimeToDate(responseBody);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = base64.decodeString(responseBody);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = base64UrlToByteArray(responseBody);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = deserializeSequenceType(this, mapper as SequenceMapper, responseBody, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = deserializeDictionaryType(this, mapper as DictionaryMapper, responseBody, objectName);\n }\n }\n\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n\n return payload;\n }\n}\n\nfunction trimEnd(str: string, ch: string) {\n let len = str.length;\n while ((len - 1) >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\n\nfunction bufferToBase64Url(buffer: any): string | undefined {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = base64.encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\n\nfunction base64UrlToByteArray(str: string): Uint8Array | undefined {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/\\-/g, \"+\").replace(/\\_/g, \"/\");\n // Base64 to Uint8Array.\n return base64.decodeString(str);\n}\n\nfunction splitSerializeName(prop: string | undefined): string[] {\n const classes: string[] = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n } else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n\n return classes;\n}\n\nfunction dateToUnixTime(d: string | Date): number | undefined {\n if (!d) {\n return undefined;\n }\n\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d as string);\n }\n return Math.floor((d as Date).getTime() / 1000);\n}\n\nfunction unixTimeToDate(n: number): Date | undefined {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\n\nfunction serializeBasicTypes(typeName: string, objectName: string, value: any): any {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/ig) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n } else if (typeName.match(/^String$/ig) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n } else if (typeName.match(/^Uuid$/ig) !== null) {\n if (!(typeof value.valueOf() === \"string\" && utils.isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n } else if (typeName.match(/^Boolean$/ig) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n } else if (typeName.match(/^Stream$/ig) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !(typeof Blob === \"function\" && value instanceof Blob)) {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`);\n }\n }\n }\n return value;\n}\n\nfunction serializeEnumType(objectName: string, allowedValues: Array, value: any): any {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\n\nfunction serializeByteArrayType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = base64.encodeByteArray(value);\n }\n return value;\n}\n\nfunction serializeBase64UrlType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = bufferToBase64Url(value);\n }\n return value;\n}\n\nfunction serializeDateTypes(typeName: string, value: any, objectName: string) {\n if (value != undefined) {\n if (typeName.match(/^Date$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10);\n } else if (typeName.match(/^DateTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString();\n } else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString();\n } else if (typeName.match(/^UnixTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n } else if (typeName.match(/^TimeSpan$/ig) !== null) {\n if (!utils.isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n value = value;\n }\n }\n return value;\n}\n\nfunction serializeSequenceType(serializer: Serializer, mapper: SequenceMapper, object: any, objectName: string) {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n tempArray[i] = serializer.serialize(elementType, object[i], objectName);\n }\n return tempArray;\n}\n\nfunction serializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, object: any, objectName: string) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(object)) {\n tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + \".\" + key);\n }\n return tempDictionary;\n}\n\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n */\nfunction resolveModelProperties(serializer: Serializer, mapper: CompositeMapper, objectName: string): { [propertyName: string]: Mapper } {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n\n const modelMapper = serializer.modelMappers[className];\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${className}\".`);\n }\n modelProps = modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${className}\" for object \"${objectName}\".`);\n }\n }\n\n return modelProps;\n}\n\nfunction serializeCompositeType(serializer: Serializer, mapper: CompositeMapper, object: any, objectName: string) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n\n if (object != undefined) {\n const payload: any = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n\n let propName: string | undefined;\n let parentObject: any = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n } else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n } else {\n const paths = splitSerializeName(propertyMapper.serializedName!);\n propName = paths.pop();\n\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if ((childObject == undefined) && (object[key] != undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n\n if (parentObject != undefined) {\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) {\n toSerialize = mapper.serializedName;\n }\n\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName);\n if (serializedValue !== undefined && propName != undefined) {\n if (propertyMapper.xmlIsAttribute) {\n // $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject.$ = parentObject.$ || {};\n parentObject.$[propName] = serializedValue;\n } else if (propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName!]: serializedValue };\n } else {\n parentObject[propName] = serializedValue;\n }\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every(pn => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]');\n }\n }\n }\n\n return payload;\n }\n return object;\n}\n\nfunction isSpecialXmlProperty(propertyName: string): boolean {\n return [\"$\", \"_\"].includes(propertyName);\n}\n\nfunction deserializeCompositeType(serializer: Serializer, mapper: CompositeMapper, responseBody: any, objectName: string): any {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance: { [key: string]: any } = {};\n const handledPropertyNames: string[] = [];\n\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName!);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n\n const headerCollectionPrefix = (propertyMapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary: any = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize((propertyMapper as DictionaryMapper).type.value, responseBody[headerKey], propertyObjectName);\n }\n\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n } else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody.$) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName!], propertyObjectName);\n } else {\n const propertyName = xmlElementName || xmlName || serializedName;\n let unwrappedProperty = responseBody[propertyName!];\n if (propertyMapper.xmlIsWrapped) {\n unwrappedProperty = responseBody[xmlName!];\n unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName!];\n\n const isEmptyWrappedList = unwrappedProperty === undefined;\n if (isEmptyWrappedList) {\n unwrappedProperty = [];\n }\n }\n instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName);\n }\n } else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res) break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) {\n propertyInstance = mapper.serializedName;\n }\n\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n } else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n instance[key] = serializedValue;\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName: string) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]');\n }\n }\n } else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) {\n instance[key] = responseBody[key];\n }\n }\n }\n\n return instance;\n}\n\nfunction deserializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName);\n }\n return tempDictionary;\n }\n return responseBody;\n}\n\nfunction deserializeSequenceType(serializer: Serializer, mapper: SequenceMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`);\n }\n return tempArray;\n }\n return responseBody;\n}\n\nfunction getPolymorphicMapper(serializer: Serializer, mapper: CompositeMapper, object: any, polymorphicPropertyName: \"clientName\" | \"serializedName\"): CompositeMapper {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator = discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\n\nfunction getPolymorphicDiscriminatorRecursively(serializer: Serializer, mapper: CompositeMapper): PolymorphicDiscriminator | undefined {\n return mapper.type.polymorphicDiscriminator\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent)\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className);\n}\n\nfunction getPolymorphicDiscriminatorSafely(serializer: Serializer, typeName?: string) {\n return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n\nexport interface MapperConstraints {\n InclusiveMaximum?: number;\n ExclusiveMaximum?: number;\n InclusiveMinimum?: number;\n ExclusiveMinimum?: number;\n MaxLength?: number;\n MinLength?: number;\n Pattern?: RegExp;\n MaxItems?: number;\n MinItems?: number;\n UniqueItems?: true;\n MultipleOf?: number;\n}\n\nexport type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType;\n\nexport interface SimpleMapperType {\n name: \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\nexport interface CompositeMapperType {\n name: \"Composite\";\n\n // Only one of the two below properties should be present.\n // Use className to reference another type definition,\n // and use modelProperties/additionalProperties when the reference to the other type has been resolved.\n className?: string;\n\n modelProperties?: { [propertyName: string]: Mapper };\n additionalProperties?: Mapper;\n\n uberParent?: string;\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\nexport interface SequenceMapperType {\n name: \"Sequence\";\n element: Mapper;\n}\n\nexport interface DictionaryMapperType {\n name: \"Dictionary\";\n value: Mapper;\n}\n\nexport interface EnumMapperType {\n name: \"Enum\";\n allowedValues: any[];\n}\n\nexport interface BaseMapper {\n xmlName?: string;\n xmlIsAttribute?: boolean;\n xmlElementName?: string;\n xmlIsWrapped?: boolean;\n readOnly?: boolean;\n isConstant?: boolean;\n required?: boolean;\n nullable?: boolean;\n serializedName?: string;\n type: MapperType;\n defaultValue?: any;\n constraints?: MapperConstraints;\n}\n\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\nexport interface PolymorphicDiscriminator {\n serializedName: string;\n clientName: string;\n [key: string]: string;\n}\n\nexport interface CompositeMapper extends BaseMapper {\n type: CompositeMapperType;\n}\n\nexport interface SequenceMapper extends BaseMapper {\n type: SequenceMapperType;\n}\n\nexport interface DictionaryMapper extends BaseMapper {\n type: DictionaryMapperType;\n headerCollectionPrefix?: string;\n}\n\nexport interface EnumMapper extends BaseMapper {\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n// TODO: why is this here?\nexport function serializeObject(toSerialize: any): any {\n if (toSerialize == undefined) return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = base64.encodeByteArray(toSerialize);\n return toSerialize;\n }\n else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n }\n else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n } else if (typeof toSerialize === \"object\") {\n const dictionary: { [key: string]: any } = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(toSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o: Array): { [K in T]: K } {\n const result: any = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n\nexport const MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\"\n]);\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders, HttpHeadersLike, isHttpHeadersLike } from \"./httpHeaders\";\nimport { OperationSpec } from \"./operationSpec\";\nimport { Mapper, Serializer } from \"./serializer\";\nimport { generateUuid } from \"./util/utils\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { AgentSettings, ProxySettings } from \"./serviceClient\";\n\nexport type HttpMethods = \"GET\" | \"PUT\" | \"POST\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\" | \"TRACE\";\nexport type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream);\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number\n};\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n readonly aborted: boolean;\n dispatchEvent: (event: Event) => boolean;\n onabort: ((this: AbortSignalLike, ev: Event) => any) | null;\n addEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n removeEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n}\n\n/**\n * An abstraction over a REST call.\n */\nexport interface WebResourceLike {\n /**\n * The URL being accessed by the request.\n */\n url: string;\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n /**\n * The HTTP body contents of the request.\n */\n body?: any;\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse;\n formData?: any;\n /**\n * A query string represented as an object.\n */\n query?: { [key: string]: any };\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n /**\n * If credentials (cookies) should be sent along during an XHR.\n */\n withCredentials: boolean;\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n */\n timeout: number;\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP(S) agent configuration.\n */\n agentSettings?: AgentSettings;\n /**\n * If the connection should be reused.\n */\n keepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void;\n\n /**\n * Sets options on the request.\n */\n prepare(options: RequestPrepareOptions): WebResourceLike;\n /**\n * Clone this request object.\n */\n clone(): WebResourceLike;\n}\n\nexport function isWebResourceLike(object: any): object is WebResourceLike {\n if (typeof object !== \"object\") {\n return false;\n }\n if (\n typeof object.url === \"string\" &&\n typeof object.method === \"string\" &&\n typeof object.headers === \"object\" &&\n isHttpHeadersLike(object.headers) &&\n typeof object.validateRequestProperties === \"function\" &&\n typeof object.prepare === \"function\" &&\n typeof object.clone === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n *\n * @constructor\n */\nexport class WebResource {\n url: string;\n method: HttpMethods;\n body?: any;\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse);\n formData?: any;\n query?: { [key: string]: any; };\n operationSpec?: OperationSpec;\n withCredentials: boolean;\n timeout: number;\n proxySettings?: ProxySettings;\n keepAlive?: boolean;\n agentSettings?: AgentSettings;\n\n abortSignal?: AbortSignalLike;\n\n /** Callback which fires upon upload progress. */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n constructor(\n url?: string,\n method?: HttpMethods,\n body?: any,\n query?: { [key: string]: any; },\n headers?: { [key: string]: any; } | HttpHeadersLike,\n streamResponseBody?: boolean,\n withCredentials?: boolean,\n abortSignal?: AbortSignalLike,\n timeout?: number,\n onUploadProgress?: (progress: TransferProgressEvent) => void,\n onDownloadProgress?: (progress: TransferProgressEvent) => void,\n proxySettings?: ProxySettings,\n keepAlive?: boolean,\n agentSettings?: AgentSettings) {\n\n this.streamResponseBody = streamResponseBody;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers));\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.agentSettings = agentSettings;\n }\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n\n /**\n * Prepares the request.\n * @param {RequestPrepareOptions} options Options to provide for preparing the request.\n * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options: RequestPrepareOptions): WebResource {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n\n if (options.method == undefined || typeof options.method.valueOf() !== \"string\") {\n throw new Error(\"options.method must be a string.\");\n }\n\n if (options.url && options.pathTemplate) {\n throw new Error(\"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\");\n }\n\n\n if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== \"string\") && (options.url == undefined || typeof options.url.valueOf() !== \"string\")) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error(\"options.url must be of type \\\"string\\\".\");\n }\n this.url = options.url;\n }\n\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error(\"The provided method \\\"\" + options.method + \"\\\" is invalid. Supported HTTP methods are: \" + JSON.stringify(validMethods));\n }\n }\n this.method = (options.method.toUpperCase() as HttpMethods);\n\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error(\"options.pathTemplate must be of type \\\"string\\\".\");\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url = baseUrl + (baseUrl.endsWith(\"/\") ? \"\" : \"/\") + (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({\\w*\\s*\\w*})/ig);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`);\n }\n segments.forEach(function (item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = (pathParameters as { [key: string]: any })[pathParamName];\n if (pathParam === null || pathParam === undefined || !(typeof pathParam === \"string\" || typeof pathParam === \"object\")) {\n throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in ${pathParameters} - ${JSON.stringify(pathParameters, undefined, 2)}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`);\n }\n\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(`options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n } else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`);\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam: any = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n }\n else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(`options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n } else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n }// end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", generateUuid());\n }\n\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty\n this.body = options.body;\n if (options.body != undefined) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n } else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, \"requestBody\");\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n\n return this;\n }\n\n /**\n * Clone this WebResource HTTP request object.\n * @returns {WebResource} The clone of this WebResource HTTP request object.\n */\n clone(): WebResource {\n const result = new WebResource(\n this.url,\n this.method,\n this.body,\n this.query,\n this.headers && this.headers.clone(),\n this.streamResponseBody,\n this.withCredentials,\n this.abortSignal,\n this.timeout,\n this.onUploadProgress,\n this.onDownloadProgress,\n this.proxySettings,\n this.keepAlive,\n this.agentSettings);\n\n if (this.formData) {\n result.formData = this.formData;\n }\n\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n\n return result;\n }\n}\n\nexport interface RequestPrepareOptions {\n /**\n * The HTTP request method. Valid values are \"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\",\n * or \"PATCH\".\n */\n method: HttpMethods;\n /**\n * The request url. It may or may not have query parameters in it. Either provide the \"url\" or\n * provide the \"pathTemplate\" in the options object. Both the options are mutually exclusive.\n */\n url?: string;\n /**\n * A dictionary of query parameters to be appended to the url, where\n * the \"key\" is the \"query-parameter-name\" and the \"value\" is the \"query-parameter-value\".\n * The \"query-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"query-parameter-value\".\n * Example:\n * - query-parameter-value in \"object\" format: { \"query-parameter-name\": { value: \"query-parameter-value\", skipUrlEncoding: true } }\n * - query-parameter-value in \"string\" format: { \"query-parameter-name\": \"query-parameter-value\"}.\n * Note: \"If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url.\n */\n queryParameters?: { [key: string]: any | ParameterValue };\n /**\n * The path template of the request url. Either provide the \"url\" or provide the \"pathTemplate\" in\n * the options object. Both the options are mutually exclusive.\n * Example: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}\"\n */\n pathTemplate?: string;\n /**\n * The base url of the request. Default value is: \"https://management.azure.com\". This is\n * applicable only with pathTemplate. If you are providing options.url then it is expected that\n * you provide the complete url.\n */\n baseUrl?: string;\n /**\n * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate.\n * Here the key is the \"path-parameter-name\" and the value is the \"path-parameter-value\".\n * The \"path-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"path-parameter-value\".\n * Example:\n * - path-parameter-value in \"object\" format: { \"path-parameter-name\": { value: \"path-parameter-value\", skipUrlEncoding: true } }\n * - path-parameter-value in \"string\" format: { \"path-parameter-name\": \"path-parameter-value\" }.\n */\n pathParameters?: { [key: string]: any | ParameterValue };\n formData?: { [key: string]: any };\n /**\n * A dictionary of request headers that need to be applied to the request.\n * Here the key is the \"header-name\" and the value is the \"header-value\". The header-value MUST be of type string.\n * - ContentType must be provided with the key name as \"Content-Type\". Default value \"application/json; charset=utf-8\".\n * - \"Transfer-Encoding\" is set to \"chunked\" by default if \"options.bodyIsStream\" is set to true.\n * - \"Content-Type\" is set to \"application/octet-stream\" by default if \"options.bodyIsStream\" is set to true.\n * - \"accept-language\" by default is set to \"en-US\"\n * - \"x-ms-client-request-id\" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true\n */\n headers?: { [key: string]: any };\n /**\n * When set to true, instructs the client to not set \"x-ms-client-request-id\" header to a new Guid().\n */\n disableClientRequestId?: boolean;\n /**\n * The request body. It can be of any type. This value will be serialized if it is not a stream.\n */\n body?: any;\n /**\n * Provides information on how to serialize the request body.\n */\n serializationMapper?: Mapper;\n /**\n * A dictionary of mappers that may be used while [de]serialization.\n */\n mappers?: { [x: string]: any };\n /**\n * Provides information on how to deserialize the response body.\n */\n deserializationMapper?: object;\n /**\n * Indicates whether this method should JSON.stringify() the request body. Default value: false.\n */\n disableJsonStringifyOnBody?: boolean;\n /**\n * Indicates whether the request body is a stream (useful for file upload scenarios).\n */\n bodyIsStream?: boolean;\n abortSignal?: AbortSignalLike;\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n}\n\n/**\n * The Parameter value provided for path or query parameters in RequestPrepareOptions\n */\nexport interface ParameterValue {\n value: any;\n skipUrlEncoding: boolean;\n [key: string]: any;\n}\n\n/**\n * Describes the base structure of the options object that will be used in every operation.\n */\nexport interface RequestOptionsBase {\n /**\n * @property {object} [customHeaders] User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n [key: string]: any;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\n\nexport class RestError extends Error {\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n static readonly REQUEST_ABORTED_ERROR: string = \"REQUEST_ABORTED_ERROR\";\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n code?: string;\n statusCode?: number;\n request?: WebResourceLike;\n response?: HttpOperationResponse;\n body?: any;\n constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any) {\n super(message);\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n this.body = body;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexport enum HttpPipelineLogLevel {\n /**\n * A log level that indicates that no logs will be logged.\n */\n OFF,\n\n /**\n * An error log.\n */\n ERROR,\n\n /**\n * A warning log.\n */\n WARNING,\n\n /**\n * An information log.\n */\n INFO\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpClient } from \"./httpClient\";\nimport { HttpHeaders } from \"./httpHeaders\";\nimport { WebResourceLike, TransferProgressEvent } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { RestError } from \"./restError\";\n\n/**\n * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.\n */\nexport class XhrHttpClient implements HttpClient {\n public sendRequest(request: WebResourceLike): Promise {\n const xhr = new XMLHttpRequest();\n\n if (request.agentSettings) {\n throw new Error(\"HTTP agent settings not supported in browser environment\");\n }\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n const abortSignal = request.abortSignal;\n if (abortSignal) {\n const listener = () => {\n xhr.abort();\n };\n abortSignal.addEventListener(\"abort\", listener);\n xhr.addEventListener(\"readystatechange\", () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n abortSignal.removeEventListener(\"abort\", listener);\n }\n });\n }\n\n addProgressListener(xhr.upload, request.onUploadProgress);\n addProgressListener(xhr, request.onDownloadProgress);\n\n if (request.formData) {\n const formData = request.formData;\n const requestForm = new FormData();\n const appendFormValue = (key: string, value: any) => {\n if (value && value.hasOwnProperty(\"value\") && value.hasOwnProperty(\"options\")) {\n requestForm.append(key, value.value, value.options);\n } else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n } else {\n appendFormValue(formKey, formValue);\n }\n }\n\n request.body = requestForm;\n request.formData = undefined;\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n // browser will automatically apply a suitable content-type header\n request.headers.remove(\"Content-Type\");\n }\n }\n\n xhr.open(request.method, request.url);\n xhr.timeout = request.timeout;\n xhr.withCredentials = request.withCredentials;\n for (const header of request.headers.headersArray()) {\n xhr.setRequestHeader(header.name, header.value);\n }\n xhr.responseType = request.streamResponseBody ? \"blob\" : \"text\";\n\n // tslint:disable-next-line:no-null-keyword\n xhr.send(request.body === undefined ? null : request.body);\n\n if (request.streamResponseBody) {\n return new Promise((resolve, reject) => {\n xhr.addEventListener(\"readystatechange\", () => {\n // Resolve as soon as headers are loaded\n if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\n const blobBody = new Promise((resolve, reject) => {\n xhr.addEventListener(\"load\", () => {\n resolve(xhr.response);\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n blobBody\n });\n }\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n } else {\n return new Promise(function (resolve, reject) {\n xhr.addEventListener(\"load\", () => resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: xhr.responseText\n }));\n rejectOnTerminalEvent(request, xhr, reject);\n });\n }\n }\n}\n\nfunction addProgressListener(xhr: XMLHttpRequestEventTarget, listener?: (progress: TransferProgressEvent) => void) {\n if (listener) {\n xhr.addEventListener(\"progress\", rawEvent => listener({\n loadedBytes: rawEvent.loaded\n }));\n }\n}\n\n// exported locally for testing\nexport function parseHeaders(xhr: XMLHttpRequest) {\n const responseHeaders = new HttpHeaders();\n const headerLines = xhr.getAllResponseHeaders().trim().split(/[\\r\\n]+/);\n for (const line of headerLines) {\n const index = line.indexOf(\":\");\n const headerName = line.slice(0, index);\n const headerValue = line.slice(index + 2);\n responseHeaders.set(headerName, headerValue);\n }\n return responseHeaders;\n}\n\nfunction rejectOnTerminalEvent(request: WebResourceLike, xhr: XMLHttpRequest, reject: (err: any) => void) {\n xhr.addEventListener(\"error\", () => reject(new RestError(`Failed to send request to ${request.url}`, RestError.REQUEST_SEND_ERROR, undefined, request)));\n xhr.addEventListener(\"abort\", () => reject(new RestError(\"The request was aborted\", RestError.REQUEST_ABORTED_ERROR, undefined, request)));\n xhr.addEventListener(\"timeout\", () => reject(new RestError(`timeout of ${xhr.timeout}ms exceeded`, RestError.REQUEST_SEND_ERROR, undefined, request)));\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { Mapper } from \"./serializer\";\n\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nexport function getPathStringFromParameter(parameter: OperationParameter): string {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\n\nexport function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string {\n let result: string;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n } else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n } else {\n result = mapper.serializedName!;\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { OperationParameter, OperationQueryParameter, OperationURLParameter } from \"./operationParameter\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { MapperType, Serializer } from \"./serializer\";\nimport { HttpMethods } from \"./webResource\";\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponse };\n}\n\nexport function isStreamOperation(operationSpec: OperationSpec): boolean {\n let result = false;\n for (const statusCode in operationSpec.responses) {\n const operationResponse: OperationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result = true;\n break;\n }\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nconst parser = new DOMParser();\nexport function parseXML(str: string): Promise {\n try {\n const dom = parser.parseFromString(str, \"application/xml\");\n throwIfError(dom);\n\n const obj = domToObject(dom.childNodes[0]);\n return Promise.resolve(obj);\n } catch (err) {\n return Promise.reject(err);\n }\n}\n\nlet errorNS = \"\";\ntry {\n errorNS = parser.parseFromString(\"INVALID\", \"text/xml\").getElementsByTagName(\"parsererror\")[0].namespaceURI!;\n} catch (ignored) {\n // Most browsers will return a document containing , but IE will throw.\n}\n\nfunction throwIfError(dom: Document) {\n if (errorNS) {\n const parserErrors = dom.getElementsByTagNameNS(errorNS, \"parsererror\");\n if (parserErrors.length) {\n throw new Error(parserErrors.item(0)!.innerHTML);\n }\n }\n}\n\nfunction isElement(node: Node): node is Element {\n return !!(node as Element).attributes;\n}\n\n/**\n * Get the Element-typed version of the provided Node if the provided node is an element with\n * attributes. If it isn't, then undefined is returned.\n */\nfunction asElementWithAttributes(node: Node): Element | undefined {\n return isElement(node) && node.hasAttributes() ? node : undefined;\n}\n\nfunction domToObject(node: Node): any {\n let result: any = {};\n\n const childNodeCount: number = node.childNodes.length;\n\n const firstChildNode: Node = node.childNodes[0];\n const onlyChildTextValue: string | undefined = (firstChildNode && childNodeCount === 1 && firstChildNode.nodeType === Node.TEXT_NODE && firstChildNode.nodeValue) || undefined;\n\n const elementWithAttributes: Element | undefined = asElementWithAttributes(node);\n if (elementWithAttributes) {\n result[\"$\"] = {};\n\n for (let i = 0; i < elementWithAttributes.attributes.length; i++) {\n const attr = elementWithAttributes.attributes[i];\n result[\"$\"][attr.nodeName] = attr.nodeValue;\n }\n\n if (onlyChildTextValue) {\n result[\"_\"] = onlyChildTextValue;\n }\n } else if (childNodeCount === 0) {\n result = \"\";\n } else if (onlyChildTextValue) {\n result = onlyChildTextValue;\n }\n\n if (!onlyChildTextValue) {\n for (let i = 0; i < childNodeCount; i++) {\n const child = node.childNodes[i];\n // Ignore leading/trailing whitespace nodes\n if (child.nodeType !== Node.TEXT_NODE) {\n const childObject: any = domToObject(child);\n if (!result[child.nodeName]) {\n result[child.nodeName] = childObject;\n } else if (Array.isArray(result[child.nodeName])) {\n result[child.nodeName].push(childObject);\n } else {\n result[child.nodeName] = [result[child.nodeName], childObject];\n }\n }\n }\n }\n\n return result;\n}\n\n// tslint:disable-next-line:no-null-keyword\nconst doc = document.implementation.createDocument(null, null, null);\nconst serializer = new XMLSerializer();\n\nexport function stringifyXML(obj: any, opts?: { rootName?: string }) {\n const rootName = opts && opts.rootName || \"root\";\n const dom = buildNode(obj, rootName)[0];\n return '' + serializer.serializeToString(dom);\n}\n\nfunction buildAttributes(attrs: { [key: string]: { toString(): string; } }): Attr[] {\n const result = [];\n for (const key of Object.keys(attrs)) {\n const attr = doc.createAttribute(key);\n attr.value = attrs[key].toString();\n result.push(attr);\n }\n return result;\n}\n\nfunction buildNode(obj: any, elementName: string): Node[] {\n if (typeof obj === \"string\" || typeof obj === \"number\" || typeof obj === \"boolean\") {\n const elem = doc.createElement(elementName);\n elem.textContent = obj.toString();\n return [elem];\n }\n else if (Array.isArray(obj)) {\n const result = [];\n for (const arrayElem of obj) {\n for (const child of buildNode(arrayElem, elementName)) {\n result.push(child);\n }\n }\n return result;\n } else if (typeof obj === \"object\") {\n const elem = doc.createElement(elementName);\n for (const key of Object.keys(obj)) {\n if (key === \"$\") {\n for (const attr of buildAttributes(obj[key])) {\n elem.attributes.setNamedItem(attr);\n }\n } else {\n for (const child of buildNode(obj[key], key)) {\n elem.appendChild(child);\n }\n }\n }\n return [elem];\n }\n else {\n throw new Error(`Illegal value passed to buildObject: ${obj}`);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { HttpPipelineLogger } from \"../httpPipelineLogger\";\nimport { HttpPipelineLogLevel } from \"../httpPipelineLogLevel\";\nimport { WebResourceLike } from \"../webResource\";\n\n/**\n * Creates a new RequestPolicy per-request that uses the provided nextPolicy.\n */\nexport type RequestPolicyFactory = {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy\n};\n\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise;\n}\n\nexport abstract class BaseRequestPolicy implements RequestPolicy {\n protected constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike) {\n }\n\n public abstract sendRequest(webResource: WebResourceLike): Promise;\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return this._options.shouldLog(logLevel);\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n this._options.log(logLevel, message);\n }\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport interface RequestPolicyOptionsLike {\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport class RequestPolicyOptions implements RequestPolicyOptionsLike {\n constructor(private _logger?: HttpPipelineLogger) {\n }\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return !!this._logger &&\n logLevel !== HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel;\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { OperationResponse } from \"../operationResponse\";\nimport { OperationSpec, isStreamOperation } from \"../operationSpec\";\nimport { RestError } from \"../restError\";\nimport { Mapper, MapperType } from \"../serializer\";\nimport * as utils from \"../util/utils\";\nimport { parseXML } from \"../util/xml\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\n/**\n * The content-types that will indicate that an operation response should be deserialized in a\n * particular way.\n */\nexport interface DeserializationContentTypes {\n /**\n * The content-types that indicate that an operation response should be deserialized as JSON.\n * Defaults to [ \"application/json\", \"text/json\" ].\n */\n json?: string[];\n\n /**\n * The content-types that indicate that an operation response should be deserialized as XML.\n * Defaults to [ \"application/xml\", \"application/atom+xml\" ].\n */\n xml?: string[];\n}\n\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nexport function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options);\n }\n };\n}\n\nexport const defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nexport const defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nexport class DeserializationPolicy extends BaseRequestPolicy {\n public readonly jsonContentTypes: string[];\n public readonly xmlContentTypes: string[];\n\n constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n\n this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes;\n this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes;\n }\n\n public async sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then((response: HttpOperationResponse) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response));\n }\n}\n\nfunction getOperationResponse(parsedResponse: HttpOperationResponse): undefined | OperationResponse {\n let result: OperationResponse | undefined;\n const request: WebResourceLike = parsedResponse.request;\n const operationSpec: OperationSpec | undefined = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter: undefined | ((operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse)) = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n } else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\n\nfunction shouldDeserializeResponse(parsedResponse: HttpOperationResponse): boolean {\n const shouldDeserialize: undefined | boolean | ((response: HttpOperationResponse) => boolean) = parsedResponse.request.shouldDeserialize;\n let result: boolean;\n if (shouldDeserialize === undefined) {\n result = true;\n } else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n } else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n\nexport function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise {\n return parse(jsonContentTypes, xmlContentTypes, response).then(parsedResponse => {\n const shouldDeserialize: boolean = shouldDeserializeResponse(parsedResponse);\n if (shouldDeserialize) {\n const operationSpec: OperationSpec | undefined = parsedResponse.request.operationSpec;\n if (operationSpec && operationSpec.responses) {\n const statusCode: number = parsedResponse.status;\n\n const expectedStatusCodes: string[] = Object.keys(operationSpec.responses);\n\n const hasNoExpectedStatusCodes: boolean = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n\n const responseSpec: OperationResponse | undefined = getOperationResponse(parsedResponse);\n\n const isExpectedStatusCode: boolean = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec;\n if (!isExpectedStatusCode) {\n const defaultResponseSpec: OperationResponse = operationSpec.responses.default;\n if (defaultResponseSpec) {\n const initialErrorMessage: string = isStreamOperation(operationSpec)\n ? `Unexpected status code: ${statusCode}`\n : parsedResponse.bodyAsText as string;\n\n const error = new RestError(initialErrorMessage);\n error.statusCode = statusCode;\n error.request = utils.stripRequest(parsedResponse.request);\n error.response = utils.stripResponse(parsedResponse);\n\n let parsedErrorResponse: { [key: string]: any } = parsedResponse.parsedBody;\n try {\n if (parsedErrorResponse) {\n const defaultResponseBodyMapper: Mapper | undefined = defaultResponseSpec.bodyMapper;\n if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === \"CloudError\") {\n if (parsedErrorResponse.error) {\n parsedErrorResponse = parsedErrorResponse.error;\n }\n if (parsedErrorResponse.code) {\n error.code = parsedErrorResponse.code;\n }\n if (parsedErrorResponse.message) {\n error.message = parsedErrorResponse.message;\n }\n } else {\n let internalError: any = parsedErrorResponse;\n if (parsedErrorResponse.error) {\n internalError = parsedErrorResponse.error;\n }\n\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n }\n\n if (defaultResponseBodyMapper) {\n let valueToDeserialize: any = parsedErrorResponse;\n if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof parsedErrorResponse === \"object\"\n ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName!]\n : [];\n }\n error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, \"error.body\");\n }\n }\n } catch (defaultError) {\n error.message = `Error \\\"${defaultError.message}\\\" occurred in deserializing the responseBody - \\\"${parsedResponse.bodyAsText}\\\" for the default response.`;\n }\n return Promise.reject(error);\n }\n } else if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize: any = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof valueToDeserialize === \"object\" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName!] : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\");\n } catch (error) {\n const restError = new RestError(`Error ${error} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`);\n restError.request = utils.stripRequest(parsedResponse.request);\n restError.response = utils.stripResponse(parsedResponse);\n return Promise.reject(restError);\n }\n } else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), \"operationRes.parsedHeaders\");\n }\n }\n }\n }\n return Promise.resolve(parsedResponse);\n });\n}\n\nfunction parse(jsonContentTypes: string[], xmlContentTypes: string[], operationResponse: HttpOperationResponse): Promise {\n const errorHandler = (err: Error & { code: string }) => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText);\n return Promise.reject(e);\n };\n\n if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType: string = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents: string[] = !contentType ? [] : contentType.split(\";\").map(component => component.toLowerCase());\n if (contentComponents.length === 0 || contentComponents.some(component => jsonContentTypes.indexOf(component) !== -1)) {\n return new Promise(resolve => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n } else if (contentComponents.some(component => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text)\n .then(body => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n\n return Promise.resolve(operationResponse);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { RestError } from \"../restError\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nconst DEFAULT_CLIENT_RETRY_COUNT = 3;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nconst DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nexport class ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * The client retry count.\n */\n retryCount: number;\n /**\n * The client retry interval in milliseconds.\n */\n retryInterval: number;\n /**\n * The minimum retry interval in milliseconds.\n */\n minRetryInterval: number;\n /**\n * The maximum retry interval in milliseconds.\n */\n maxRetryInterval: number;\n\n /**\n * @constructor\n * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.\n * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy.\n * @param {number} [retryCount] The client retry count.\n * @param {number} [retryInterval] The client retry interval, in milliseconds.\n * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.\n * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n function isNumber(n: any): n is number { return typeof n === \"number\"; }\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => retry(this, request, response))\n .catch(error => retry(this, request, error.response, undefined, error));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: ExponentialRetryPolicy, statusCode: number | undefined, retryData: RetryData): boolean {\n if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) {\n return false;\n }\n\n let currentCount: number;\n if (!retryData) {\n throw new Error(\"retryData for the ExponentialRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {RetryData} retryData The retry data.\n * @param {RetryError} [err] The operation\"s error, if any.\n */\nfunction updateRetryData(policy: ExponentialRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: ExponentialRetryPolicy, request: WebResourceLike, response?: HttpOperationResponse, retryData?: RetryData, requestError?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, requestError);\n const isAborted: boolean | undefined = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy, response && response.status, retryData)) {\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, undefined))\n .catch(err => retry(policy, request, response, retryData, err));\n } else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err = retryData.error ||\n new RestError(\n \"Failed to send the request.\",\n RestError.REQUEST_SEND_ERROR,\n response && response.status,\n response && response.request,\n response);\n return Promise.reject(err);\n } else {\n return Promise.resolve(response);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function generateClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\"): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n }\n };\n}\n\nexport class GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, private _requestIdHeaderName: string) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, utils.generateUuid());\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n * and \"plugins\" section in webpack.testconfig.ts.\n */\n\nimport { TelemetryInfo } from \"./userAgentPolicy\";\n\ninterface NavigatorEx extends Navigator {\n // oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2\n readonly oscpu: string;\n}\n\nexport function getDefaultUserAgentKey(): string {\n return \"x-ms-command-name\";\n}\n\nexport function getPlatformSpecificData(): TelemetryInfo[] {\n const navigator = window.navigator as NavigatorEx;\n const osInfo = {\n key: \"OS\",\n value: (navigator.oscpu || navigator.platform).replace(\" \", \"\")\n };\n\n return [osInfo];\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { getDefaultUserAgentKey, getPlatformSpecificData } from \"./msRestUserAgentPolicy\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport type TelemetryInfo = { key?: string; value?: string };\n\nfunction getRuntimeInfo(): TelemetryInfo[] {\n const msRestRuntime = {\n key: \"ms-rest-js\",\n value: Constants.msRestVersion\n };\n\n return [msRestRuntime];\n}\n\nfunction getUserAgentString(telemetryInfo: TelemetryInfo[], keySeparator = \" \", valueSeparator = \"/\"): string {\n return telemetryInfo.map(info => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n }).join(keySeparator);\n}\n\nexport const getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n\nexport function getDefaultUserAgentValue(): string {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n\nexport function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory {\n const key: string = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key;\n const value: string = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value;\n\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n }\n };\n}\n\nexport class UserAgentPolicy extends BaseRequestPolicy {\n constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike, protected headerKey: string, protected headerValue: string) {\n super(_nextPolicy, _options);\n }\n\n sendRequest(request: WebResourceLike): Promise {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n\n addUserAgentHeader(request: WebResourceLike): void {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { replaceAll } from \"./util/utils\";\n\ntype URLQueryParseState = \"ParameterName\" | \"ParameterValue\" | \"Invalid\";\n\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nexport class URLQuery {\n private readonly _rawQuery: { [queryParameterName: string]: string | string[] } = {};\n\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n public any(): boolean {\n return Object.keys(this._rawQuery).length > 0;\n }\n\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n public set(parameterName: string, parameterValue: any): void {\n if (parameterName) {\n if (parameterValue != undefined) {\n const newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n } else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n public get(parameterName: string): string | string[] | undefined {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n public toString(): string {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n } else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n\n /**\n * Parse a URLQuery from the provided text.\n */\n public static parse(text: string): URLQuery {\n const result = new URLQuery();\n\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n\n let currentState: URLQueryParseState = \"ParameterName\";\n\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter: string = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"=\":\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"Invalid\";\n break;\n\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n\n case \"Invalid\":\n if (currentCharacter === \"&\") {\n currentState = \"ParameterName\";\n }\n break;\n\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n\n return result;\n }\n}\n\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nexport class URLBuilder {\n private _scheme: string | undefined;\n private _host: string | undefined;\n private _port: string | undefined;\n private _path: string | undefined;\n private _query: URLQuery | undefined;\n\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n public setScheme(scheme: string | undefined): void {\n if (!scheme) {\n this._scheme = undefined;\n } else {\n this.set(scheme, \"SCHEME\");\n }\n }\n\n /**\n * Get the scheme that has been set in this URL.\n */\n public getScheme(): string | undefined {\n return this._scheme;\n }\n\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n public setHost(host: string | undefined): void {\n if (!host) {\n this._host = undefined;\n } else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n\n /**\n * Get the host that has been set in this URL.\n */\n public getHost(): string | undefined {\n return this._host;\n }\n\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n public setPort(port: number | string | undefined): void {\n if (port == undefined || port === \"\") {\n this._port = undefined;\n } else {\n this.set(port.toString(), \"PORT\");\n }\n }\n\n /**\n * Get the port that has been set in this URL.\n */\n public getPort(): string | undefined {\n return this._port;\n }\n\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n public setPath(path: string | undefined): void {\n if (!path) {\n this._path = undefined;\n } else {\n if (path.indexOf(\"://\") !== -1) {\n this.set(path, \"SCHEME\");\n } else {\n this.set(path, \"PATH\");\n }\n }\n }\n\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n public appendPath(path: string | undefined): void {\n if (path) {\n let currentPath: string | undefined = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n\n /**\n * Get the path that has been set in this URL.\n */\n public getPath(): string | undefined {\n return this._path;\n }\n\n /**\n * Set the query in this URL.\n */\n public setQuery(query: string | undefined): void {\n if (!query) {\n this._query = undefined;\n } else {\n this._query = URLQuery.parse(query);\n }\n }\n\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n public setQueryParameter(queryParameterName: string, queryParameterValue: any): void {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n public getQueryParameterValue(queryParameterName: string): string | string[] | undefined {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n\n /**\n * Get the query in this URL.\n */\n public getQuery(): string | undefined {\n return this._query ? this._query.toString() : undefined;\n }\n\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n private set(text: string, startState: URLTokenizerState): void {\n const tokenizer = new URLTokenizer(text, startState);\n\n while (tokenizer.next()) {\n const token: URLToken | undefined = tokenizer.current();\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n\n case \"PATH\":\n const tokenPath: string | undefined = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n\n public toString(): string {\n let result = \"\";\n\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n\n if (this._host) {\n result += this._host;\n }\n\n if (this._port) {\n result += `:${this._port}`;\n }\n\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n\n return result;\n }\n\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n public replaceAll(searchValue: string, replaceValue: string): void {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n\n public static parse(text: string): URLBuilder {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\n\ntype URLTokenizerState = \"SCHEME\" | \"SCHEME_OR_HOST\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\" | \"DONE\";\n\ntype URLTokenType = \"SCHEME\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\";\n\nexport class URLToken {\n public constructor(public readonly text: string, public readonly type: URLTokenType) {\n }\n\n public static scheme(text: string): URLToken {\n return new URLToken(text, \"SCHEME\");\n }\n\n public static host(text: string): URLToken {\n return new URLToken(text, \"HOST\");\n }\n\n public static port(text: string): URLToken {\n return new URLToken(text, \"PORT\");\n }\n\n public static path(text: string): URLToken {\n return new URLToken(text, \"PATH\");\n }\n\n public static query(text: string): URLToken {\n return new URLToken(text, \"QUERY\");\n }\n}\n\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nexport function isAlphaNumericCharacter(character: string): boolean {\n const characterCode: number = character.charCodeAt(0);\n return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */);\n}\n\n/**\n * A class that tokenizes URL strings.\n */\nexport class URLTokenizer {\n readonly _textLength: number;\n _currentState: URLTokenizerState;\n _currentIndex: number;\n _currentToken: URLToken | undefined;\n\n public constructor(readonly _text: string, state?: URLTokenizerState) {\n this._textLength = _text ? _text.length : 0;\n this._currentState = state != undefined ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n public current(): URLToken | undefined {\n return this._currentToken;\n }\n\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n public next(): boolean {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n } else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n\n case \"HOST\":\n nextHost(this);\n break;\n\n case \"PORT\":\n nextPort(this);\n break;\n\n case \"PATH\":\n nextPath(this);\n break;\n\n case \"QUERY\":\n nextQuery(this);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n\n\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer: URLTokenizer): string {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer: URLTokenizer): boolean {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer: URLTokenizer): string {\n return tokenizer._text[tokenizer._currentIndex];\n}\n\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer: URLTokenizer, step?: number): void {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer: URLTokenizer, charactersToPeek: number): string {\n let endIndex: number = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer: URLTokenizer, condition: (character: string) => boolean): string {\n let result = \"\";\n\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter: string = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n } else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n\n return result;\n}\n\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer: URLTokenizer): string {\n return readWhile(tokenizer, (character: string) => isAlphaNumericCharacter(character));\n}\n\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer: URLTokenizer, ...terminatingCharacters: string[]): string {\n return readWhile(tokenizer, (character: string) => terminatingCharacters.indexOf(character) === -1);\n}\n\nfunction nextScheme(tokenizer: URLTokenizer): void {\n const scheme: string = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"HOST\";\n }\n}\n\nfunction nextSchemeOrHost(tokenizer: URLTokenizer): void {\n const schemeOrHost: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\n\nfunction nextHost(tokenizer: URLTokenizer): void {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n\n const host: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPort(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n\n const port: string = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPath(tokenizer: URLTokenizer): void {\n const path: string = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextQuery(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n\n const query: string = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { URLBuilder } from \"../url\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function redirectPolicy(maximumRetries = 20): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n }\n };\n}\n\nexport class RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly maxRetries = 20) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => handleRedirect(this, response, 0));\n }\n}\n\nfunction handleRedirect(policy: RedirectPolicy, response: HttpOperationResponse, currentRetries: number): Promise {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (locationHeader &&\n (status === 300 || status === 307 || (status === 303 && request.method === \"POST\")) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)) {\n\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n }\n\n return policy._nextPolicy.sendRequest(request)\n .then(res => handleRedirect(policy, res, currentRetries + 1));\n }\n\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function rpRegistrationPolicy(retryTimeout = 30): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n }\n };\n}\n\nexport class RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly _retryTimeout = 30) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => registerIfNeeded(this, request, response));\n }\n}\n\n\nfunction registerIfNeeded(policy: RPRegistrationPolicy, request: WebResourceLike, response: HttpOperationResponse): Promise {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText as string);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then(registrationStatus => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n });\n }\n }\n\n return Promise.resolve(response);\n}\n\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param {WebResourceLike} originalRequest The original request\n * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false.\n * @returns {object} A new request object with desired headers.\n */\nfunction getRequestEssentials(originalRequest: WebResourceLike, reuseUrlToo = false): WebResourceLike {\n const reqOptions: WebResourceLike = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n\n return reqOptions;\n}\n\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param {string} body The response body received after making the original request.\n * @returns {string} The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body: string): string {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n } catch (err) {\n // do nothing;\n }\n if (responseBody && responseBody.error && responseBody.error.message &&\n responseBody.error.code && responseBody.error.code === \"MissingSubscriptionRegistration\") {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} url The original request url\n * @returns {string} The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url: string): string {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//ig);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n } else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n\n/**\n * Registers the given provider.\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} provider The provider name to be registered.\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @param {registrationCallback} callback The callback that handles the RP registration\n */\nfunction registerRP(policy: RPRegistrationPolicy, urlPrefix: string, provider: string, originalRequest: WebResourceLike): Promise {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n\n return policy._nextPolicy.sendRequest(reqOptions)\n .then(response => {\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n });\n}\n\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} url The request url for polling\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns {Promise} True if RP Registration is successful.\n */\nfunction getRegistrationStatus(policy: RPRegistrationPolicy, url: string, originalRequest: WebResourceLike): Promise {\n const reqOptions: any = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n\n return policy._nextPolicy.sendRequest(reqOptions).then(res => {\n const obj = (res.parsedBody as any);\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n } else {\n return utils.delay(policy._retryTimeout * 1000).then(() => getRegistrationStatus(policy, url, originalRequest));\n }\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"../credentials/serviceClientCredentials\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n }\n };\n}\n\nexport class SigningPolicy extends BaseRequestPolicy {\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, public authenticationProvider: ServiceClientCredentials) {\n super(nextPolicy, options);\n }\n\n signRequest(request: WebResourceLike): Promise {\n return this.authenticationProvider.signRequest(request);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this.signRequest(request).then(nextRequest => this._nextPolicy.sendRequest(nextRequest));\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n *\n * @constructor\n * @param {number} retryCount The client retry count.\n * @param {number} retryInterval The client retry interval, in milliseconds.\n * @param {number} minRetryInterval The minimum retry interval, in milliseconds.\n * @param {number} maxRetryInterval The maximum retry interval, in milliseconds.\n */\nexport class SystemErrorRetryPolicy extends BaseRequestPolicy {\n retryCount: number;\n retryInterval: number;\n minRetryInterval: number;\n maxRetryInterval: number;\n DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\n DEFAULT_CLIENT_RETRY_COUNT = 3;\n DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\n DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n this.retryCount = typeof retryCount === \"number\" ? retryCount : this.DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = typeof retryInterval === \"number\" ? retryInterval : this.DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = typeof minRetryInterval === \"number\" ? minRetryInterval : this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = typeof maxRetryInterval === \"number\" ? maxRetryInterval : this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone()).then(response => retry(this, request, response));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: SystemErrorRetryPolicy, retryData: RetryData): boolean {\n let currentCount;\n if (!retryData) {\n throw new Error(\"retryData for the SystemErrorRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {RetryData} retryData The retry data.\n * @param {object} err The operation\"s error, if any.\n */\nfunction updateRetryData(policy: SystemErrorRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: SystemErrorRetryPolicy, request: WebResourceLike, operationResponse: HttpOperationResponse, retryData?: RetryData, err?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, err);\n if (err && err.code && shouldRetry(policy, retryData) &&\n (err.code === \"ETIMEDOUT\" || err.code === \"ESOCKETTIMEDOUT\" || err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" || err.code === \"ENOENT\")) {\n // If previous operation ended with an error and the policy allows a retry, do that\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, err))\n .catch(err => retry(policy, request, operationResponse, retryData, err));\n } else {\n if (err != undefined) {\n // If the operation failed in the end, return all errors instead of just the last one\n err = retryData.error;\n return Promise.reject(err);\n }\n return Promise.resolve(operationResponse);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport enum QueryCollectionFormat {\n Csv = \",\",\n Ssv = \" \",\n Tsv = \"\\t\",\n Pipes = \"|\",\n Multi = \"Multi\",\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { AgentSettings } from \"../serviceClient\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nconst agentNotSupportedInBrowser = new Error(\"AgentPolicy is not supported in browser environment\");\n\nexport function agentPolicy(_agentSettings?: AgentSettings): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => {\n throw agentNotSupportedInBrowser;\n }\n };\n}\n\nexport class AgentPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n throw agentNotSupportedInBrowser;\n }\n\n public sendRequest(_request: WebResourceLike): Promise {\n throw agentNotSupportedInBrowser;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ProxySettings } from \"../serviceClient\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nconst proxyNotSupportedInBrowser = new Error(\"ProxyPolicy is not supported in browser environment\");\n\nexport function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined {\n return undefined;\n}\n\nexport function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory {\n return {\n create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => {\n throw proxyNotSupportedInBrowser;\n }\n };\n}\n\nexport class ProxyPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n throw proxyNotSupportedInBrowser;\n }\n\n public sendRequest(_request: WebResourceLike): Promise {\n throw proxyNotSupportedInBrowser;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { delay } from \"../util/utils\";\n\ntype ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise;\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n\nexport function throttlingRetryPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nexport class ThrottlingRetryPolicy extends BaseRequestPolicy {\n private _handleResponse: ResponseHandler;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _handleResponse?: ResponseHandler) {\n super(nextPolicy, options);\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n\n public async sendRequest(httpRequest: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(httpRequest.clone()).then(response => {\n if (response.status !== StatusCodes.TooManyRequests) {\n return response;\n } else {\n return this._handleResponse(httpRequest, response);\n }\n });\n }\n\n private async _defaultResponseHandler(httpRequest: WebResourceLike, httpResponse: HttpOperationResponse): Promise {\n const retryAfterHeader: string | undefined = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);\n\n if (retryAfterHeader) {\n const delayInMs: number | undefined = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);\n if (delayInMs) {\n return delay(delayInMs).then((_: any) => this._nextPolicy.sendRequest(httpRequest));\n }\n }\n\n return httpResponse;\n }\n\n public static parseRetryAfterHeader(headerValue: string): number | undefined {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n } else {\n return retryAfterInSeconds * 1000;\n }\n }\n\n public static parseDateRetryAfterHeader(headerValue: string): number | undefined {\n try {\n const now: number = Date.now();\n const date: number = Date.parse(headerValue);\n const diff = date - now;\n\n return Number.isNaN(diff) ? undefined : diff;\n } catch (error) {\n return undefined;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"./credentials/serviceClientCredentials\";\nimport { DefaultHttpClient } from \"./defaultHttpClient\";\nimport { HttpClient } from \"./httpClient\";\nimport { HttpOperationResponse, RestResponse } from \"./httpOperationResponse\";\nimport { HttpPipelineLogger } from \"./httpPipelineLogger\";\nimport { OperationArguments } from \"./operationArguments\";\nimport { getPathStringFromParameter, getPathStringFromParameterPath, OperationParameter, ParameterPath } from \"./operationParameter\";\nimport { isStreamOperation, OperationSpec } from \"./operationSpec\";\nimport { deserializationPolicy, DeserializationContentTypes } from \"./policies/deserializationPolicy\";\nimport { exponentialRetryPolicy } from \"./policies/exponentialRetryPolicy\";\nimport { generateClientRequestIdPolicy } from \"./policies/generateClientRequestIdPolicy\";\nimport { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from \"./policies/userAgentPolicy\";\nimport { redirectPolicy } from \"./policies/redirectPolicy\";\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from \"./policies/requestPolicy\";\nimport { rpRegistrationPolicy } from \"./policies/rpRegistrationPolicy\";\nimport { signingPolicy } from \"./policies/signingPolicy\";\nimport { systemErrorRetryPolicy } from \"./policies/systemErrorRetryPolicy\";\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { CompositeMapper, DictionaryMapper, Mapper, MapperType, Serializer } from \"./serializer\";\nimport { URLBuilder } from \"./url\";\nimport * as utils from \"./util/utils\";\nimport { stringifyXML } from \"./util/xml\";\nimport { RequestOptionsBase, RequestPrepareOptions, WebResourceLike, isWebResourceLike, WebResource } from \"./webResource\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { ServiceCallback } from \"./util/utils\";\nimport { agentPolicy } from \"./policies/agentPolicy\";\nimport { proxyPolicy, getDefaultProxySettings } from \"./policies/proxyPolicy\";\nimport { throttlingRetryPolicy } from \"./policies/throttlingRetryPolicy\";\nimport { Agent } from \"http\";\n\n\n/**\n * HTTP proxy settings (Node.js only)\n */\nexport interface ProxySettings {\n host: string;\n port: number;\n username?: string;\n password?: string;\n}\n\n/**\n * HTTP and HTTPS agents (Node.js only)\n */\nexport interface AgentSettings {\n http: Agent;\n https: Agent;\n}\n\n/**\n * Options to be provided while creating the client.\n */\nexport interface ServiceClientOptions {\n /**\n * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP\n * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns\n * the requestPolicyFactories that will be used.\n */\n requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => (void | RequestPolicyFactory[]));\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline.\n */\n httpPipelineLogger?: HttpPipelineLogger;\n /**\n * If set to true, turn off the default retry policy.\n */\n noRetryPolicy?: boolean;\n /**\n * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30.\n */\n rpRegistrationRetryTimeout?: number;\n /**\n * Whether or not to generate a client request ID header for each HTTP request.\n */\n generateClientRequestIdHeader?: boolean;\n /**\n * Whether to include credentials in CORS requests in the browser.\n * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information.\n */\n withCredentials?: boolean;\n /**\n * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a\n * header to all outgoing requests with this header name and a random UUID as the request ID.\n */\n clientRequestIdHeaderName?: string;\n /**\n * The content-types that will be associated with JSON or XML serialization.\n */\n deserializationContentTypes?: DeserializationContentTypes;\n /**\n * The header name to use for the telemetry header while sending the request. If this is not\n * specified, then \"User-Agent\" will be used when running on Node.js and \"x-ms-command-name\" will\n * be used when running in a browser.\n */\n userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string);\n /**\n * The string to be set to the telemetry header while sending the request, or a function that\n * takes in the default user-agent string and returns the user-agent string that will be used.\n */\n userAgent?: string | ((defaultUserAgent: string) => string);\n /**\n * Proxy settings which will be used for every HTTP request (Node.js only).\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only).\n */\n agentSettings?: AgentSettings;\n}\n\n/**\n * @class\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n /**\n * If specified, this is the base URI that requests will be made against for this ServiceClient.\n * If it is not specified, then all OperationSpecs must contain a baseUrl property.\n */\n protected baseUri?: string;\n\n /**\n * The default request content type for the service.\n * Used if no requestContentType is present on an OperationSpec.\n */\n protected requestContentType?: string;\n\n\n /**\n * The HTTP client that will be used to send requests.\n */\n private readonly _httpClient: HttpClient;\n private readonly _requestPolicyOptions: RequestPolicyOptionsLike;\n\n private readonly _requestPolicyFactories: RequestPolicyFactory[];\n private readonly _withCredentials: boolean;\n\n /**\n * The ServiceClient constructor\n * @constructor\n * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication.\n * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client.\n */\n constructor(credentials?: ServiceClientCredentials, options?: ServiceClientOptions) {\n if (!options) {\n options = {};\n }\n\n if (credentials && !credentials.signRequest) {\n throw new Error(\"credentials argument needs to implement signRequest method\");\n }\n\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || new DefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n\n let requestPolicyFactories: RequestPolicyFactory[];\n if (Array.isArray(options.requestPolicyFactories)) {\n requestPolicyFactories = options.requestPolicyFactories;\n } else {\n requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options);\n if (options.requestPolicyFactories) {\n const newRequestPolicyFactories: void | RequestPolicyFactory[] = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n\n let httpRequest: WebResourceLike;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n } else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n } catch (error) {\n return Promise.reject(error);\n }\n\n let httpPipeline: RequestPolicy = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions);\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from.\n * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest.\n * @param {ServiceCallback} callback The callback to call when the response is received.\n */\n sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise {\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n\n const httpRequest = new WebResource();\n\n let result: Promise;\n try {\n const baseUri: string | undefined = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\");\n }\n\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n\n const requestUrl: URLBuilder = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue: string = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter));\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue);\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue: any = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer);\n if (queryParameterValue != undefined) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter));\n if (queryParameter.collectionFormat != undefined) {\n if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n queryParameterValue = \"\";\n } else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] = item == undefined ? \"\" : item.toString();\n }\n }\n } else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || queryParameter.collectionFormat === QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== QueryCollectionFormat.Multi && queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue: any = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer);\n if (headerValue != undefined) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter));\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n\n const options: RequestOptionsBase | undefined = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n }\n\n httpRequest.withCredentials = this._withCredentials;\n\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n\n if (httpRequest.streamResponseBody == undefined) {\n httpRequest.streamResponseBody = isStreamOperation(operationSpec);\n }\n\n result = this.sendRequest(httpRequest)\n .then(res => flattenResponse(res, operationSpec.responses[res.status]));\n } catch (error) {\n result = Promise.reject(error);\n }\n\n const cb = callback;\n if (cb) {\n result\n // tslint:disable-next-line:no-null-keyword\n .then(res => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch(err => cb(err));\n }\n\n return result;\n }\n}\n\nexport function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void {\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer);\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, xmlName, xmlElementName, serializedName } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if (httpRequest.body != undefined || required) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(operationSpec.requestBody);\n httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString);\n const isStream = typeName === MapperType.Stream;\n if (operationSpec.isXML) {\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(utils.prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName!), { rootName: xmlName || serializedName });\n }\n else if (!isStream) {\n httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName });\n }\n } else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n } catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue: any = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer);\n if (formDataParameterValue != undefined) {\n const formDataParameterPropertyName: string = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter));\n }\n }\n }\n}\n\nfunction isRequestPolicyFactory(instance: any): instance is RequestPolicyFactory {\n return typeof instance.create === \"function\";\n}\n\nfunction getValueOrFunctionResult(value: undefined | string | ((defaultValue: string) => string), defaultValueCreator: (() => string)): string {\n let result: string;\n if (typeof value === \"string\") {\n result = value;\n } else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\n\nfunction createDefaultRequestPolicyFactories(credentials: ServiceClientCredentials | RequestPolicyFactory | undefined, options: ServiceClientOptions): RequestPolicyFactory[] {\n const factories: RequestPolicyFactory[] = [];\n\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n\n if (credentials) {\n if (isRequestPolicyFactory(credentials)) {\n factories.push(credentials);\n } else {\n factories.push(signingPolicy(credentials));\n }\n }\n\n const userAgentHeaderName: string = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName);\n const userAgentHeaderValue: string = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue);\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n\n const proxySettings = options.proxySettings || getDefaultProxySettings();\n if (proxySettings) {\n factories.push(proxyPolicy(proxySettings));\n }\n\n if (options.agentSettings) {\n factories.push(agentPolicy(options.agentSettings));\n }\n\n return factories;\n}\n\nexport type PropertyParent = { [propertyName: string]: any };\n\n/**\n * Get the property parent for the property at the provided path when starting with the provided\n * parent object.\n */\nexport function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent {\n if (parent && propertyPath) {\n const propertyPathLength: number = propertyPath.length;\n for (let i = 0; i < propertyPathLength - 1; ++i) {\n const propertyName: string = propertyPath[i];\n if (!parent[propertyName]) {\n parent[propertyName] = {};\n }\n parent = parent[propertyName];\n }\n }\n return parent;\n}\n\nfunction getOperationArgumentValueFromParameter(serviceClient: ServiceClient, operationArguments: OperationArguments, parameter: OperationParameter, serializer: Serializer): any {\n return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer);\n}\n\nexport function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any {\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult: PropertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue = parameterMapper.required || (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n\n // Serialize just for validation purposes.\n const parameterPathString: string = getPathStringFromParameterPath(parameterPath, parameterMapper);\n serializer.serialize(parameterMapper, value, parameterPathString);\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![propertyName];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer);\n // Serialize just for validation purposes.\n const propertyPathString: string = getPathStringFromParameterPath(propertyPath, propertyMapper);\n serializer.serialize(propertyMapper, propertyValue, propertyPathString);\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(parent: { [parameterName: string]: any }, parameterPath: string[]): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent != undefined && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nexport function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n\n const addOperationResponse = (obj: {}) =>\n Object.defineProperty(obj, \"_response\", {\n value: _response\n });\n\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse({\n ...parsedHeaders,\n blobBody: _response.blobBody,\n readableStreamBody: _response.readableStreamBody\n });\n }\n\n const modelProperties = typeName === \"Composite\" && (bodyMapper as CompositeMapper).type.modelProperties || {};\n const isPageableResponse = Object.keys(modelProperties).some(k => modelProperties[k].serializedName === \"\");\n if (typeName === \"Sequence\" || isPageableResponse) {\n // We're expecting a sequece(array) make sure that the response body is in the\n // correct format, if not make it an empty array []\n const parsedBody =\n Array.isArray(_response.parsedBody)\n ? _response.parsedBody\n : [];\n const arrayResponse = [...parsedBody] as RestResponse & any[];\n\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n }\n }\n\n if (bodyMapper || _response.request.method === \"HEAD\" || utils.isPrimitiveType(_response.parsedBody)) {\n // primitive body types and HEAD booleans\n return addOperationResponse({\n ...parsedHeaders,\n body: _response.parsedBody\n });\n }\n\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function logPolicy(logger: any = console.log): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new LogPolicy(nextPolicy, options, logger);\n }\n };\n}\n\nexport class LogPolicy extends BaseRequestPolicy {\n logger?: any;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger: any = console.log) {\n super(nextPolicy, options);\n this.logger = logger;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => logResponse(this, response));\n }\n}\n\nfunction logResponse(policy: LogPolicy, response: HttpOperationResponse): Promise {\n policy.logger(`>> Request: ${JSON.stringify(response.request, undefined, 2)}`);\n policy.logger(`>> Response status code: ${response.status}`);\n const responseBody = response.bodyAsText;\n policy.logger(`>> Body: ${responseBody}`);\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Bearer\";\n\n/**\n * A credentials object that uses a token string and a authorzation scheme to authenticate.\n */\nexport class TokenCredentials implements ServiceClientCredentials {\n token: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new TokenCredentials object.\n *\n * @constructor\n * @param {string} token The token.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(token: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (!token) {\n throw new Error(\"token cannot be null or undefined.\");\n }\n this.token = token;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @return {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport * as base64 from \"../util/base64\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n\nexport class BasicAuthenticationCredentials implements ServiceClientCredentials {\n userName: string;\n password: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @constructor\n * @param {string} userName User name.\n * @param {string} password Password.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(userName: string, password: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${base64.encodeString(credentials)}`;\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\n/**\n * @interface ApiKeyCredentialOptions\n * Describes the options to be provided while creating an instance of ApiKeyCredentials\n */\nexport interface ApiKeyCredentialOptions {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n inQuery?: { [x: string]: any };\n}\n\n/**\n * Authenticates to a service using an API key.\n */\nexport class ApiKeyCredentials implements ServiceClientCredentials {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n private readonly inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n private readonly inQuery?: { [x: string]: any };\n\n /**\n * @constructor\n * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options: ApiKeyCredentialOptions) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(`options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`);\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param {WebResource} webResource The WebResource to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike): Promise {\n if (!webResource) {\n return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type \"object\".`));\n }\n\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n\n return Promise.resolve(webResource);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @constructor\n * @param {string} topicKey The EventGrid topic key\n */\n constructor(topicKey: string) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": topicKey\n }\n };\n super(options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class DomainCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid DomainCredentials object.\n *\n * @constructor\n * @param {string} domainKey The EventGrid domain key\n */\n constructor(domainKey: string) {\n if (!domainKey || (domainKey && typeof domainKey !== \"string\")) {\n throw new Error(\"domainKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": domainKey\n }\n };\n super(options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/dist/msRest.node.js b/node_modules/@azure/ms-rest-js/dist/msRest.node.js new file mode 100644 index 000000000..76ef0299c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/dist/msRest.node.js @@ -0,0 +1,5070 @@ +/** @license ms-rest-js + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var uuidv4 = _interopDefault(require('uuid/v4')); +var tslib = require('tslib'); +var tough = require('tough-cookie'); +var http = require('http'); +var https = require('https'); +require('node-fetch'); +var FormData = _interopDefault(require('form-data')); +var stream = require('stream'); +var tunnel = require('tunnel'); +var xml2js = require('xml2js'); +var os = require('os'); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName) { + return headerName.toLowerCase(); +} +function isHttpHeadersLike(object) { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function") { + return true; + } + return false; +} +/** + * A collection of HTTP header key/value pairs. + */ +var HttpHeaders = /** @class */ (function () { + function HttpHeaders(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (var headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + HttpHeaders.prototype.set = function (headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() }; + }; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + HttpHeaders.prototype.get = function (headerName) { + var header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + }; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + HttpHeaders.prototype.contains = function (headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + }; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + HttpHeaders.prototype.remove = function (headerName) { + var result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + }; + /** + * Get the headers that are contained this collection as an object. + */ + HttpHeaders.prototype.rawHeaders = function () { + var result = {}; + for (var headerKey in this._headersMap) { + var header = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + }; + /** + * Get the headers that are contained in this collection as an array. + */ + HttpHeaders.prototype.headersArray = function () { + var headers = []; + for (var headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerNames = function () { + var headerNames = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerValues = function () { + var headerValues = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + }; + /** + * Get the JSON object representation of this HTTP header collection. + */ + HttpHeaders.prototype.toJson = function () { + return this.rawHeaders(); + }; + /** + * Get the string representation of this HTTP header collection. + */ + HttpHeaders.prototype.toString = function () { + return JSON.stringify(this.toJson()); + }; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + HttpHeaders.prototype.clone = function () { + return new HttpHeaders(this.rawHeaders()); + }; + return HttpHeaders; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +function encodeString(value) { + return Buffer.from(value).toString("base64"); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +function encodeByteArray(value) { + // Buffer.from accepts | -- the TypeScript definition is off here + // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length + var bufferValue = (value instanceof Buffer) ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +function decodeString(value) { + return Buffer.from(value, "base64"); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +var Constants = { + /** + * The ms-rest version + * @const + * @type {string} + */ + msRestVersion: "2.1.0", + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + StatusCodes: { + TooManyRequests: 429 + } + }, + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + AUTHORIZATION_SCHEME: "Bearer", + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } +}; + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +var isNode = (typeof process !== "undefined") && !!process.version && !!process.versions && !!process.versions.node; +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +function encodeUri(uri) { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); +} +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +function stripResponse(response) { + var strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; +} +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResource} request The Http Request object + * + * @return {WebResource} The stripped version of Http Request. + */ +function stripRequest(request) { + var strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; +} +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +function isValidUuid(uuid) { + var validUuidRegex = new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "ig"); + return validUuidRegex.test(uuid); +} +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +function generateUuid() { + return uuidv4(); +} +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +function executePromisesSequentially(promiseFactories, kickstart) { + var result = Promise.resolve(kickstart); + promiseFactories.forEach(function (promiseFactory) { + result = result.then(promiseFactory); + }); + return result; +} +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +function delay(t, value) { + return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); }); +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +function promiseToCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + cb(undefined, data); + }, function (err) { + cb(err); + }); + }; +} +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +function promiseToServiceCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + process.nextTick(cb, undefined, data.parsedBody, data.request, data); + }, function (err) { + process.nextTick(cb, err); + }); + }; +} +function prepareXMLRootList(obj, elementName) { + var _a; + if (!Array.isArray(obj)) { + obj = [obj]; + } + return _a = {}, _a[elementName] = obj, _a; +} +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +function applyMixins(targetCtor, sourceCtors) { + sourceCtors.forEach(function (sourceCtors) { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(function (name) { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); +} +var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +function isDuration(value) { + return validateISODuration.test(value); +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +/** + * Determines whether the given enity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param value Any entity + * @return boolean - true is it is primitive type, false otherwise. + */ +function isPrimitiveType(value) { + return (typeof value !== "object" && typeof value !== "function") || value === null; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var Serializer = /** @class */ (function () { + function Serializer(modelMappers, isXML) { + if (modelMappers === void 0) { modelMappers = {}; } + this.modelMappers = modelMappers; + this.isXML = isXML; + } + Serializer.prototype.validateConstraints = function (mapper, value, objectName) { + var failValidation = function (constraintName, constraintValue) { + throw new Error("\"" + objectName + "\" with value \"" + value + "\" should satisfy the constraint \"" + constraintName + "\": " + constraintValue + "."); + }; + if (mapper.constraints && (value != undefined)) { + var _a = mapper.constraints, ExclusiveMaximum = _a.ExclusiveMaximum, ExclusiveMinimum = _a.ExclusiveMinimum, InclusiveMaximum = _a.InclusiveMaximum, InclusiveMinimum = _a.InclusiveMinimum, MaxItems = _a.MaxItems, MaxLength = _a.MaxLength, MinItems = _a.MinItems, MinLength = _a.MinLength, MultipleOf = _a.MultipleOf, Pattern = _a.Pattern, UniqueItems = _a.UniqueItems; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + var pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if ((typeof value !== "string") || (value.match(pattern) === null)) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && value.some(function (item, i, ar) { return ar.indexOf(item) !== i; })) { + failValidation("UniqueItems", UniqueItems); + } + } + }; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + Serializer.prototype.serialize = function (mapper, object, objectName) { + var payload = {}; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/ig) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + var required = mapper.required, nullable = mapper.nullable; + if (required && nullable && object === undefined) { + throw new Error(objectName + " cannot be undefined."); + } + if (required && !nullable && object == undefined) { + throw new Error(objectName + " cannot be null or undefined."); + } + if (!required && nullable === false && object === null) { + throw new Error(objectName + " cannot be null."); + } + if (object == undefined) { + payload = object; + } + else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/ig) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/ig) !== null) { + var enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Composite$/ig) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName); + } + } + return payload; + }; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + Serializer.prototype.deserialize = function (mapper, responseBody, objectName) { + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + var payload; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/ig) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName); + } + else { + if (this.isXML) { + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$") and body ("_") properties, then just reduce the responseBody value to + * the body ("_") property. + */ + if (responseBody["$"] != undefined && responseBody["_"] != undefined) { + responseBody = responseBody["_"]; + } + } + if (mapperType.match(/^Number$/ig) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/ig) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/ig) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + }; + return Serializer; +}()); +function trimEnd(str, ch) { + var len = str.length; + while ((len - 1) >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error("Please provide an input of type Uint8Array for converting to Base64Url."); + } + // Uint8Array to Base64. + var str = encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); +} +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/\-/g, "+").replace(/\_/g, "/"); + // Base64 to Uint8Array. + return decodeString(str); +} +function splitSerializeName(prop) { + var classes = []; + var partialclass = ""; + if (prop) { + var subwords = prop.split("."); + for (var _i = 0, subwords_1 = subwords; _i < subwords_1.length; _i++) { + var item = subwords_1[_i]; + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; +} +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); +} +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/ig) !== null) { + if (typeof value !== "number") { + throw new Error(objectName + " with value " + value + " must be of type number."); + } + } + else if (typeName.match(/^String$/ig) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(objectName + " with value \"" + value + "\" must be of type string."); + } + } + else if (typeName.match(/^Uuid$/ig) !== null) { + if (!(typeof value.valueOf() === "string" && isValidUuid(value))) { + throw new Error(objectName + " with value \"" + value + "\" must be of type string and a valid uuid."); + } + } + else if (typeName.match(/^Boolean$/ig) !== null) { + if (typeof value !== "boolean") { + throw new Error(objectName + " with value " + value + " must be of type boolean."); + } + } + else if (typeName.match(/^Stream$/ig) !== null) { + var objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !(typeof Blob === "function" && value instanceof Blob)) { + throw new Error(objectName + " must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."); + } + } + } + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error("Please provide a set of allowedValues to validate " + objectName + " as an Enum Type."); + } + var isPresent = allowedValues.some(function (item) { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(value + " is not a valid value for " + objectName + ". The valid values are: " + JSON.stringify(allowedValues) + "."); + } + return value; +} +function serializeByteArrayType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = encodeByteArray(value); + } + return value; +} +function serializeBase64UrlType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = bufferToBase64Url(value); + } + return value; +} +function serializeDateTypes(typeName, value, objectName) { + if (value != undefined) { + if (typeName.match(/^Date$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123 format."); + } + value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123/ISO8601 format " + + "for it to be serialized in UnixTime/Epoch format."); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/ig) !== null) { + if (!isDuration(value)) { + throw new Error(objectName + " must be a string in ISO 8601 format. Instead was \"" + value + "\"."); + } + value = value; + } + } + return value; +} +function serializeSequenceType(serializer, mapper, object, objectName) { + if (!Array.isArray(object)) { + throw new Error(objectName + " must be of type Array."); + } + var elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempArray = []; + for (var i = 0; i < object.length; i++) { + tempArray[i] = serializer.serialize(elementType, object[i], objectName); + } + return tempArray; +} +function serializeDictionaryType(serializer, mapper, object, objectName) { + if (typeof object !== "object") { + throw new Error(objectName + " must be of type object."); + } + var valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + "." + key); + } + return tempDictionary; +} +/** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ +function resolveModelProperties(serializer, mapper, objectName) { + var modelProps = mapper.type.modelProperties; + if (!modelProps) { + var className = mapper.type.className; + if (!className) { + throw new Error("Class name for model \"" + objectName + "\" is not provided in the mapper \"" + JSON.stringify(mapper, undefined, 2) + "\"."); + } + var modelMapper = serializer.modelMappers[className]; + if (!modelMapper) { + throw new Error("mapper() cannot be null or undefined for model \"" + className + "\"."); + } + modelProps = modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error("modelProperties cannot be null or undefined in the " + + ("mapper \"" + JSON.stringify(modelMapper) + "\" of type \"" + className + "\" for object \"" + objectName + "\".")); + } + } + return modelProps; +} +function serializeCompositeType(serializer, mapper, object, objectName) { + var _a; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object != undefined) { + var payload = {}; + var modelProps = resolveModelProperties(serializer, mapper, objectName); + for (var _i = 0, _b = Object.keys(modelProps); _i < _b.length; _i++) { + var key = _b[_i]; + var propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + var propName = void 0; + var parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + var paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (var _c = 0, paths_1 = paths; _c < paths_1.length; _c++) { + var pathName = paths_1[_c]; + var childObject = parentObject[pathName]; + if ((childObject == undefined) && (object[key] != undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject != undefined) { + var propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + var toSerialize = object[key]; + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + var serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName); + if (serializedValue !== undefined && propName != undefined) { + if (propertyMapper.xmlIsAttribute) { + // $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject.$ = parentObject.$ || {}; + parentObject.$[propName] = serializedValue; + } + else if (propertyMapper.xmlIsWrapped) { + parentObject[propName] = (_a = {}, _a[propertyMapper.xmlElementName] = serializedValue, _a); + } + else { + parentObject[propName] = serializedValue; + } + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var propNames = Object.keys(modelProps); + var _loop_1 = function (clientPropName) { + var isAdditionalProperty = propNames.every(function (pn) { return pn !== clientPropName; }); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]'); + } + }; + for (var clientPropName in object) { + _loop_1(clientPropName); + } + } + return payload; + } + return object; +} +function isSpecialXmlProperty(propertyName) { + return ["$", "_"].includes(propertyName); +} +function deserializeCompositeType(serializer, mapper, responseBody, objectName) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + var modelProps = resolveModelProperties(serializer, mapper, objectName); + var instance = {}; + var handledPropertyNames = []; + for (var _i = 0, _a = Object.keys(modelProps); _i < _a.length; _i++) { + var key = _a[_i]; + var propertyMapper = modelProps[key]; + var paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + var serializedName = propertyMapper.serializedName, xmlName = propertyMapper.xmlName, xmlElementName = propertyMapper.xmlElementName; + var propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + var headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + var dictionary = {}; + for (var _b = 0, _c = Object.keys(responseBody); _b < _c.length; _b++) { + var headerKey = _c[_b]; + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody.$) { + instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName], propertyObjectName); + } + else { + var propertyName = xmlElementName || xmlName || serializedName; + var unwrappedProperty = responseBody[propertyName]; + if (propertyMapper.xmlIsWrapped) { + unwrappedProperty = responseBody[xmlName]; + unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName]; + var isEmptyWrappedList = unwrappedProperty === undefined; + if (isEmptyWrappedList) { + unwrappedProperty = []; + } + } + instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName); + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + var propertyInstance = void 0; + var res = responseBody; + // traversing the object step by step. + for (var _d = 0, paths_2 = paths; _d < paths_2.length; _d++) { + var item = paths_2[_d]; + if (!res) + break; + res = res[item]; + } + propertyInstance = res; + var polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + var serializedValue = void 0; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + instance[key] = serializedValue; + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var isAdditionalProperty = function (responsePropName) { + for (var clientPropName in modelProps) { + var paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (var responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]'); + } + } + } + else if (responseBody) { + for (var _e = 0, _f = Object.keys(responseBody); _e < _f.length; _e++) { + var key = _f[_e]; + if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) { + instance[key] = responseBody[key]; + } + } + } + return instance; +} +function deserializeDictionaryType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(responseBody); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName); + } + return tempDictionary; + } + return responseBody; +} +function deserializeSequenceType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + var tempArray = []; + for (var i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], objectName + "[" + i + "]"); + } + return tempArray; + } + return responseBody; +} +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + var discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + var discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + var typeName = mapper.type.uberParent || mapper.type.className; + var indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + var polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return mapper.type.polymorphicDiscriminator + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +// TODO: why is this here? +function serializeObject(toSerialize) { + if (toSerialize == undefined) + return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + var array = []; + for (var i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } + else if (typeof toSerialize === "object") { + var dictionary = {}; + for (var property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; +} +/** + * Utility function to create a K:V from a list of strings + */ +function strEnum(o) { + var result = {}; + for (var _i = 0, o_1 = o; _i < o_1.length; _i++) { + var key = o_1[_i]; + result[key] = key; + } + return result; +} +var MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" +]); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function isWebResourceLike(object) { + if (typeof object !== "object") { + return false; + } + if (typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function") { + return true; + } + return false; +} +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +var WebResource = /** @class */ (function () { + function WebResource(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, agentSettings) { + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers)); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.agentSettings = agentSettings; + } + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + WebResource.prototype.validateRequestProperties = function () { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + }; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + WebResource.prototype.prepare = function (options) { + if (!options) { + throw new Error("options object is required"); + } + if (options.method == undefined || typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && (options.url == undefined || typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error("options.url must be of type \"string\"."); + } + this.url = options.url; + } + // set the method + if (options.method) { + var validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error("The provided method \"" + options.method + "\" is invalid. Supported HTTP methods are: " + JSON.stringify(validMethods)); + } + } + this.method = options.method.toUpperCase(); + // construct the url if path template is provided + if (options.pathTemplate) { + var pathTemplate_1 = options.pathTemplate, pathParameters_1 = options.pathParameters; + if (typeof pathTemplate_1 !== "string") { + throw new Error("options.pathTemplate must be of type \"string\"."); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + var baseUrl = options.baseUrl; + var url_1 = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + (pathTemplate_1.startsWith("/") ? pathTemplate_1.slice(1) : pathTemplate_1); + var segments = url_1.match(/({\w*\s*\w*})/ig); + if (segments && segments.length) { + if (!pathParameters_1) { + throw new Error("pathTemplate: " + pathTemplate_1 + " has been provided. Hence, options.pathParameters must also be provided."); + } + segments.forEach(function (item) { + var pathParamName = item.slice(1, -1); + var pathParam = pathParameters_1[pathParamName]; + if (pathParam === null || pathParam === undefined || !(typeof pathParam === "string" || typeof pathParam === "object")) { + throw new Error("pathTemplate: " + pathTemplate_1 + " contains the path parameter " + pathParamName + + (" however, it is not present in " + pathParameters_1 + " - " + JSON.stringify(pathParameters_1, undefined, 2) + ".") + + ("The value of the path parameter can either be a \"string\" of the form { " + pathParamName + ": \"some sample value\" } or ") + + ("it can be an \"object\" of the form { \"" + pathParamName + "\": { value: \"some sample value\", skipUrlEncoding: true } }.")); + } + if (typeof pathParam.valueOf() === "string") { + url_1 = url_1.replace(item, encodeURIComponent(pathParam)); + } + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error("options.pathParameters[" + pathParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (pathParam.skipUrlEncoding) { + url_1 = url_1.replace(item, pathParam.value); + } + else { + url_1 = url_1.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url_1; + } + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + var queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error("options.queryParameters must be of type object. It should be a JSON object " + + "of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. " + + "The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }."); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + var queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (var queryParamName in queryParameters) { + var queryParam = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error("options.queryParameters[" + queryParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } + else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + } // end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + // add headers to the request if they are provided + if (options.headers) { + var headers = options.headers; + for (var _i = 0, _a = Object.keys(options.headers); _i < _a.length; _i++) { + var headerName = _a[_i]; + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", generateUuid()); + } + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body != undefined) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } + else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + return this; + }; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + WebResource.prototype.clone = function () { + var result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.agentSettings); + if (this.formData) { + result.formData = this.formData; + } + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + return result; + }; + return WebResource; +}()); + +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var RestError = /** @class */ (function (_super) { + tslib.__extends(RestError, _super); + function RestError(message, code, statusCode, request, response, body) { + var _this = _super.call(this, message) || this; + _this.code = code; + _this.statusCode = statusCode; + _this.request = request; + _this.response = response; + _this.body = body; + Object.setPrototypeOf(_this, RestError.prototype); + return _this; + } + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.REQUEST_ABORTED_ERROR = "REQUEST_ABORTED_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + return RestError; +}(Error)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var FetchHttpClient = /** @class */ (function () { + function FetchHttpClient() { + } + FetchHttpClient.prototype.sendRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var abortController, formData, requestForm_1, appendFormValue, _i, _a, formKey, formValue, j, contentType, body, loadedBytes_1, uploadReportStream, platformSpecificRequestInit, requestInit, response, headers, operationResponse, _b, _c, onDownloadProgress_1, responseBody, loadedBytes_2, downloadReportStream, length_1, error_1, fetchError; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + if (!httpRequest && typeof httpRequest !== "object") { + throw new Error("'httpRequest' (WebResource) cannot be null or undefined and must be of type object."); + } + abortController = new AbortController(); + if (httpRequest.abortSignal) { + if (httpRequest.abortSignal.aborted) { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + httpRequest.abortSignal.addEventListener("abort", function (event) { + if (event.type === "abort") { + abortController.abort(); + } + }); + } + if (httpRequest.timeout) { + setTimeout(function () { + abortController.abort(); + }, httpRequest.timeout); + } + if (httpRequest.formData) { + formData = httpRequest.formData; + requestForm_1 = new FormData(); + appendFormValue = function (key, value) { + // value function probably returns a stream so we can provide a fresh stream on each retry + if (typeof value === "function") { + value = value(); + } + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (_i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + formKey = _a[_i]; + formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + httpRequest.body = requestForm_1; + httpRequest.formData = undefined; + contentType = httpRequest.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + if (typeof requestForm_1.getBoundary === "function") { + httpRequest.headers.set("Content-Type", "multipart/form-data; boundary=" + requestForm_1.getBoundary()); + } + else { + // browser will automatically apply a suitable content-type header + httpRequest.headers.remove("Content-Type"); + } + } + } + body = httpRequest.body + ? (typeof httpRequest.body === "function" ? httpRequest.body() : httpRequest.body) + : undefined; + if (httpRequest.onUploadProgress && httpRequest.body) { + loadedBytes_1 = 0; + uploadReportStream = new stream.Transform({ + transform: function (chunk, _encoding, callback) { + loadedBytes_1 += chunk.length; + httpRequest.onUploadProgress({ loadedBytes: loadedBytes_1 }); + callback(undefined, chunk); + } + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + return [4 /*yield*/, this.prepareRequest(httpRequest)]; + case 1: + platformSpecificRequestInit = _d.sent(); + requestInit = tslib.__assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, signal: abortController.signal }, platformSpecificRequestInit); + _d.label = 2; + case 2: + _d.trys.push([2, 8, 9, 10]); + return [4 /*yield*/, this.fetch(httpRequest.url, requestInit)]; + case 3: + response = _d.sent(); + headers = parseHeaders(response.headers); + _b = { + headers: headers, + request: httpRequest, + status: response.status, + readableStreamBody: httpRequest.streamResponseBody ? response.body : undefined + }; + if (!!httpRequest.streamResponseBody) return [3 /*break*/, 5]; + return [4 /*yield*/, response.text()]; + case 4: + _c = _d.sent(); + return [3 /*break*/, 6]; + case 5: + _c = undefined; + _d.label = 6; + case 6: + operationResponse = (_b.bodyAsText = _c, + _b); + onDownloadProgress_1 = httpRequest.onDownloadProgress; + if (onDownloadProgress_1) { + responseBody = response.body || undefined; + if (isReadableStream(responseBody)) { + loadedBytes_2 = 0; + downloadReportStream = new stream.Transform({ + transform: function (chunk, _encoding, callback) { + loadedBytes_2 += chunk.length; + onDownloadProgress_1({ loadedBytes: loadedBytes_2 }); + callback(undefined, chunk); + } + }); + responseBody.pipe(downloadReportStream); + operationResponse.readableStreamBody = downloadReportStream; + } + else { + length_1 = parseInt(headers.get("Content-Length")) || undefined; + if (length_1) { + // Calling callback for non-stream response for consistency with browser + onDownloadProgress_1({ loadedBytes: length_1 }); + } + } + } + return [4 /*yield*/, this.processRequest(operationResponse)]; + case 7: + _d.sent(); + return [2 /*return*/, operationResponse]; + case 8: + error_1 = _d.sent(); + fetchError = error_1; + if (fetchError.code === "ENOTFOUND") { + throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest); + } + else if (fetchError.type === "aborted") { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + throw fetchError; + case 9: return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }); + }; + return FetchHttpClient; +}()); +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +function parseHeaders(headers) { + var httpHeaders = new HttpHeaders(); + headers.forEach(function (value, key) { + httpHeaders.set(key, value); + }); + return httpHeaders; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A class that handles the query portion of a URLBuilder. + */ +var URLQuery = /** @class */ (function () { + function URLQuery() { + this._rawQuery = {}; + } + /** + * Get whether or not there any query parameters in this URLQuery. + */ + URLQuery.prototype.any = function () { + return Object.keys(this._rawQuery).length > 0; + }; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + URLQuery.prototype.set = function (parameterName, parameterValue) { + if (parameterName) { + if (parameterValue != undefined) { + var newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } + else { + delete this._rawQuery[parameterName]; + } + } + }; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + URLQuery.prototype.get = function (parameterName) { + return parameterName ? this._rawQuery[parameterName] : undefined; + }; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + URLQuery.prototype.toString = function () { + var result = ""; + for (var parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + var parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + var parameterStrings = []; + for (var _i = 0, parameterValue_1 = parameterValue; _i < parameterValue_1.length; _i++) { + var parameterValueElement = parameterValue_1[_i]; + parameterStrings.push(parameterName + "=" + parameterValueElement); + } + result += parameterStrings.join("&"); + } + else { + result += parameterName + "=" + parameterValue; + } + } + return result; + }; + /** + * Parse a URLQuery from the provided text. + */ + URLQuery.parse = function (text) { + var result = new URLQuery(); + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + var currentState = "ParameterName"; + var parameterName = ""; + var parameterValue = ""; + for (var i = 0; i < text.length; ++i) { + var currentCharacter = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + case "&": + parameterName = ""; + parameterValue = ""; + break; + default: + parameterName += currentCharacter; + break; + } + break; + case "ParameterValue": + switch (currentCharacter) { + case "=": + parameterName = ""; + parameterValue = ""; + currentState = "Invalid"; + break; + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + default: + parameterValue += currentCharacter; + break; + } + break; + case "Invalid": + if (currentCharacter === "&") { + currentState = "ParameterName"; + } + break; + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + return result; + }; + return URLQuery; +}()); +/** + * A class that handles creating, modifying, and parsing URLs. + */ +var URLBuilder = /** @class */ (function () { + function URLBuilder() { + } + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setScheme = function (scheme) { + if (!scheme) { + this._scheme = undefined; + } + else { + this.set(scheme, "SCHEME"); + } + }; + /** + * Get the scheme that has been set in this URL. + */ + URLBuilder.prototype.getScheme = function () { + return this._scheme; + }; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setHost = function (host) { + if (!host) { + this._host = undefined; + } + else { + this.set(host, "SCHEME_OR_HOST"); + } + }; + /** + * Get the host that has been set in this URL. + */ + URLBuilder.prototype.getHost = function () { + return this._host; + }; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setPort = function (port) { + if (port == undefined || port === "") { + this._port = undefined; + } + else { + this.set(port.toString(), "PORT"); + } + }; + /** + * Get the port that has been set in this URL. + */ + URLBuilder.prototype.getPort = function () { + return this._port; + }; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + URLBuilder.prototype.setPath = function (path) { + if (!path) { + this._path = undefined; + } + else { + if (path.indexOf("://") !== -1) { + this.set(path, "SCHEME"); + } + else { + this.set(path, "PATH"); + } + } + }; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + URLBuilder.prototype.appendPath = function (path) { + if (path) { + var currentPath = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + if (path.startsWith("/")) { + path = path.substring(1); + } + path = currentPath + path; + } + this.set(path, "PATH"); + } + }; + /** + * Get the path that has been set in this URL. + */ + URLBuilder.prototype.getPath = function () { + return this._path; + }; + /** + * Set the query in this URL. + */ + URLBuilder.prototype.setQuery = function (query) { + if (!query) { + this._query = undefined; + } + else { + this._query = URLQuery.parse(query); + } + }; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + URLBuilder.prototype.setQueryParameter = function (queryParameterName, queryParameterValue) { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + }; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + URLBuilder.prototype.getQueryParameterValue = function (queryParameterName) { + return this._query ? this._query.get(queryParameterName) : undefined; + }; + /** + * Get the query in this URL. + */ + URLBuilder.prototype.getQuery = function () { + return this._query ? this._query.toString() : undefined; + }; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + URLBuilder.prototype.set = function (text, startState) { + var tokenizer = new URLTokenizer(text, startState); + while (tokenizer.next()) { + var token = tokenizer.current(); + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + case "HOST": + this._host = token.text || undefined; + break; + case "PORT": + this._port = token.text || undefined; + break; + case "PATH": + var tokenPath = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + default: + throw new Error("Unrecognized URLTokenType: " + token.type); + } + } + } + }; + URLBuilder.prototype.toString = function () { + var result = ""; + if (this._scheme) { + result += this._scheme + "://"; + } + if (this._host) { + result += this._host; + } + if (this._port) { + result += ":" + this._port; + } + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + if (this._query && this._query.any()) { + result += "?" + this._query.toString(); + } + return result; + }; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + URLBuilder.prototype.replaceAll = function (searchValue, replaceValue) { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + }; + URLBuilder.parse = function (text) { + var result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + }; + return URLBuilder; +}()); +var URLToken = /** @class */ (function () { + function URLToken(text, type) { + this.text = text; + this.type = type; + } + URLToken.scheme = function (text) { + return new URLToken(text, "SCHEME"); + }; + URLToken.host = function (text) { + return new URLToken(text, "HOST"); + }; + URLToken.port = function (text) { + return new URLToken(text, "PORT"); + }; + URLToken.path = function (text) { + return new URLToken(text, "PATH"); + }; + URLToken.query = function (text) { + return new URLToken(text, "QUERY"); + }; + return URLToken; +}()); +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +function isAlphaNumericCharacter(character) { + var characterCode = character.charCodeAt(0); + return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) || + (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) || + (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */); +} +/** + * A class that tokenizes URL strings. + */ +var URLTokenizer = /** @class */ (function () { + function URLTokenizer(_text, state) { + this._text = _text; + this._textLength = _text ? _text.length : 0; + this._currentState = state != undefined ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + URLTokenizer.prototype.current = function () { + return this._currentToken; + }; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + URLTokenizer.prototype.next = function () { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } + else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + case "HOST": + nextHost(this); + break; + case "PORT": + nextPort(this); + break; + case "PATH": + nextPath(this); + break; + case "QUERY": + nextQuery(this); + break; + default: + throw new Error("Unrecognized URLTokenizerState: " + this._currentState); + } + } + return !!this._currentToken; + }; + return URLTokenizer; +}()); +/** + * Read the remaining characters from this Tokenizer's character stream. + */ +function readRemaining(tokenizer) { + var result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; +} +/** + * Whether or not this URLTokenizer has a current character. + */ +function hasCurrentCharacter(tokenizer) { + return tokenizer._currentIndex < tokenizer._textLength; +} +/** + * Get the character in the text string at the current index. + */ +function getCurrentCharacter(tokenizer) { + return tokenizer._text[tokenizer._currentIndex]; +} +/** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ +function nextCharacter(tokenizer, step) { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } +} +/** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ +function peekCharacters(tokenizer, charactersToPeek) { + var endIndex = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); +} +/** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ +function readWhile(tokenizer, condition) { + var result = ""; + while (hasCurrentCharacter(tokenizer)) { + var currentCharacter = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } + else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + return result; +} +/** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ +function readWhileLetterOrDigit(tokenizer) { + return readWhile(tokenizer, function (character) { return isAlphaNumericCharacter(character); }); +} +/** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ +function readUntilCharacter(tokenizer) { + var terminatingCharacters = []; + for (var _i = 1; _i < arguments.length; _i++) { + terminatingCharacters[_i - 1] = arguments[_i]; + } + return readWhile(tokenizer, function (character) { return terminatingCharacters.indexOf(character) === -1; }); +} +function nextScheme(tokenizer) { + var scheme = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "HOST"; + } +} +function nextSchemeOrHost(tokenizer) { + var schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } +} +function nextHost(tokenizer) { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + var host = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPort(tokenizer) { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + var port = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPath(tokenizer) { + var path = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextQuery(tokenizer) { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + var query = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function createProxyAgent(requestUrl, proxySettings, headers) { + var tunnelOptions = { + proxy: { + host: URLBuilder.parse(proxySettings.host).getHost(), + port: proxySettings.port, + headers: (headers && headers.rawHeaders()) || {} + } + }; + if ((proxySettings.username && proxySettings.password)) { + tunnelOptions.proxy.proxyAuth = proxySettings.username + ":" + proxySettings.password; + } + var requestScheme = URLBuilder.parse(requestUrl).getScheme() || ""; + var isRequestHttps = requestScheme.toLowerCase() === "https"; + var proxyScheme = URLBuilder.parse(proxySettings.host).getScheme() || ""; + var isProxyHttps = proxyScheme.toLowerCase() === "https"; + var proxyAgent = { + isHttps: isRequestHttps, + agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) + }; + return proxyAgent; +} +function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) { + if (isRequestHttps && isProxyHttps) { + return tunnel.httpsOverHttps(tunnelOptions); + } + else if (isRequestHttps && !isProxyHttps) { + return tunnel.httpsOverHttp(tunnelOptions); + } + else if (!isRequestHttps && isProxyHttps) { + return tunnel.httpOverHttps(tunnelOptions); + } + else { + return tunnel.httpOverHttp(tunnelOptions); + } +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var globalWithFetch = global; +if (typeof globalWithFetch.fetch !== "function") { + var fetch_1 = require("node-fetch").default; + globalWithFetch.fetch = fetch_1; +} +var NodeFetchHttpClient = /** @class */ (function (_super) { + tslib.__extends(NodeFetchHttpClient, _super); + function NodeFetchHttpClient() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.cookieJar = new tough.CookieJar(undefined, { looseMode: true }); + return _this; + } + NodeFetchHttpClient.prototype.fetch = function (input, init) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, fetch(input, init)]; + }); + }); + }; + NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var requestInit, cookieString, _a, httpAgent, httpsAgent, tunnel, options, agent; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + requestInit = {}; + if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) { + if (err) { + reject(err); + } + else { + resolve(cookie); + } + }); + })]; + case 1: + cookieString = _b.sent(); + httpRequest.headers.set("Cookie", cookieString); + _b.label = 2; + case 2: + if (httpRequest.agentSettings) { + _a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https; + if (httpsAgent && httpRequest.url.startsWith("https")) { + requestInit.agent = httpsAgent; + } + else if (httpAgent) { + requestInit.agent = httpAgent; + } + } + else if (httpRequest.proxySettings) { + tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers); + requestInit.agent = tunnel.agent; + } + if (httpRequest.keepAlive === true) { + if (requestInit.agent) { + requestInit.agent.keepAlive = true; + } + else { + options = { keepAlive: true }; + agent = httpRequest.url.startsWith("https") ? new https.Agent(options) : new http.Agent(options); + requestInit.agent = agent; + } + } + return [2 /*return*/, requestInit]; + } + }); + }); + }; + NodeFetchHttpClient.prototype.processRequest = function (operationResponse) { + return tslib.__awaiter(this, void 0, void 0, function () { + var setCookieHeader_1; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.cookieJar) return [3 /*break*/, 2]; + setCookieHeader_1 = operationResponse.headers.get("Set-Cookie"); + if (!(setCookieHeader_1 != undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + })]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + return NodeFetchHttpClient; +}(FetchHttpClient)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +(function (HttpPipelineLogLevel) { + /** + * A log level that indicates that no logs will be logged. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + /** + * An error log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + /** + * A warning log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; + /** + * An information log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; +})(exports.HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = {})); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +function getPathStringFromParameter(parameter) { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); +} +function getPathStringFromParameterPath(parameterPath, mapper) { + var result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function isStreamOperation(operationSpec) { + var result = false; + for (var statusCode in operationSpec.responses) { + var operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function stringifyXML(obj, opts) { + var builder = new xml2js.Builder({ + explicitArray: false, + explicitCharkey: false, + rootName: (opts || {}).rootName, + renderOpts: { + pretty: false + } + }); + return builder.buildObject(obj); +} +function parseXML(str) { + var xmlParser = new xml2js.Parser({ + explicitArray: false, + explicitCharkey: false, + explicitRoot: false + }); + return new Promise(function (resolve, reject) { + if (!str) { + reject(new Error("Document is empty")); + } + else { + xmlParser.parseString(str, function (err, res) { + if (err) { + reject(err); + } + else { + resolve(res); + } + }); + } + }); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var BaseRequestPolicy = /** @class */ (function () { + function BaseRequestPolicy(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + BaseRequestPolicy.prototype.shouldLog = function (logLevel) { + return this._options.shouldLog(logLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + BaseRequestPolicy.prototype.log = function (logLevel, message) { + this._options.log(logLevel, message); + }; + return BaseRequestPolicy; +}()); +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +var RequestPolicyOptions = /** @class */ (function () { + function RequestPolicyOptions(_logger) { + this._logger = _logger; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + RequestPolicyOptions.prototype.shouldLog = function (logLevel) { + return !!this._logger && + logLevel !== exports.HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel; + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + RequestPolicyOptions.prototype.log = function (logLevel, message) { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + }; + return RequestPolicyOptions; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +function deserializationPolicy(deserializationContentTypes) { + return { + create: function (nextPolicy, options) { + return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options); + } + }; +} +var defaultJsonContentTypes = ["application/json", "text/json"]; +var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +var DeserializationPolicy = /** @class */ (function (_super) { + tslib.__extends(DeserializationPolicy, _super); + function DeserializationPolicy(nextPolicy, deserializationContentTypes, options) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes; + _this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes; + return _this; + } + DeserializationPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(request).then(function (response) { return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response); })]; + }); + }); + }; + return DeserializationPolicy; +}(BaseRequestPolicy)); +function getOperationResponse(parsedResponse) { + var result; + var request = parsedResponse.request; + var operationSpec = request.operationSpec; + if (operationSpec) { + var operationResponseGetter = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; +} +function shouldDeserializeResponse(parsedResponse) { + var shouldDeserialize = parsedResponse.request.shouldDeserialize; + var result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response) { + return parse(jsonContentTypes, xmlContentTypes, response).then(function (parsedResponse) { + var shouldDeserialize = shouldDeserializeResponse(parsedResponse); + if (shouldDeserialize) { + var operationSpec = parsedResponse.request.operationSpec; + if (operationSpec && operationSpec.responses) { + var statusCode = parsedResponse.status; + var expectedStatusCodes = Object.keys(operationSpec.responses); + var hasNoExpectedStatusCodes = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); + var responseSpec = getOperationResponse(parsedResponse); + var isExpectedStatusCode = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec; + if (!isExpectedStatusCode) { + var defaultResponseSpec = operationSpec.responses.default; + if (defaultResponseSpec) { + var initialErrorMessage = isStreamOperation(operationSpec) + ? "Unexpected status code: " + statusCode + : parsedResponse.bodyAsText; + var error = new RestError(initialErrorMessage); + error.statusCode = statusCode; + error.request = stripRequest(parsedResponse.request); + error.response = stripResponse(parsedResponse); + var parsedErrorResponse = parsedResponse.parsedBody; + try { + if (parsedErrorResponse) { + var defaultResponseBodyMapper = defaultResponseSpec.bodyMapper; + if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === "CloudError") { + if (parsedErrorResponse.error) { + parsedErrorResponse = parsedErrorResponse.error; + } + if (parsedErrorResponse.code) { + error.code = parsedErrorResponse.code; + } + if (parsedErrorResponse.message) { + error.message = parsedErrorResponse.message; + } + } + else { + var internalError = parsedErrorResponse; + if (parsedErrorResponse.error) { + internalError = parsedErrorResponse.error; + } + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + } + if (defaultResponseBodyMapper) { + var valueToDeserialize = parsedErrorResponse; + if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof parsedErrorResponse === "object" + ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName] + : []; + } + error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, "error.body"); + } + } + } + catch (defaultError) { + error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response."; + } + return Promise.reject(error); + } + } + else if (responseSpec) { + if (responseSpec.bodyMapper) { + var valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody"); + } + catch (error) { + var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText); + restError.request = stripRequest(parsedResponse.request); + restError.response = stripResponse(parsedResponse); + return Promise.reject(restError); + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + } + } + return Promise.resolve(parsedResponse); + }); +} +function parse(jsonContentTypes, xmlContentTypes, operationResponse) { + var errorHandler = function (err) { + var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + "."; + var errCode = err.code || RestError.PARSE_ERROR; + var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText); + return Promise.reject(e); + }; + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + var text_1 = operationResponse.bodyAsText; + var contentType = operationResponse.headers.get("Content-Type") || ""; + var contentComponents = !contentType ? [] : contentType.split(";").map(function (component) { return component.toLowerCase(); }); + if (contentComponents.length === 0 || contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) { + return new Promise(function (resolve) { + operationResponse.parsedBody = JSON.parse(text_1); + resolve(operationResponse); + }).catch(errorHandler); + } + else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) { + return parseXML(text_1) + .then(function (body) { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + return Promise.resolve(operationResponse); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function exponentialRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; +var DEFAULT_CLIENT_RETRY_COUNT = 3; +var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; +var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +var ExponentialRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(ExponentialRetryPolicy, _super); + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + function isNumber(n) { return typeof n === "number"; } + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + ExponentialRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return retry(_this, request, response); }) + .catch(function (error) { return retry(_this, request, error.response, undefined, error); }); + }; + return ExponentialRetryPolicy; +}(BaseRequestPolicy)); +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(policy, statusCode, retryData) { + if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) { + return false; + } + var currentCount; + if (!retryData) { + throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); +} +/** + * Updates the retry data for the next attempt. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {RetryData} retryData The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +function updateRetryData(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; +} +function retry(policy, request, response, retryData, requestError) { + retryData = updateRetryData(policy, retryData, requestError); + var isAborted = request.abortSignal && request.abortSignal.aborted; + if (!isAborted && shouldRetry(policy, response && response.status, retryData)) { + return delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry(policy, request, res, retryData, undefined); }) + .catch(function (err) { return retry(policy, request, response, retryData, err); }); + } + else if (isAborted || requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + var err = retryData.error || + new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response); + return Promise.reject(err); + } + else { + return Promise.resolve(response); + } +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function generateClientRequestIdPolicy(requestIdHeaderName) { + if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; } + return { + create: function (nextPolicy, options) { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; +} +var GenerateClientRequestIdPolicy = /** @class */ (function (_super) { + tslib.__extends(GenerateClientRequestIdPolicy, _super); + function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._requestIdHeaderName = _requestIdHeaderName; + return _this; + } + GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, generateUuid()); + } + return this._nextPolicy.sendRequest(request); + }; + return GenerateClientRequestIdPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function getDefaultUserAgentKey() { + return Constants.HeaderConstants.USER_AGENT; +} +function getPlatformSpecificData() { + var runtimeInfo = { + key: "Node", + value: process.version + }; + var osInfo = { + key: "OS", + value: "(" + os.arch() + "-" + os.type() + "-" + os.release() + ")" + }; + return [runtimeInfo, osInfo]; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function getRuntimeInfo() { + var msRestRuntime = { + key: "ms-rest-js", + value: Constants.msRestVersion + }; + return [msRestRuntime]; +} +function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) { + if (keySeparator === void 0) { keySeparator = " "; } + if (valueSeparator === void 0) { valueSeparator = "/"; } + return telemetryInfo.map(function (info) { + var value = info.value ? "" + valueSeparator + info.value : ""; + return "" + info.key + value; + }).join(keySeparator); +} +var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; +function getDefaultUserAgentValue() { + var runtimeInfo = getRuntimeInfo(); + var platformSpecificData = getPlatformSpecificData(); + var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; +} +function userAgentPolicy(userAgentData) { + var key = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key; + var value = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value; + return { + create: function (nextPolicy, options) { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; +} +var UserAgentPolicy = /** @class */ (function (_super) { + tslib.__extends(UserAgentPolicy, _super); + function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) { + var _this = _super.call(this, _nextPolicy, _options) || this; + _this._nextPolicy = _nextPolicy; + _this._options = _options; + _this.headerKey = headerKey; + _this.headerValue = headerValue; + return _this; + } + UserAgentPolicy.prototype.sendRequest = function (request) { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + }; + UserAgentPolicy.prototype.addUserAgentHeader = function (request) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + }; + return UserAgentPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function redirectPolicy(maximumRetries) { + if (maximumRetries === void 0) { maximumRetries = 20; } + return { + create: function (nextPolicy, options) { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; +} +var RedirectPolicy = /** @class */ (function (_super) { + tslib.__extends(RedirectPolicy, _super); + function RedirectPolicy(nextPolicy, options, maxRetries) { + if (maxRetries === void 0) { maxRetries = 20; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.maxRetries = maxRetries; + return _this; + } + RedirectPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return handleRedirect(_this, response, 0); }); + }; + return RedirectPolicy; +}(BaseRequestPolicy)); +function handleRedirect(policy, response, currentRetries) { + var request = response.request, status = response.status; + var locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || status === 307 || (status === 303 && request.method === "POST")) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + var builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + } + return policy._nextPolicy.sendRequest(request) + .then(function (res) { return handleRedirect(policy, res, currentRetries + 1); }); + } + return Promise.resolve(response); +} + +function rpRegistrationPolicy(retryTimeout) { + if (retryTimeout === void 0) { retryTimeout = 30; } + return { + create: function (nextPolicy, options) { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; +} +var RPRegistrationPolicy = /** @class */ (function (_super) { + tslib.__extends(RPRegistrationPolicy, _super); + function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) { + if (_retryTimeout === void 0) { _retryTimeout = 30; } + var _this = _super.call(this, nextPolicy, options) || this; + _this._retryTimeout = _retryTimeout; + return _this; + } + RPRegistrationPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return registerIfNeeded(_this, request, response); }); + }; + return RPRegistrationPolicy; +}(BaseRequestPolicy)); +function registerIfNeeded(policy, request, response) { + if (response.status === 409) { + var rpName = checkRPNotRegisteredError(response.bodyAsText); + if (rpName) { + var urlPrefix = extractSubscriptionUrl(request.url); + return registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(function () { return false; }) + .then(function (registrationStatus) { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + }); + } + } + return Promise.resolve(response); +} +/** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ +function getRequestEssentials(originalRequest, reuseUrlToo) { + if (reuseUrlToo === void 0) { reuseUrlToo = false; } + var reqOptions = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", generateUuid()); + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + return reqOptions; +} +/** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ +function checkRPNotRegisteredError(body) { + var result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } + catch (err) { + // do nothing; + } + if (responseBody && responseBody.error && responseBody.error.message && + responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") { + var matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; +} +/** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ +function extractSubscriptionUrl(url) { + var result; + var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } + else { + throw new Error("Unable to extract subscriptionId from the given url - " + url + "."); + } + return result; +} +/** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ +function registerRP(policy, urlPrefix, provider, originalRequest) { + var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01"; + var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01"; + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + return policy._nextPolicy.sendRequest(reqOptions) + .then(function (response) { + if (response.status !== 200) { + throw new Error("Autoregistration of " + provider + " failed. Please try registering manually."); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); +} +/** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ +function getRegistrationStatus(policy, url, originalRequest) { + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + return policy._nextPolicy.sendRequest(reqOptions).then(function (res) { + var obj = res.parsedBody; + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } + else { + return delay(policy._retryTimeout * 1000).then(function () { return getRegistrationStatus(policy, url, originalRequest); }); + } + }); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function signingPolicy(authenticationProvider) { + return { + create: function (nextPolicy, options) { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; +} +var SigningPolicy = /** @class */ (function (_super) { + tslib.__extends(SigningPolicy, _super); + function SigningPolicy(nextPolicy, options, authenticationProvider) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.authenticationProvider = authenticationProvider; + return _this; + } + SigningPolicy.prototype.signRequest = function (request) { + return this.authenticationProvider.signRequest(request); + }; + SigningPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this.signRequest(request).then(function (nextRequest) { return _this._nextPolicy.sendRequest(nextRequest); }); + }; + return SigningPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +var SystemErrorRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(SystemErrorRetryPolicy, _super); + function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; + _this.DEFAULT_CLIENT_RETRY_COUNT = 3; + _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; + _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + _this.retryCount = typeof retryCount === "number" ? retryCount : _this.DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = typeof retryInterval === "number" ? retryInterval : _this.DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = typeof minRetryInterval === "number" ? minRetryInterval : _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = typeof maxRetryInterval === "number" ? maxRetryInterval : _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + SystemErrorRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()).then(function (response) { return retry$1(_this, request, response); }); + }; + return SystemErrorRetryPolicy; +}(BaseRequestPolicy)); +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry$1(policy, retryData) { + var currentCount; + if (!retryData) { + throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); +} +/** + * Updates the retry data for the next attempt. + * + * @param {RetryData} retryData The retry data. + * @param {object} err The operation"s error, if any. + */ +function updateRetryData$1(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; +} +function retry$1(policy, request, operationResponse, retryData, err) { + retryData = updateRetryData$1(policy, retryData, err); + if (err && err.code && shouldRetry$1(policy, retryData) && + (err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || err.code === "ENOENT")) { + // If previous operation ended with an error and the policy allows a retry, do that + return delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry$1(policy, request, res, retryData, err); }) + .catch(function (err) { return retry$1(policy, request, operationResponse, retryData, err); }); + } + else { + if (err != undefined) { + // If the operation failed in the end, return all errors instead of just the last one + err = retryData.error; + return Promise.reject(err); + } + return Promise.resolve(operationResponse); + } +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +(function (QueryCollectionFormat) { + QueryCollectionFormat["Csv"] = ","; + QueryCollectionFormat["Ssv"] = " "; + QueryCollectionFormat["Tsv"] = "\t"; + QueryCollectionFormat["Pipes"] = "|"; + QueryCollectionFormat["Multi"] = "Multi"; +})(exports.QueryCollectionFormat || (exports.QueryCollectionFormat = {})); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function agentPolicy(agentSettings) { + return { + create: function (nextPolicy, options) { + return new AgentPolicy(nextPolicy, options, agentSettings); + } + }; +} +var AgentPolicy = /** @class */ (function (_super) { + tslib.__extends(AgentPolicy, _super); + function AgentPolicy(nextPolicy, options, agentSettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.agentSettings = agentSettings; + return _this; + } + AgentPolicy.prototype.sendRequest = function (request) { + if (!request.agentSettings) { + request.agentSettings = this.agentSettings; + } + return this._nextPolicy.sendRequest(request); + }; + return AgentPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + if (process.env[Constants.HTTPS_PROXY]) { + return process.env[Constants.HTTPS_PROXY]; + } + else if (process.env[Constants.HTTPS_PROXY.toLowerCase()]) { + return process.env[Constants.HTTPS_PROXY.toLowerCase()]; + } + else if (process.env[Constants.HTTP_PROXY]) { + return process.env[Constants.HTTP_PROXY]; + } + else if (process.env[Constants.HTTP_PROXY.toLowerCase()]) { + return process.env[Constants.HTTP_PROXY.toLowerCase()]; + } + return undefined; +} +function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + var parsedUrl = URLBuilder.parse(proxyUrl); + return { + host: parsedUrl.getScheme() + "://" + parsedUrl.getHost(), + port: Number.parseInt(parsedUrl.getPort() || "80") + }; +} +function proxyPolicy(proxySettings) { + return { + create: function (nextPolicy, options) { + return new ProxyPolicy(nextPolicy, options, proxySettings); + } + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + tslib.__extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options, proxySettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.proxySettings = proxySettings; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (request) { + if (!request.proxySettings) { + request.proxySettings = this.proxySettings; + } + return this._nextPolicy.sendRequest(request); + }; + return ProxyPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var StatusCodes = Constants.HttpConstants.StatusCodes; +function throttlingRetryPolicy() { + return { + create: function (nextPolicy, options) { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; +} +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +var ThrottlingRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(ThrottlingRetryPolicy, _super); + function ThrottlingRetryPolicy(nextPolicy, options, _handleResponse) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._handleResponse = _handleResponse || _this._defaultResponseHandler; + return _this; + } + ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } + else { + return _this._handleResponse(httpRequest, response); + } + })]; + }); + }); + }; + ThrottlingRetryPolicy.prototype._defaultResponseHandler = function (httpRequest, httpResponse) { + return tslib.__awaiter(this, void 0, void 0, function () { + var retryAfterHeader, delayInMs; + var _this = this; + return tslib.__generator(this, function (_a) { + retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + if (retryAfterHeader) { + delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return [2 /*return*/, delay(delayInMs).then(function (_) { return _this._nextPolicy.sendRequest(httpRequest); })]; + } + } + return [2 /*return*/, httpResponse]; + }); + }); + }; + ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) { + var retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } + else { + return retryAfterInSeconds * 1000; + } + }; + ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) { + try { + var now = Date.now(); + var date = Date.parse(headerValue); + var diff = date - now; + return Number.isNaN(diff) ? undefined : diff; + } + catch (error) { + return undefined; + } + }; + return ThrottlingRetryPolicy; +}(BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +var ServiceClient = /** @class */ (function () { + /** + * The ServiceClient constructor + * @constructor + * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication. + * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client. + */ + function ServiceClient(credentials, options) { + if (!options) { + options = {}; + } + if (credentials && !credentials.signRequest) { + throw new Error("credentials argument needs to implement signRequest method"); + } + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new NodeFetchHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + var requestPolicyFactories; + if (Array.isArray(options.requestPolicyFactories)) { + requestPolicyFactories = options.requestPolicyFactories; + } + else { + requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options); + if (options.requestPolicyFactories) { + var newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + /** + * Send the provided httpRequest. + */ + ServiceClient.prototype.sendRequest = function (options) { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + var httpRequest; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } + else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } + catch (error) { + return Promise.reject(error); + } + var httpPipeline = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (var i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + }; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + ServiceClient.prototype.sendOperationRequest = function (operationArguments, operationSpec, callback) { + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + var httpRequest = new WebResource(); + var result; + try { + var baseUri = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + var requestUrl = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (var _i = 0, _a = operationSpec.urlParameters; _i < _a.length; _i++) { + var urlParameter = _a[_i]; + var urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter)); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll("{" + (urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)) + "}", urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (var _b = 0, _c = operationSpec.queryParameters; _b < _c.length; _b++) { + var queryParameter = _c[_b]; + var queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue != undefined) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter)); + if (queryParameter.collectionFormat != undefined) { + if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + queryParameterValue = ""; + } + else { + for (var index in queryParameterValue) { + var item = queryParameterValue[index]; + queryParameterValue[index] = item == undefined ? "" : item.toString(); + } + } + } + else if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Ssv || queryParameter.collectionFormat === exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (var index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Multi && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== exports.QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + var contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + if (operationSpec.headerParameters) { + for (var _d = 0, _e = operationSpec.headerParameters; _d < _e.length; _d++) { + var headerParameter = _e[_d]; + var headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue != undefined) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter)); + var headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + for (var _f = 0, _g = Object.keys(headerValue); _f < _g.length; _f++) { + var key = _g[_f]; + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + var options = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (var customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + } + httpRequest.withCredentials = this._withCredentials; + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + if (httpRequest.streamResponseBody == undefined) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + result = this.sendRequest(httpRequest) + .then(function (res) { return flattenResponse(res, operationSpec.responses[res.status]); }); + } + catch (error) { + result = Promise.reject(error); + } + var cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(function (res) { return cb(null, res._response.parsedBody, res._response.request, res._response); }) + .catch(function (err) { return cb(err); }); + } + return result; + }; + return ServiceClient; +}()); +function serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) { + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + var bodyMapper = operationSpec.requestBody.mapper; + var required = bodyMapper.required, xmlName = bodyMapper.xmlName, xmlElementName = bodyMapper.xmlElementName, serializedName = bodyMapper.serializedName; + var typeName = bodyMapper.type.name; + try { + if (httpRequest.body != undefined || required) { + var requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString); + var isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName), { rootName: xmlName || serializedName }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName }); + } + } + else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } + catch (error) { + throw new Error("Error \"" + error.message + "\" occurred in serializing the payload - " + JSON.stringify(serializedName, undefined, " ") + "."); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (var _i = 0, _a = operationSpec.formDataParameters; _i < _a.length; _i++) { + var formDataParameter = _a[_i]; + var formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue != undefined) { + var formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter)); + } + } + } +} +function isRequestPolicyFactory(instance) { + return typeof instance.create === "function"; +} +function getValueOrFunctionResult(value, defaultValueCreator) { + var result; + if (typeof value === "string") { + result = value; + } + else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; +} +function createDefaultRequestPolicyFactories(credentials, options) { + var factories = []; + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + if (credentials) { + if (isRequestPolicyFactory(credentials)) { + factories.push(credentials); + } + else { + factories.push(signingPolicy(credentials)); + } + } + var userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + var userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + factories.push(deserializationPolicy(options.deserializationContentTypes)); + var proxySettings = options.proxySettings || getDefaultProxySettings(); + if (proxySettings) { + factories.push(proxyPolicy(proxySettings)); + } + if (options.agentSettings) { + factories.push(agentPolicy(options.agentSettings)); + } + return factories; +} +function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); +} +function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { + var value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + var propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + var useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = parameterMapper.required || (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + // Serialize just for validation purposes. + var parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString); + } + } + else { + if (parameterMapper.required) { + value = {}; + } + for (var propertyName in parameterPath) { + var propertyMapper = parameterMapper.type.modelProperties[propertyName]; + var propertyPath = parameterPath[propertyName]; + var propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + var propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + var result = { propertyFound: false }; + var i = 0; + for (; i < parameterPath.length; ++i) { + var parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent != undefined && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} +function flattenResponse(_response, responseSpec) { + var parsedHeaders = _response.parsedHeaders; + var bodyMapper = responseSpec && responseSpec.bodyMapper; + var addOperationResponse = function (obj) { + return Object.defineProperty(obj, "_response", { + value: _response + }); + }; + if (bodyMapper) { + var typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody })); + } + var modelProperties_1 = typeName === "Composite" && bodyMapper.type.modelProperties || {}; + var isPageableResponse = Object.keys(modelProperties_1).some(function (k) { return modelProperties_1[k].serializedName === ""; }); + if (typeName === "Sequence" || isPageableResponse) { + // We're expecting a sequece(array) make sure that the response body is in the + // correct format, if not make it an empty array [] + var parsedBody = Array.isArray(_response.parsedBody) + ? _response.parsedBody + : []; + var arrayResponse = tslib.__spreadArrays(parsedBody); + for (var _i = 0, _a = Object.keys(modelProperties_1); _i < _a.length; _i++) { + var key = _a[_i]; + if (modelProperties_1[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + if (parsedHeaders) { + for (var _b = 0, _c = Object.keys(parsedHeaders); _b < _c.length; _b++) { + var key = _c[_b]; + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), _response.parsedBody)); + } + } + if (bodyMapper || _response.request.method === "HEAD" || isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), { body: _response.parsedBody })); + } + return addOperationResponse(tslib.__assign(tslib.__assign({}, parsedHeaders), _response.parsedBody)); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +function logPolicy(logger) { + if (logger === void 0) { logger = console.log; } + return { + create: function (nextPolicy, options) { + return new LogPolicy(nextPolicy, options, logger); + } + }; +} +var LogPolicy = /** @class */ (function (_super) { + tslib.__extends(LogPolicy, _super); + function LogPolicy(nextPolicy, options, logger) { + if (logger === void 0) { logger = console.log; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.logger = logger; + return _this; + } + LogPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return logResponse(_this, response); }); + }; + return LogPolicy; +}(BaseRequestPolicy)); +function logResponse(policy, response) { + policy.logger(">> Request: " + JSON.stringify(response.request, undefined, 2)); + policy.logger(">> Response status code: " + response.status); + var responseBody = response.bodyAsText; + policy.logger(">> Body: " + responseBody); + return Promise.resolve(response); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var HeaderConstants = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME = "Bearer"; +/** + * A credentials object that uses a token string and a authorzation scheme to authenticate. + */ +var TokenCredentials = /** @class */ (function () { + /** + * Creates a new TokenCredentials object. + * + * @constructor + * @param {string} token The token. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function TokenCredentials(token, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (!token) { + throw new Error("token cannot be null or undefined."); + } + this.token = token; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @return {Promise} The signed request object. + */ + TokenCredentials.prototype.signRequest = function (webResource) { + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, this.authorizationScheme + " " + this.token); + return Promise.resolve(webResource); + }; + return TokenCredentials; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var HeaderConstants$1 = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME$1 = "Basic"; +var BasicAuthenticationCredentials = /** @class */ (function () { + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function BasicAuthenticationCredentials(userName, password, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME$1; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME$1; + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + BasicAuthenticationCredentials.prototype.signRequest = function (webResource) { + var credentials = this.userName + ":" + this.password; + var encodedCredentials = this.authorizationScheme + " " + encodeString(credentials); + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants$1.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + }; + return BasicAuthenticationCredentials; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * Authenticates to a service using an API key. + */ +var ApiKeyCredentials = /** @class */ (function () { + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + function ApiKeyCredentials(options) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error("options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided."); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResource} webResource The WebResource to be signed. + * @returns {Promise} The signed request object. + */ + ApiKeyCredentials.prototype.signRequest = function (webResource) { + if (!webResource) { + return Promise.reject(new Error("webResource cannot be null or undefined and must be of type \"object\".")); + } + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (var headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error("url cannot be null in the request object.")); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (var key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += key + "=" + this.inQuery[key]; + } + } + return Promise.resolve(webResource); + }; + return ApiKeyCredentials; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var TopicCredentials = /** @class */ (function (_super) { + tslib.__extends(TopicCredentials, _super); + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + function TopicCredentials(topicKey) { + var _this = this; + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return TopicCredentials; +}(ApiKeyCredentials)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +var DomainCredentials = /** @class */ (function (_super) { + tslib.__extends(DomainCredentials, _super); + /** + * Creates a new EventGrid DomainCredentials object. + * + * @constructor + * @param {string} domainKey The EventGrid domain key + */ + function DomainCredentials(domainKey) { + var _this = this; + if (!domainKey || (domainKey && typeof domainKey !== "string")) { + throw new Error("domainKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": domainKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return DomainCredentials; +}(ApiKeyCredentials)); + +exports.ApiKeyCredentials = ApiKeyCredentials; +exports.BaseRequestPolicy = BaseRequestPolicy; +exports.BasicAuthenticationCredentials = BasicAuthenticationCredentials; +exports.Constants = Constants; +exports.DefaultHttpClient = NodeFetchHttpClient; +exports.DomainCredentials = DomainCredentials; +exports.HttpHeaders = HttpHeaders; +exports.MapperType = MapperType; +exports.RequestPolicyOptions = RequestPolicyOptions; +exports.RestError = RestError; +exports.Serializer = Serializer; +exports.ServiceClient = ServiceClient; +exports.TokenCredentials = TokenCredentials; +exports.TopicCredentials = TopicCredentials; +exports.URLBuilder = URLBuilder; +exports.URLQuery = URLQuery; +exports.WebResource = WebResource; +exports.agentPolicy = agentPolicy; +exports.applyMixins = applyMixins; +exports.delay = delay; +exports.deserializationPolicy = deserializationPolicy; +exports.deserializeResponseBody = deserializeResponseBody; +exports.encodeUri = encodeUri; +exports.executePromisesSequentially = executePromisesSequentially; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +exports.flattenResponse = flattenResponse; +exports.generateClientRequestIdPolicy = generateClientRequestIdPolicy; +exports.generateUuid = generateUuid; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.getDefaultUserAgentValue = getDefaultUserAgentValue; +exports.isDuration = isDuration; +exports.isNode = isNode; +exports.isValidUuid = isValidUuid; +exports.logPolicy = logPolicy; +exports.promiseToCallback = promiseToCallback; +exports.promiseToServiceCallback = promiseToServiceCallback; +exports.proxyPolicy = proxyPolicy; +exports.redirectPolicy = redirectPolicy; +exports.serializeObject = serializeObject; +exports.signingPolicy = signingPolicy; +exports.stripRequest = stripRequest; +exports.stripResponse = stripResponse; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +exports.userAgentPolicy = userAgentPolicy; +//# sourceMappingURL=msRest.node.js.map diff --git a/node_modules/@azure/ms-rest-js/dist/msRest.node.js.map b/node_modules/@azure/ms-rest-js/dist/msRest.node.js.map new file mode 100644 index 000000000..bbb1c65d2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/dist/msRest.node.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRest.node.js","sources":["../lib/httpHeaders.ts","../lib/util/base64.ts","../lib/util/constants.ts","../lib/util/utils.ts","../lib/serializer.ts","../lib/webResource.ts","../node_modules/event-target-shim/src/event.mjs","../node_modules/event-target-shim/src/event-target.mjs","../node_modules/abort-controller/src/abort-signal.ts","../node_modules/abort-controller/src/abort-controller.ts","../lib/restError.ts","../lib/fetchHttpClient.ts","../lib/url.ts","../lib/proxyAgent.ts","../lib/nodeFetchHttpClient.ts","../lib/httpPipelineLogLevel.ts","../lib/operationParameter.ts","../lib/operationSpec.ts","../lib/util/xml.ts","../lib/policies/requestPolicy.ts","../lib/policies/deserializationPolicy.ts","../lib/policies/exponentialRetryPolicy.ts","../lib/policies/generateClientRequestIdPolicy.ts","../lib/policies/msRestUserAgentPolicy.ts","../lib/policies/userAgentPolicy.ts","../lib/policies/redirectPolicy.ts","../lib/policies/rpRegistrationPolicy.ts","../lib/policies/signingPolicy.ts","../lib/policies/systemErrorRetryPolicy.ts","../lib/queryCollectionFormat.ts","../lib/policies/agentPolicy.ts","../lib/policies/proxyPolicy.ts","../lib/policies/throttlingRetryPolicy.ts","../lib/serviceClient.ts","../lib/policies/logPolicy.ts","../lib/credentials/tokenCredentials.ts","../lib/credentials/basicAuthenticationCredentials.ts","../lib/credentials/apiKeyCredentials.ts","../lib/credentials/topicCredentials.ts","../lib/credentials/domainCredentials.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName: string) {\n return headerName.toLowerCase();\n}\n\n/**\n * An individual header within a HttpHeaders collection.\n */\nexport interface HttpHeader {\n /**\n * The name of the header.\n */\n name: string;\n\n /**\n * The value of the header.\n */\n value: string;\n}\n\n/**\n * A HttpHeaders collection represented as a simple JSON object.\n */\nexport type RawHttpHeaders = { [headerName: string]: string };\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport interface HttpHeadersLike {\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n set(headerName: string, headerValue: string | number): void;\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n get(headerName: string): string | undefined;\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n contains(headerName: string): boolean;\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n remove(headerName: string): boolean;\n /**\n * Get the headers that are contained this collection as an object.\n */\n rawHeaders(): RawHttpHeaders;\n /**\n * Get the headers that are contained in this collection as an array.\n */\n headersArray(): HttpHeader[];\n /**\n * Get the header names that are contained in this collection.\n */\n headerNames(): string[];\n /**\n * Get the header values that are contained in this collection.\n */\n headerValues(): string[];\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n clone(): HttpHeadersLike;\n /**\n * Get the JSON object representation of this HTTP header collection.\n * The result is the same as `rawHeaders()`.\n */\n toJson(): RawHttpHeaders;\n}\n\nexport function isHttpHeadersLike(object?: any): object is HttpHeadersLike {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n\n if (\n typeof object.rawHeaders === \"function\" &&\n typeof object.clone === \"function\" &&\n typeof object.get === \"function\" &&\n typeof object.set === \"function\" &&\n typeof object.contains === \"function\" &&\n typeof object.remove === \"function\" &&\n typeof object.headersArray === \"function\" &&\n typeof object.headerValues === \"function\" &&\n typeof object.headerNames === \"function\" &&\n typeof object.toJson === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport class HttpHeaders {\n private readonly _headersMap: { [headerKey: string]: HttpHeader };\n\n constructor(rawHeaders?: RawHttpHeaders) {\n this._headersMap = {};\n if (rawHeaders) {\n for (const headerName in rawHeaders) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName The name of the header to set. This value is case-insensitive.\n * @param headerValue The value of the header to set.\n */\n public set(headerName: string, headerValue: string | number): void {\n this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() };\n }\n\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName The name of the header.\n */\n public get(headerName: string): string | undefined {\n const header: HttpHeader = this._headersMap[getHeaderKey(headerName)];\n return !header ? undefined : header.value;\n }\n\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n public contains(headerName: string): boolean {\n return !!this._headersMap[getHeaderKey(headerName)];\n }\n\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName The name of the header to remove.\n */\n public remove(headerName: string): boolean {\n const result: boolean = this.contains(headerName);\n delete this._headersMap[getHeaderKey(headerName)];\n return result;\n }\n\n /**\n * Get the headers that are contained this collection as an object.\n */\n public rawHeaders(): RawHttpHeaders {\n const result: RawHttpHeaders = {};\n for (const headerKey in this._headersMap) {\n const header: HttpHeader = this._headersMap[headerKey];\n result[header.name.toLowerCase()] = header.value;\n }\n return result;\n }\n\n /**\n * Get the headers that are contained in this collection as an array.\n */\n public headersArray(): HttpHeader[] {\n const headers: HttpHeader[] = [];\n for (const headerKey in this._headersMap) {\n headers.push(this._headersMap[headerKey]);\n }\n return headers;\n }\n\n /**\n * Get the header names that are contained in this collection.\n */\n public headerNames(): string[] {\n const headerNames: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerNames.push(headers[i].name);\n }\n return headerNames;\n }\n\n /**\n * Get the header names that are contained in this collection.\n */\n public headerValues(): string[] {\n const headerValues: string[] = [];\n const headers: HttpHeader[] = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerValues.push(headers[i].value);\n }\n return headerValues;\n }\n\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n public toJson(): RawHttpHeaders {\n return this.rawHeaders();\n }\n\n /**\n * Get the string representation of this HTTP header collection.\n */\n public toString(): string {\n return JSON.stringify(this.toJson());\n }\n\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n public clone(): HttpHeaders {\n return new HttpHeaders(this.rawHeaders());\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * Encodes a string in base64 format.\n * @param value the string to encode\n */\nexport function encodeString(value: string): string {\n return Buffer.from(value).toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value the Uint8Aray to encode\n */\nexport function encodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts | -- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = (value instanceof Buffer) ? value : Buffer.from(value.buffer as ArrayBuffer);\n return bufferValue.toString(\"base64\");\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value the base64 string to decode\n */\nexport function decodeString(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nexport const Constants = {\n /**\n * The ms-rest version\n * @const\n * @type {string}\n */\n msRestVersion: \"2.1.0\",\n\n /**\n * Specifies HTTP.\n *\n * @const\n * @type {string}\n */\n HTTP: \"http:\",\n\n /**\n * Specifies HTTPS.\n *\n * @const\n * @type {string}\n */\n HTTPS: \"https:\",\n\n /**\n * Specifies HTTP Proxy.\n *\n * @const\n * @type {string}\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n\n /**\n * Specifies HTTPS Proxy.\n *\n * @const\n * @type {string}\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n\n HttpConstants: {\n /**\n * Http Verbs\n *\n * @const\n * @enum {string}\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\"\n },\n\n StatusCodes: {\n TooManyRequests: 429\n }\n },\n\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n *\n * @const\n * @type {string}\n */\n AUTHORIZATION: \"authorization\",\n\n AUTHORIZATION_SCHEME: \"Bearer\",\n\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n *\n * @const\n * @type {string}\n */\n RETRY_AFTER: \"Retry-After\",\n\n /**\n * The UserAgent header.\n *\n * @const\n * @type {string}\n */\n USER_AGENT: \"User-Agent\"\n }\n};\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport uuidv4 from \"uuid/v4\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { RestError } from \"../restError\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"./constants\";\n\n/**\n * A constant that indicates whether the environment is node.js or browser based.\n */\nexport const isNode = (typeof process !== \"undefined\") && !!process.version && !!process.versions && !!process.versions.node;\n\n/**\n * Checks if a parsed URL is HTTPS\n *\n * @param {object} urlToCheck The url to check\n * @return {boolean} True if the URL is HTTPS; false otherwise.\n */\nexport function urlIsHTTPS(urlToCheck: { protocol: string }): boolean {\n return urlToCheck.protocol.toLowerCase() === Constants.HTTPS;\n}\n\n/**\n * Encodes an URI.\n *\n * @param {string} uri The URI to be encoded.\n * @return {string} The encoded URI.\n */\nexport function encodeUri(uri: string): string {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param {HttpOperationResponse} response The Http Response\n *\n * @return {object} The stripped version of Http Response.\n */\nexport function stripResponse(response: HttpOperationResponse): any {\n const strippedResponse: any = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param {WebResource} request The Http Request object\n *\n * @return {WebResource} The stripped version of Http Request.\n */\nexport function stripRequest(request: WebResourceLike): WebResourceLike {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n\n/**\n * Validates the given uuid as a string\n *\n * @param {string} uuid The uuid as a string that needs to be validated\n *\n * @return {boolean} True if the uuid is valid; false otherwise.\n */\nexport function isValidUuid(uuid: string): boolean {\n const validUuidRegex = new RegExp(\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\", \"ig\");\n return validUuidRegex.test(uuid);\n}\n\n/**\n * Provides an array of values of an object. For example\n * for a given object { \"a\": \"foo\", \"b\": \"bar\" }, the method returns [\"foo\", \"bar\"].\n *\n * @param {object} obj An object whose properties need to be enumerated so that it\"s values can be provided as an array\n *\n * @return {any[]} An array of values of the given object.\n */\nexport function objectValues(obj: { [key: string]: any; }): any[] {\n const result: any[] = [];\n if (obj && obj instanceof Object) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n result.push((obj)[key]);\n }\n }\n } else {\n throw new Error(`The provided object ${JSON.stringify(obj, undefined, 2)} is not a valid object that can be ` +\n `enumerated to provide its values as an array.`);\n }\n return result;\n}\n\n/**\n * Generated UUID\n *\n * @return {string} RFC4122 v4 UUID.\n */\nexport function generateUuid(): string {\n return uuidv4();\n}\n\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param {Array} promiseFactories An array of promise factories(A function that return a promise)\n *\n * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n *\n * @return A chain of resolved or rejected promises\n */\nexport function executePromisesSequentially(promiseFactories: Array, kickstart: any) {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n\n/**\n * Merges source object into the target object\n * @param {object} source The object that needs to be merged\n *\n * @param {object} target The object to be merged into\n *\n * @returns {object} Returns the merged target object.\n */\nexport function mergeObjects(source: { [key: string]: any; }, target: { [key: string]: any; }) {\n Object.keys(source).forEach((key) => {\n target[key] = source[key];\n });\n return target;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after t milliseconds.\n * @param {number} t The number of milliseconds to be delayed.\n * @param {T} value The value to be resolved with after a timeout of t milliseconds.\n * @returns {Promise} Resolved promise\n */\nexport function delay(t: number, value?: T): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(value), t));\n}\n\n/**\n * Service callback that is returned for REST requests initiated by the service client.\n */\nexport interface ServiceCallback {\n /**\n * A method that will be invoked as a callback to a service function.\n * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null.\n * @param {TResult} [result] The deserialized response body if an error did not occur.\n * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur.\n * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur.\n */\n (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void;\n}\n\n/**\n * Converts a Promise to a callback.\n * @param {Promise} promise The Promise to be converted to a callback\n * @returns {Function} A function that takes the callback (cb: Function): void\n * @deprecated generated code should instead depend on responseToBody\n */\nexport function promiseToCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: Function): void => {\n promise.then((data: any) => {\n cb(undefined, data);\n }, (err: Error) => {\n cb(err);\n });\n };\n}\n\n/**\n * Converts a Promise to a service callback.\n * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void\n */\nexport function promiseToServiceCallback(promise: Promise): Function {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb: ServiceCallback): void => {\n promise.then((data: HttpOperationResponse) => {\n process.nextTick(cb, undefined, data.parsedBody as T, data.request, data);\n }, (err: Error) => {\n process.nextTick(cb, err);\n });\n };\n}\n\nexport function prepareXMLRootList(obj: any, elementName: string) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n return { [elementName]: obj };\n}\n\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param {object} targetCtor The target object on which the properties need to be applied.\n * @param {Array} sourceCtors An array of source objects from which the properties need to be taken.\n */\nexport function applyMixins(targetCtor: any, sourceCtors: any[]): void {\n sourceCtors.forEach(sourceCtors => {\n Object.getOwnPropertyNames(sourceCtors.prototype).forEach(name => {\n targetCtor.prototype[name] = sourceCtors.prototype[name];\n });\n });\n}\n\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param {string} value The value to be validated for ISO 8601 duration format.\n * @return {boolean} `true` if valid, `false` otherwise.\n */\nexport function isDuration(value: string): boolean {\n return validateISODuration.test(value);\n}\n\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param {string | undefined} value The value to search and replace in.\n * @param {string} searchValue The value to search for in the value argument.\n * @param {string} replaceValue The value to replace searchValue with in the value argument.\n * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue.\n */\nexport function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n\n/**\n * Determines whether the given enity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param value Any entity\n * @return boolean - true is it is primitive type, false otherwise.\n */\nexport function isPrimitiveType(value: any): boolean {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as base64 from \"./util/base64\";\nimport * as utils from \"./util/utils\";\n\nexport class Serializer {\n constructor(public readonly modelMappers: { [key: string]: any } = {}, public readonly isXML?: boolean) { }\n\n validateConstraints(mapper: Mapper, value: any, objectName: string): void {\n const failValidation = (constraintName: keyof MapperConstraints, constraintValue: any) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && (value != undefined)) {\n const {\n ExclusiveMaximum,\n ExclusiveMinimum,\n InclusiveMaximum,\n InclusiveMinimum,\n MaxItems,\n MaxLength,\n MinItems,\n MinLength,\n MultipleOf,\n Pattern,\n UniqueItems\n } = mapper.constraints;\n if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && value > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && value < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n if (MaxItems != undefined && value.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && value.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && value.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && value.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && value % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern: RegExp = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if ((typeof value !== \"string\") || (value.match(pattern) === null)) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems && value.some((item: any, i: number, ar: Array) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n\n /**\n * Serialize the given object based on its metadata defined in the mapper\n *\n * @param {Mapper} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized\n *\n * @param {string} objectName Name of the serialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object\n */\n serialize(mapper: Mapper, object: any, objectName?: string): any {\n let payload: any = {};\n const mapperType = mapper.type.name as string;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = [];\n }\n\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n\n const { required, nullable } = mapper;\n\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n\n if (object == undefined) {\n payload = object;\n } else {\n // Validate Constraints if any\n this.validateConstraints(mapper, object, objectName);\n if (mapperType.match(/^any$/ig) !== null) {\n payload = object;\n } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n } else if (mapperType.match(/^Enum$/ig) !== null) {\n const enumMapper: EnumMapper = mapper as EnumMapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = serializeByteArrayType(objectName, object);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = serializeSequenceType(this, mapper as SequenceMapper, object, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = serializeDictionaryType(this, mapper as DictionaryMapper, object, objectName);\n } else if (mapperType.match(/^Composite$/ig) !== null) {\n payload = serializeCompositeType(this, mapper as CompositeMapper, object, objectName);\n }\n }\n return payload;\n }\n\n /**\n * Deserialize the given object based on its metadata defined in the mapper\n *\n * @param {object} mapper The mapper which defines the metadata of the serializable object\n *\n * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized\n *\n * @param {string} objectName Name of the deserialized object\n *\n * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object\n */\n deserialize(mapper: Mapper, responseBody: any, objectName: string): any {\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n\n let payload: any;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName!;\n }\n\n if (mapperType.match(/^Composite$/ig) !== null) {\n payload = deserializeCompositeType(this, mapper as CompositeMapper, responseBody, objectName);\n } else {\n if (this.isXML) {\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\") and body (\"_\") properties, then just reduce the responseBody value to\n * the body (\"_\") property.\n */\n if (responseBody[\"$\"] != undefined && responseBody[\"_\"] != undefined) {\n responseBody = responseBody[\"_\"];\n }\n }\n\n if (mapperType.match(/^Number$/ig) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n } else if (mapperType.match(/^Boolean$/ig) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n } else if (responseBody === \"false\") {\n payload = false;\n } else {\n payload = responseBody;\n }\n } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) {\n payload = responseBody;\n } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) {\n payload = new Date(responseBody);\n } else if (mapperType.match(/^UnixTime$/ig) !== null) {\n payload = unixTimeToDate(responseBody);\n } else if (mapperType.match(/^ByteArray$/ig) !== null) {\n payload = base64.decodeString(responseBody);\n } else if (mapperType.match(/^Base64Url$/ig) !== null) {\n payload = base64UrlToByteArray(responseBody);\n } else if (mapperType.match(/^Sequence$/ig) !== null) {\n payload = deserializeSequenceType(this, mapper as SequenceMapper, responseBody, objectName);\n } else if (mapperType.match(/^Dictionary$/ig) !== null) {\n payload = deserializeDictionaryType(this, mapper as DictionaryMapper, responseBody, objectName);\n }\n }\n\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n\n return payload;\n }\n}\n\nfunction trimEnd(str: string, ch: string) {\n let len = str.length;\n while ((len - 1) >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\n\nfunction bufferToBase64Url(buffer: any): string | undefined {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = base64.encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\n\nfunction base64UrlToByteArray(str: string): Uint8Array | undefined {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/\\-/g, \"+\").replace(/\\_/g, \"/\");\n // Base64 to Uint8Array.\n return base64.decodeString(str);\n}\n\nfunction splitSerializeName(prop: string | undefined): string[] {\n const classes: string[] = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n } else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n\n return classes;\n}\n\nfunction dateToUnixTime(d: string | Date): number | undefined {\n if (!d) {\n return undefined;\n }\n\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d as string);\n }\n return Math.floor((d as Date).getTime() / 1000);\n}\n\nfunction unixTimeToDate(n: number): Date | undefined {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\n\nfunction serializeBasicTypes(typeName: string, objectName: string, value: any): any {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/ig) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n } else if (typeName.match(/^String$/ig) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n } else if (typeName.match(/^Uuid$/ig) !== null) {\n if (!(typeof value.valueOf() === \"string\" && utils.isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n } else if (typeName.match(/^Boolean$/ig) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n } else if (typeName.match(/^Stream$/ig) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !(typeof Blob === \"function\" && value instanceof Blob)) {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`);\n }\n }\n }\n return value;\n}\n\nfunction serializeEnumType(objectName: string, allowedValues: Array, value: any): any {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\n\nfunction serializeByteArrayType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = base64.encodeByteArray(value);\n }\n return value;\n}\n\nfunction serializeBase64UrlType(objectName: string, value: any): any {\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n value = bufferToBase64Url(value);\n }\n return value;\n}\n\nfunction serializeDateTypes(typeName: string, value: any, objectName: string) {\n if (value != undefined) {\n if (typeName.match(/^Date$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10);\n } else if (typeName.match(/^DateTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString();\n } else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString();\n } else if (typeName.match(/^UnixTime$/ig) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n } else if (typeName.match(/^TimeSpan$/ig) !== null) {\n if (!utils.isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n value = value;\n }\n }\n return value;\n}\n\nfunction serializeSequenceType(serializer: Serializer, mapper: SequenceMapper, object: any, objectName: string) {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n tempArray[i] = serializer.serialize(elementType, object[i], objectName);\n }\n return tempArray;\n}\n\nfunction serializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, object: any, objectName: string) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(object)) {\n tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + \".\" + key);\n }\n return tempDictionary;\n}\n\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer the serializer containing the entire set of mappers\n * @param mapper the composite mapper to resolve\n */\nfunction resolveModelProperties(serializer: Serializer, mapper: CompositeMapper, objectName: string): { [propertyName: string]: Mapper } {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n\n const modelMapper = serializer.modelMappers[className];\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${className}\".`);\n }\n modelProps = modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${className}\" for object \"${objectName}\".`);\n }\n }\n\n return modelProps;\n}\n\nfunction serializeCompositeType(serializer: Serializer, mapper: CompositeMapper, object: any, objectName: string) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n\n if (object != undefined) {\n const payload: any = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n\n let propName: string | undefined;\n let parentObject: any = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n } else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n } else {\n const paths = splitSerializeName(propertyMapper.serializedName!);\n propName = paths.pop();\n\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if ((childObject == undefined) && (object[key] != undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n\n if (parentObject != undefined) {\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) {\n toSerialize = mapper.serializedName;\n }\n\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName);\n if (serializedValue !== undefined && propName != undefined) {\n if (propertyMapper.xmlIsAttribute) {\n // $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject.$ = parentObject.$ || {};\n parentObject.$[propName] = serializedValue;\n } else if (propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName!]: serializedValue };\n } else {\n parentObject[propName] = serializedValue;\n }\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every(pn => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]');\n }\n }\n }\n\n return payload;\n }\n return object;\n}\n\nfunction isSpecialXmlProperty(propertyName: string): boolean {\n return [\"$\", \"_\"].includes(propertyName);\n}\n\nfunction deserializeCompositeType(serializer: Serializer, mapper: CompositeMapper, responseBody: any, objectName: string): any {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance: { [key: string]: any } = {};\n const handledPropertyNames: string[] = [];\n\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName!);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n\n const headerCollectionPrefix = (propertyMapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary: any = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize((propertyMapper as DictionaryMapper).type.value, responseBody[headerKey], propertyObjectName);\n }\n\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n } else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody.$) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName!], propertyObjectName);\n } else {\n const propertyName = xmlElementName || xmlName || serializedName;\n let unwrappedProperty = responseBody[propertyName!];\n if (propertyMapper.xmlIsWrapped) {\n unwrappedProperty = responseBody[xmlName!];\n unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName!];\n\n const isEmptyWrappedList = unwrappedProperty === undefined;\n if (isEmptyWrappedList) {\n unwrappedProperty = [];\n }\n }\n instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName);\n }\n } else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res) break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) {\n propertyInstance = mapper.serializedName;\n }\n\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n } else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);\n instance[key] = serializedValue;\n }\n }\n }\n\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName: string) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]');\n }\n }\n } else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) {\n instance[key] = responseBody[key];\n }\n }\n }\n\n return instance;\n}\n\nfunction deserializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary: { [key: string]: any } = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName);\n }\n return tempDictionary;\n }\n return responseBody;\n}\n\nfunction deserializeSequenceType(serializer: Serializer, mapper: SequenceMapper, responseBody: any, objectName: string): any {\n /*jshint validthis: true */\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`);\n }\n return tempArray;\n }\n return responseBody;\n}\n\nfunction getPolymorphicMapper(serializer: Serializer, mapper: CompositeMapper, object: any, polymorphicPropertyName: \"clientName\" | \"serializedName\"): CompositeMapper {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator = discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\n\nfunction getPolymorphicDiscriminatorRecursively(serializer: Serializer, mapper: CompositeMapper): PolymorphicDiscriminator | undefined {\n return mapper.type.polymorphicDiscriminator\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent)\n || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className);\n}\n\nfunction getPolymorphicDiscriminatorSafely(serializer: Serializer, typeName?: string) {\n return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n\nexport interface MapperConstraints {\n InclusiveMaximum?: number;\n ExclusiveMaximum?: number;\n InclusiveMinimum?: number;\n ExclusiveMinimum?: number;\n MaxLength?: number;\n MinLength?: number;\n Pattern?: RegExp;\n MaxItems?: number;\n MinItems?: number;\n UniqueItems?: true;\n MultipleOf?: number;\n}\n\nexport type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType;\n\nexport interface SimpleMapperType {\n name: \"Base64Url\"\n | \"Boolean\"\n | \"ByteArray\"\n | \"Date\"\n | \"DateTime\"\n | \"DateTimeRfc1123\"\n | \"Object\"\n | \"Stream\"\n | \"String\"\n | \"TimeSpan\"\n | \"UnixTime\"\n | \"Uuid\"\n | \"Number\"\n | \"any\";\n}\n\nexport interface CompositeMapperType {\n name: \"Composite\";\n\n // Only one of the two below properties should be present.\n // Use className to reference another type definition,\n // and use modelProperties/additionalProperties when the reference to the other type has been resolved.\n className?: string;\n\n modelProperties?: { [propertyName: string]: Mapper };\n additionalProperties?: Mapper;\n\n uberParent?: string;\n polymorphicDiscriminator?: PolymorphicDiscriminator;\n}\n\nexport interface SequenceMapperType {\n name: \"Sequence\";\n element: Mapper;\n}\n\nexport interface DictionaryMapperType {\n name: \"Dictionary\";\n value: Mapper;\n}\n\nexport interface EnumMapperType {\n name: \"Enum\";\n allowedValues: any[];\n}\n\nexport interface BaseMapper {\n xmlName?: string;\n xmlIsAttribute?: boolean;\n xmlElementName?: string;\n xmlIsWrapped?: boolean;\n readOnly?: boolean;\n isConstant?: boolean;\n required?: boolean;\n nullable?: boolean;\n serializedName?: string;\n type: MapperType;\n defaultValue?: any;\n constraints?: MapperConstraints;\n}\n\nexport type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;\n\nexport interface PolymorphicDiscriminator {\n serializedName: string;\n clientName: string;\n [key: string]: string;\n}\n\nexport interface CompositeMapper extends BaseMapper {\n type: CompositeMapperType;\n}\n\nexport interface SequenceMapper extends BaseMapper {\n type: SequenceMapperType;\n}\n\nexport interface DictionaryMapper extends BaseMapper {\n type: DictionaryMapperType;\n headerCollectionPrefix?: string;\n}\n\nexport interface EnumMapper extends BaseMapper {\n type: EnumMapperType;\n}\n\nexport interface UrlParameterValue {\n value: string;\n skipUrlEncoding: boolean;\n}\n\n// TODO: why is this here?\nexport function serializeObject(toSerialize: any): any {\n if (toSerialize == undefined) return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = base64.encodeByteArray(toSerialize);\n return toSerialize;\n }\n else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n }\n else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n } else if (typeof toSerialize === \"object\") {\n const dictionary: { [key: string]: any } = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(toSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o: Array): { [K in T]: K } {\n const result: any = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n\nexport const MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\"\n]);\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders, HttpHeadersLike, isHttpHeadersLike } from \"./httpHeaders\";\nimport { OperationSpec } from \"./operationSpec\";\nimport { Mapper, Serializer } from \"./serializer\";\nimport { generateUuid } from \"./util/utils\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { AgentSettings, ProxySettings } from \"./serviceClient\";\n\nexport type HttpMethods = \"GET\" | \"PUT\" | \"POST\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\" | \"TRACE\";\nexport type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream);\n\n/**\n * Fired in response to upload or download progress.\n */\nexport type TransferProgressEvent = {\n /**\n * The number of bytes loaded so far.\n */\n loadedBytes: number\n};\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n readonly aborted: boolean;\n dispatchEvent: (event: Event) => boolean;\n onabort: ((this: AbortSignalLike, ev: Event) => any) | null;\n addEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n removeEventListener: (type: \"abort\", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;\n}\n\n/**\n * An abstraction over a REST call.\n */\nexport interface WebResourceLike {\n /**\n * The URL being accessed by the request.\n */\n url: string;\n /**\n * The HTTP method to use when making the request.\n */\n method: HttpMethods;\n /**\n * The HTTP body contents of the request.\n */\n body?: any;\n /**\n * The HTTP headers to use when making the request.\n */\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (\n operationSpec: OperationSpec,\n response: HttpOperationResponse\n ) => undefined | OperationResponse;\n formData?: any;\n /**\n * A query string represented as an object.\n */\n query?: { [key: string]: any };\n /**\n * Used to parse the response.\n */\n operationSpec?: OperationSpec;\n /**\n * If credentials (cookies) should be sent along during an XHR.\n */\n withCredentials: boolean;\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n * If the request is terminated, an `AbortError` is thrown.\n */\n timeout: number;\n /**\n * Proxy configuration.\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP(S) agent configuration.\n */\n agentSettings?: AgentSettings;\n /**\n * If the connection should be reused.\n */\n keepAlive?: boolean;\n\n /**\n * Used to abort the request later.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void;\n\n /**\n * Sets options on the request.\n */\n prepare(options: RequestPrepareOptions): WebResourceLike;\n /**\n * Clone this request object.\n */\n clone(): WebResourceLike;\n}\n\nexport function isWebResourceLike(object: any): object is WebResourceLike {\n if (typeof object !== \"object\") {\n return false;\n }\n if (\n typeof object.url === \"string\" &&\n typeof object.method === \"string\" &&\n typeof object.headers === \"object\" &&\n isHttpHeadersLike(object.headers) &&\n typeof object.validateRequestProperties === \"function\" &&\n typeof object.prepare === \"function\" &&\n typeof object.clone === \"function\"\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n *\n * @constructor\n */\nexport class WebResource {\n url: string;\n method: HttpMethods;\n body?: any;\n headers: HttpHeadersLike;\n /**\n * Whether or not the body of the HttpOperationResponse should be treated as a stream.\n */\n streamResponseBody?: boolean;\n /**\n * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the\n * HttpOperationResponse should be deserialized.\n */\n shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);\n /**\n * A function that returns the proper OperationResponse for the given OperationSpec and\n * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will\n * be used.\n */\n operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse);\n formData?: any;\n query?: { [key: string]: any; };\n operationSpec?: OperationSpec;\n withCredentials: boolean;\n timeout: number;\n proxySettings?: ProxySettings;\n keepAlive?: boolean;\n agentSettings?: AgentSettings;\n\n abortSignal?: AbortSignalLike;\n\n /** Callback which fires upon upload progress. */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /** Callback which fires upon download progress. */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n constructor(\n url?: string,\n method?: HttpMethods,\n body?: any,\n query?: { [key: string]: any; },\n headers?: { [key: string]: any; } | HttpHeadersLike,\n streamResponseBody?: boolean,\n withCredentials?: boolean,\n abortSignal?: AbortSignalLike,\n timeout?: number,\n onUploadProgress?: (progress: TransferProgressEvent) => void,\n onDownloadProgress?: (progress: TransferProgressEvent) => void,\n proxySettings?: ProxySettings,\n keepAlive?: boolean,\n agentSettings?: AgentSettings) {\n\n this.streamResponseBody = streamResponseBody;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers));\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.agentSettings = agentSettings;\n }\n\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties(): void {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n\n /**\n * Prepares the request.\n * @param {RequestPrepareOptions} options Options to provide for preparing the request.\n * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options: RequestPrepareOptions): WebResource {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n\n if (options.method == undefined || typeof options.method.valueOf() !== \"string\") {\n throw new Error(\"options.method must be a string.\");\n }\n\n if (options.url && options.pathTemplate) {\n throw new Error(\"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\");\n }\n\n\n if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== \"string\") && (options.url == undefined || typeof options.url.valueOf() !== \"string\")) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error(\"options.url must be of type \\\"string\\\".\");\n }\n this.url = options.url;\n }\n\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error(\"The provided method \\\"\" + options.method + \"\\\" is invalid. Supported HTTP methods are: \" + JSON.stringify(validMethods));\n }\n }\n this.method = (options.method.toUpperCase() as HttpMethods);\n\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error(\"options.pathTemplate must be of type \\\"string\\\".\");\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url = baseUrl + (baseUrl.endsWith(\"/\") ? \"\" : \"/\") + (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({\\w*\\s*\\w*})/ig);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`);\n }\n segments.forEach(function (item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = (pathParameters as { [key: string]: any })[pathParamName];\n if (pathParam === null || pathParam === undefined || !(typeof pathParam === \"string\" || typeof pathParam === \"object\")) {\n throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in ${pathParameters} - ${JSON.stringify(pathParameters, undefined, 2)}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`);\n }\n\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(`options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n } else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`);\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam: any = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n }\n else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(`options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n } else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n }// end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", generateUuid());\n }\n\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty\n this.body = options.body;\n if (options.body != undefined) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n } else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, \"requestBody\");\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n\n return this;\n }\n\n /**\n * Clone this WebResource HTTP request object.\n * @returns {WebResource} The clone of this WebResource HTTP request object.\n */\n clone(): WebResource {\n const result = new WebResource(\n this.url,\n this.method,\n this.body,\n this.query,\n this.headers && this.headers.clone(),\n this.streamResponseBody,\n this.withCredentials,\n this.abortSignal,\n this.timeout,\n this.onUploadProgress,\n this.onDownloadProgress,\n this.proxySettings,\n this.keepAlive,\n this.agentSettings);\n\n if (this.formData) {\n result.formData = this.formData;\n }\n\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n\n return result;\n }\n}\n\nexport interface RequestPrepareOptions {\n /**\n * The HTTP request method. Valid values are \"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\",\n * or \"PATCH\".\n */\n method: HttpMethods;\n /**\n * The request url. It may or may not have query parameters in it. Either provide the \"url\" or\n * provide the \"pathTemplate\" in the options object. Both the options are mutually exclusive.\n */\n url?: string;\n /**\n * A dictionary of query parameters to be appended to the url, where\n * the \"key\" is the \"query-parameter-name\" and the \"value\" is the \"query-parameter-value\".\n * The \"query-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"query-parameter-value\".\n * Example:\n * - query-parameter-value in \"object\" format: { \"query-parameter-name\": { value: \"query-parameter-value\", skipUrlEncoding: true } }\n * - query-parameter-value in \"string\" format: { \"query-parameter-name\": \"query-parameter-value\"}.\n * Note: \"If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url.\n */\n queryParameters?: { [key: string]: any | ParameterValue };\n /**\n * The path template of the request url. Either provide the \"url\" or provide the \"pathTemplate\" in\n * the options object. Both the options are mutually exclusive.\n * Example: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}\"\n */\n pathTemplate?: string;\n /**\n * The base url of the request. Default value is: \"https://management.azure.com\". This is\n * applicable only with pathTemplate. If you are providing options.url then it is expected that\n * you provide the complete url.\n */\n baseUrl?: string;\n /**\n * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate.\n * Here the key is the \"path-parameter-name\" and the value is the \"path-parameter-value\".\n * The \"path-parameter-value\" can be of type \"string\" or it can be of type \"object\".\n * The \"object\" format should be used when you want to skip url encoding. While using the object format,\n * the object must have a property named value which provides the \"path-parameter-value\".\n * Example:\n * - path-parameter-value in \"object\" format: { \"path-parameter-name\": { value: \"path-parameter-value\", skipUrlEncoding: true } }\n * - path-parameter-value in \"string\" format: { \"path-parameter-name\": \"path-parameter-value\" }.\n */\n pathParameters?: { [key: string]: any | ParameterValue };\n formData?: { [key: string]: any };\n /**\n * A dictionary of request headers that need to be applied to the request.\n * Here the key is the \"header-name\" and the value is the \"header-value\". The header-value MUST be of type string.\n * - ContentType must be provided with the key name as \"Content-Type\". Default value \"application/json; charset=utf-8\".\n * - \"Transfer-Encoding\" is set to \"chunked\" by default if \"options.bodyIsStream\" is set to true.\n * - \"Content-Type\" is set to \"application/octet-stream\" by default if \"options.bodyIsStream\" is set to true.\n * - \"accept-language\" by default is set to \"en-US\"\n * - \"x-ms-client-request-id\" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true\n */\n headers?: { [key: string]: any };\n /**\n * When set to true, instructs the client to not set \"x-ms-client-request-id\" header to a new Guid().\n */\n disableClientRequestId?: boolean;\n /**\n * The request body. It can be of any type. This value will be serialized if it is not a stream.\n */\n body?: any;\n /**\n * Provides information on how to serialize the request body.\n */\n serializationMapper?: Mapper;\n /**\n * A dictionary of mappers that may be used while [de]serialization.\n */\n mappers?: { [x: string]: any };\n /**\n * Provides information on how to deserialize the response body.\n */\n deserializationMapper?: object;\n /**\n * Indicates whether this method should JSON.stringify() the request body. Default value: false.\n */\n disableJsonStringifyOnBody?: boolean;\n /**\n * Indicates whether the request body is a stream (useful for file upload scenarios).\n */\n bodyIsStream?: boolean;\n abortSignal?: AbortSignalLike;\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n}\n\n/**\n * The Parameter value provided for path or query parameters in RequestPrepareOptions\n */\nexport interface ParameterValue {\n value: any;\n skipUrlEncoding: boolean;\n [key: string]: any;\n}\n\n/**\n * Describes the base structure of the options object that will be used in every operation.\n */\nexport interface RequestOptionsBase {\n /**\n * @property {object} [customHeaders] User defined custom request headers that\n * will be applied before the request is sent.\n */\n customHeaders?: { [key: string]: string };\n\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * The number of milliseconds a request can take before automatically being terminated.\n */\n timeout?: number;\n\n /**\n * Callback which fires upon upload progress.\n */\n onUploadProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback which fires upon download progress.\n */\n onDownloadProgress?: (progress: TransferProgressEvent) => void;\n\n [key: string]: any;\n}\n","/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n","import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\n\nexport class RestError extends Error {\n static readonly REQUEST_SEND_ERROR: string = \"REQUEST_SEND_ERROR\";\n static readonly REQUEST_ABORTED_ERROR: string = \"REQUEST_ABORTED_ERROR\";\n static readonly PARSE_ERROR: string = \"PARSE_ERROR\";\n\n code?: string;\n statusCode?: number;\n request?: WebResourceLike;\n response?: HttpOperationResponse;\n body?: any;\n constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any) {\n super(message);\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n this.body = body;\n\n Object.setPrototypeOf(this, RestError.prototype);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport AbortController from \"abort-controller\";\nimport FormData from \"form-data\";\n\nimport { HttpClient } from \"./httpClient\";\nimport { WebResourceLike } from \"./webResource\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { HttpHeaders, HttpHeadersLike } from \"./httpHeaders\";\nimport { RestError } from \"./restError\";\nimport { Readable, Transform } from \"stream\";\n\ninterface FetchError extends Error {\n code?: string;\n errno?: string;\n type?: string;\n}\n\nexport abstract class FetchHttpClient implements HttpClient {\n async sendRequest(httpRequest: WebResourceLike): Promise {\n if (!httpRequest && typeof httpRequest !== \"object\") {\n throw new Error(\"'httpRequest' (WebResource) cannot be null or undefined and must be of type object.\");\n }\n\n const abortController = new AbortController();\n if (httpRequest.abortSignal) {\n if (httpRequest.abortSignal.aborted) {\n throw new RestError(\"The request was aborted\", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest);\n }\n\n httpRequest.abortSignal.addEventListener(\"abort\", (event: Event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n });\n }\n\n if (httpRequest.timeout) {\n setTimeout(() => {\n abortController.abort();\n }, httpRequest.timeout);\n }\n\n if (httpRequest.formData) {\n const formData: any = httpRequest.formData;\n const requestForm = new FormData();\n const appendFormValue = (key: string, value: any) => {\n // value function probably returns a stream so we can provide a fresh stream on each retry\n if (typeof value === \"function\") {\n value = value();\n }\n if (value && value.hasOwnProperty(\"value\") && value.hasOwnProperty(\"options\")) {\n requestForm.append(key, value.value, value.options);\n } else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n } else {\n appendFormValue(formKey, formValue);\n }\n }\n\n httpRequest.body = requestForm;\n httpRequest.formData = undefined;\n const contentType = httpRequest.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n if (typeof requestForm.getBoundary === \"function\") {\n httpRequest.headers.set(\"Content-Type\", `multipart/form-data; boundary=${requestForm.getBoundary()}`);\n } else {\n // browser will automatically apply a suitable content-type header\n httpRequest.headers.remove(\"Content-Type\");\n }\n }\n }\n\n let body = httpRequest.body\n ? (typeof httpRequest.body === \"function\" ? httpRequest.body() : httpRequest.body)\n : undefined;\n if (httpRequest.onUploadProgress && httpRequest.body) {\n let loadedBytes = 0;\n const uploadReportStream = new Transform({\n transform: (chunk: string | Buffer, _encoding, callback) => {\n loadedBytes += chunk.length;\n httpRequest.onUploadProgress!({ loadedBytes });\n callback(undefined, chunk);\n }\n });\n\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n } else {\n uploadReportStream.end(body);\n }\n\n body = uploadReportStream;\n }\n\n const platformSpecificRequestInit: Partial = await this.prepareRequest(httpRequest);\n\n const requestInit: RequestInit = {\n body: body,\n headers: httpRequest.headers.rawHeaders(),\n method: httpRequest.method,\n signal: abortController.signal,\n ...platformSpecificRequestInit\n };\n\n try {\n const response: Response = await this.fetch(httpRequest.url, requestInit);\n\n const headers = parseHeaders(response.headers);\n const operationResponse: HttpOperationResponse = {\n headers: headers,\n request: httpRequest,\n status: response.status,\n readableStreamBody: httpRequest.streamResponseBody ? (response.body as unknown) as NodeJS.ReadableStream : undefined,\n bodyAsText: !httpRequest.streamResponseBody ? await response.text() : undefined,\n };\n\n const onDownloadProgress = httpRequest.onDownloadProgress;\n if (onDownloadProgress) {\n const responseBody: ReadableStream | undefined = response.body || undefined;\n\n if (isReadableStream(responseBody)) {\n let loadedBytes = 0;\n const downloadReportStream = new Transform({\n transform: (chunk: string | Buffer, _encoding, callback) => {\n loadedBytes += chunk.length;\n onDownloadProgress({ loadedBytes });\n callback(undefined, chunk);\n }\n });\n responseBody.pipe(downloadReportStream);\n operationResponse.readableStreamBody = downloadReportStream;\n } else {\n const length = parseInt(headers.get(\"Content-Length\")!) || undefined;\n if (length) {\n // Calling callback for non-stream response for consistency with browser\n onDownloadProgress({ loadedBytes: length });\n }\n }\n }\n\n await this.processRequest(operationResponse);\n\n return operationResponse;\n } catch (error) {\n const fetchError: FetchError = error;\n if (fetchError.code === \"ENOTFOUND\") {\n throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest);\n } else if (fetchError.type === \"aborted\") {\n throw new RestError(\"The request was aborted\", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest);\n }\n\n throw fetchError;\n } finally {\n }\n }\n\n abstract async prepareRequest(httpRequest: WebResourceLike): Promise>;\n abstract async processRequest(operationResponse: HttpOperationResponse): Promise;\n abstract async fetch(input: RequestInfo, init?: RequestInit): Promise;\n}\n\nfunction isReadableStream(body: any): body is Readable {\n return body && typeof body.pipe === \"function\";\n}\n\nexport function parseHeaders(headers: Headers): HttpHeadersLike {\n const httpHeaders = new HttpHeaders();\n\n headers.forEach((value, key) => {\n httpHeaders.set(key, value);\n });\n\n return httpHeaders;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { replaceAll } from \"./util/utils\";\n\ntype URLQueryParseState = \"ParameterName\" | \"ParameterValue\" | \"Invalid\";\n\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nexport class URLQuery {\n private readonly _rawQuery: { [queryParameterName: string]: string | string[] } = {};\n\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n public any(): boolean {\n return Object.keys(this._rawQuery).length > 0;\n }\n\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n public set(parameterName: string, parameterValue: any): void {\n if (parameterName) {\n if (parameterValue != undefined) {\n const newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n } else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n public get(parameterName: string): string | string[] | undefined {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n public toString(): string {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n } else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n\n /**\n * Parse a URLQuery from the provided text.\n */\n public static parse(text: string): URLQuery {\n const result = new URLQuery();\n\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n\n let currentState: URLQueryParseState = \"ParameterName\";\n\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter: string = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"=\":\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"Invalid\";\n break;\n\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n\n case \"Invalid\":\n if (currentCharacter === \"&\") {\n currentState = \"ParameterName\";\n }\n break;\n\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n\n return result;\n }\n}\n\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nexport class URLBuilder {\n private _scheme: string | undefined;\n private _host: string | undefined;\n private _port: string | undefined;\n private _path: string | undefined;\n private _query: URLQuery | undefined;\n\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n public setScheme(scheme: string | undefined): void {\n if (!scheme) {\n this._scheme = undefined;\n } else {\n this.set(scheme, \"SCHEME\");\n }\n }\n\n /**\n * Get the scheme that has been set in this URL.\n */\n public getScheme(): string | undefined {\n return this._scheme;\n }\n\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n public setHost(host: string | undefined): void {\n if (!host) {\n this._host = undefined;\n } else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n\n /**\n * Get the host that has been set in this URL.\n */\n public getHost(): string | undefined {\n return this._host;\n }\n\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n public setPort(port: number | string | undefined): void {\n if (port == undefined || port === \"\") {\n this._port = undefined;\n } else {\n this.set(port.toString(), \"PORT\");\n }\n }\n\n /**\n * Get the port that has been set in this URL.\n */\n public getPort(): string | undefined {\n return this._port;\n }\n\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n public setPath(path: string | undefined): void {\n if (!path) {\n this._path = undefined;\n } else {\n if (path.indexOf(\"://\") !== -1) {\n this.set(path, \"SCHEME\");\n } else {\n this.set(path, \"PATH\");\n }\n }\n }\n\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n public appendPath(path: string | undefined): void {\n if (path) {\n let currentPath: string | undefined = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n\n /**\n * Get the path that has been set in this URL.\n */\n public getPath(): string | undefined {\n return this._path;\n }\n\n /**\n * Set the query in this URL.\n */\n public setQuery(query: string | undefined): void {\n if (!query) {\n this._query = undefined;\n } else {\n this._query = URLQuery.parse(query);\n }\n }\n\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n public setQueryParameter(queryParameterName: string, queryParameterValue: any): void {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n public getQueryParameterValue(queryParameterName: string): string | string[] | undefined {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n\n /**\n * Get the query in this URL.\n */\n public getQuery(): string | undefined {\n return this._query ? this._query.toString() : undefined;\n }\n\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n private set(text: string, startState: URLTokenizerState): void {\n const tokenizer = new URLTokenizer(text, startState);\n\n while (tokenizer.next()) {\n const token: URLToken | undefined = tokenizer.current();\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n\n case \"PATH\":\n const tokenPath: string | undefined = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n\n public toString(): string {\n let result = \"\";\n\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n\n if (this._host) {\n result += this._host;\n }\n\n if (this._port) {\n result += `:${this._port}`;\n }\n\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n\n return result;\n }\n\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n public replaceAll(searchValue: string, replaceValue: string): void {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n\n public static parse(text: string): URLBuilder {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\n\ntype URLTokenizerState = \"SCHEME\" | \"SCHEME_OR_HOST\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\" | \"DONE\";\n\ntype URLTokenType = \"SCHEME\" | \"HOST\" | \"PORT\" | \"PATH\" | \"QUERY\";\n\nexport class URLToken {\n public constructor(public readonly text: string, public readonly type: URLTokenType) {\n }\n\n public static scheme(text: string): URLToken {\n return new URLToken(text, \"SCHEME\");\n }\n\n public static host(text: string): URLToken {\n return new URLToken(text, \"HOST\");\n }\n\n public static port(text: string): URLToken {\n return new URLToken(text, \"PORT\");\n }\n\n public static path(text: string): URLToken {\n return new URLToken(text, \"PATH\");\n }\n\n public static query(text: string): URLToken {\n return new URLToken(text, \"QUERY\");\n }\n}\n\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nexport function isAlphaNumericCharacter(character: string): boolean {\n const characterCode: number = character.charCodeAt(0);\n return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */);\n}\n\n/**\n * A class that tokenizes URL strings.\n */\nexport class URLTokenizer {\n readonly _textLength: number;\n _currentState: URLTokenizerState;\n _currentIndex: number;\n _currentToken: URLToken | undefined;\n\n public constructor(readonly _text: string, state?: URLTokenizerState) {\n this._textLength = _text ? _text.length : 0;\n this._currentState = state != undefined ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n public current(): URLToken | undefined {\n return this._currentToken;\n }\n\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n public next(): boolean {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n } else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n\n case \"HOST\":\n nextHost(this);\n break;\n\n case \"PORT\":\n nextPort(this);\n break;\n\n case \"PATH\":\n nextPath(this);\n break;\n\n case \"QUERY\":\n nextQuery(this);\n break;\n\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n\n\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer: URLTokenizer): string {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer: URLTokenizer): boolean {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer: URLTokenizer): string {\n return tokenizer._text[tokenizer._currentIndex];\n}\n\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer: URLTokenizer, step?: number): void {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer: URLTokenizer, charactersToPeek: number): string {\n let endIndex: number = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer: URLTokenizer, condition: (character: string) => boolean): string {\n let result = \"\";\n\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter: string = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n } else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n\n return result;\n}\n\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer: URLTokenizer): string {\n return readWhile(tokenizer, (character: string) => isAlphaNumericCharacter(character));\n}\n\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer: URLTokenizer, ...terminatingCharacters: string[]): string {\n return readWhile(tokenizer, (character: string) => terminatingCharacters.indexOf(character) === -1);\n}\n\nfunction nextScheme(tokenizer: URLTokenizer): void {\n const scheme: string = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"HOST\";\n }\n}\n\nfunction nextSchemeOrHost(tokenizer: URLTokenizer): void {\n const schemeOrHost: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n } else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\n\nfunction nextHost(tokenizer: URLTokenizer): void {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n\n const host: string = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPort(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n\n const port: string = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextPath(tokenizer: URLTokenizer): void {\n const path: string = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n } else {\n tokenizer._currentState = \"QUERY\";\n }\n}\n\nfunction nextQuery(tokenizer: URLTokenizer): void {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n\n const query: string = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport * as tunnel from \"tunnel\";\n\nimport { ProxySettings } from \"./serviceClient\";\nimport { URLBuilder } from \"./url\";\nimport { HttpHeadersLike } from \"./httpHeaders\";\n\nexport type ProxyAgent = { isHttps: boolean; agent: http.Agent | https.Agent };\nexport function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent {\n const tunnelOptions: tunnel.HttpsOverHttpsOptions = {\n proxy: {\n host: URLBuilder.parse(proxySettings.host).getHost() as string,\n port: proxySettings.port,\n headers: (headers && headers.rawHeaders()) || {}\n }\n };\n\n if ((proxySettings.username && proxySettings.password)) {\n tunnelOptions.proxy!.proxyAuth = `${proxySettings.username}:${proxySettings.password}`;\n }\n\n const requestScheme = URLBuilder.parse(requestUrl).getScheme() || \"\";\n const isRequestHttps = requestScheme.toLowerCase() === \"https\";\n const proxyScheme = URLBuilder.parse(proxySettings.host).getScheme() || \"\";\n const isProxyHttps = proxyScheme.toLowerCase() === \"https\";\n\n const proxyAgent = {\n isHttps: isRequestHttps,\n agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions)\n };\n\n return proxyAgent;\n}\n\nexport function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: tunnel.HttpsOverHttpsOptions): http.Agent | https.Agent {\n if (isRequestHttps && isProxyHttps) {\n return tunnel.httpsOverHttps(tunnelOptions);\n } else if (isRequestHttps && !isProxyHttps) {\n return tunnel.httpsOverHttp(tunnelOptions);\n } else if (!isRequestHttps && isProxyHttps) {\n return tunnel.httpOverHttps(tunnelOptions);\n } else {\n return tunnel.httpOverHttp(tunnelOptions);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as tough from \"tough-cookie\";\nimport * as http from \"http\";\nimport * as https from \"https\";\nimport \"node-fetch\";\n\nimport { FetchHttpClient } from \"./fetchHttpClient\";\nimport { HttpOperationResponse } from \"./httpOperationResponse\";\nimport { WebResourceLike } from \"./webResource\";\nimport { createProxyAgent, ProxyAgent } from \"./proxyAgent\";\n\ninterface GlobalWithFetch extends NodeJS.Global {\n fetch: (input: RequestInfo, init?: RequestInit) => Promise;\n}\n\nconst globalWithFetch = global as GlobalWithFetch;\nif (typeof globalWithFetch.fetch !== \"function\") {\n const fetch = require(\"node-fetch\").default;\n globalWithFetch.fetch = fetch;\n}\n\n\nexport class NodeFetchHttpClient extends FetchHttpClient {\n private readonly cookieJar = new tough.CookieJar(undefined, { looseMode: true });\n\n async fetch(input: RequestInfo, init?: RequestInit): Promise {\n return fetch(input, init);\n }\n\n async prepareRequest(httpRequest: WebResourceLike): Promise> {\n const requestInit: Partial = {};\n\n if (this.cookieJar && !httpRequest.headers.get(\"Cookie\")) {\n const cookieString = await new Promise((resolve, reject) => {\n this.cookieJar!.getCookieString(httpRequest.url, (err, cookie) => {\n if (err) {\n reject(err);\n } else {\n resolve(cookie);\n }\n });\n });\n\n httpRequest.headers.set(\"Cookie\", cookieString);\n }\n\n if (httpRequest.agentSettings) {\n const {http: httpAgent, https: httpsAgent} = httpRequest.agentSettings;\n if (httpsAgent && httpRequest.url.startsWith(\"https\")) {\n requestInit.agent = httpsAgent;\n } else if (httpAgent) {\n requestInit.agent = httpAgent;\n }\n } else if (httpRequest.proxySettings) {\n const tunnel: ProxyAgent = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);\n requestInit.agent = tunnel.agent;\n }\n\n if (httpRequest.keepAlive === true) {\n if (requestInit.agent) {\n requestInit.agent.keepAlive = true;\n } else {\n const options: http.AgentOptions | https.AgentOptions = { keepAlive: true };\n const agent = httpRequest.url.startsWith(\"https\") ? new https.Agent(options) : new http.Agent(options);\n requestInit.agent = agent;\n }\n }\n\n return requestInit;\n }\n\n async processRequest(operationResponse: HttpOperationResponse): Promise {\n if (this.cookieJar) {\n const setCookieHeader = operationResponse.headers.get(\"Set-Cookie\");\n if (setCookieHeader != undefined) {\n await new Promise((resolve, reject) => {\n this.cookieJar!.setCookie(\n setCookieHeader,\n operationResponse.request.url,\n { ignoreError: true },\n err => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexport enum HttpPipelineLogLevel {\n /**\n * A log level that indicates that no logs will be logged.\n */\n OFF,\n\n /**\n * An error log.\n */\n ERROR,\n\n /**\n * A warning log.\n */\n WARNING,\n\n /**\n * An information log.\n */\n INFO\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { Mapper } from \"./serializer\";\n\nexport type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath };\n\n/**\n * A common interface that all Operation parameter's extend.\n */\nexport interface OperationParameter {\n /**\n * The path to this parameter's value in OperationArguments or the object that contains paths for\n * each property's value in OperationArguments.\n */\n parameterPath: ParameterPath;\n\n /**\n * The mapper that defines how to validate and serialize this parameter's value.\n */\n mapper: Mapper;\n}\n\n/**\n * A parameter for an operation that will be substituted into the operation's request URL.\n */\nexport interface OperationURLParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the URL parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n}\n\n/**\n * A parameter for an operation that will be added as a query parameter to the operation's HTTP\n * request.\n */\nexport interface OperationQueryParameter extends OperationParameter {\n /**\n * Whether or not to skip encoding the query parameter's value before adding it to the URL.\n */\n skipEncoding?: boolean;\n\n /**\n * If this query parameter's value is a collection, what type of format should the value be\n * converted to.\n */\n collectionFormat?: QueryCollectionFormat;\n}\n\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nexport function getPathStringFromParameter(parameter: OperationParameter): string {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\n\nexport function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string {\n let result: string;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n } else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n } else {\n result = mapper.serializedName!;\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { OperationParameter, OperationQueryParameter, OperationURLParameter } from \"./operationParameter\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { MapperType, Serializer } from \"./serializer\";\nimport { HttpMethods } from \"./webResource\";\n\n/**\n * A specification that defines an operation.\n */\nexport interface OperationSpec {\n /**\n * The serializer to use in this operation.\n */\n readonly serializer: Serializer;\n\n /**\n * The HTTP method that should be used by requests for this operation.\n */\n readonly httpMethod: HttpMethods;\n\n /**\n * The URL that was provided in the service's specification. This will still have all of the URL\n * template variables in it. If this is not provided when the OperationSpec is created, then it\n * will be populated by a \"baseUri\" property on the ServiceClient.\n */\n readonly baseUrl?: string;\n\n /**\n * The fixed path for this operation's URL. This will still have all of the URL template variables\n * in it.\n */\n readonly path?: string;\n\n /**\n * The content type of the request body. This value will be used as the \"Content-Type\" header if\n * it is provided.\n */\n readonly contentType?: string;\n\n /**\n * The parameter that will be used to construct the HTTP request's body.\n */\n readonly requestBody?: OperationParameter;\n\n /**\n * Whether or not this operation uses XML request and response bodies.\n */\n readonly isXML?: boolean;\n\n /**\n * The parameters to the operation method that will be substituted into the constructed URL.\n */\n readonly urlParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be added to the constructed URL's query.\n */\n readonly queryParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be converted to headers on the operation's\n * HTTP request.\n */\n readonly headerParameters?: ReadonlyArray;\n\n /**\n * The parameters to the operation method that will be used to create a formdata body for the\n * operation's HTTP request.\n */\n readonly formDataParameters?: ReadonlyArray;\n\n /**\n * The different types of responses that this operation can return based on what status code is\n * returned.\n */\n readonly responses: { [responseCode: string]: OperationResponse };\n}\n\nexport function isStreamOperation(operationSpec: OperationSpec): boolean {\n let result = false;\n for (const statusCode in operationSpec.responses) {\n const operationResponse: OperationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result = true;\n break;\n }\n }\n return result;\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as xml2js from \"xml2js\";\n\nexport function stringifyXML(obj: any, opts?: { rootName?: string }) {\n const builder = new xml2js.Builder({\n explicitArray: false,\n explicitCharkey: false,\n rootName: (opts || {}).rootName,\n renderOpts: {\n pretty: false\n }\n });\n return builder.buildObject(obj);\n}\n\nexport function parseXML(str: string): Promise {\n const xmlParser = new xml2js.Parser({\n explicitArray: false,\n explicitCharkey: false,\n explicitRoot: false\n });\n return new Promise((resolve, reject) => {\n if (!str) {\n reject(new Error(\"Document is empty\"));\n } else {\n xmlParser.parseString(str, (err?: Error, res?: any) => {\n if (err) {\n reject(err);\n } else {\n resolve(res);\n }\n });\n }\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { HttpPipelineLogger } from \"../httpPipelineLogger\";\nimport { HttpPipelineLogLevel } from \"../httpPipelineLogLevel\";\nimport { WebResourceLike } from \"../webResource\";\n\n/**\n * Creates a new RequestPolicy per-request that uses the provided nextPolicy.\n */\nexport type RequestPolicyFactory = {\n create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy\n};\n\nexport interface RequestPolicy {\n sendRequest(httpRequest: WebResourceLike): Promise;\n}\n\nexport abstract class BaseRequestPolicy implements RequestPolicy {\n protected constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike) {\n }\n\n public abstract sendRequest(webResource: WebResourceLike): Promise;\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return this._options.shouldLog(logLevel);\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n this._options.log(logLevel, message);\n }\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport interface RequestPolicyOptionsLike {\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel: HttpPipelineLogLevel): boolean;\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n log(logLevel: HttpPipelineLogLevel, message: string): void;\n}\n\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nexport class RequestPolicyOptions implements RequestPolicyOptionsLike {\n constructor(private _logger?: HttpPipelineLogger) {\n }\n\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n public shouldLog(logLevel: HttpPipelineLogLevel): boolean {\n return !!this._logger &&\n logLevel !== HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel;\n }\n\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel The log level of this log.\n * @param message The message of this log.\n */\n public log(logLevel: HttpPipelineLogLevel, message: string): void {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { OperationResponse } from \"../operationResponse\";\nimport { OperationSpec, isStreamOperation } from \"../operationSpec\";\nimport { RestError } from \"../restError\";\nimport { Mapper, MapperType } from \"../serializer\";\nimport * as utils from \"../util/utils\";\nimport { parseXML } from \"../util/xml\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\n/**\n * The content-types that will indicate that an operation response should be deserialized in a\n * particular way.\n */\nexport interface DeserializationContentTypes {\n /**\n * The content-types that indicate that an operation response should be deserialized as JSON.\n * Defaults to [ \"application/json\", \"text/json\" ].\n */\n json?: string[];\n\n /**\n * The content-types that indicate that an operation response should be deserialized as XML.\n * Defaults to [ \"application/xml\", \"application/atom+xml\" ].\n */\n xml?: string[];\n}\n\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nexport function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options);\n }\n };\n}\n\nexport const defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nexport const defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nexport class DeserializationPolicy extends BaseRequestPolicy {\n public readonly jsonContentTypes: string[];\n public readonly xmlContentTypes: string[];\n\n constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike) {\n super(nextPolicy, options);\n\n this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes;\n this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes;\n }\n\n public async sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then((response: HttpOperationResponse) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response));\n }\n}\n\nfunction getOperationResponse(parsedResponse: HttpOperationResponse): undefined | OperationResponse {\n let result: OperationResponse | undefined;\n const request: WebResourceLike = parsedResponse.request;\n const operationSpec: OperationSpec | undefined = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter: undefined | ((operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse)) = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n } else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\n\nfunction shouldDeserializeResponse(parsedResponse: HttpOperationResponse): boolean {\n const shouldDeserialize: undefined | boolean | ((response: HttpOperationResponse) => boolean) = parsedResponse.request.shouldDeserialize;\n let result: boolean;\n if (shouldDeserialize === undefined) {\n result = true;\n } else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n } else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n\nexport function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise {\n return parse(jsonContentTypes, xmlContentTypes, response).then(parsedResponse => {\n const shouldDeserialize: boolean = shouldDeserializeResponse(parsedResponse);\n if (shouldDeserialize) {\n const operationSpec: OperationSpec | undefined = parsedResponse.request.operationSpec;\n if (operationSpec && operationSpec.responses) {\n const statusCode: number = parsedResponse.status;\n\n const expectedStatusCodes: string[] = Object.keys(operationSpec.responses);\n\n const hasNoExpectedStatusCodes: boolean = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n\n const responseSpec: OperationResponse | undefined = getOperationResponse(parsedResponse);\n\n const isExpectedStatusCode: boolean = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec;\n if (!isExpectedStatusCode) {\n const defaultResponseSpec: OperationResponse = operationSpec.responses.default;\n if (defaultResponseSpec) {\n const initialErrorMessage: string = isStreamOperation(operationSpec)\n ? `Unexpected status code: ${statusCode}`\n : parsedResponse.bodyAsText as string;\n\n const error = new RestError(initialErrorMessage);\n error.statusCode = statusCode;\n error.request = utils.stripRequest(parsedResponse.request);\n error.response = utils.stripResponse(parsedResponse);\n\n let parsedErrorResponse: { [key: string]: any } = parsedResponse.parsedBody;\n try {\n if (parsedErrorResponse) {\n const defaultResponseBodyMapper: Mapper | undefined = defaultResponseSpec.bodyMapper;\n if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === \"CloudError\") {\n if (parsedErrorResponse.error) {\n parsedErrorResponse = parsedErrorResponse.error;\n }\n if (parsedErrorResponse.code) {\n error.code = parsedErrorResponse.code;\n }\n if (parsedErrorResponse.message) {\n error.message = parsedErrorResponse.message;\n }\n } else {\n let internalError: any = parsedErrorResponse;\n if (parsedErrorResponse.error) {\n internalError = parsedErrorResponse.error;\n }\n\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n }\n\n if (defaultResponseBodyMapper) {\n let valueToDeserialize: any = parsedErrorResponse;\n if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof parsedErrorResponse === \"object\"\n ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName!]\n : [];\n }\n error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, \"error.body\");\n }\n }\n } catch (defaultError) {\n error.message = `Error \\\"${defaultError.message}\\\" occurred in deserializing the responseBody - \\\"${parsedResponse.bodyAsText}\\\" for the default response.`;\n }\n return Promise.reject(error);\n }\n } else if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize: any = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize = typeof valueToDeserialize === \"object\" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName!] : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\");\n } catch (error) {\n const restError = new RestError(`Error ${error} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`);\n restError.request = utils.stripRequest(parsedResponse.request);\n restError.response = utils.stripResponse(parsedResponse);\n return Promise.reject(restError);\n }\n } else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), \"operationRes.parsedHeaders\");\n }\n }\n }\n }\n return Promise.resolve(parsedResponse);\n });\n}\n\nfunction parse(jsonContentTypes: string[], xmlContentTypes: string[], operationResponse: HttpOperationResponse): Promise {\n const errorHandler = (err: Error & { code: string }) => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText);\n return Promise.reject(e);\n };\n\n if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType: string = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents: string[] = !contentType ? [] : contentType.split(\";\").map(component => component.toLowerCase());\n if (contentComponents.length === 0 || contentComponents.some(component => jsonContentTypes.indexOf(component) !== -1)) {\n return new Promise(resolve => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n } else if (contentComponents.some(component => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text)\n .then(body => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n\n return Promise.resolve(operationResponse);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { RestError } from \"../restError\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nconst DEFAULT_CLIENT_RETRY_COUNT = 3;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nconst DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nexport class ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * The client retry count.\n */\n retryCount: number;\n /**\n * The client retry interval in milliseconds.\n */\n retryInterval: number;\n /**\n * The minimum retry interval in milliseconds.\n */\n minRetryInterval: number;\n /**\n * The maximum retry interval in milliseconds.\n */\n maxRetryInterval: number;\n\n /**\n * @constructor\n * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain.\n * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy.\n * @param {number} [retryCount] The client retry count.\n * @param {number} [retryInterval] The client retry interval, in milliseconds.\n * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds.\n * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds.\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n function isNumber(n: any): n is number { return typeof n === \"number\"; }\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => retry(this, request, response))\n .catch(error => retry(this, request, error.response, undefined, error));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: ExponentialRetryPolicy, statusCode: number | undefined, retryData: RetryData): boolean {\n if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) {\n return false;\n }\n\n let currentCount: number;\n if (!retryData) {\n throw new Error(\"retryData for the ExponentialRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against.\n * @param {RetryData} retryData The retry data.\n * @param {RetryError} [err] The operation\"s error, if any.\n */\nfunction updateRetryData(policy: ExponentialRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: ExponentialRetryPolicy, request: WebResourceLike, response?: HttpOperationResponse, retryData?: RetryData, requestError?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, requestError);\n const isAborted: boolean | undefined = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy, response && response.status, retryData)) {\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, undefined))\n .catch(err => retry(policy, request, response, retryData, err));\n } else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err = retryData.error ||\n new RestError(\n \"Failed to send the request.\",\n RestError.REQUEST_SEND_ERROR,\n response && response.status,\n response && response.request,\n response);\n return Promise.reject(err);\n } else {\n return Promise.resolve(response);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function generateClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\"): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n }\n };\n}\n\nexport class GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, private _requestIdHeaderName: string) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, utils.generateUuid());\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport * as os from \"os\";\nimport { TelemetryInfo } from \"./userAgentPolicy\";\nimport { Constants } from \"../util/constants\";\n\nexport function getDefaultUserAgentKey(): string {\n return Constants.HeaderConstants.USER_AGENT;\n}\n\nexport function getPlatformSpecificData(): TelemetryInfo[] {\n const runtimeInfo = {\n key: \"Node\",\n value: process.version\n };\n\n const osInfo = {\n key: \"OS\",\n value: `(${os.arch()}-${os.type()}-${os.release()})`\n };\n\n return [runtimeInfo, osInfo];\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { getDefaultUserAgentKey, getPlatformSpecificData } from \"./msRestUserAgentPolicy\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport type TelemetryInfo = { key?: string; value?: string };\n\nfunction getRuntimeInfo(): TelemetryInfo[] {\n const msRestRuntime = {\n key: \"ms-rest-js\",\n value: Constants.msRestVersion\n };\n\n return [msRestRuntime];\n}\n\nfunction getUserAgentString(telemetryInfo: TelemetryInfo[], keySeparator = \" \", valueSeparator = \"/\"): string {\n return telemetryInfo.map(info => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n }).join(keySeparator);\n}\n\nexport const getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n\nexport function getDefaultUserAgentValue(): string {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n\nexport function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory {\n const key: string = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key;\n const value: string = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value;\n\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n }\n };\n}\n\nexport class UserAgentPolicy extends BaseRequestPolicy {\n constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike, protected headerKey: string, protected headerValue: string) {\n super(_nextPolicy, _options);\n }\n\n sendRequest(request: WebResourceLike): Promise {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n\n addUserAgentHeader(request: WebResourceLike): void {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { URLBuilder } from \"../url\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function redirectPolicy(maximumRetries = 20): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n }\n };\n}\n\nexport class RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly maxRetries = 20) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => handleRedirect(this, response, 0));\n }\n}\n\nfunction handleRedirect(policy: RedirectPolicy, response: HttpOperationResponse, currentRetries: number): Promise {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (locationHeader &&\n (status === 300 || status === 307 || (status === 303 && request.method === \"POST\")) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)) {\n\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n }\n\n return policy._nextPolicy.sendRequest(request)\n .then(res => handleRedirect(policy, res, currentRetries + 1));\n }\n\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function rpRegistrationPolicy(retryTimeout = 30): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n }\n };\n}\n\nexport class RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly _retryTimeout = 30) {\n super(nextPolicy, options);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone())\n .then(response => registerIfNeeded(this, request, response));\n }\n}\n\n\nfunction registerIfNeeded(policy: RPRegistrationPolicy, request: WebResourceLike, response: HttpOperationResponse): Promise {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText as string);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then(registrationStatus => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n });\n }\n }\n\n return Promise.resolve(response);\n}\n\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param {WebResourceLike} originalRequest The original request\n * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false.\n * @returns {object} A new request object with desired headers.\n */\nfunction getRequestEssentials(originalRequest: WebResourceLike, reuseUrlToo = false): WebResourceLike {\n const reqOptions: WebResourceLike = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", utils.generateUuid());\n\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n\n return reqOptions;\n}\n\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param {string} body The response body received after making the original request.\n * @returns {string} The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body: string): string {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n } catch (err) {\n // do nothing;\n }\n if (responseBody && responseBody.error && responseBody.error.message &&\n responseBody.error.code && responseBody.error.code === \"MissingSubscriptionRegistration\") {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} url The original request url\n * @returns {string} The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url: string): string {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//ig);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n } else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n\n/**\n * Registers the given provider.\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param {string} provider The provider name to be registered.\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @param {registrationCallback} callback The callback that handles the RP registration\n */\nfunction registerRP(policy: RPRegistrationPolicy, urlPrefix: string, provider: string, originalRequest: WebResourceLike): Promise {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n\n return policy._nextPolicy.sendRequest(reqOptions)\n .then(response => {\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n });\n}\n\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against.\n * @param {string} url The request url for polling\n * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns {Promise} True if RP Registration is successful.\n */\nfunction getRegistrationStatus(policy: RPRegistrationPolicy, url: string, originalRequest: WebResourceLike): Promise {\n const reqOptions: any = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n\n return policy._nextPolicy.sendRequest(reqOptions).then(res => {\n const obj = (res.parsedBody as any);\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n } else {\n return utils.delay(policy._retryTimeout * 1000).then(() => getRegistrationStatus(policy, url, originalRequest));\n }\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"../credentials/serviceClientCredentials\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n }\n };\n}\n\nexport class SigningPolicy extends BaseRequestPolicy {\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, public authenticationProvider: ServiceClientCredentials) {\n super(nextPolicy, options);\n }\n\n signRequest(request: WebResourceLike): Promise {\n return this.authenticationProvider.signRequest(request);\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this.signRequest(request).then(nextRequest => this._nextPolicy.sendRequest(nextRequest));\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport * as utils from \"../util/utils\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport interface RetryData {\n retryCount: number;\n retryInterval: number;\n error?: RetryError;\n}\n\nexport interface RetryError extends Error {\n message: string;\n code?: string;\n innerError?: RetryError;\n}\n\nexport function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n }\n };\n}\n\n/**\n * @class\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n *\n * @constructor\n * @param {number} retryCount The client retry count.\n * @param {number} retryInterval The client retry interval, in milliseconds.\n * @param {number} minRetryInterval The minimum retry interval, in milliseconds.\n * @param {number} maxRetryInterval The maximum retry interval, in milliseconds.\n */\nexport class SystemErrorRetryPolicy extends BaseRequestPolicy {\n retryCount: number;\n retryInterval: number;\n minRetryInterval: number;\n maxRetryInterval: number;\n DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\n DEFAULT_CLIENT_RETRY_COUNT = 3;\n DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\n DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) {\n super(nextPolicy, options);\n this.retryCount = typeof retryCount === \"number\" ? retryCount : this.DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = typeof retryInterval === \"number\" ? retryInterval : this.DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = typeof minRetryInterval === \"number\" ? minRetryInterval : this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = typeof maxRetryInterval === \"number\" ? maxRetryInterval : this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request.clone()).then(response => retry(this, request, response));\n }\n}\n\n/**\n * Determines if the operation should be retried and how long to wait until the next retry.\n *\n * @param {number} statusCode The HTTP status code.\n * @param {RetryData} retryData The retry data.\n * @return {boolean} True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(policy: SystemErrorRetryPolicy, retryData: RetryData): boolean {\n let currentCount;\n if (!retryData) {\n throw new Error(\"retryData for the SystemErrorRetryPolicyFilter cannot be null.\");\n } else {\n currentCount = (retryData && retryData.retryCount);\n }\n return (currentCount < policy.retryCount);\n}\n\n/**\n * Updates the retry data for the next attempt.\n *\n * @param {RetryData} retryData The retry data.\n * @param {object} err The operation\"s error, if any.\n */\nfunction updateRetryData(policy: SystemErrorRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData {\n if (!retryData) {\n retryData = {\n retryCount: 0,\n retryInterval: 0\n };\n }\n\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n\n retryData.error = err;\n }\n\n // Adjust retry count\n retryData.retryCount++;\n\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount) - 1;\n const boundedRandDelta = policy.retryInterval * 0.8 +\n Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8));\n incrementDelta *= boundedRandDelta;\n\n retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval);\n\n return retryData;\n}\n\nfunction retry(policy: SystemErrorRetryPolicy, request: WebResourceLike, operationResponse: HttpOperationResponse, retryData?: RetryData, err?: RetryError): Promise {\n retryData = updateRetryData(policy, retryData, err);\n if (err && err.code && shouldRetry(policy, retryData) &&\n (err.code === \"ETIMEDOUT\" || err.code === \"ESOCKETTIMEDOUT\" || err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" || err.code === \"ENOENT\")) {\n // If previous operation ended with an error and the policy allows a retry, do that\n return utils.delay(retryData.retryInterval)\n .then(() => policy._nextPolicy.sendRequest(request.clone()))\n .then(res => retry(policy, request, res, retryData, err))\n .catch(err => retry(policy, request, operationResponse, retryData, err));\n } else {\n if (err != undefined) {\n // If the operation failed in the end, return all errors instead of just the last one\n err = retryData.error;\n return Promise.reject(err);\n }\n return Promise.resolve(operationResponse);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexport enum QueryCollectionFormat {\n Csv = \",\",\n Ssv = \" \",\n Tsv = \"\\t\",\n Pipes = \"|\",\n Multi = \"Multi\",\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { AgentSettings } from \"../serviceClient\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\n\nexport function agentPolicy(agentSettings?: AgentSettings): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new AgentPolicy(nextPolicy, options, agentSettings!);\n }\n };\n}\n\nexport class AgentPolicy extends BaseRequestPolicy {\n agentSettings: AgentSettings;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, agentSettings: AgentSettings) {\n super(nextPolicy, options);\n this.agentSettings = agentSettings;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.agentSettings) {\n request.agentSettings = this.agentSettings;\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { ProxySettings } from \"../serviceClient\";\nimport { WebResourceLike } from \"../webResource\";\nimport { Constants } from \"../util/constants\";\nimport { URLBuilder } from \"../url\";\n\nfunction loadEnvironmentProxyValue(): string | undefined {\n if (!process) {\n return undefined;\n }\n\n if (process.env[Constants.HTTPS_PROXY]) {\n return process.env[Constants.HTTPS_PROXY];\n } else if (process.env[Constants.HTTPS_PROXY.toLowerCase()]) {\n return process.env[Constants.HTTPS_PROXY.toLowerCase()];\n } else if (process.env[Constants.HTTP_PROXY]) {\n return process.env[Constants.HTTP_PROXY];\n } else if (process.env[Constants.HTTP_PROXY.toLowerCase()]) {\n return process.env[Constants.HTTP_PROXY.toLowerCase()];\n }\n\n return undefined;\n}\n\nexport function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n\n const parsedUrl = URLBuilder.parse(proxyUrl);\n return {\n host: parsedUrl.getScheme() + \"://\" + parsedUrl.getHost(),\n port: Number.parseInt(parsedUrl.getPort() || \"80\")\n };\n}\n\n\nexport function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ProxyPolicy(nextPolicy, options, proxySettings!);\n }\n };\n}\n\nexport class ProxyPolicy extends BaseRequestPolicy {\n proxySettings: ProxySettings;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, proxySettings: ProxySettings) {\n super(nextPolicy, options);\n this.proxySettings = proxySettings;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n if (!request.proxySettings) {\n request.proxySettings = this.proxySettings;\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from \"./requestPolicy\";\nimport { WebResourceLike } from \"../webResource\";\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { Constants } from \"../util/constants\";\nimport { delay } from \"../util/utils\";\n\ntype ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise;\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n\nexport function throttlingRetryPolicy(): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n }\n };\n}\n\n/**\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nexport class ThrottlingRetryPolicy extends BaseRequestPolicy {\n private _handleResponse: ResponseHandler;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _handleResponse?: ResponseHandler) {\n super(nextPolicy, options);\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n\n public async sendRequest(httpRequest: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(httpRequest.clone()).then(response => {\n if (response.status !== StatusCodes.TooManyRequests) {\n return response;\n } else {\n return this._handleResponse(httpRequest, response);\n }\n });\n }\n\n private async _defaultResponseHandler(httpRequest: WebResourceLike, httpResponse: HttpOperationResponse): Promise {\n const retryAfterHeader: string | undefined = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);\n\n if (retryAfterHeader) {\n const delayInMs: number | undefined = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);\n if (delayInMs) {\n return delay(delayInMs).then((_: any) => this._nextPolicy.sendRequest(httpRequest));\n }\n }\n\n return httpResponse;\n }\n\n public static parseRetryAfterHeader(headerValue: string): number | undefined {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n } else {\n return retryAfterInSeconds * 1000;\n }\n }\n\n public static parseDateRetryAfterHeader(headerValue: string): number | undefined {\n try {\n const now: number = Date.now();\n const date: number = Date.parse(headerValue);\n const diff = date - now;\n\n return Number.isNaN(diff) ? undefined : diff;\n } catch (error) {\n return undefined;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ServiceClientCredentials } from \"./credentials/serviceClientCredentials\";\nimport { DefaultHttpClient } from \"./defaultHttpClient\";\nimport { HttpClient } from \"./httpClient\";\nimport { HttpOperationResponse, RestResponse } from \"./httpOperationResponse\";\nimport { HttpPipelineLogger } from \"./httpPipelineLogger\";\nimport { OperationArguments } from \"./operationArguments\";\nimport { getPathStringFromParameter, getPathStringFromParameterPath, OperationParameter, ParameterPath } from \"./operationParameter\";\nimport { isStreamOperation, OperationSpec } from \"./operationSpec\";\nimport { deserializationPolicy, DeserializationContentTypes } from \"./policies/deserializationPolicy\";\nimport { exponentialRetryPolicy } from \"./policies/exponentialRetryPolicy\";\nimport { generateClientRequestIdPolicy } from \"./policies/generateClientRequestIdPolicy\";\nimport { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from \"./policies/userAgentPolicy\";\nimport { redirectPolicy } from \"./policies/redirectPolicy\";\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from \"./policies/requestPolicy\";\nimport { rpRegistrationPolicy } from \"./policies/rpRegistrationPolicy\";\nimport { signingPolicy } from \"./policies/signingPolicy\";\nimport { systemErrorRetryPolicy } from \"./policies/systemErrorRetryPolicy\";\nimport { QueryCollectionFormat } from \"./queryCollectionFormat\";\nimport { CompositeMapper, DictionaryMapper, Mapper, MapperType, Serializer } from \"./serializer\";\nimport { URLBuilder } from \"./url\";\nimport * as utils from \"./util/utils\";\nimport { stringifyXML } from \"./util/xml\";\nimport { RequestOptionsBase, RequestPrepareOptions, WebResourceLike, isWebResourceLike, WebResource } from \"./webResource\";\nimport { OperationResponse } from \"./operationResponse\";\nimport { ServiceCallback } from \"./util/utils\";\nimport { agentPolicy } from \"./policies/agentPolicy\";\nimport { proxyPolicy, getDefaultProxySettings } from \"./policies/proxyPolicy\";\nimport { throttlingRetryPolicy } from \"./policies/throttlingRetryPolicy\";\nimport { Agent } from \"http\";\n\n\n/**\n * HTTP proxy settings (Node.js only)\n */\nexport interface ProxySettings {\n host: string;\n port: number;\n username?: string;\n password?: string;\n}\n\n/**\n * HTTP and HTTPS agents (Node.js only)\n */\nexport interface AgentSettings {\n http: Agent;\n https: Agent;\n}\n\n/**\n * Options to be provided while creating the client.\n */\nexport interface ServiceClientOptions {\n /**\n * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP\n * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns\n * the requestPolicyFactories that will be used.\n */\n requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => (void | RequestPolicyFactory[]));\n /**\n * The HttpClient that will be used to send HTTP requests.\n */\n httpClient?: HttpClient;\n /**\n * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline.\n */\n httpPipelineLogger?: HttpPipelineLogger;\n /**\n * If set to true, turn off the default retry policy.\n */\n noRetryPolicy?: boolean;\n /**\n * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30.\n */\n rpRegistrationRetryTimeout?: number;\n /**\n * Whether or not to generate a client request ID header for each HTTP request.\n */\n generateClientRequestIdHeader?: boolean;\n /**\n * Whether to include credentials in CORS requests in the browser.\n * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information.\n */\n withCredentials?: boolean;\n /**\n * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a\n * header to all outgoing requests with this header name and a random UUID as the request ID.\n */\n clientRequestIdHeaderName?: string;\n /**\n * The content-types that will be associated with JSON or XML serialization.\n */\n deserializationContentTypes?: DeserializationContentTypes;\n /**\n * The header name to use for the telemetry header while sending the request. If this is not\n * specified, then \"User-Agent\" will be used when running on Node.js and \"x-ms-command-name\" will\n * be used when running in a browser.\n */\n userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string);\n /**\n * The string to be set to the telemetry header while sending the request, or a function that\n * takes in the default user-agent string and returns the user-agent string that will be used.\n */\n userAgent?: string | ((defaultUserAgent: string) => string);\n /**\n * Proxy settings which will be used for every HTTP request (Node.js only).\n */\n proxySettings?: ProxySettings;\n /**\n * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only).\n */\n agentSettings?: AgentSettings;\n}\n\n/**\n * @class\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n /**\n * If specified, this is the base URI that requests will be made against for this ServiceClient.\n * If it is not specified, then all OperationSpecs must contain a baseUrl property.\n */\n protected baseUri?: string;\n\n /**\n * The default request content type for the service.\n * Used if no requestContentType is present on an OperationSpec.\n */\n protected requestContentType?: string;\n\n\n /**\n * The HTTP client that will be used to send requests.\n */\n private readonly _httpClient: HttpClient;\n private readonly _requestPolicyOptions: RequestPolicyOptionsLike;\n\n private readonly _requestPolicyFactories: RequestPolicyFactory[];\n private readonly _withCredentials: boolean;\n\n /**\n * The ServiceClient constructor\n * @constructor\n * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication.\n * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client.\n */\n constructor(credentials?: ServiceClientCredentials, options?: ServiceClientOptions) {\n if (!options) {\n options = {};\n }\n\n if (credentials && !credentials.signRequest) {\n throw new Error(\"credentials argument needs to implement signRequest method\");\n }\n\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || new DefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n\n let requestPolicyFactories: RequestPolicyFactory[];\n if (Array.isArray(options.requestPolicyFactories)) {\n requestPolicyFactories = options.requestPolicyFactories;\n } else {\n requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options);\n if (options.requestPolicyFactories) {\n const newRequestPolicyFactories: void | RequestPolicyFactory[] = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n\n let httpRequest: WebResourceLike;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n } else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n } catch (error) {\n return Promise.reject(error);\n }\n\n let httpPipeline: RequestPolicy = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions);\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from.\n * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest.\n * @param {ServiceCallback} callback The callback to call when the response is received.\n */\n sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise {\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n\n const httpRequest = new WebResource();\n\n let result: Promise;\n try {\n const baseUri: string | undefined = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\");\n }\n\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n\n const requestUrl: URLBuilder = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue: string = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter));\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue);\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue: any = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer);\n if (queryParameterValue != undefined) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter));\n if (queryParameter.collectionFormat != undefined) {\n if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n queryParameterValue = \"\";\n } else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] = item == undefined ? \"\" : item.toString();\n }\n }\n } else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || queryParameter.collectionFormat === QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== QueryCollectionFormat.Multi && queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue: any = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer);\n if (headerValue != undefined) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter));\n const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper).headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n } else {\n httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n\n const options: RequestOptionsBase | undefined = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n }\n\n httpRequest.withCredentials = this._withCredentials;\n\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n\n if (httpRequest.streamResponseBody == undefined) {\n httpRequest.streamResponseBody = isStreamOperation(operationSpec);\n }\n\n result = this.sendRequest(httpRequest)\n .then(res => flattenResponse(res, operationSpec.responses[res.status]));\n } catch (error) {\n result = Promise.reject(error);\n }\n\n const cb = callback;\n if (cb) {\n result\n // tslint:disable-next-line:no-null-keyword\n .then(res => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch(err => cb(err));\n }\n\n return result;\n }\n}\n\nexport function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void {\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer);\n\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, xmlName, xmlElementName, serializedName } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if (httpRequest.body != undefined || required) {\n const requestBodyParameterPathString: string = getPathStringFromParameter(operationSpec.requestBody);\n httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString);\n const isStream = typeName === MapperType.Stream;\n if (operationSpec.isXML) {\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(utils.prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName!), { rootName: xmlName || serializedName });\n }\n else if (!isStream) {\n httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName });\n }\n } else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n } catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue: any = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer);\n if (formDataParameterValue != undefined) {\n const formDataParameterPropertyName: string = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter));\n }\n }\n }\n}\n\nfunction isRequestPolicyFactory(instance: any): instance is RequestPolicyFactory {\n return typeof instance.create === \"function\";\n}\n\nfunction getValueOrFunctionResult(value: undefined | string | ((defaultValue: string) => string), defaultValueCreator: (() => string)): string {\n let result: string;\n if (typeof value === \"string\") {\n result = value;\n } else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\n\nfunction createDefaultRequestPolicyFactories(credentials: ServiceClientCredentials | RequestPolicyFactory | undefined, options: ServiceClientOptions): RequestPolicyFactory[] {\n const factories: RequestPolicyFactory[] = [];\n\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n\n if (credentials) {\n if (isRequestPolicyFactory(credentials)) {\n factories.push(credentials);\n } else {\n factories.push(signingPolicy(credentials));\n }\n }\n\n const userAgentHeaderName: string = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName);\n const userAgentHeaderValue: string = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue);\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n\n const proxySettings = options.proxySettings || getDefaultProxySettings();\n if (proxySettings) {\n factories.push(proxyPolicy(proxySettings));\n }\n\n if (options.agentSettings) {\n factories.push(agentPolicy(options.agentSettings));\n }\n\n return factories;\n}\n\nexport type PropertyParent = { [propertyName: string]: any };\n\n/**\n * Get the property parent for the property at the provided path when starting with the provided\n * parent object.\n */\nexport function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent {\n if (parent && propertyPath) {\n const propertyPathLength: number = propertyPath.length;\n for (let i = 0; i < propertyPathLength - 1; ++i) {\n const propertyName: string = propertyPath[i];\n if (!parent[propertyName]) {\n parent[propertyName] = {};\n }\n parent = parent[propertyName];\n }\n }\n return parent;\n}\n\nfunction getOperationArgumentValueFromParameter(serviceClient: ServiceClient, operationArguments: OperationArguments, parameter: OperationParameter, serializer: Serializer): any {\n return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer);\n}\n\nexport function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any {\n let value: any;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n } else {\n let propertySearchResult: PropertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue = parameterMapper.required || (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n\n // Serialize just for validation purposes.\n const parameterPathString: string = getPathStringFromParameterPath(parameterPath, parameterMapper);\n serializer.serialize(parameterMapper, value, parameterPathString);\n }\n } else {\n if (parameterMapper.required) {\n value = {};\n }\n\n for (const propertyName in parameterPath) {\n const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![propertyName];\n const propertyPath: ParameterPath = parameterPath[propertyName];\n const propertyValue: any = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer);\n // Serialize just for validation purposes.\n const propertyPathString: string = getPathStringFromParameterPath(propertyPath, propertyMapper);\n serializer.serialize(propertyMapper, propertyValue, propertyPathString);\n if (propertyValue !== undefined) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\n\ninterface PropertySearchResult {\n propertyValue?: any;\n propertyFound: boolean;\n}\n\nfunction getPropertyFromParameterPath(parent: { [parameterName: string]: any }, parameterPath: string[]): PropertySearchResult {\n const result: PropertySearchResult = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart: string = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent != undefined && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n } else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n\nexport function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n\n const addOperationResponse = (obj: {}) =>\n Object.defineProperty(obj, \"_response\", {\n value: _response\n });\n\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse({\n ...parsedHeaders,\n blobBody: _response.blobBody,\n readableStreamBody: _response.readableStreamBody\n });\n }\n\n const modelProperties = typeName === \"Composite\" && (bodyMapper as CompositeMapper).type.modelProperties || {};\n const isPageableResponse = Object.keys(modelProperties).some(k => modelProperties[k].serializedName === \"\");\n if (typeName === \"Sequence\" || isPageableResponse) {\n // We're expecting a sequece(array) make sure that the response body is in the\n // correct format, if not make it an empty array []\n const parsedBody =\n Array.isArray(_response.parsedBody)\n ? _response.parsedBody\n : [];\n const arrayResponse = [...parsedBody] as RestResponse & any[];\n\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n }\n }\n\n if (bodyMapper || _response.request.method === \"HEAD\" || utils.isPrimitiveType(_response.parsedBody)) {\n // primitive body types and HEAD booleans\n return addOperationResponse({\n ...parsedHeaders,\n body: _response.parsedBody\n });\n }\n\n return addOperationResponse({\n ...parsedHeaders,\n ..._response.parsedBody\n });\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpOperationResponse } from \"../httpOperationResponse\";\nimport { WebResourceLike } from \"../webResource\";\nimport { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from \"./requestPolicy\";\n\nexport function logPolicy(logger: any = console.log): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new LogPolicy(nextPolicy, options, logger);\n }\n };\n}\n\nexport class LogPolicy extends BaseRequestPolicy {\n logger?: any;\n\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger: any = console.log) {\n super(nextPolicy, options);\n this.logger = logger;\n }\n\n public sendRequest(request: WebResourceLike): Promise {\n return this._nextPolicy.sendRequest(request).then(response => logResponse(this, response));\n }\n}\n\nfunction logResponse(policy: LogPolicy, response: HttpOperationResponse): Promise {\n policy.logger(`>> Request: ${JSON.stringify(response.request, undefined, 2)}`);\n policy.logger(`>> Response status code: ${response.status}`);\n const responseBody = response.bodyAsText;\n policy.logger(`>> Body: ${responseBody}`);\n return Promise.resolve(response);\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Bearer\";\n\n/**\n * A credentials object that uses a token string and a authorzation scheme to authenticate.\n */\nexport class TokenCredentials implements ServiceClientCredentials {\n token: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new TokenCredentials object.\n *\n * @constructor\n * @param {string} token The token.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(token: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (!token) {\n throw new Error(\"token cannot be null or undefined.\");\n }\n this.token = token;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @return {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport * as base64 from \"../util/base64\";\nimport { Constants } from \"../util/constants\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n\nexport class BasicAuthenticationCredentials implements ServiceClientCredentials {\n userName: string;\n password: string;\n authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME;\n\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @constructor\n * @param {string} userName User name.\n * @param {string} password Password.\n * @param {string} [authorizationScheme] The authorization scheme.\n */\n constructor(userName: string, password: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) {\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n\n /**\n * Signs a request with the Authentication header.\n *\n * @param {WebResourceLike} webResource The WebResourceLike to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike) {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${base64.encodeString(credentials)}`;\n if (!webResource.headers) webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { HttpHeaders } from \"../httpHeaders\";\nimport { WebResourceLike } from \"../webResource\";\nimport { ServiceClientCredentials } from \"./serviceClientCredentials\";\n\n/**\n * @interface ApiKeyCredentialOptions\n * Describes the options to be provided while creating an instance of ApiKeyCredentials\n */\nexport interface ApiKeyCredentialOptions {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n inQuery?: { [x: string]: any };\n}\n\n/**\n * Authenticates to a service using an API key.\n */\nexport class ApiKeyCredentials implements ServiceClientCredentials {\n /**\n * A key value pair of the header parameters that need to be applied to the request.\n */\n private readonly inHeader?: { [x: string]: any };\n /**\n * A key value pair of the query parameters that need to be applied to the request.\n */\n private readonly inQuery?: { [x: string]: any };\n\n /**\n * @constructor\n * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options: ApiKeyCredentialOptions) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(`options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`);\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param {WebResource} webResource The WebResource to be signed.\n * @returns {Promise} The signed request object.\n */\n signRequest(webResource: WebResourceLike): Promise {\n if (!webResource) {\n return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type \"object\".`));\n }\n\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n\n return Promise.resolve(webResource);\n }\n}","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @constructor\n * @param {string} topicKey The EventGrid topic key\n */\n constructor(topicKey: string) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": topicKey\n }\n };\n super(options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nimport { ApiKeyCredentials, ApiKeyCredentialOptions } from \"./apiKeyCredentials\";\n\nexport class DomainCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid DomainCredentials object.\n *\n * @constructor\n * @param {string} domainKey The EventGrid domain key\n */\n constructor(domainKey: string) {\n if (!domainKey || (domainKey && typeof domainKey !== \"string\")) {\n throw new Error(\"domainKey cannot be null or undefined and must be of type string.\");\n }\n const options: ApiKeyCredentialOptions = {\n inHeader: {\n \"aeg-sas-key\": domainKey\n }\n };\n super(options);\n }\n}\n"],"names":["base64.decodeString","base64.encodeByteArray","utils.isValidUuid","utils.isDuration","__extends","Transform","tunnel.httpsOverHttps","tunnel.httpsOverHttp","tunnel.httpOverHttps","tunnel.httpOverHttp","tough.CookieJar","https.Agent","http.Agent","HttpPipelineLogLevel","xml2js.Builder","xml2js.Parser","utils.stripRequest","utils.stripResponse","utils.delay","utils.generateUuid","os.arch","os.type","os.release","retry","shouldRetry","updateRetryData","QueryCollectionFormat","DefaultHttpClient","utils.prepareXMLRootList","__spreadArrays","utils.isPrimitiveType","HeaderConstants","DEFAULT_AUTHORIZATION_SCHEME","base64.encodeString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;;;AAGA,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,UAAU,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;SA4Ee,iBAAiB,CAAC,MAAY;IAC5C,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACzC,OAAO,KAAK,CAAC;KACd;IAED,IACE,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU;QACvC,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU;QAClC,OAA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ACvC,QAAQ,EAAE;gBACR,aAAa,EAAE,SAAS;aACzB;SACF,CAAC;QACF,QAAA,kBAAM,OAAO,CAAC,SAAC;;KAChB;IACH,wBAAC;AAAD,CAlBA,CAAuC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts new file mode 100644 index 000000000..3562ec2a6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts @@ -0,0 +1,9 @@ +import { FetchHttpClient } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class BrowserFetchHttpClient extends FetchHttpClient { + prepareRequest(_httpRequest: WebResourceLike): Promise>; + processRequest(_operationResponse: HttpOperationResponse): Promise; + fetch(input: RequestInfo, init?: RequestInit): Promise; +} +//# sourceMappingURL=browserFetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts.map new file mode 100644 index 000000000..84f0dc410 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"browserFetchHttpClient.d.ts","sourceRoot":"","sources":["../../lib/browserFetchHttpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,sBAAuB,SAAQ,eAAe;IACzD,cAAc,CAAC,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAI5E,cAAc,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGjE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js new file mode 100644 index 000000000..4e59f9551 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { FetchHttpClient } from "./fetchHttpClient"; +var BrowserFetchHttpClient = /** @class */ (function (_super) { + __extends(BrowserFetchHttpClient, _super); + function BrowserFetchHttpClient() { + return _super !== null && _super.apply(this, arguments) || this; + } + BrowserFetchHttpClient.prototype.prepareRequest = function (_httpRequest) { + return Promise.resolve({}); + }; + BrowserFetchHttpClient.prototype.processRequest = function (_operationResponse) { + return Promise.resolve(); + }; + BrowserFetchHttpClient.prototype.fetch = function (input, init) { + return fetch(input, init); + }; + return BrowserFetchHttpClient; +}(FetchHttpClient)); +export { BrowserFetchHttpClient }; +//# sourceMappingURL=browserFetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js.map new file mode 100644 index 000000000..f811e59c5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/browserFetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browserFetchHttpClient.js","sourceRoot":"","sources":["../../lib/browserFetchHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD;IAA4C,0CAAe;IAA3D;;IAYA,CAAC;IAXC,+CAAc,GAAd,UAAe,YAA6B;QAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAED,+CAAc,GAAd,UAAe,kBAAyC;QACtD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,sCAAK,GAAL,UAAM,KAAkB,EAAE,IAAkB;QAC1C,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,6BAAC;AAAD,CAAC,AAZD,CAA4C,eAAe,GAY1D"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts new file mode 100644 index 000000000..f566c6f0c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts @@ -0,0 +1,46 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +/** + * @interface ApiKeyCredentialOptions + * Describes the options to be provided while creating an instance of ApiKeyCredentials + */ +export interface ApiKeyCredentialOptions { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + inHeader?: { + [x: string]: any; + }; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + inQuery?: { + [x: string]: any; + }; +} +/** + * Authenticates to a service using an API key. + */ +export declare class ApiKeyCredentials implements ServiceClientCredentials { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + private readonly inHeader?; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + private readonly inQuery?; + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + constructor(options: ApiKeyCredentialOptions); + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResource} webResource The WebResource to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=apiKeyCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts.map new file mode 100644 index 000000000..318a24059 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apiKeyCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/apiKeyCredentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,wBAAwB;IAChE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAuB;IACjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAuB;IAEhD;;;OAGG;gBACS,OAAO,EAAE,uBAAuB;IAQ5C;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CA+BpE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js new file mode 100644 index 000000000..587a24af1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpHeaders } from "../httpHeaders"; +/** + * Authenticates to a service using an API key. + */ +var ApiKeyCredentials = /** @class */ (function () { + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + function ApiKeyCredentials(options) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error("options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided."); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResource} webResource The WebResource to be signed. + * @returns {Promise} The signed request object. + */ + ApiKeyCredentials.prototype.signRequest = function (webResource) { + if (!webResource) { + return Promise.reject(new Error("webResource cannot be null or undefined and must be of type \"object\".")); + } + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (var headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error("url cannot be null in the request object.")); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (var key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += key + "=" + this.inQuery[key]; + } + } + return Promise.resolve(webResource); + }; + return ApiKeyCredentials; +}()); +export { ApiKeyCredentials }; +//# sourceMappingURL=apiKeyCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js.map new file mode 100644 index 000000000..3625654db --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/apiKeyCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apiKeyCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/apiKeyCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+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IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBAClC,WAAW,CAAC,GAAG,IAAI,GAAG,CAAC;iBACxB;gBACD,WAAW,CAAC,GAAG,IAAO,GAAG,SAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAG,CAAC;aAClD;SACF;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IACH,wBAAC;AAAD,CAAC,AA3DD,IA2DC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts new file mode 100644 index 000000000..c313e5257 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts @@ -0,0 +1,24 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +export declare class BasicAuthenticationCredentials implements ServiceClientCredentials { + userName: string; + password: string; + authorizationScheme: string; + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(userName: string, password: string, authorizationScheme?: string); + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=basicAuthenticationCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts.map new file mode 100644 index 000000000..6d1ad1c91 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"basicAuthenticationCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/basicAuthenticationCredentials.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAItE,qBAAa,8BAA+B,YAAW,wBAAwB;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAgC;IAE3D;;;;;;;OAOG;gBACS,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,mBAAmB,GAAE,MAAqC;IAY1G;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe;CAOzC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js new file mode 100644 index 000000000..e1553b0b2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpHeaders } from "../httpHeaders"; +import * as base64 from "../util/base64"; +import { Constants } from "../util/constants"; +var HeaderConstants = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME = "Basic"; +var BasicAuthenticationCredentials = /** @class */ (function () { + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function BasicAuthenticationCredentials(userName, password, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + BasicAuthenticationCredentials.prototype.signRequest = function (webResource) { + var credentials = this.userName + ":" + this.password; + var encodedCredentials = this.authorizationScheme + " " + base64.encodeString(credentials); + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + }; + return BasicAuthenticationCredentials; +}()); +export { BasicAuthenticationCredentials }; +//# sourceMappingURL=basicAuthenticationCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js.map new file mode 100644 index 000000000..82cc936e8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/basicAuthenticationCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"basicAuthenticationCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/basicAuthenticationCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,IAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;AAClD,IAAM,4BAA4B,GAAG,OAAO,CAAC;AAE7C;IAKE;;;;;;;OAOG;IACH,wCAAY,QAAgB,EAAE,QAAgB,EAAE,mBAA0D;QAA1D,oCAAA,EAAA,kDAA0D;QAV1G,wBAAmB,GAAW,4BAA4B,CAAC;QAWzD,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO,QAAQ,CAAC,OAAO,EAAE,KAAK,QAAQ,EAAE;YACzF,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;SACrF;QACD,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO,QAAQ,CAAC,OAAO,EAAE,KAAK,QAAQ,EAAE;YACzF,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;SACrF;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACH,oDAAW,GAAX,UAAY,WAA4B;QACtC,IAAM,WAAW,GAAM,IAAI,CAAC,QAAQ,SAAI,IAAI,CAAC,QAAU,CAAC;QACxD,IAAM,kBAAkB,GAAM,IAAI,CAAC,mBAAmB,SAAI,MAAM,CAAC,YAAY,CAAC,WAAW,CAAG,CAAC;QAC7F,IAAI,CAAC,WAAW,CAAC,OAAO;YAAE,WAAW,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAClE,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;QAC3E,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IACH,qCAAC;AAAD,CAAC,AAtCD,IAsCC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts new file mode 100644 index 000000000..34c7db7a0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts @@ -0,0 +1,2 @@ +export declare type Authenticator = (challenge: object) => Promise; +//# sourceMappingURL=credentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts.map new file mode 100644 index 000000000..81ab42b08 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/credentials.ts"],"names":[],"mappings":"AAGA,oBAAY,aAAa,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js new file mode 100644 index 000000000..a9eeec2e9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=credentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js.map new file mode 100644 index 000000000..939147b7a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/credentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../lib/credentials/credentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts new file mode 100644 index 000000000..481819ca8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts @@ -0,0 +1,11 @@ +import { ApiKeyCredentials } from "./apiKeyCredentials"; +export declare class DomainCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid DomainCredentials object. + * + * @constructor + * @param {string} domainKey The EventGrid domain key + */ + constructor(domainKey: string); +} +//# sourceMappingURL=domainCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts.map new file mode 100644 index 000000000..322c5817b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"domainCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/domainCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF,qBAAa,iBAAkB,SAAQ,iBAAiB;IACpD;;;;;OAKG;gBACO,SAAS,EAAE,MAAM;CAW9B"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js new file mode 100644 index 000000000..22c8b6205 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { ApiKeyCredentials } from "./apiKeyCredentials"; +var DomainCredentials = /** @class */ (function (_super) { + __extends(DomainCredentials, _super); + /** + * Creates a new EventGrid DomainCredentials object. + * + * @constructor + * @param {string} domainKey The EventGrid domain key + */ + function DomainCredentials(domainKey) { + var _this = this; + if (!domainKey || (domainKey && typeof domainKey !== "string")) { + throw new Error("domainKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": domainKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return DomainCredentials; +}(ApiKeyCredentials)); +export { DomainCredentials }; +//# sourceMappingURL=domainCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js.map new file mode 100644 index 000000000..64c742b8d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/domainCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"domainCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/domainCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF;IAAuC,qCAAiB;IACpD;;;;;OAKG;IACL,2BAAY,SAAiB;QAA7B,iBAUC;QATC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,CAAC,EAAE;YAC9D,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;SACtF;QACD,IAAM,OAAO,GAA4B;YACvC,QAAQ,EAAE;gBACR,aAAa,EAAE,SAAS;aACzB;SACF,CAAC;QACF,QAAA,kBAAM,OAAO,CAAC,SAAC;;IACjB,CAAC;IACH,wBAAC;AAAD,CAAC,AAlBD,CAAuC,iBAAiB,GAkBvD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts new file mode 100644 index 000000000..af0bbacae --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts @@ -0,0 +1,11 @@ +import { WebResourceLike } from "../webResource"; +export interface ServiceClientCredentials { + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike/request to be signed. + * @returns {Promise} The signed request object; + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=serviceClientCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts.map new file mode 100644 index 000000000..2c091a370 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClientCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/serviceClientCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js new file mode 100644 index 000000000..e94df45ca --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=serviceClientCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js.map new file mode 100644 index 000000000..68ab15887 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClientCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/serviceClientCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts new file mode 100644 index 000000000..95a5c310d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts @@ -0,0 +1,25 @@ +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +/** + * A credentials object that uses a token string and a authorzation scheme to authenticate. + */ +export declare class TokenCredentials implements ServiceClientCredentials { + token: string; + authorizationScheme: string; + /** + * Creates a new TokenCredentials object. + * + * @constructor + * @param {string} token The token. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(token: string, authorizationScheme?: string); + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @return {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise; +} +//# sourceMappingURL=tokenCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts.map new file mode 100644 index 000000000..30b15f022 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/tokenCredentials.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAKtE;;GAEG;AACH,qBAAa,gBAAiB,YAAW,wBAAwB;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAgC;IAE3D;;;;;;OAMG;gBACS,KAAK,EAAE,MAAM,EAAE,mBAAmB,GAAE,MAAqC;IAQrF;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe;CAKzC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js new file mode 100644 index 000000000..70265d731 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpHeaders } from "../httpHeaders"; +import { Constants } from "../util/constants"; +var HeaderConstants = Constants.HeaderConstants; +var DEFAULT_AUTHORIZATION_SCHEME = "Bearer"; +/** + * A credentials object that uses a token string and a authorzation scheme to authenticate. + */ +var TokenCredentials = /** @class */ (function () { + /** + * Creates a new TokenCredentials object. + * + * @constructor + * @param {string} token The token. + * @param {string} [authorizationScheme] The authorization scheme. + */ + function TokenCredentials(token, authorizationScheme) { + if (authorizationScheme === void 0) { authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; } + this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME; + if (!token) { + throw new Error("token cannot be null or undefined."); + } + this.token = token; + this.authorizationScheme = authorizationScheme; + } + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @return {Promise} The signed request object. + */ + TokenCredentials.prototype.signRequest = function (webResource) { + if (!webResource.headers) + webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, this.authorizationScheme + " " + this.token); + return Promise.resolve(webResource); + }; + return TokenCredentials; +}()); +export { TokenCredentials }; +//# sourceMappingURL=tokenCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js.map new file mode 100644 index 000000000..1fea71a65 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/tokenCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/tokenCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,IAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;AAClD,IAAM,4BAA4B,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH;IAIE;;;;;;OAMG;IACH,0BAAY,KAAa,EAAE,mBAA0D;QAA1D,oCAAA,EAAA,kDAA0D;QATrF,wBAAmB,GAAW,4BAA4B,CAAC;QAUzD,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACvD;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACH,sCAAW,GAAX,UAAY,WAA4B;QACtC,IAAI,CAAC,WAAW,CAAC,OAAO;YAAE,WAAW,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAClE,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,EAAK,IAAI,CAAC,mBAAmB,SAAI,IAAI,CAAC,KAAO,CAAC,CAAC;QACpG,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IACH,uBAAC;AAAD,CAAC,AA9BD,IA8BC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts new file mode 100644 index 000000000..059fe9357 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts @@ -0,0 +1,11 @@ +import { ApiKeyCredentials } from "./apiKeyCredentials"; +export declare class TopicCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + constructor(topicKey: string); +} +//# sourceMappingURL=topicCredentials.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts.map new file mode 100644 index 000000000..62cc996ab --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"topicCredentials.d.ts","sourceRoot":"","sources":["../../../lib/credentials/topicCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF,qBAAa,gBAAiB,SAAQ,iBAAiB;IACnD;;;;;OAKG;gBACO,QAAQ,EAAE,MAAM;CAW7B"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js new file mode 100644 index 000000000..dee468b97 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { ApiKeyCredentials } from "./apiKeyCredentials"; +var TopicCredentials = /** @class */ (function (_super) { + __extends(TopicCredentials, _super); + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + function TopicCredentials(topicKey) { + var _this = this; + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + var options = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + _this = _super.call(this, options) || this; + return _this; + } + return TopicCredentials; +}(ApiKeyCredentials)); +export { TopicCredentials }; +//# sourceMappingURL=topicCredentials.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js.map b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js.map new file mode 100644 index 000000000..8945538de --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/credentials/topicCredentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"topicCredentials.js","sourceRoot":"","sources":["../../../lib/credentials/topicCredentials.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qBAAqB,CAAC;AAEjF;IAAsC,oCAAiB;IACnD;;;;;OAKG;IACL,0BAAY,QAAgB;QAA5B,iBAUC;QATC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,EAAE;YAC3D,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;SACrF;QACD,IAAM,OAAO,GAA4B;YACvC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,QAAA,kBAAM,OAAO,CAAC,SAAC;;IACjB,CAAC;IACH,uBAAC;AAAD,CAAC,AAlBD,CAAsC,iBAAiB,GAkBtD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts new file mode 100644 index 000000000..883145a45 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts @@ -0,0 +1,2 @@ +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; +//# sourceMappingURL=defaultHttpClient.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts.map new file mode 100644 index 000000000..9a0417262 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.browser.d.ts","sourceRoot":"","sources":["../../lib/defaultHttpClient.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js new file mode 100644 index 000000000..49ae42711 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; +//# sourceMappingURL=defaultHttpClient.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js.map new file mode 100644 index 000000000..d21b02eba --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.browser.js","sourceRoot":"","sources":["../../lib/defaultHttpClient.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts new file mode 100644 index 000000000..a7381a249 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts @@ -0,0 +1,2 @@ +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; +//# sourceMappingURL=defaultHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts.map new file mode 100644 index 000000000..35b8b1fa7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.d.ts","sourceRoot":"","sources":["../../lib/defaultHttpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js new file mode 100644 index 000000000..a8b56aa8d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; +//# sourceMappingURL=defaultHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js.map new file mode 100644 index 000000000..1effd0f99 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/defaultHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultHttpClient.js","sourceRoot":"","sources":["../../lib/defaultHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts new file mode 100644 index 000000000..0258eaaf7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts @@ -0,0 +1,12 @@ +import { HttpClient } from "./httpClient"; +import { WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { HttpHeadersLike } from "./httpHeaders"; +export declare abstract class FetchHttpClient implements HttpClient { + sendRequest(httpRequest: WebResourceLike): Promise; + abstract prepareRequest(httpRequest: WebResourceLike): Promise>; + abstract processRequest(operationResponse: HttpOperationResponse): Promise; + abstract fetch(input: RequestInfo, init?: RequestInit): Promise; +} +export declare function parseHeaders(headers: Headers): HttpHeadersLike; +//# sourceMappingURL=fetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts.map new file mode 100644 index 000000000..49f6de3a7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fetchHttpClient.d.ts","sourceRoot":"","sources":["../../lib/fetchHttpClient.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAe,eAAe,EAAE,MAAM,eAAe,CAAC;AAU7D,8BAAsB,eAAgB,YAAW,UAAU;IACnD,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;aAkJhE,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;aAC3E,cAAc,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;aACvE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;CAChF;AAMD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,CAQ9D"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js new file mode 100644 index 000000000..f716e75c5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __assign, __awaiter, __generator } from "tslib"; +import AbortController from "abort-controller"; +import FormData from "form-data"; +import { HttpHeaders } from "./httpHeaders"; +import { RestError } from "./restError"; +import { Transform } from "stream"; +var FetchHttpClient = /** @class */ (function () { + function FetchHttpClient() { + } + FetchHttpClient.prototype.sendRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var abortController, formData, requestForm_1, appendFormValue, _i, _a, formKey, formValue, j, contentType, body, loadedBytes_1, uploadReportStream, platformSpecificRequestInit, requestInit, response, headers, operationResponse, _b, _c, onDownloadProgress_1, responseBody, loadedBytes_2, downloadReportStream, length_1, error_1, fetchError; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + if (!httpRequest && typeof httpRequest !== "object") { + throw new Error("'httpRequest' (WebResource) cannot be null or undefined and must be of type object."); + } + abortController = new AbortController(); + if (httpRequest.abortSignal) { + if (httpRequest.abortSignal.aborted) { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + httpRequest.abortSignal.addEventListener("abort", function (event) { + if (event.type === "abort") { + abortController.abort(); + } + }); + } + if (httpRequest.timeout) { + setTimeout(function () { + abortController.abort(); + }, httpRequest.timeout); + } + if (httpRequest.formData) { + formData = httpRequest.formData; + requestForm_1 = new FormData(); + appendFormValue = function (key, value) { + // value function probably returns a stream so we can provide a fresh stream on each retry + if (typeof value === "function") { + value = value(); + } + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (_i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + formKey = _a[_i]; + formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + httpRequest.body = requestForm_1; + httpRequest.formData = undefined; + contentType = httpRequest.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + if (typeof requestForm_1.getBoundary === "function") { + httpRequest.headers.set("Content-Type", "multipart/form-data; boundary=" + requestForm_1.getBoundary()); + } + else { + // browser will automatically apply a suitable content-type header + httpRequest.headers.remove("Content-Type"); + } + } + } + body = httpRequest.body + ? (typeof httpRequest.body === "function" ? httpRequest.body() : httpRequest.body) + : undefined; + if (httpRequest.onUploadProgress && httpRequest.body) { + loadedBytes_1 = 0; + uploadReportStream = new Transform({ + transform: function (chunk, _encoding, callback) { + loadedBytes_1 += chunk.length; + httpRequest.onUploadProgress({ loadedBytes: loadedBytes_1 }); + callback(undefined, chunk); + } + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + return [4 /*yield*/, this.prepareRequest(httpRequest)]; + case 1: + platformSpecificRequestInit = _d.sent(); + requestInit = __assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, signal: abortController.signal }, platformSpecificRequestInit); + _d.label = 2; + case 2: + _d.trys.push([2, 8, 9, 10]); + return [4 /*yield*/, this.fetch(httpRequest.url, requestInit)]; + case 3: + response = _d.sent(); + headers = parseHeaders(response.headers); + _b = { + headers: headers, + request: httpRequest, + status: response.status, + readableStreamBody: httpRequest.streamResponseBody ? response.body : undefined + }; + if (!!httpRequest.streamResponseBody) return [3 /*break*/, 5]; + return [4 /*yield*/, response.text()]; + case 4: + _c = _d.sent(); + return [3 /*break*/, 6]; + case 5: + _c = undefined; + _d.label = 6; + case 6: + operationResponse = (_b.bodyAsText = _c, + _b); + onDownloadProgress_1 = httpRequest.onDownloadProgress; + if (onDownloadProgress_1) { + responseBody = response.body || undefined; + if (isReadableStream(responseBody)) { + loadedBytes_2 = 0; + downloadReportStream = new Transform({ + transform: function (chunk, _encoding, callback) { + loadedBytes_2 += chunk.length; + onDownloadProgress_1({ loadedBytes: loadedBytes_2 }); + callback(undefined, chunk); + } + }); + responseBody.pipe(downloadReportStream); + operationResponse.readableStreamBody = downloadReportStream; + } + else { + length_1 = parseInt(headers.get("Content-Length")) || undefined; + if (length_1) { + // Calling callback for non-stream response for consistency with browser + onDownloadProgress_1({ loadedBytes: length_1 }); + } + } + } + return [4 /*yield*/, this.processRequest(operationResponse)]; + case 7: + _d.sent(); + return [2 /*return*/, operationResponse]; + case 8: + error_1 = _d.sent(); + fetchError = error_1; + if (fetchError.code === "ENOTFOUND") { + throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest); + } + else if (fetchError.type === "aborted") { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + throw fetchError; + case 9: return [7 /*endfinally*/]; + case 10: return [2 /*return*/]; + } + }); + }); + }; + return FetchHttpClient; +}()); +export { FetchHttpClient }; +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +export function parseHeaders(headers) { + var httpHeaders = new HttpHeaders(); + headers.forEach(function (value, key) { + httpHeaders.set(key, value); + }); + return httpHeaders; +} +//# sourceMappingURL=fetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js.map new file mode 100644 index 000000000..5aeb1bb91 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/fetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetchHttpClient.js","sourceRoot":"","sources":["../../lib/fetchHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,QAAQ,MAAM,WAAW,CAAC;AAKjC,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAA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AA;;wBAA5C,SAA4C,CAAC;wBAE7C,sBAAO,iBAAiB,EAAC;;;wBAEnB,UAAU,GAAe,OAAK,CAAC;wBACrC,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE;4BACnC,MAAM,IAAI,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,kBAAkB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;yBAC/F;6BAAM,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;4BACxC,MAAM,IAAI,SAAS,CAAC,yBAAyB,EAAE,SAAS,CAAC,qBAAqB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;yBACzG;wBAED,MAAM,UAAU,CAAC;;;;;;KAGpB;IAKH,sBAAC;AAAD,CAAC,AAtJD,IAsJC;;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,IAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;IAEtC,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;QACzB,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts new file mode 100644 index 000000000..5f5f00e97 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts @@ -0,0 +1,7 @@ +import { RequestPolicy } from "./policies/requestPolicy"; +/** + * An interface that can send HttpRequests and receive promised HttpResponses. + */ +export interface HttpClient extends RequestPolicy { +} +//# sourceMappingURL=httpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts.map new file mode 100644 index 000000000..5e51a29ae --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpClient.d.ts","sourceRoot":"","sources":["../../lib/httpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;CAChD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpClient.js b/node_modules/@azure/ms-rest-js/es/lib/httpClient.js new file mode 100644 index 000000000..8dca936c6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpClient.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=httpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/httpClient.js.map new file mode 100644 index 000000000..e8c060fd6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpClient.js","sourceRoot":"","sources":["../../lib/httpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts new file mode 100644 index 000000000..4f95f2eae --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts @@ -0,0 +1,132 @@ +/** + * An individual header within a HttpHeaders collection. + */ +export interface HttpHeader { + /** + * The name of the header. + */ + name: string; + /** + * The value of the header. + */ + value: string; +} +/** + * A HttpHeaders collection represented as a simple JSON object. + */ +export declare type RawHttpHeaders = { + [headerName: string]: string; +}; +/** + * A collection of HTTP header key/value pairs. + */ +export interface HttpHeadersLike { + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeadersLike; + /** + * Get the JSON object representation of this HTTP header collection. + * The result is the same as `rawHeaders()`. + */ + toJson(): RawHttpHeaders; +} +export declare function isHttpHeadersLike(object?: any): object is HttpHeadersLike; +/** + * A collection of HTTP header key/value pairs. + */ +export declare class HttpHeaders { + private readonly _headersMap; + constructor(rawHeaders?: RawHttpHeaders); + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header names that are contained in this collection. + */ + headerValues(): string[]; + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(): RawHttpHeaders; + /** + * Get the string representation of this HTTP header collection. + */ + toString(): string; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeaders; +} +//# sourceMappingURL=httpHeaders.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts.map new file mode 100644 index 000000000..dde137d04 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpHeaders.d.ts","sourceRoot":"","sources":["../../lib/httpHeaders.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5D;;;;OAIG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;OAEG;IACH,UAAU,IAAI,cAAc,CAAC;IAC7B;;OAEG;IACH,YAAY,IAAI,UAAU,EAAE,CAAC;IAC7B;;OAEG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE,CAAC;IACzB;;OAEG;IACH,KAAK,IAAI,eAAe,CAAC;IACzB;;;OAGG;IACH,MAAM,IAAI,cAAc,CAAC;CAC1B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,MAAM,IAAI,eAAe,CAoBzE;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;gBAEtD,UAAU,CAAC,EAAE,cAAc;IASvC;;;;;OAKG;IACI,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIlE;;;;OAIG;IACI,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKlD;;OAEG;IACI,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI5C;;;;OAIG;IACI,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAM1C;;OAEG;IACI,UAAU,IAAI,cAAc;IASnC;;OAEG;IACI,YAAY,IAAI,UAAU,EAAE;IAQnC;;OAEG;IACI,WAAW,IAAI,MAAM,EAAE;IAS9B;;OAEG;IACI,YAAY,IAAI,MAAM,EAAE;IAS/B;;OAEG;IACI,MAAM,IAAI,cAAc;IAI/B;;OAEG;IACI,QAAQ,IAAI,MAAM;IAIzB;;OAEG;IACI,KAAK,IAAI,WAAW;CAG5B"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js new file mode 100644 index 000000000..6f0cb644e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName) { + return headerName.toLowerCase(); +} +export function isHttpHeadersLike(object) { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function") { + return true; + } + return false; +} +/** + * A collection of HTTP header key/value pairs. + */ +var HttpHeaders = /** @class */ (function () { + function HttpHeaders(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (var headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + HttpHeaders.prototype.set = function (headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() }; + }; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + HttpHeaders.prototype.get = function (headerName) { + var header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + }; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + HttpHeaders.prototype.contains = function (headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + }; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + HttpHeaders.prototype.remove = function (headerName) { + var result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + }; + /** + * Get the headers that are contained this collection as an object. + */ + HttpHeaders.prototype.rawHeaders = function () { + var result = {}; + for (var headerKey in this._headersMap) { + var header = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + }; + /** + * Get the headers that are contained in this collection as an array. + */ + HttpHeaders.prototype.headersArray = function () { + var headers = []; + for (var headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerNames = function () { + var headerNames = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + }; + /** + * Get the header names that are contained in this collection. + */ + HttpHeaders.prototype.headerValues = function () { + var headerValues = []; + var headers = this.headersArray(); + for (var i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + }; + /** + * Get the JSON object representation of this HTTP header collection. + */ + HttpHeaders.prototype.toJson = function () { + return this.rawHeaders(); + }; + /** + * Get the string representation of this HTTP header collection. + */ + HttpHeaders.prototype.toString = function () { + return JSON.stringify(this.toJson()); + }; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + HttpHeaders.prototype.clone = function () { + return new HttpHeaders(this.rawHeaders()); + }; + return HttpHeaders; +}()); +export { HttpHeaders }; +//# sourceMappingURL=httpHeaders.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js.map b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js.map new file mode 100644 index 000000000..4c1660217 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpHeaders.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpHeaders.js","sourceRoot":"","sources":["../../lib/httpHeaders.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;GAEG;AACH,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,UAAU,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AA4ED,MAAM,UAAU,iBAAiB,CAAC,MAAY;IAC5C,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACzC,OAAO,KAAK,CAAC;KACd;IAED,IACE,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU;QACvC,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU;QAClC,O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AAY,EAAE,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACvC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,4BAAM,GAAb;QACE,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,8BAAQ,GAAf;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,2BAAK,GAAZ;QACE,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5C,CAAC;IACH,kBAAC;AAAD,CAAC,AArHD,IAqHC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts new file mode 100644 index 000000000..49de13e06 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts @@ -0,0 +1,75 @@ +/// +import { WebResourceLike } from "./webResource"; +import { HttpHeadersLike } from "./httpHeaders"; +/** + * The properties on an HTTP response which will always be present. + */ +export interface HttpResponse { + /** + * The raw request + */ + request: WebResourceLike; + /** + * The HTTP response status (e.g. 200) + */ + status: number; + /** + * The HTTP response headers. + */ + headers: HttpHeadersLike; +} +declare global { + /** + * Stub declaration of the browser-only Blob type. + * Full type information can be obtained by including "lib": ["dom"] in tsconfig.json. + */ + interface Blob { + } +} +/** + * Wrapper object for http request and response. Deserialized object is stored in + * the `parsedBody` property when the response body is received in JSON or XML. + */ +export interface HttpOperationResponse extends HttpResponse { + /** + * The parsed HTTP response headers. + */ + parsedHeaders?: { + [key: string]: any; + }; + /** + * The response body as text (string format) + */ + bodyAsText?: string | null; + /** + * The response body as parsed JSON or XML + */ + parsedBody?: any; + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; +} +/** + * The flattened response to a REST call. + * Contains the underlying HttpOperationResponse as well as + * the merged properties of the parsedBody, parsedHeaders, etc. + */ +export interface RestResponse { + /** + * The underlying HTTP response containing both raw and deserialized response data. + */ + _response: HttpOperationResponse; + [key: string]: any; +} +//# sourceMappingURL=httpOperationResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts.map new file mode 100644 index 000000000..10ad4f59b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpOperationResponse.d.ts","sourceRoot":"","sources":["../../lib/httpOperationResponse.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IAEzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,IAAI;KAAG;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;CAC5C;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,EAAE,qBAAqB,CAAC;IAEjC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js new file mode 100644 index 000000000..bdb330848 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=httpOperationResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js.map b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js.map new file mode 100644 index 000000000..14302d678 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpOperationResponse.js","sourceRoot":"","sources":["../../lib/httpOperationResponse.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts new file mode 100644 index 000000000..7a13ab291 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts @@ -0,0 +1,22 @@ +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export declare enum HttpPipelineLogLevel { + /** + * A log level that indicates that no logs will be logged. + */ + OFF = 0, + /** + * An error log. + */ + ERROR = 1, + /** + * A warning log. + */ + WARNING = 2, + /** + * An information log. + */ + INFO = 3 +} +//# sourceMappingURL=httpPipelineLogLevel.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts.map new file mode 100644 index 000000000..91f637ccb --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogLevel.d.ts","sourceRoot":"","sources":["../../lib/httpPipelineLogLevel.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,KAAK,IAAA;IAEL;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,IAAI,IAAA;CACL"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js new file mode 100644 index 000000000..8971a068d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export var HttpPipelineLogLevel; +(function (HttpPipelineLogLevel) { + /** + * A log level that indicates that no logs will be logged. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + /** + * An error log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + /** + * A warning log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; + /** + * An information log. + */ + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; +})(HttpPipelineLogLevel || (HttpPipelineLogLevel = {})); +//# sourceMappingURL=httpPipelineLogLevel.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js.map b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js.map new file mode 100644 index 000000000..d933399fa --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogLevel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogLevel.js","sourceRoot":"","sources":["../../lib/httpPipelineLogLevel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;GAEG;AACH,MAAM,CAAN,IAAY,oBAoBX;AApBD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,6DAAG,CAAA;IAEH;;OAEG;IACH,iEAAK,CAAA;IAEL;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;AACN,CAAC,EApBW,oBAAoB,KAApB,oBAAoB,QAoB/B"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts new file mode 100644 index 000000000..fdbf56c8e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts @@ -0,0 +1,35 @@ +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +/** + * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages + * that can be used for debugging purposes. + */ +export interface HttpPipelineLogger { + /** + * The log level threshold for what logs will be logged. + */ + minimumLogLevel: HttpPipelineLogLevel; + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +export declare class ConsoleHttpPipelineLogger implements HttpPipelineLogger { + minimumLogLevel: HttpPipelineLogLevel; + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + constructor(minimumLogLevel: HttpPipelineLogLevel); + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=httpPipelineLogger.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts.map new file mode 100644 index 000000000..d3a97a1a6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogger.d.ts","sourceRoot":"","sources":["../../lib/httpPipelineLogger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,eAAe,EAAE,oBAAoB,CAAC;IAEtC;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;IAK/C,eAAe,EAAE,oBAAoB;IAJxD;;;OAGG;gBACgB,eAAe,EAAE,oBAAoB;IAGxD;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAgB3D"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js new file mode 100644 index 000000000..a8b1cb53f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +var ConsoleHttpPipelineLogger = /** @class */ (function () { + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + function ConsoleHttpPipelineLogger(minimumLogLevel) { + this.minimumLogLevel = minimumLogLevel; + } + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + ConsoleHttpPipelineLogger.prototype.log = function (logLevel, message) { + var logMessage = HttpPipelineLogLevel[logLevel] + ": " + message; + switch (logLevel) { + case HttpPipelineLogLevel.ERROR: + console.error(logMessage); + break; + case HttpPipelineLogLevel.WARNING: + console.warn(logMessage); + break; + case HttpPipelineLogLevel.INFO: + console.log(logMessage); + break; + } + }; + return ConsoleHttpPipelineLogger; +}()); +export { ConsoleHttpPipelineLogger }; +//# sourceMappingURL=httpPipelineLogger.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js.map b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js.map new file mode 100644 index 000000000..7c20979bb --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/httpPipelineLogger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"httpPipelineLogger.js","sourceRoot":"","sources":["../../lib/httpPipelineLogger.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAoB9D;;GAEG;AACH;IACE;;;OAGG;IACH,mCAAmB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IACxD,CAAC;IAED;;;;OAIG;IACH,uCAAG,GAAH,UAAI,QAA8B,EAAE,OAAe;QACjD,IAAM,UAAU,GAAM,oBAAoB,CAAC,QAAQ,CAAC,UAAK,OAAS,CAAC;QACnE,QAAQ,QAAQ,EAAE;YAClB,KAAK,oBAAoB,CAAC,KAAK;gBAC7B,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBAC1B,MAAM;YAER,KAAK,oBAAoB,CAAC,OAAO;gBAC/B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACzB,MAAM;YAER,KAAK,oBAAoB,CAAC,IAAI;gBAC5B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxB,MAAM;SACP;IACH,CAAC;IACH,gCAAC;AAAD,CAAC,AA7BD,IA6BC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts b/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts new file mode 100644 index 000000000..7c8977ed4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts @@ -0,0 +1,38 @@ +export { WebResource, WebResourceLike, HttpRequestBody, RequestPrepareOptions, HttpMethods, ParameterValue, RequestOptionsBase, TransferProgressEvent, AbortSignalLike } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpClient } from "./httpClient"; +export { HttpHeaders, HttpHeadersLike } from "./httpHeaders"; +export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse"; +export { HttpPipelineLogger } from "./httpPipelineLogger"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { OperationArguments } from "./operationArguments"; +export { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +export { OperationResponse } from "./operationResponse"; +export { OperationSpec } from "./operationSpec"; +export { ServiceClient, ServiceClientOptions, flattenResponse } from "./serviceClient"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { agentPolicy } from "./policies/agentPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy } from "./policies/redirectPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy"; +export { MapperType, SimpleMapperType, CompositeMapperType, DictionaryMapperType, SequenceMapperType, EnumMapperType, Mapper, BaseMapper, CompositeMapper, SequenceMapper, DictionaryMapper, EnumMapper, MapperConstraints, PolymorphicDiscriminator, Serializer, UrlParameterValue, serializeObject } from "./serializer"; +export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, ServiceCallback, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration } from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; +export { TokenCredentials } from "./credentials/tokenCredentials"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials"; +export { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { DomainCredentials } from "./credentials/domainCredentials"; +export { Authenticator } from "./credentials/credentials"; +//# sourceMappingURL=msRest.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts.map new file mode 100644 index 000000000..ecf0f9591 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/msRest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msRest.d.ts","sourceRoot":"","sources":["../../lib/msRest.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9L,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EA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AAC;AAClE,OAAO,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/msRest.js b/node_modules/@azure/ms-rest-js/es/lib/msRest.js new file mode 100644 index 000000000..670d32223 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/msRest.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +export { WebResource } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpHeaders } from "./httpHeaders"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { ServiceClient, flattenResponse } from "./serviceClient"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicyOptions } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { agentPolicy } from "./policies/agentPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy } from "./policies/redirectPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy"; +export { MapperType, Serializer, serializeObject } from "./serializer"; +export { stripRequest, stripResponse, delay, executePromisesSequentially, generateUuid, encodeUri, promiseToCallback, promiseToServiceCallback, isValidUuid, applyMixins, isNode, isDuration } from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; +// Credentials +export { TokenCredentials } from "./credentials/tokenCredentials"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials } from "./credentials/apiKeyCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { DomainCredentials } from "./credentials/domainCredentials"; +//# sourceMappingURL=msRest.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/msRest.js.map b/node_modules/@azure/ms-rest-js/es/lib/msRest.js.map new file mode 100644 index 000000000..013d9f98a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/msRest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRest.js","sourceRoot":"","sources":["../../lib/msRest.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,WAAW,EAAoJ,MAAM,eAAe,CAAC;AAC9L,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAE,aAAa,EAAwB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAuC,oBAAoB,EAA4B,MAAM,0BAA0B,CAA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.ts b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts new file mode 100644 index 000000000..7e5a0255e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts @@ -0,0 +1,11 @@ +import "node-fetch"; +import { FetchHttpClient } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class NodeFetchHttpClient extends FetchHttpClient { + private readonly cookieJar; + fetch(input: RequestInfo, init?: RequestInit): Promise; + prepareRequest(httpRequest: WebResourceLike): Promise>; + processRequest(operationResponse: HttpOperationResponse): Promise; +} +//# sourceMappingURL=nodeFetchHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts.map new file mode 100644 index 000000000..10b05bdb1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFetchHttpClient.d.ts","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAchD,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuD;IAE3E,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIhE,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IA0C3E,cAAc,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAoB9E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js new file mode 100644 index 000000000..7443a4bfd --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __awaiter, __extends, __generator } from "tslib"; +import * as tough from "tough-cookie"; +import * as http from "http"; +import * as https from "https"; +import "node-fetch"; +import { FetchHttpClient } from "./fetchHttpClient"; +import { createProxyAgent } from "./proxyAgent"; +var globalWithFetch = global; +if (typeof globalWithFetch.fetch !== "function") { + var fetch_1 = require("node-fetch").default; + globalWithFetch.fetch = fetch_1; +} +var NodeFetchHttpClient = /** @class */ (function (_super) { + __extends(NodeFetchHttpClient, _super); + function NodeFetchHttpClient() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.cookieJar = new tough.CookieJar(undefined, { looseMode: true }); + return _this; + } + NodeFetchHttpClient.prototype.fetch = function (input, init) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, fetch(input, init)]; + }); + }); + }; + NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var requestInit, cookieString, _a, httpAgent, httpsAgent, tunnel, options, agent; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + requestInit = {}; + if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) { + if (err) { + reject(err); + } + else { + resolve(cookie); + } + }); + })]; + case 1: + cookieString = _b.sent(); + httpRequest.headers.set("Cookie", cookieString); + _b.label = 2; + case 2: + if (httpRequest.agentSettings) { + _a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https; + if (httpsAgent && httpRequest.url.startsWith("https")) { + requestInit.agent = httpsAgent; + } + else if (httpAgent) { + requestInit.agent = httpAgent; + } + } + else if (httpRequest.proxySettings) { + tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers); + requestInit.agent = tunnel.agent; + } + if (httpRequest.keepAlive === true) { + if (requestInit.agent) { + requestInit.agent.keepAlive = true; + } + else { + options = { keepAlive: true }; + agent = httpRequest.url.startsWith("https") ? new https.Agent(options) : new http.Agent(options); + requestInit.agent = agent; + } + } + return [2 /*return*/, requestInit]; + } + }); + }); + }; + NodeFetchHttpClient.prototype.processRequest = function (operationResponse) { + return __awaiter(this, void 0, void 0, function () { + var setCookieHeader_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.cookieJar) return [3 /*break*/, 2]; + setCookieHeader_1 = operationResponse.headers.get("Set-Cookie"); + if (!(setCookieHeader_1 != undefined)) return [3 /*break*/, 2]; + return [4 /*yield*/, new Promise(function (resolve, reject) { + _this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + })]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + return NodeFetchHttpClient; +}(FetchHttpClient)); +export { NodeFetchHttpClient }; +//# sourceMappingURL=nodeFetchHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js.map new file mode 100644 index 000000000..d7b0b3719 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFetchHttpClient.js","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;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,wBAAc;wBACV,oBAAkB,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;6BAChE,CAAA,iBAAe,IAAI,SAAS,CAAA,EAA5B,wBAA4B;wBAC9B,qBAAM,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gCAChC,KAAI,CAAC,SAAU,CAAC,SAAS,CACvB,iBAAe,EACf,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAC7B,EAAE,WAAW,EAAE,IAAI,EAAE,EACrB,UAAA,GAAG;oCACD,IAAI,GAAG,EAAE;wCACP,MAAM,CAAC,GAAG,CAAC,CAAC;qCACb;yCAAM;wCACL,OAAO,EAAE,CAAC;qCACX;gCACH,CAAC,CAAC,CAAC;4BACP,CAAC,CAAC,EAAA;;wBAZF,SAYE,CAAC;;;;;;KAGR;IACH,0BAAC;AAAD,CAAC,AArED,CAAyC,eAAe,GAqEvD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts new file mode 100644 index 000000000..7eadcda91 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts @@ -0,0 +1,15 @@ +import { RequestOptionsBase } from "./webResource"; +/** + * A collection of properties that apply to a single invocation of an operation. + */ +export interface OperationArguments { + /** + * The parameters that were passed to the operation method. + */ + [parameterName: string]: any; + /** + * The optional arugments that are provided to an operation. + */ + options?: RequestOptionsBase; +} +//# sourceMappingURL=operationArguments.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts.map new file mode 100644 index 000000000..e05a58fee --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationArguments.d.ts","sourceRoot":"","sources":["../../lib/operationArguments.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,CAAC,aAAa,EAAE,MAAM,GAAG,GAAG,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js new file mode 100644 index 000000000..c8bbde71f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=operationArguments.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js.map b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js.map new file mode 100644 index 000000000..ee2fe5c7f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationArguments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationArguments.js","sourceRoot":"","sources":["../../lib/operationArguments.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts new file mode 100644 index 000000000..f5b78021b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts @@ -0,0 +1,51 @@ +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { Mapper } from "./serializer"; +export declare type ParameterPath = string | string[] | { + [propertyName: string]: ParameterPath; +}; +/** + * A common interface that all Operation parameter's extend. + */ +export interface OperationParameter { + /** + * The path to this parameter's value in OperationArguments or the object that contains paths for + * each property's value in OperationArguments. + */ + parameterPath: ParameterPath; + /** + * The mapper that defines how to validate and serialize this parameter's value. + */ + mapper: Mapper; +} +/** + * A parameter for an operation that will be substituted into the operation's request URL. + */ +export interface OperationURLParameter extends OperationParameter { + /** + * Whether or not to skip encoding the URL parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; +} +/** + * A parameter for an operation that will be added as a query parameter to the operation's HTTP + * request. + */ +export interface OperationQueryParameter extends OperationParameter { + /** + * Whether or not to skip encoding the query parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; + /** + * If this query parameter's value is a collection, what type of format should the value be + * converted to. + */ + collectionFormat?: QueryCollectionFormat; +} +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export declare function getPathStringFromParameter(parameter: OperationParameter): string; +export declare function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string; +//# sourceMappingURL=operationParameter.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts.map new file mode 100644 index 000000000..1ca4c2a04 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationParameter.d.ts","sourceRoot":"","sources":["../../lib/operationParameter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,oBAAY,aAAa,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,aAAa,EAAE,aAAa,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CAEhF;AAED,wBAAgB,8BAA8B,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnG"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js new file mode 100644 index 000000000..8ab319a67 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export function getPathStringFromParameter(parameter) { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); +} +export function getPathStringFromParameterPath(parameterPath, mapper) { + var result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; +} +//# sourceMappingURL=operationParameter.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js.map b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js.map new file mode 100644 index 000000000..e18532998 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationParameter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationParameter.js","sourceRoot":"","sources":["../../lib/operationParameter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAkD/F;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,SAA6B;IACtE,OAAO,8BAA8B,CAAC,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,aAA4B,EAAE,MAAc;IACzF,IAAI,MAAc,CAAC;IACnB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACrC,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACvC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAClC;SAAM;QACL,MAAM,GAAG,MAAM,CAAC,cAAe,CAAC;KACjC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts new file mode 100644 index 000000000..f99c6003b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts @@ -0,0 +1,15 @@ +import { Mapper } from "./serializer"; +/** + * An OperationResponse that can be returned from an operation request for a single status code. + */ +export interface OperationResponse { + /** + * The mapper that will be used to deserialize the response headers. + */ + headersMapper?: Mapper; + /** + * The mapper that will be used to deserialize the response body. + */ + bodyMapper?: Mapper; +} +//# sourceMappingURL=operationResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts.map new file mode 100644 index 000000000..d96474af5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationResponse.d.ts","sourceRoot":"","sources":["../../lib/operationResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js new file mode 100644 index 000000000..b6e328131 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +//# sourceMappingURL=operationResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js.map b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js.map new file mode 100644 index 000000000..a31b9a5f6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationResponse.js","sourceRoot":"","sources":["../../lib/operationResponse.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts new file mode 100644 index 000000000..9be13076a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts @@ -0,0 +1,68 @@ +import { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +import { OperationResponse } from "./operationResponse"; +import { Serializer } from "./serializer"; +import { HttpMethods } from "./webResource"; +/** + * A specification that defines an operation. + */ +export interface OperationSpec { + /** + * The serializer to use in this operation. + */ + readonly serializer: Serializer; + /** + * The HTTP method that should be used by requests for this operation. + */ + readonly httpMethod: HttpMethods; + /** + * The URL that was provided in the service's specification. This will still have all of the URL + * template variables in it. If this is not provided when the OperationSpec is created, then it + * will be populated by a "baseUri" property on the ServiceClient. + */ + readonly baseUrl?: string; + /** + * The fixed path for this operation's URL. This will still have all of the URL template variables + * in it. + */ + readonly path?: string; + /** + * The content type of the request body. This value will be used as the "Content-Type" header if + * it is provided. + */ + readonly contentType?: string; + /** + * The parameter that will be used to construct the HTTP request's body. + */ + readonly requestBody?: OperationParameter; + /** + * Whether or not this operation uses XML request and response bodies. + */ + readonly isXML?: boolean; + /** + * The parameters to the operation method that will be substituted into the constructed URL. + */ + readonly urlParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be added to the constructed URL's query. + */ + readonly queryParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be converted to headers on the operation's + * HTTP request. + */ + readonly headerParameters?: ReadonlyArray; + /** + * The parameters to the operation method that will be used to create a formdata body for the + * operation's HTTP request. + */ + readonly formDataParameters?: ReadonlyArray; + /** + * The different types of responses that this operation can return based on what status code is + * returned. + */ + readonly responses: { + [responseCode: string]: OperationResponse; + }; +} +export declare function isStreamOperation(operationSpec: OperationSpec): boolean; +//# sourceMappingURL=operationSpec.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts.map new file mode 100644 index 000000000..6d813b7bd --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationSpec.d.ts","sourceRoot":"","sources":["../../lib/operationSpec.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAc,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE9D;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAElE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAE9D;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAEhE;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAAE,CAAC;CACnE;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAUvE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js new file mode 100644 index 000000000..5832a91a4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { MapperType } from "./serializer"; +export function isStreamOperation(operationSpec) { + var result = false; + for (var statusCode in operationSpec.responses) { + var operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; +} +//# sourceMappingURL=operationSpec.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js.map b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js.map new file mode 100644 index 000000000..088d6cff8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/operationSpec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationSpec.js","sourceRoot":"","sources":["../../lib/operationSpec.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,OAAO,EAAE,UAAU,EAAc,MAAM,cAAc,CAAC;AA2EtD,MAAM,UAAU,iBAAiB,CAAC,aAA4B;IAC5D,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,KAAK,IAAM,UAAU,IAAI,aAAa,CAAC,SAAS,EAAE;QAChD,IAAM,iBAAiB,GAAsB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACjF,IAAI,iBAAiB,CAAC,UAAU,IAAI,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM,EAAE;YAChG,MAAM,GAAG,IAAI,CAAC;YACd,MAAM;SACP;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts new file mode 100644 index 000000000..7893df0c5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts @@ -0,0 +1,10 @@ +import { AgentSettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +export declare function agentPolicy(_agentSettings?: AgentSettings): RequestPolicyFactory; +export declare class AgentPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike); + sendRequest(_request: WebResourceLike): Promise; +} +//# sourceMappingURL=agentPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts.map new file mode 100644 index 000000000..9aa7c9a77 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"agentPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAMhF;AAED,qBAAa,WAAY,SAAQ,iBAAiB;gBACpC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB;IAKjE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG9E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js new file mode 100644 index 000000000..1b18061de --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +var agentNotSupportedInBrowser = new Error("AgentPolicy is not supported in browser environment"); +export function agentPolicy(_agentSettings) { + return { + create: function (_nextPolicy, _options) { + throw agentNotSupportedInBrowser; + } + }; +} +var AgentPolicy = /** @class */ (function (_super) { + __extends(AgentPolicy, _super); + function AgentPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw agentNotSupportedInBrowser; + return _this; + } + AgentPolicy.prototype.sendRequest = function (_request) { + throw agentNotSupportedInBrowser; + }; + return AgentPolicy; +}(BaseRequestPolicy)); +export { AgentPolicy }; +//# sourceMappingURL=agentPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js.map new file mode 100644 index 000000000..834d3b703 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"agentPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAInH,IAAM,0BAA0B,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEpG,MAAM,UAAU,WAAW,CAAC,cAA8B;IACxD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAAkC;YACrE,MAAM,0BAA0B,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAChD,qBAAY,UAAyB,EAAE,OAAiC;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,0BAA0B,CAAC;;IACnC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,QAAyB;QAC1C,MAAM,0BAA0B,CAAC;IACnC,CAAC;IACH,kBAAC;AAAD,CAAC,AATD,CAAiC,iBAAiB,GASjD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts new file mode 100644 index 000000000..84d197e02 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts @@ -0,0 +1,11 @@ +import { AgentSettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +export declare function agentPolicy(agentSettings?: AgentSettings): RequestPolicyFactory; +export declare class AgentPolicy extends BaseRequestPolicy { + agentSettings: AgentSettings; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, agentSettings: AgentSettings); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=agentPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts.map new file mode 100644 index 000000000..385482801 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"agentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAM/E;AAED,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,aAAa,EAAE,aAAa,CAAC;gBAEjB,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,aAAa;IAK/F,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js new file mode 100644 index 000000000..243c787b3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function agentPolicy(agentSettings) { + return { + create: function (nextPolicy, options) { + return new AgentPolicy(nextPolicy, options, agentSettings); + } + }; +} +var AgentPolicy = /** @class */ (function (_super) { + __extends(AgentPolicy, _super); + function AgentPolicy(nextPolicy, options, agentSettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.agentSettings = agentSettings; + return _this; + } + AgentPolicy.prototype.sendRequest = function (request) { + if (!request.agentSettings) { + request.agentSettings = this.agentSettings; + } + return this._nextPolicy.sendRequest(request); + }; + return AgentPolicy; +}(BaseRequestPolicy)); +export { AgentPolicy }; +//# sourceMappingURL=agentPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js.map new file mode 100644 index 000000000..80ea90ad2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/agentPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"agentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/agentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAInH,MAAM,UAAU,WAAW,CAAC,aAA6B;IACvD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,aAAc,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAGhD,qBAAY,UAAyB,EAAE,OAAiC,EAAE,aAA4B;QAAtG,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACrC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC1B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,kBAAC;AAAD,CAAC,AAdD,CAAiC,iBAAiB,GAcjD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts new file mode 100644 index 000000000..de2ef2c40 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts @@ -0,0 +1,38 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +/** + * The content-types that will indicate that an operation response should be deserialized in a + * particular way. + */ +export interface DeserializationContentTypes { + /** + * The content-types that indicate that an operation response should be deserialized as JSON. + * Defaults to [ "application/json", "text/json" ]. + */ + json?: string[]; + /** + * The content-types that indicate that an operation response should be deserialized as XML. + * Defaults to [ "application/xml", "application/atom+xml" ]. + */ + xml?: string[]; +} +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export declare function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory; +export declare const defaultJsonContentTypes: string[]; +export declare const defaultXmlContentTypes: string[]; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +export declare class DeserializationPolicy extends BaseRequestPolicy { + readonly jsonContentTypes: string[]; + readonly xmlContentTypes: string[]; + constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike); + sendRequest(request: WebResourceLike): Promise; +} +export declare function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise; +//# sourceMappingURL=deserializationPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts.map new file mode 100644 index 000000000..7cd821c75 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializationPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/deserializationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAOjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,2BAA2B,CAAC,EAAE,2BAA2B,GAAG,oBAAoB,CAMrH;AAED,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AACzE,eAAO,MAAM,sBAAsB,UAA8C,CAAC;AAElF;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,SAAgB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3C,SAAgB,eAAe,EAAE,MAAM,EAAE,CAAC;gBAE9B,UAAU,EAAE,aAAa,EAAE,2BAA2B,EAAE,2BAA2B,GAAG,SAAS,EAAE,OAAO,EAAE,wBAAwB;IAOjI,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAGnF;AA8BD,wBAAgB,uBAAuB,CAAC,gBAAgB,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA+F9J"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js new file mode 100644 index 000000000..073137a53 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __awaiter, __extends, __generator } from "tslib"; +import { isStreamOperation } from "../operationSpec"; +import { RestError } from "../restError"; +import { MapperType } from "../serializer"; +import * as utils from "../util/utils"; +import { parseXML } from "../util/xml"; +import { BaseRequestPolicy } from "./requestPolicy"; +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export function deserializationPolicy(deserializationContentTypes) { + return { + create: function (nextPolicy, options) { + return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options); + } + }; +} +export var defaultJsonContentTypes = ["application/json", "text/json"]; +export var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +var DeserializationPolicy = /** @class */ (function (_super) { + __extends(DeserializationPolicy, _super); + function DeserializationPolicy(nextPolicy, deserializationContentTypes, options) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes; + _this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes; + return _this; + } + DeserializationPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(request).then(function (response) { return deserializeResponseBody(_this.jsonContentTypes, _this.xmlContentTypes, response); })]; + }); + }); + }; + return DeserializationPolicy; +}(BaseRequestPolicy)); +export { DeserializationPolicy }; +function getOperationResponse(parsedResponse) { + var result; + var request = parsedResponse.request; + var operationSpec = request.operationSpec; + if (operationSpec) { + var operationResponseGetter = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; +} +function shouldDeserializeResponse(parsedResponse) { + var shouldDeserialize = parsedResponse.request.shouldDeserialize; + var result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +export function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response) { + return parse(jsonContentTypes, xmlContentTypes, response).then(function (parsedResponse) { + var shouldDeserialize = shouldDeserializeResponse(parsedResponse); + if (shouldDeserialize) { + var operationSpec = parsedResponse.request.operationSpec; + if (operationSpec && operationSpec.responses) { + var statusCode = parsedResponse.status; + var expectedStatusCodes = Object.keys(operationSpec.responses); + var hasNoExpectedStatusCodes = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); + var responseSpec = getOperationResponse(parsedResponse); + var isExpectedStatusCode = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec; + if (!isExpectedStatusCode) { + var defaultResponseSpec = operationSpec.responses.default; + if (defaultResponseSpec) { + var initialErrorMessage = isStreamOperation(operationSpec) + ? "Unexpected status code: " + statusCode + : parsedResponse.bodyAsText; + var error = new RestError(initialErrorMessage); + error.statusCode = statusCode; + error.request = utils.stripRequest(parsedResponse.request); + error.response = utils.stripResponse(parsedResponse); + var parsedErrorResponse = parsedResponse.parsedBody; + try { + if (parsedErrorResponse) { + var defaultResponseBodyMapper = defaultResponseSpec.bodyMapper; + if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === "CloudError") { + if (parsedErrorResponse.error) { + parsedErrorResponse = parsedErrorResponse.error; + } + if (parsedErrorResponse.code) { + error.code = parsedErrorResponse.code; + } + if (parsedErrorResponse.message) { + error.message = parsedErrorResponse.message; + } + } + else { + var internalError = parsedErrorResponse; + if (parsedErrorResponse.error) { + internalError = parsedErrorResponse.error; + } + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + } + if (defaultResponseBodyMapper) { + var valueToDeserialize = parsedErrorResponse; + if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof parsedErrorResponse === "object" + ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName] + : []; + } + error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, "error.body"); + } + } + } + catch (defaultError) { + error.message = "Error \"" + defaultError.message + "\" occurred in deserializing the responseBody - \"" + parsedResponse.bodyAsText + "\" for the default response."; + } + return Promise.reject(error); + } + } + else if (responseSpec) { + if (responseSpec.bodyMapper) { + var valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody"); + } + catch (error) { + var restError = new RestError("Error " + error + " occurred in deserializing the responseBody - " + parsedResponse.bodyAsText); + restError.request = utils.stripRequest(parsedResponse.request); + restError.response = utils.stripResponse(parsedResponse); + return Promise.reject(restError); + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + } + } + return Promise.resolve(parsedResponse); + }); +} +function parse(jsonContentTypes, xmlContentTypes, operationResponse) { + var errorHandler = function (err) { + var msg = "Error \"" + err + "\" occurred while parsing the response body - " + operationResponse.bodyAsText + "."; + var errCode = err.code || RestError.PARSE_ERROR; + var e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText); + return Promise.reject(e); + }; + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + var text_1 = operationResponse.bodyAsText; + var contentType = operationResponse.headers.get("Content-Type") || ""; + var contentComponents = !contentType ? [] : contentType.split(";").map(function (component) { return component.toLowerCase(); }); + if (contentComponents.length === 0 || contentComponents.some(function (component) { return jsonContentTypes.indexOf(component) !== -1; })) { + return new Promise(function (resolve) { + operationResponse.parsedBody = JSON.parse(text_1); + resolve(operationResponse); + }).catch(errorHandler); + } + else if (contentComponents.some(function (component) { return xmlContentTypes.indexOf(component) !== -1; })) { + return parseXML(text_1) + .then(function (body) { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + return Promise.resolve(operationResponse); +} +//# sourceMappingURL=deserializationPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js.map new file mode 100644 index 000000000..8e10f623a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/deserializationPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"deserializationPolicy.js","sourceRoot":"","sources":["../../../lib/policies/deserializationPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAI/F,OAAO,EAAiB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAU,UAAU,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAoBnH;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,2BAAyD;IAC7F,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,2BAA2B,EAAE,OAAO,CAAC,CAAC;QACrF,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,IAAM,uBAAuB,GAAG,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;AACzE,MAAM,CAAC,IAAM,sBAAsB,GAAG,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;AAElF;;;GAGG;AACH;IAA2C,yCAAiB;IAI1D,+BAAY,UAAyB,EAAE,2BAAoE,EAAE,OAAiC;QAA9I,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAI3B;QAFC,KAAI,CAAC,gBAAgB,GAAG,2BAA2B,IAAI,2BAA2B,CAAC,IAAI,IAAI,uBAAuB,CAAC;QACnH,KAAI,CAAC,eAAe,GAAG,2BAA2B,IAAI,2BAA2B,CAAC,GAAG,IAAI,sBAAsB,CAA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a,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,SAAS,IAAI,OAAA,SAAS,CAAC,WAAW,EAAE,EAAvB,CAAuB,CAAC,CAAC;QACzH,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAA,SAAS,IAAI,OAAA,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAA1C,CAA0C,CAAC,EAAE;YACrH,OAAO,IAAI,OAAO,CAAwB,UAAA,OAAO;gBAC/C,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAI,CAAC,CAAC;gBAChD,OAAO,CAAC,iBAAiB,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SACxB;aAAM,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAA,SAAS,IAAI,OAAA,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAzC,CAAyC,CAAC,EAAE;YACzF,OAAO,QAAQ,CAAC,MAAI,CAAC;iBAClB,IAAI,CAAC,UAAA,IAAI;gBACR,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC;gBACpC,OAAO,iBAAiB,CAAC;YAC3B,CAAC,CAAC;iBACD,KAAK,CAAC,YAAY,CAAC,CAAC;SACxB;KACF;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC5C,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts new file mode 100644 index 000000000..3442911a0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts @@ -0,0 +1,48 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} +export declare function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +export declare class ExponentialRetryPolicy extends BaseRequestPolicy { + /** + * The client retry count. + */ + retryCount: number; + /** + * The client retry interval in milliseconds. + */ + retryInterval: number; + /** + * The minimum retry interval in milliseconds. + */ + minRetryInterval: number; + /** + * The maximum retry interval in milliseconds. + */ + maxRetryInterval: number; + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=exponentialRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts.map new file mode 100644 index 000000000..4115570f9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/exponentialRetryPolicy.ts"],"names":[],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/lib/policies/exponentialRetryPolicy.js new file mode 100644 index 000000000..03dfd3f8b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { RestError } from "../restError"; +export function exponentialRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +var DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; +var DEFAULT_CLIENT_RETRY_COUNT = 3; +var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; +var DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +var ExponentialRetryPolicy = /** @class */ (function (_super) { + __extends(ExponentialRetryPolicy, _super); + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + function ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + function isNumber(n) { return typeof n === "number"; } + _this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + ExponentialRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return retry(_this, request, response); }) + .catch(function (error) { return retry(_this, request, error.response, undefined, error); }); + }; + return ExponentialRetryPolicy; +}(BaseRequestPolicy)); +export { ExponentialRetryPolicy }; +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(policy, statusCode, retryData) { + if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) { + return false; + } + var currentCount; + if (!retryData) { + throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); +} +/** + * Updates the retry data for the next attempt. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {RetryData} retryData The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +function updateRetryData(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; +} +function retry(policy, request, response, retryData, requestError) { + retryData = updateRetryData(policy, retryData, requestError); + var isAborted = request.abortSignal && request.abortSignal.aborted; + if (!isAborted && shouldRetry(policy, response && response.status, retryData)) { + return utils.delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry(policy, request, res, retryData, undefined); }) + .catch(function (err) { return retry(policy, request, response, retryData, err); }); + } + else if (isAborted || requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + var err = retryData.error || + new RestError("Failed to send the request.", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response); + return Promise.reject(err); + } + else { + return Promise.resolve(response); + } +} +//# sourceMappingURL=exponentialRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js.map new file mode 100644 index 000000000..7ec50fbbe --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/exponentialRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exponentialRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/exponentialRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAczC,MAAM,UAAU,sBAAsB,CAAC,UAAmB,EAAE,aAAsB,EAAE,gBAAyB,EAAE,gBAAyB;IACtI,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;QACxH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,IAAM,6BAA6B,GAAG,IAAI,GAAG,EAAE,CAAC;AAChD,IAAM,0BAA0B,GAAG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K;YACzB,IAAI,SAAS,CACX,6BAA6B,EAC7B,SAAS,CAAC,kBAAkB,EAC5B,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAC3B,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAC5B,QAAQ,CAAC,CAAC;QACd,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KAC5B;SAAM;QACL,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KAClC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts new file mode 100644 index 000000000..d08160d26 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare function generateClientRequestIdPolicy(requestIdHeaderName?: string): RequestPolicyFactory; +export declare class GenerateClientRequestIdPolicy extends BaseRequestPolicy { + private _requestIdHeaderName; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _requestIdHeaderName: string); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=generateClientRequestIdPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts.map new file mode 100644 index 000000000..1f49ea39b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generateClientRequestIdPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,wBAAgB,6BAA6B,CAAC,mBAAmB,SAA2B,GAAG,oBAAoB,CAMlH;AAED,qBAAa,6BAA8B,SAAQ,iBAAiB;IACQ,OAAO,CAAC,oBAAoB;gBAA1F,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAU,oBAAoB,EAAE,MAAM;IAIvG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js new file mode 100644 index 000000000..32ac2a933 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function generateClientRequestIdPolicy(requestIdHeaderName) { + if (requestIdHeaderName === void 0) { requestIdHeaderName = "x-ms-client-request-id"; } + return { + create: function (nextPolicy, options) { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; +} +var GenerateClientRequestIdPolicy = /** @class */ (function (_super) { + __extends(GenerateClientRequestIdPolicy, _super); + function GenerateClientRequestIdPolicy(nextPolicy, options, _requestIdHeaderName) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._requestIdHeaderName = _requestIdHeaderName; + return _this; + } + GenerateClientRequestIdPolicy.prototype.sendRequest = function (request) { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, utils.generateUuid()); + } + return this._nextPolicy.sendRequest(request); + }; + return GenerateClientRequestIdPolicy; +}(BaseRequestPolicy)); +export { GenerateClientRequestIdPolicy }; +//# sourceMappingURL=generateClientRequestIdPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js.map new file mode 100644 index 000000000..ff2a038fd --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/generateClientRequestIdPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generateClientRequestIdPolicy.js","sourceRoot":"","sources":["../../../lib/policies/generateClientRequestIdPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAEnH,MAAM,UAAU,6BAA6B,CAAC,mBAA8C;IAA9C,oCAAA,EAAA,8CAA8C;IAC1F,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;QACrF,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmD,iDAAiB;IAClE,uCAAY,UAAyB,EAAE,OAAiC,EAAU,oBAA4B;QAA9G,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAFiF,0BAAoB,GAApB,oBAAoB,CAAQ;;IAE9G,CAAC;IAEM,mDAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE;YACxD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;SACtE;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,oCAAC;AAAD,CAAC,AAXD,CAAmD,iBAAiB,GAWnE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts new file mode 100644 index 000000000..62399673a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare function logPolicy(logger?: any): RequestPolicyFactory; +export declare class LogPolicy extends BaseRequestPolicy { + logger?: any; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger?: any); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=logPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts.map new file mode 100644 index 000000000..f2a611c0a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"logPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/logPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,wBAAgB,SAAS,CAAC,MAAM,GAAE,GAAiB,GAAG,oBAAoB,CAMzE;AAED,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,MAAM,CAAC,EAAE,GAAG,CAAC;gBAED,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAE,GAAiB;IAK5F,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js new file mode 100644 index 000000000..5c018ba2f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function logPolicy(logger) { + if (logger === void 0) { logger = console.log; } + return { + create: function (nextPolicy, options) { + return new LogPolicy(nextPolicy, options, logger); + } + }; +} +var LogPolicy = /** @class */ (function (_super) { + __extends(LogPolicy, _super); + function LogPolicy(nextPolicy, options, logger) { + if (logger === void 0) { logger = console.log; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.logger = logger; + return _this; + } + LogPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return logResponse(_this, response); }); + }; + return LogPolicy; +}(BaseRequestPolicy)); +export { LogPolicy }; +function logResponse(policy, response) { + policy.logger(">> Request: " + JSON.stringify(response.request, undefined, 2)); + policy.logger(">> Response status code: " + response.status); + var responseBody = response.bodyAsText; + policy.logger(">> Body: " + responseBody); + return Promise.resolve(response); +} +//# sourceMappingURL=logPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/logPolicy.js.map new file mode 100644 index 000000000..18599dfd1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/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,MAAM,CAAC,MAAM,CAAC,cAAY,YAAc,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts new file mode 100644 index 000000000..3ff8522d3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts.map new file mode 100644 index 000000000..39d10a81e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAQzD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js new file mode 100644 index 000000000..19b5fb039 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +export function getDefaultUserAgentKey() { + return "x-ms-command-name"; +} +export function getPlatformSpecificData() { + var navigator = window.navigator; + var osInfo = { + key: "OS", + value: (navigator.oscpu || navigator.platform).replace(" ", "") + }; + return [osInfo]; +} +//# sourceMappingURL=msRestUserAgentPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js.map new file mode 100644 index 000000000..adc237a60 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAc/F,MAAM,UAAU,sBAAsB;IACpC,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,SAAS,GAAG,MAAM,CAAC,SAAwB,CAAC;IAClD,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;KAChE,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts new file mode 100644 index 000000000..1fac88842 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts @@ -0,0 +1,4 @@ +import { TelemetryInfo } from "./userAgentPolicy"; +export declare function getDefaultUserAgentKey(): string; +export declare function getPlatformSpecificData(): TelemetryInfo[]; +//# sourceMappingURL=msRestUserAgentPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts.map new file mode 100644 index 000000000..9ad418352 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,aAAa,EAAE,CAYzD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js new file mode 100644 index 000000000..d3ab59eb2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import * as os from "os"; +import { Constants } from "../util/constants"; +export function getDefaultUserAgentKey() { + return Constants.HeaderConstants.USER_AGENT; +} +export function getPlatformSpecificData() { + var runtimeInfo = { + key: "Node", + value: process.version + }; + var osInfo = { + key: "OS", + value: "(" + os.arch() + "-" + os.type() + "-" + os.release() + ")" + }; + return [runtimeInfo, osInfo]; +} +//# sourceMappingURL=msRestUserAgentPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js.map new file mode 100644 index 000000000..8db5ec536 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/msRestUserAgentPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msRestUserAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/msRestUserAgentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,UAAU,sBAAsB;IACpC,OAAO,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAM,WAAW,GAAG;QAClB,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,OAAO,CAAC,OAAO;KACvB,CAAC;IAEF,IAAM,MAAM,GAAG;QACb,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,MAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,IAAI,EAAE,SAAI,EAAE,CAAC,OAAO,EAAE,MAAG;KACrD,CAAC;IAEF,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts new file mode 100644 index 000000000..5c2b57402 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts @@ -0,0 +1,11 @@ +import { ProxySettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike); + sendRequest(_request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts.map new file mode 100644 index 000000000..e90e9ee8f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.browser.d.ts","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAErF;AAED,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAMhF;AAED,qBAAa,WAAY,SAAQ,iBAAiB;gBACpC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB;IAKjE,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG9E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js new file mode 100644 index 000000000..11684d4ca --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment"); +export function getDefaultProxySettings(_proxyUrl) { + return undefined; +} +export function proxyPolicy(_proxySettings) { + return { + create: function (_nextPolicy, _options) { + throw proxyNotSupportedInBrowser; + } + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + __extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + throw proxyNotSupportedInBrowser; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (_request) { + throw proxyNotSupportedInBrowser; + }; + return ProxyPolicy; +}(BaseRequestPolicy)); +export { ProxyPolicy }; +//# sourceMappingURL=proxyPolicy.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js.map new file mode 100644 index 000000000..e68d24587 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.browser.js","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAInH,IAAM,0BAA0B,GAAG,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AAEpG,MAAM,UAAU,uBAAuB,CAAC,SAAkB;IACxD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,cAA8B;IACxD,OAAO;QACL,MAAM,EAAE,UAAC,WAA0B,EAAE,QAAkC;YACrE,MAAM,0BAA0B,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAiC,+BAAiB;IAChD,qBAAY,UAAyB,EAAE,OAAiC;QAAxE,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,MAAM,0BAA0B,CAAC;;IACnC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,QAAyB;QAC1C,MAAM,0BAA0B,CAAC;IACnC,CAAC;IACH,kBAAC;AAAD,CAAC,AATD,CAAiC,iBAAiB,GASjD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts new file mode 100644 index 000000000..99d74c6a7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts @@ -0,0 +1,12 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { ProxySettings } from "../serviceClient"; +import { WebResourceLike } from "../webResource"; +export declare function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined; +export declare function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory; +export declare class ProxyPolicy extends BaseRequestPolicy { + proxySettings: ProxySettings; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, proxySettings: ProxySettings); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=proxyPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts.map new file mode 100644 index 000000000..fb25a05a4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAsBjD,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAapF;AAGD,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAM/E;AAED,qBAAa,WAAY,SAAQ,iBAAiB;IAChD,aAAa,EAAE,aAAa,CAAC;gBAEjB,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,aAAa;IAK/F,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js new file mode 100644 index 000000000..a0fd440cf --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { Constants } from "../util/constants"; +import { URLBuilder } from "../url"; +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + if (process.env[Constants.HTTPS_PROXY]) { + return process.env[Constants.HTTPS_PROXY]; + } + else if (process.env[Constants.HTTPS_PROXY.toLowerCase()]) { + return process.env[Constants.HTTPS_PROXY.toLowerCase()]; + } + else if (process.env[Constants.HTTP_PROXY]) { + return process.env[Constants.HTTP_PROXY]; + } + else if (process.env[Constants.HTTP_PROXY.toLowerCase()]) { + return process.env[Constants.HTTP_PROXY.toLowerCase()]; + } + return undefined; +} +export function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + var parsedUrl = URLBuilder.parse(proxyUrl); + return { + host: parsedUrl.getScheme() + "://" + parsedUrl.getHost(), + port: Number.parseInt(parsedUrl.getPort() || "80") + }; +} +export function proxyPolicy(proxySettings) { + return { + create: function (nextPolicy, options) { + return new ProxyPolicy(nextPolicy, options, proxySettings); + } + }; +} +var ProxyPolicy = /** @class */ (function (_super) { + __extends(ProxyPolicy, _super); + function ProxyPolicy(nextPolicy, options, proxySettings) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.proxySettings = proxySettings; + return _this; + } + ProxyPolicy.prototype.sendRequest = function (request) { + if (!request.proxySettings) { + request.proxySettings = this.proxySettings; + } + return this._nextPolicy.sendRequest(request); + }; + return ProxyPolicy; +}(BaseRequestPolicy)); +export { ProxyPolicy }; +//# sourceMappingURL=proxyPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js.map new file mode 100644 index 000000000..f5cbd18a2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/proxyPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyPolicy.js","sourceRoot":"","sources":["../../../lib/policies/proxyPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAInH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,SAAS,yBAAyB;IAChC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;QACtC,OAAO,OAAO,CAAC,GAAG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AAiB;IAGhD,qBAAY,UAAyB,EAAE,OAAiC,EAAE,aAA4B;QAAtG,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;IACrC,CAAC;IAEM,iCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC1B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IACH,kBAAC;AAAD,CAAC,AAdD,CAAiC,iBAAiB,GAcjD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts new file mode 100644 index 000000000..f1520803d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare function redirectPolicy(maximumRetries?: number): RequestPolicyFactory; +export declare class RedirectPolicy extends BaseRequestPolicy { + readonly maxRetries: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, maxRetries?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=redirectPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts.map new file mode 100644 index 000000000..a12ae0543 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"redirectPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/redirectPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,wBAAgB,cAAc,CAAC,cAAc,SAAK,GAAG,oBAAoB,CAMxE;AAED,qBAAa,cAAe,SAAQ,iBAAiB;IACuB,QAAQ,CAAC,UAAU;gBAAjF,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAW,UAAU,SAAK;IAI3F,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js new file mode 100644 index 000000000..da9f52d8f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { URLBuilder } from "../url"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function redirectPolicy(maximumRetries) { + if (maximumRetries === void 0) { maximumRetries = 20; } + return { + create: function (nextPolicy, options) { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; +} +var RedirectPolicy = /** @class */ (function (_super) { + __extends(RedirectPolicy, _super); + function RedirectPolicy(nextPolicy, options, maxRetries) { + if (maxRetries === void 0) { maxRetries = 20; } + var _this = _super.call(this, nextPolicy, options) || this; + _this.maxRetries = maxRetries; + return _this; + } + RedirectPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request).then(function (response) { return handleRedirect(_this, response, 0); }); + }; + return RedirectPolicy; +}(BaseRequestPolicy)); +export { RedirectPolicy }; +function handleRedirect(policy, response, currentRetries) { + var request = response.request, status = response.status; + var locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || status === 307 || (status === 303 && request.method === "POST")) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + var builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + } + return policy._nextPolicy.sendRequest(request) + .then(function (res) { return handleRedirect(policy, res, currentRetries + 1); }); + } + return Promise.resolve(response); +} +//# sourceMappingURL=redirectPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js.map new file mode 100644 index 000000000..a16ccd713 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/redirectPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"redirectPolicy.js","sourceRoot":"","sources":["../../../lib/policies/redirectPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAEnH,MAAM,UAAU,cAAc,CAAC,cAAmB;IAAnB,+BAAA,EAAA,mBAAmB;IAChD,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAoC,kCAAiB;IACnD,wBAAY,UAAyB,EAAE,OAAiC,EAAW,UAAe;QAAf,2BAAA,EAAA,eAAe;QAAlG,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAFkF,gBAAU,GAAV,UAAU,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C,CAA+C,CAAC,CAAC;KACjE;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts new file mode 100644 index 000000000..ff3e61d16 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts @@ -0,0 +1,71 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { HttpPipelineLogger } from "../httpPipelineLogger"; +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +import { WebResourceLike } from "../webResource"; +/** + * Creates a new RequestPolicy per-request that uses the provided nextPolicy. + */ +export declare type RequestPolicyFactory = { + create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy; +}; +export interface RequestPolicy { + sendRequest(httpRequest: WebResourceLike): Promise; +} +export declare abstract class BaseRequestPolicy implements RequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptionsLike; + protected constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike); + abstract sendRequest(webResource: WebResourceLike): Promise; + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export interface RequestPolicyOptionsLike { + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export declare class RequestPolicyOptions implements RequestPolicyOptionsLike { + private _logger?; + constructor(_logger?: HttpPipelineLogger | undefined); + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} +//# sourceMappingURL=requestPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts.map new file mode 100644 index 000000000..1f45e2fee --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"requestPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/requestPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,GAAG,aAAa,CAAA;CACpF,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC3E;AAED,8BAAsB,iBAAkB,YAAW,aAAa;IACxC,QAAQ,CAAC,WAAW,EAAE,aAAa;IAAE,QAAQ,CAAC,QAAQ,EAAE,wBAAwB;IAAtG,SAAS,aAAsB,WAAW,EAAE,aAAa,EAAW,QAAQ,EAAE,wBAAwB;aAGtF,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAEzF;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO;IAIzD;;;;;OAKG;IACI,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAGlE;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC;IAEnD;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,oBAAqB,YAAW,wBAAwB;IACvD,OAAO,CAAC,OAAO,CAAC;gBAAR,OAAO,CAAC,gCAAoB;IAGhD;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO;IAMzD;;;;;OAKG;IACI,GAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js new file mode 100644 index 000000000..7290fb161 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +var BaseRequestPolicy = /** @class */ (function () { + function BaseRequestPolicy(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + BaseRequestPolicy.prototype.shouldLog = function (logLevel) { + return this._options.shouldLog(logLevel); + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + BaseRequestPolicy.prototype.log = function (logLevel, message) { + this._options.log(logLevel, message); + }; + return BaseRequestPolicy; +}()); +export { BaseRequestPolicy }; +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +var RequestPolicyOptions = /** @class */ (function () { + function RequestPolicyOptions(_logger) { + this._logger = _logger; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + RequestPolicyOptions.prototype.shouldLog = function (logLevel) { + return !!this._logger && + logLevel !== HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel; + }; + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + RequestPolicyOptions.prototype.log = function (logLevel, message) { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + }; + return RequestPolicyOptions; +}()); +export { RequestPolicyOptions }; +//# sourceMappingURL=requestPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js.map new file mode 100644 index 000000000..a0d3966c0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/requestPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"requestPolicy.js","sourceRoot":"","sources":["../../../lib/policies/requestPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAc/D;IACE,2BAA+B,WAA0B,EAAW,QAAkC;QAAvE,gBAAW,GAAX,WAAW,CAAe;QAAW,aAAQ,GAAR,QAAQ,CAA0B;IACtG,CAAC;IAID;;;;OAIG;IACI,qCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,+BAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AAxBD,IAwBC;;AAsBD;;GAEG;AACH;IACE,8BAAoB,OAA4B;QAA5B,YAAO,GAAP,OAAO,CAAqB;IAChD,CAAC;IAED;;;;OAIG;IACI,wCAAS,GAAhB,UAAiB,QAA8B;QAC7C,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO;YACnB,QAAQ,KAAK,oBAAoB,CAAC,GAAG;YACrC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,kCAAG,GAAV,UAAW,QAA8B,EAAE,OAAe;QACxD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACrC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AA1BD,IA0BC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts new file mode 100644 index 000000000..305f61758 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts @@ -0,0 +1,10 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare function rpRegistrationPolicy(retryTimeout?: number): RequestPolicyFactory; +export declare class RPRegistrationPolicy extends BaseRequestPolicy { + readonly _retryTimeout: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _retryTimeout?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=rpRegistrationPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts.map new file mode 100644 index 000000000..4ed4602e8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rpRegistrationPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,wBAAgB,oBAAoB,CAAC,YAAY,SAAK,GAAG,oBAAoB,CAM5E;AAED,qBAAa,oBAAqB,SAAQ,iBAAiB;IACiB,QAAQ,CAAC,aAAa;gBAApF,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAW,aAAa,SAAK;IAI9F,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAI7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js new file mode 100644 index 000000000..20faa35f7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js @@ -0,0 +1,158 @@ +import { __extends } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function rpRegistrationPolicy(retryTimeout) { + if (retryTimeout === void 0) { retryTimeout = 30; } + return { + create: function (nextPolicy, options) { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; +} +var RPRegistrationPolicy = /** @class */ (function (_super) { + __extends(RPRegistrationPolicy, _super); + function RPRegistrationPolicy(nextPolicy, options, _retryTimeout) { + if (_retryTimeout === void 0) { _retryTimeout = 30; } + var _this = _super.call(this, nextPolicy, options) || this; + _this._retryTimeout = _retryTimeout; + return _this; + } + RPRegistrationPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()) + .then(function (response) { return registerIfNeeded(_this, request, response); }); + }; + return RPRegistrationPolicy; +}(BaseRequestPolicy)); +export { RPRegistrationPolicy }; +function registerIfNeeded(policy, request, response) { + if (response.status === 409) { + var rpName = checkRPNotRegisteredError(response.bodyAsText); + if (rpName) { + var urlPrefix = extractSubscriptionUrl(request.url); + return registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(function () { return false; }) + .then(function (registrationStatus) { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", utils.generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + }); + } + } + return Promise.resolve(response); +} +/** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ +function getRequestEssentials(originalRequest, reuseUrlToo) { + if (reuseUrlToo === void 0) { reuseUrlToo = false; } + var reqOptions = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", utils.generateUuid()); + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + return reqOptions; +} +/** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ +function checkRPNotRegisteredError(body) { + var result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } + catch (err) { + // do nothing; + } + if (responseBody && responseBody.error && responseBody.error.message && + responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") { + var matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; +} +/** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ +function extractSubscriptionUrl(url) { + var result; + var matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } + else { + throw new Error("Unable to extract subscriptionId from the given url - " + url + "."); + } + return result; +} +/** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ +function registerRP(policy, urlPrefix, provider, originalRequest) { + var postUrl = urlPrefix + "providers/" + provider + "/register?api-version=2016-02-01"; + var getUrl = urlPrefix + "providers/" + provider + "?api-version=2016-02-01"; + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + return policy._nextPolicy.sendRequest(reqOptions) + .then(function (response) { + if (response.status !== 200) { + throw new Error("Autoregistration of " + provider + " failed. Please try registering manually."); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); +} +/** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ +function getRegistrationStatus(policy, url, originalRequest) { + var reqOptions = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + return policy._nextPolicy.sendRequest(reqOptions).then(function (res) { + var obj = res.parsedBody; + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } + else { + return utils.delay(policy._retryTimeout * 1000).then(function () { return getRegistrationStatus(policy, url, originalRequest); }); + } + }); +} +//# sourceMappingURL=rpRegistrationPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js.map new file mode 100644 index 000000000..539a5448d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/rpRegistrationPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rpRegistrationPolicy.js","sourceRoot":"","sources":["../../../lib/policies/rpRegistrationPolicy.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAEnH,MAAM,UAAU,oBAAoB,CAAC,YAAi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QG;AACH,SAAS,qBAAqB,CAAC,MAA4B,EAAE,GAAW,EAAE,eAAgC;IACxG,IAAM,UAAU,GAAQ,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAC9D,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;IACrB,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;IAE1B,OAAO,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;QACxD,IAAM,GAAG,GAAI,GAAG,CAAC,UAAkB,CAAC;QACpC,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,iBAAiB,KAAK,YAAY,EAAE;YACrF,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,cAAM,OAAA,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,eAAe,CAAC,EAAnD,CAAmD,CAAC,CAAC;SACjH;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts new file mode 100644 index 000000000..b4b2f2df4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts @@ -0,0 +1,12 @@ +import { ServiceClientCredentials } from "../credentials/serviceClientCredentials"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory; +export declare class SigningPolicy extends BaseRequestPolicy { + authenticationProvider: ServiceClientCredentials; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, authenticationProvider: ServiceClientCredentials); + signRequest(request: WebResourceLike): Promise; + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=signingPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts.map new file mode 100644 index 000000000..2053ada73 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signingPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,wBAAgB,aAAa,CAAC,sBAAsB,EAAE,wBAAwB,GAAG,oBAAoB,CAMpG;AAED,qBAAa,aAAc,SAAQ,iBAAiB;IAE+B,sBAAsB,EAAE,wBAAwB;gBAArH,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAS,sBAAsB,EAAE,wBAAwB;IAIjI,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxD,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js new file mode 100644 index 000000000..56361fded --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function signingPolicy(authenticationProvider) { + return { + create: function (nextPolicy, options) { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; +} +var SigningPolicy = /** @class */ (function (_super) { + __extends(SigningPolicy, _super); + function SigningPolicy(nextPolicy, options, authenticationProvider) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.authenticationProvider = authenticationProvider; + return _this; + } + SigningPolicy.prototype.signRequest = function (request) { + return this.authenticationProvider.signRequest(request); + }; + SigningPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this.signRequest(request).then(function (nextRequest) { return _this._nextPolicy.sendRequest(nextRequest); }); + }; + return SigningPolicy; +}(BaseRequestPolicy)); +export { SigningPolicy }; +//# sourceMappingURL=signingPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js.map new file mode 100644 index 000000000..3b01a9052 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/signingPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signingPolicy.js","sourceRoot":"","sources":["../../../lib/policies/signingPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAK/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAEnH,MAAM,UAAU,aAAa,CAAC,sBAAgD;IAC5E,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC;QACxE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;IAAmC,iCAAiB;IAElD,uBAAY,UAAyB,EAAE,OAAiC,EAAS,sBAAgD;QAAjI,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAC3B;QAFgF,4BAAsB,GAAtB,sBAAsB,CAA0B;;IAEjI,CAAC;IAED,mCAAW,GAAX,UAAY,OAAwB;QAClC,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEM,mCAAW,GAAlB,UAAmB,OAAwB;QAA3C,iBAEC;QADC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAA,WAAW,IAAI,OAAA,KAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,EAAzC,CAAyC,CAAC,CAAC;IAClG,CAAC;IACH,oBAAC;AAAD,CAAC,AAbD,CAAmC,iBAAiB,GAanD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts new file mode 100644 index 000000000..153e5604c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts @@ -0,0 +1,37 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} +export declare function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory; +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +export declare class SystemErrorRetryPolicy extends BaseRequestPolicy { + retryCount: number; + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; + DEFAULT_CLIENT_RETRY_INTERVAL: number; + DEFAULT_CLIENT_RETRY_COUNT: number; + DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number; + DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number); + sendRequest(request: WebResourceLike): Promise; +} +//# sourceMappingURL=systemErrorRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts.map new file mode 100644 index 000000000..e3d87e5e3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"systemErrorRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAM9J;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,6BAA6B,SAAa;IAC1C,0BAA0B,SAAK;IAC/B,iCAAiC,SAAa;IAC9C,iCAAiC,SAAY;gBAEjC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM;IAQpK,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAG7E"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js new file mode 100644 index 000000000..e9667f6ef --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import * as utils from "../util/utils"; +import { BaseRequestPolicy } from "./requestPolicy"; +export function systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + return { + create: function (nextPolicy, options) { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +var SystemErrorRetryPolicy = /** @class */ (function (_super) { + __extends(SystemErrorRetryPolicy, _super); + function SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; + _this.DEFAULT_CLIENT_RETRY_COUNT = 3; + _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; + _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + _this.retryCount = typeof retryCount === "number" ? retryCount : _this.DEFAULT_CLIENT_RETRY_COUNT; + _this.retryInterval = typeof retryInterval === "number" ? retryInterval : _this.DEFAULT_CLIENT_RETRY_INTERVAL; + _this.minRetryInterval = typeof minRetryInterval === "number" ? minRetryInterval : _this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + _this.maxRetryInterval = typeof maxRetryInterval === "number" ? maxRetryInterval : _this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return _this; + } + SystemErrorRetryPolicy.prototype.sendRequest = function (request) { + var _this = this; + return this._nextPolicy.sendRequest(request.clone()).then(function (response) { return retry(_this, request, response); }); + }; + return SystemErrorRetryPolicy; +}(BaseRequestPolicy)); +export { SystemErrorRetryPolicy }; +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(policy, retryData) { + var currentCount; + if (!retryData) { + throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null."); + } + else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); +} +/** + * Updates the retry data for the next attempt. + * + * @param {RetryData} retryData The retry data. + * @param {object} err The operation"s error, if any. + */ +function updateRetryData(policy, retryData, err) { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + retryData.error = err; + } + // Adjust retry count + retryData.retryCount++; + // Adjust retry interval + var incrementDelta = Math.pow(2, retryData.retryCount) - 1; + var boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + return retryData; +} +function retry(policy, request, operationResponse, retryData, err) { + retryData = updateRetryData(policy, retryData, err); + if (err && err.code && shouldRetry(policy, retryData) && + (err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || err.code === "ENOENT")) { + // If previous operation ended with an error and the policy allows a retry, do that + return utils.delay(retryData.retryInterval) + .then(function () { return policy._nextPolicy.sendRequest(request.clone()); }) + .then(function (res) { return retry(policy, request, res, retryData, err); }) + .catch(function (err) { return retry(policy, request, operationResponse, retryData, err); }); + } + else { + if (err != undefined) { + // If the operation failed in the end, return all errors instead of just the last one + err = retryData.error; + return Promise.reject(err); + } + return Promise.resolve(operationResponse); + } +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js.map new file mode 100644 index 000000000..52121ed7e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/systemErrorRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"systemErrorRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/systemErrorRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAG/F,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAcnH,MAAM,UAAU,sBAAsB,CAAC,UAAmB,EAAE,aAAsB,EA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,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAC5B;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;KAC3C;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts new file mode 100644 index 000000000..e706fbfbe --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts @@ -0,0 +1,21 @@ +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +declare type ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise; +export declare function throttlingRetryPolicy(): RequestPolicyFactory; +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +export declare class ThrottlingRetryPolicy extends BaseRequestPolicy { + private _handleResponse; + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _handleResponse?: ResponseHandler); + sendRequest(httpRequest: WebResourceLike): Promise; + private _defaultResponseHandler; + static parseRetryAfterHeader(headerValue: string): number | undefined; + static parseDateRetryAfterHeader(headerValue: string): number | undefined; +} +export {}; +//# sourceMappingURL=throttlingRetryPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts.map new file mode 100644 index 000000000..9a9268c4f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throttlingRetryPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAIjE,aAAK,eAAe,GAAG,CAAC,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAGzH,wBAAgB,qBAAqB,IAAI,oBAAoB,CAM5D;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC1D,OAAO,CAAC,eAAe,CAAkB;gBAE7B,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB,EAAE,eAAe,CAAC,EAAE,eAAe;IAK9F,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAUxE,uBAAuB;WAavB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;WAS9D,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAWjF"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js new file mode 100644 index 000000000..25126fa14 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy } from "./requestPolicy"; +import { Constants } from "../util/constants"; +import { delay } from "../util/utils"; +var StatusCodes = Constants.HttpConstants.StatusCodes; +export function throttlingRetryPolicy() { + return { + create: function (nextPolicy, options) { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; +} +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +var ThrottlingRetryPolicy = /** @class */ (function (_super) { + __extends(ThrottlingRetryPolicy, _super); + function ThrottlingRetryPolicy(nextPolicy, options, _handleResponse) { + var _this = _super.call(this, nextPolicy, options) || this; + _this._handleResponse = _handleResponse || _this._defaultResponseHandler; + return _this; + } + ThrottlingRetryPolicy.prototype.sendRequest = function (httpRequest) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, this._nextPolicy.sendRequest(httpRequest.clone()).then(function (response) { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } + else { + return _this._handleResponse(httpRequest, response); + } + })]; + }); + }); + }; + ThrottlingRetryPolicy.prototype._defaultResponseHandler = function (httpRequest, httpResponse) { + return __awaiter(this, void 0, void 0, function () { + var retryAfterHeader, delayInMs; + var _this = this; + return __generator(this, function (_a) { + retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + if (retryAfterHeader) { + delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return [2 /*return*/, delay(delayInMs).then(function (_) { return _this._nextPolicy.sendRequest(httpRequest); })]; + } + } + return [2 /*return*/, httpResponse]; + }); + }); + }; + ThrottlingRetryPolicy.parseRetryAfterHeader = function (headerValue) { + var retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } + else { + return retryAfterInSeconds * 1000; + } + }; + ThrottlingRetryPolicy.parseDateRetryAfterHeader = function (headerValue) { + try { + var now = Date.now(); + var date = Date.parse(headerValue); + var diff = date - now; + return Number.isNaN(diff) ? undefined : diff; + } + catch (error) { + return undefined; + } + }; + return ThrottlingRetryPolicy; +}(BaseRequestPolicy)); +export { ThrottlingRetryPolicy }; +//# sourceMappingURL=throttlingRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js.map new file mode 100644 index 000000000..d287ed1ac --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/throttlingRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttlingRetryPolicy.js","sourceRoot":"","sources":["../../../lib/policies/throttlingRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAGnH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,IAAM,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;AAExD,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAAiC;YACnE,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH;IAA2C,yCAAiB;IAG1D,+BAAY,UAAyB,EAAE,OAAiC,EAAE,eAAiC;QAA3G,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,eAAe,GAAG,eAAe,IAAI,KAAI,CAAC,uBAAuB,CAAC;;IACzE,CAAC;IAEY,2CAAW,GAAxB,UAAyB,WAA4B;;;;gBACnD,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC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YAExB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AAnDD,CAA2C,iBAAiB,GAmD3D"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts new file mode 100644 index 000000000..2ba12d403 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts @@ -0,0 +1,21 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { getDefaultUserAgentKey } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +export declare type TelemetryInfo = { + key?: string; + value?: string; +}; +export declare const getDefaultUserAgentHeaderName: typeof getDefaultUserAgentKey; +export declare function getDefaultUserAgentValue(): string; +export declare function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory; +export declare class UserAgentPolicy extends BaseRequestPolicy { + readonly _nextPolicy: RequestPolicy; + readonly _options: RequestPolicyOptionsLike; + protected headerKey: string; + protected headerValue: string; + constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike, headerKey: string, headerValue: string); + sendRequest(request: WebResourceLike): Promise; + addUserAgentHeader(request: WebResourceLike): void; +} +//# sourceMappingURL=userAgentPolicy.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts.map new file mode 100644 index 000000000..1f97ece80 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"userAgentPolicy.d.ts","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,oBAAY,aAAa,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAkB7D,eAAO,MAAM,6BAA6B,+BAAyB,CAAC;AAEpE,wBAAgB,wBAAwB,IAAI,MAAM,CAKjD;AAED,wBAAgB,eAAe,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,oBAAoB,CASnF;AAED,qBAAa,eAAgB,SAAQ,iBAAiB;IACxC,QAAQ,CAAC,WAAW,EAAE,aAAa;IAAE,QAAQ,CAAC,QAAQ,EAAE,wBAAwB;IAAE,SAAS,CAAC,SAAS,EAAE,MAAM;IAAE,SAAS,CAAC,WAAW,EAAE,MAAM;gBAAnI,WAAW,EAAE,aAAa,EAAW,QAAQ,EAAE,wBAAwB,EAAY,SAAS,EAAE,MAAM,EAAY,WAAW,EAAE,MAAM;IAIxJ,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKrE,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CASnD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js new file mode 100644 index 000000000..0ae451e77 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +import { HttpHeaders } from "../httpHeaders"; +import { Constants } from "../util/constants"; +import { getDefaultUserAgentKey, getPlatformSpecificData } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy } from "./requestPolicy"; +function getRuntimeInfo() { + var msRestRuntime = { + key: "ms-rest-js", + value: Constants.msRestVersion + }; + return [msRestRuntime]; +} +function getUserAgentString(telemetryInfo, keySeparator, valueSeparator) { + if (keySeparator === void 0) { keySeparator = " "; } + if (valueSeparator === void 0) { valueSeparator = "/"; } + return telemetryInfo.map(function (info) { + var value = info.value ? "" + valueSeparator + info.value : ""; + return "" + info.key + value; + }).join(keySeparator); +} +export var getDefaultUserAgentHeaderName = getDefaultUserAgentKey; +export function getDefaultUserAgentValue() { + var runtimeInfo = getRuntimeInfo(); + var platformSpecificData = getPlatformSpecificData(); + var userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; +} +export function userAgentPolicy(userAgentData) { + var key = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key; + var value = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value; + return { + create: function (nextPolicy, options) { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; +} +var UserAgentPolicy = /** @class */ (function (_super) { + __extends(UserAgentPolicy, _super); + function UserAgentPolicy(_nextPolicy, _options, headerKey, headerValue) { + var _this = _super.call(this, _nextPolicy, _options) || this; + _this._nextPolicy = _nextPolicy; + _this._options = _options; + _this.headerKey = headerKey; + _this.headerValue = headerValue; + return _this; + } + UserAgentPolicy.prototype.sendRequest = function (request) { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + }; + UserAgentPolicy.prototype.addUserAgentHeader = function (request) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + }; + return UserAgentPolicy; +}(BaseRequestPolicy)); +export { UserAgentPolicy }; +//# sourceMappingURL=userAgentPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js.map b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js.map new file mode 100644 index 000000000..2ac501305 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/policies/userAgentPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userAgentPolicy.js","sourceRoot":"","sources":["../../../lib/policies/userAgentPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAiE,MAAM,iBAAiB,CAAC;AAInH,SAAS,cAAc;IACrB,IAAM,aAAa,GAAG;QACpB,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,SAAS,CAAC,aAAa;KAC/B,CAAC;IAEF,OAAO,CAAC,aAAa,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,kBAAkB,CAAC,aAA8B,EAAE,YAAkB,EAAE,cAAoB;IAAxC,6BAAA,EAAA,kBAAkB;IAAE,+BAAA,EAAA,oBAAoB;IAClG,OAAO,aAAa,CAAC,GAAG,CAAC,UAAA,IAAI;QAC3B,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAG,cAAc,GAAG,IAAI,CAAC,KAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,KAAG,IAAI,CAAC,GAAG,GAAG,KAAO,CAAC;IAC/B,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACxB,CAAC;AAED,MAAM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CAAC,CAAC;IAC/C,CAAC;IAED,4CAAkB,GAAlB,UAAmB,OAAwB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,OAAO,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;SACrC;QAED,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE;YAC5D,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SACvD;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAnBD,CAAqC,iBAAiB,GAmBrD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts new file mode 100644 index 000000000..8cf66a138 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts @@ -0,0 +1,13 @@ +/// +import * as http from "http"; +import * as https from "https"; +import * as tunnel from "tunnel"; +import { ProxySettings } from "./serviceClient"; +import { HttpHeadersLike } from "./httpHeaders"; +export declare type ProxyAgent = { + isHttps: boolean; + agent: http.Agent | https.Agent; +}; +export declare function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent; +export declare function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: tunnel.HttpsOverHttpsOptions): http.Agent | https.Agent; +//# sourceMappingURL=proxyAgent.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts.map new file mode 100644 index 000000000..e2b8591ae --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyAgent.d.ts","sourceRoot":"","sources":["../../lib/proxyAgent.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,oBAAY,UAAU,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;CAAE,CAAC;AAC/E,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,UAAU,CAwBxH;AAED,wBAAgB,YAAY,CAAC,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAUlJ"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js new file mode 100644 index 000000000..ca33f6b2e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import * as tunnel from "tunnel"; +import { URLBuilder } from "./url"; +export function createProxyAgent(requestUrl, proxySettings, headers) { + var tunnelOptions = { + proxy: { + host: URLBuilder.parse(proxySettings.host).getHost(), + port: proxySettings.port, + headers: (headers && headers.rawHeaders()) || {} + } + }; + if ((proxySettings.username && proxySettings.password)) { + tunnelOptions.proxy.proxyAuth = proxySettings.username + ":" + proxySettings.password; + } + var requestScheme = URLBuilder.parse(requestUrl).getScheme() || ""; + var isRequestHttps = requestScheme.toLowerCase() === "https"; + var proxyScheme = URLBuilder.parse(proxySettings.host).getScheme() || ""; + var isProxyHttps = proxyScheme.toLowerCase() === "https"; + var proxyAgent = { + isHttps: isRequestHttps, + agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) + }; + return proxyAgent; +} +export function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) { + if (isRequestHttps && isProxyHttps) { + return tunnel.httpsOverHttps(tunnelOptions); + } + else if (isRequestHttps && !isProxyHttps) { + return tunnel.httpsOverHttp(tunnelOptions); + } + else if (!isRequestHttps && isProxyHttps) { + return tunnel.httpOverHttps(tunnelOptions); + } + else { + return tunnel.httpOverHttp(tunnelOptions); + } +} +//# sourceMappingURL=proxyAgent.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js.map b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js.map new file mode 100644 index 000000000..d1079bfc2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/proxyAgent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxyAgent.js","sourceRoot":"","sources":["../../lib/proxyAgent.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAI/F,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,aAA4B,EAAE,OAAyB;IAC1G,IAAM,aAAa,GAAiC;QAClD,KAAK,EAAE;YACL,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAY;YAC9D,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,OAAO,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE;SACjD;KACF,CAAC;IAEF,IAAI,CAAC,aAAa,CAAC,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;QACtD,aAAa,CAAC,KAAM,CAAC,SAAS,GAAM,aAAa,CAAC,QAAQ,SAAI,aAAa,CAAC,QAAU,CAAC;KACxF;IAED,IAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;IACrE,IAAM,cAAc,GAAG,aAAa,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;IAC/D,IAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;IAC3E,IAAM,YAAY,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;IAE3D,IAAM,UAAU,GAAG;QACjB,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,YAAY,CAAC,cAAc,EAAE,YAAY,EAAE,aAAa,CAAC;KACjE,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,cAAuB,EAAE,YAAqB,EAAE,aAA2C;IACtH,IAAI,cAAc,IAAI,YAAY,EAAE;QAClC,OAAO,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;KAC7C;SAAM,IAAI,cAAc,IAAI,CAAC,YAAY,EAAE;QAC1C,OAAO,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;KAC5C;SAAM,IAAI,CAAC,cAAc,IAAI,YAAY,EAAE;QAC1C,OAAO,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;KAC5C;SAAM;QACL,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;KAC3C;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts new file mode 100644 index 000000000..a235f8563 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts @@ -0,0 +1,11 @@ +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export declare enum QueryCollectionFormat { + Csv = ",", + Ssv = " ", + Tsv = "\t", + Pipes = "|", + Multi = "Multi" +} +//# sourceMappingURL=queryCollectionFormat.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts.map new file mode 100644 index 000000000..7ad8dc849 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"queryCollectionFormat.d.ts","sourceRoot":"","sources":["../../lib/queryCollectionFormat.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,GAAG,MAAM;IACT,GAAG,MAAM;IACT,GAAG,OAAO;IACV,KAAK,MAAM;IACX,KAAK,UAAU;CAChB"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js new file mode 100644 index 000000000..6128d013d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export var QueryCollectionFormat; +(function (QueryCollectionFormat) { + QueryCollectionFormat["Csv"] = ","; + QueryCollectionFormat["Ssv"] = " "; + QueryCollectionFormat["Tsv"] = "\t"; + QueryCollectionFormat["Pipes"] = "|"; + QueryCollectionFormat["Multi"] = "Multi"; +})(QueryCollectionFormat || (QueryCollectionFormat = {})); +//# sourceMappingURL=queryCollectionFormat.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js.map b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js.map new file mode 100644 index 000000000..29c806c19 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/queryCollectionFormat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"queryCollectionFormat.js","sourceRoot":"","sources":["../../lib/queryCollectionFormat.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;GAEG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,mCAAU,CAAA;IACV,oCAAW,CAAA;IACX,wCAAe,CAAA;AACjB,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts b/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts new file mode 100644 index 000000000..7b889c4c9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts @@ -0,0 +1,14 @@ +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +export declare class RestError extends Error { + static readonly REQUEST_SEND_ERROR: string; + static readonly REQUEST_ABORTED_ERROR: string; + static readonly PARSE_ERROR: string; + code?: string; + statusCode?: number; + request?: WebResourceLike; + response?: HttpOperationResponse; + body?: any; + constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any); +} +//# sourceMappingURL=restError.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts.map new file mode 100644 index 000000000..170ed4ef0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/restError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"restError.d.ts","sourceRoot":"","sources":["../../lib/restError.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,SAAU,SAAQ,KAAK;IAClC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAwB;IAClE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAA2B;IACxE,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAiB;IAEpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,IAAI,CAAC,EAAE,GAAG,CAAC;gBACC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,qBAAqB,EAAE,IAAI,CAAC,EAAE,GAAG;CAUzI"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/restError.js b/node_modules/@azure/ms-rest-js/es/lib/restError.js new file mode 100644 index 000000000..906252032 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/restError.js @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __extends } from "tslib"; +var RestError = /** @class */ (function (_super) { + __extends(RestError, _super); + function RestError(message, code, statusCode, request, response, body) { + var _this = _super.call(this, message) || this; + _this.code = code; + _this.statusCode = statusCode; + _this.request = request; + _this.response = response; + _this.body = body; + Object.setPrototypeOf(_this, RestError.prototype); + return _this; + } + RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + RestError.REQUEST_ABORTED_ERROR = "REQUEST_ABORTED_ERROR"; + RestError.PARSE_ERROR = "PARSE_ERROR"; + return RestError; +}(Error)); +export { RestError }; +//# sourceMappingURL=restError.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/restError.js.map b/node_modules/@azure/ms-rest-js/es/lib/restError.js.map new file mode 100644 index 000000000..fec5a0883 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/restError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"restError.js","sourceRoot":"","sources":["../../lib/restError.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAK/F;IAA+B,6BAAK;IAUlC,mBAAY,OAAe,EAAE,IAAa,EAAE,UAAmB,EAAE,OAAyB,EAAE,QAAgC,EAAE,IAAU;QAAxI,YACE,kBAAM,OAAO,CAAC,SAQf;QAPC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;;IACnD,CAAC;IAlBe,4BAAkB,GAAW,oBAAoB,CAAC;IAClD,+BAAqB,GAAW,uBAAuB,CAAC;IACxD,qBAAW,GAAW,aAAa,CAAC;IAiBtD,gBAAC;CAAA,AApBD,CAA+B,KAAK,GAoBnC;SApBY,SAAS"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts b/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts new file mode 100644 index 000000000..2fb084f0b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts @@ -0,0 +1,130 @@ +export declare class Serializer { + readonly modelMappers: { + [key: string]: any; + }; + readonly isXML?: boolean | undefined; + constructor(modelMappers?: { + [key: string]: any; + }, isXML?: boolean | undefined); + validateConstraints(mapper: Mapper, value: any, objectName: string): void; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + serialize(mapper: Mapper, object: any, objectName?: string): any; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + deserialize(mapper: Mapper, responseBody: any, objectName: string): any; +} +export interface MapperConstraints { + InclusiveMaximum?: number; + ExclusiveMaximum?: number; + InclusiveMinimum?: number; + ExclusiveMinimum?: number; + MaxLength?: number; + MinLength?: number; + Pattern?: RegExp; + MaxItems?: number; + MinItems?: number; + UniqueItems?: true; + MultipleOf?: number; +} +export declare type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType; +export interface SimpleMapperType { + name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; +} +export interface CompositeMapperType { + name: "Composite"; + className?: string; + modelProperties?: { + [propertyName: string]: Mapper; + }; + additionalProperties?: Mapper; + uberParent?: string; + polymorphicDiscriminator?: PolymorphicDiscriminator; +} +export interface SequenceMapperType { + name: "Sequence"; + element: Mapper; +} +export interface DictionaryMapperType { + name: "Dictionary"; + value: Mapper; +} +export interface EnumMapperType { + name: "Enum"; + allowedValues: any[]; +} +export interface BaseMapper { + xmlName?: string; + xmlIsAttribute?: boolean; + xmlElementName?: string; + xmlIsWrapped?: boolean; + readOnly?: boolean; + isConstant?: boolean; + required?: boolean; + nullable?: boolean; + serializedName?: string; + type: MapperType; + defaultValue?: any; + constraints?: MapperConstraints; +} +export declare type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper; +export interface PolymorphicDiscriminator { + serializedName: string; + clientName: string; + [key: string]: string; +} +export interface CompositeMapper extends BaseMapper { + type: CompositeMapperType; +} +export interface SequenceMapper extends BaseMapper { + type: SequenceMapperType; +} +export interface DictionaryMapper extends BaseMapper { + type: DictionaryMapperType; + headerCollectionPrefix?: string; +} +export interface EnumMapper extends BaseMapper { + type: EnumMapperType; +} +export interface UrlParameterValue { + value: string; + skipUrlEncoding: boolean; +} +export declare function serializeObject(toSerialize: any): any; +export declare const MapperType: { + Base64Url: "Base64Url"; + Boolean: "Boolean"; + ByteArray: "ByteArray"; + Date: "Date"; + DateTime: "DateTime"; + DateTimeRfc1123: "DateTimeRfc1123"; + Object: "Object"; + Stream: "Stream"; + String: "String"; + TimeSpan: "TimeSpan"; + UnixTime: "UnixTime"; + Number: "Number"; + Composite: "Composite"; + Sequence: "Sequence"; + Dictionary: "Dictionary"; + Enum: "Enum"; +}; +//# sourceMappingURL=serializer.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts.map new file mode 100644 index 000000000..2fb46e751 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serializer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../lib/serializer.ts"],"names":[],"mappings":"AAMA,qBAAa,UAAU;aACO,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;aAAuB,KAAK,CAAC;gBAAjE,YAAY,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO,EAAkB,KAAK,CAAC,qBAAS;IAEtG,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAyDzE;;;;;;;;;;OAUG;IACH,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CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAGD,wBAAgB,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAuBrD;AAaD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBrB,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serializer.js b/node_modules/@azure/ms-rest-js/es/lib/serializer.js new file mode 100644 index 000000000..aefef21f2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serializer.js @@ -0,0 +1,768 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import * as base64 from "./util/base64"; +import * as utils from "./util/utils"; +var Serializer = /** @class */ (function () { + function Serializer(modelMappers, isXML) { + if (modelMappers === void 0) { modelMappers = {}; } + this.modelMappers = modelMappers; + this.isXML = isXML; + } + Serializer.prototype.validateConstraints = function (mapper, value, objectName) { + var failValidation = function (constraintName, constraintValue) { + throw new Error("\"" + objectName + "\" with value \"" + value + "\" should satisfy the constraint \"" + constraintName + "\": " + constraintValue + "."); + }; + if (mapper.constraints && (value != undefined)) { + var _a = mapper.constraints, ExclusiveMaximum = _a.ExclusiveMaximum, ExclusiveMinimum = _a.ExclusiveMinimum, InclusiveMaximum = _a.InclusiveMaximum, InclusiveMinimum = _a.InclusiveMinimum, MaxItems = _a.MaxItems, MaxLength = _a.MaxLength, MinItems = _a.MinItems, MinLength = _a.MinLength, MultipleOf = _a.MultipleOf, Pattern = _a.Pattern, UniqueItems = _a.UniqueItems; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + var pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if ((typeof value !== "string") || (value.match(pattern) === null)) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && value.some(function (item, i, ar) { return ar.indexOf(item) !== i; })) { + failValidation("UniqueItems", UniqueItems); + } + } + }; + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + Serializer.prototype.serialize = function (mapper, object, objectName) { + var payload = {}; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/ig) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + var required = mapper.required, nullable = mapper.nullable; + if (required && nullable && object === undefined) { + throw new Error(objectName + " cannot be undefined."); + } + if (required && !nullable && object == undefined) { + throw new Error(objectName + " cannot be null or undefined."); + } + if (!required && nullable === false && object === null) { + throw new Error(objectName + " cannot be null."); + } + if (object == undefined) { + payload = object; + } + else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/ig) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/ig) !== null) { + var enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName); + } + else if (mapperType.match(/^Composite$/ig) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName); + } + } + return payload; + }; + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + Serializer.prototype.deserialize = function (mapper, responseBody, objectName) { + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + var payload; + var mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/ig) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName); + } + else { + if (this.isXML) { + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$") and body ("_") properties, then just reduce the responseBody value to + * the body ("_") property. + */ + if (responseBody["$"] != undefined && responseBody["_"] != undefined) { + responseBody = responseBody["_"]; + } + } + if (mapperType.match(/^Number$/ig) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/ig) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/ig) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = base64.decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName); + } + else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + }; + return Serializer; +}()); +export { Serializer }; +function trimEnd(str, ch) { + var len = str.length; + while ((len - 1) >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error("Please provide an input of type Uint8Array for converting to Base64Url."); + } + // Uint8Array to Base64. + var str = base64.encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); +} +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/\-/g, "+").replace(/\_/g, "/"); + // Base64 to Uint8Array. + return base64.decodeString(str); +} +function splitSerializeName(prop) { + var classes = []; + var partialclass = ""; + if (prop) { + var subwords = prop.split("."); + for (var _i = 0, subwords_1 = subwords; _i < subwords_1.length; _i++) { + var item = subwords_1[_i]; + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; +} +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); +} +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/ig) !== null) { + if (typeof value !== "number") { + throw new Error(objectName + " with value " + value + " must be of type number."); + } + } + else if (typeName.match(/^String$/ig) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(objectName + " with value \"" + value + "\" must be of type string."); + } + } + else if (typeName.match(/^Uuid$/ig) !== null) { + if (!(typeof value.valueOf() === "string" && utils.isValidUuid(value))) { + throw new Error(objectName + " with value \"" + value + "\" must be of type string and a valid uuid."); + } + } + else if (typeName.match(/^Boolean$/ig) !== null) { + if (typeof value !== "boolean") { + throw new Error(objectName + " with value " + value + " must be of type boolean."); + } + } + else if (typeName.match(/^Stream$/ig) !== null) { + var objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !(typeof Blob === "function" && value instanceof Blob)) { + throw new Error(objectName + " must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."); + } + } + } + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error("Please provide a set of allowedValues to validate " + objectName + " as an Enum Type."); + } + var isPresent = allowedValues.some(function (item) { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(value + " is not a valid value for " + objectName + ". The valid values are: " + JSON.stringify(allowedValues) + "."); + } + return value; +} +function serializeByteArrayType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = base64.encodeByteArray(value); + } + return value; +} +function serializeBase64UrlType(objectName, value) { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(objectName + " must be of type Uint8Array."); + } + value = bufferToBase64Url(value); + } + return value; +} +function serializeDateTypes(typeName, value, objectName) { + if (value != undefined) { + if (typeName.match(/^Date$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in ISO8601 format."); + } + value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123 format."); + } + value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(objectName + " must be an instanceof Date or a string in RFC-1123/ISO8601 format " + + "for it to be serialized in UnixTime/Epoch format."); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/ig) !== null) { + if (!utils.isDuration(value)) { + throw new Error(objectName + " must be a string in ISO 8601 format. Instead was \"" + value + "\"."); + } + value = value; + } + } + return value; +} +function serializeSequenceType(serializer, mapper, object, objectName) { + if (!Array.isArray(object)) { + throw new Error(objectName + " must be of type Array."); + } + var elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempArray = []; + for (var i = 0; i < object.length; i++) { + tempArray[i] = serializer.serialize(elementType, object[i], objectName); + } + return tempArray; +} +function serializeDictionaryType(serializer, mapper, object, objectName) { + if (typeof object !== "object") { + throw new Error(objectName + " must be of type object."); + } + var valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName + ".")); + } + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + "." + key); + } + return tempDictionary; +} +/** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ +function resolveModelProperties(serializer, mapper, objectName) { + var modelProps = mapper.type.modelProperties; + if (!modelProps) { + var className = mapper.type.className; + if (!className) { + throw new Error("Class name for model \"" + objectName + "\" is not provided in the mapper \"" + JSON.stringify(mapper, undefined, 2) + "\"."); + } + var modelMapper = serializer.modelMappers[className]; + if (!modelMapper) { + throw new Error("mapper() cannot be null or undefined for model \"" + className + "\"."); + } + modelProps = modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error("modelProperties cannot be null or undefined in the " + + ("mapper \"" + JSON.stringify(modelMapper) + "\" of type \"" + className + "\" for object \"" + objectName + "\".")); + } + } + return modelProps; +} +function serializeCompositeType(serializer, mapper, object, objectName) { + var _a; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object != undefined) { + var payload = {}; + var modelProps = resolveModelProperties(serializer, mapper, objectName); + for (var _i = 0, _b = Object.keys(modelProps); _i < _b.length; _i++) { + var key = _b[_i]; + var propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + var propName = void 0; + var parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + var paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (var _c = 0, paths_1 = paths; _c < paths_1.length; _c++) { + var pathName = paths_1[_c]; + var childObject = parentObject[pathName]; + if ((childObject == undefined) && (object[key] != undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject != undefined) { + var propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + var toSerialize = object[key]; + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + var serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName); + if (serializedValue !== undefined && propName != undefined) { + if (propertyMapper.xmlIsAttribute) { + // $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject.$ = parentObject.$ || {}; + parentObject.$[propName] = serializedValue; + } + else if (propertyMapper.xmlIsWrapped) { + parentObject[propName] = (_a = {}, _a[propertyMapper.xmlElementName] = serializedValue, _a); + } + else { + parentObject[propName] = serializedValue; + } + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var propNames = Object.keys(modelProps); + var _loop_1 = function (clientPropName) { + var isAdditionalProperty = propNames.every(function (pn) { return pn !== clientPropName; }); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]'); + } + }; + for (var clientPropName in object) { + _loop_1(clientPropName); + } + } + return payload; + } + return object; +} +function isSpecialXmlProperty(propertyName) { + return ["$", "_"].includes(propertyName); +} +function deserializeCompositeType(serializer, mapper, responseBody, objectName) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + var modelProps = resolveModelProperties(serializer, mapper, objectName); + var instance = {}; + var handledPropertyNames = []; + for (var _i = 0, _a = Object.keys(modelProps); _i < _a.length; _i++) { + var key = _a[_i]; + var propertyMapper = modelProps[key]; + var paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + var serializedName = propertyMapper.serializedName, xmlName = propertyMapper.xmlName, xmlElementName = propertyMapper.xmlElementName; + var propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + var headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + var dictionary = {}; + for (var _b = 0, _c = Object.keys(responseBody); _b < _c.length; _b++) { + var headerKey = _c[_b]; + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody.$) { + instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName], propertyObjectName); + } + else { + var propertyName = xmlElementName || xmlName || serializedName; + var unwrappedProperty = responseBody[propertyName]; + if (propertyMapper.xmlIsWrapped) { + unwrappedProperty = responseBody[xmlName]; + unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName]; + var isEmptyWrappedList = unwrappedProperty === undefined; + if (isEmptyWrappedList) { + unwrappedProperty = []; + } + } + instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName); + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + var propertyInstance = void 0; + var res = responseBody; + // traversing the object step by step. + for (var _d = 0, paths_2 = paths; _d < paths_2.length; _d++) { + var item = paths_2[_d]; + if (!res) + break; + res = res[item]; + } + propertyInstance = res; + var polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + var serializedValue = void 0; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + instance[key] = serializedValue; + } + } + } + var additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + var isAdditionalProperty = function (responsePropName) { + for (var clientPropName in modelProps) { + var paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (var responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]'); + } + } + } + else if (responseBody) { + for (var _e = 0, _f = Object.keys(responseBody); _e < _f.length; _e++) { + var key = _f[_e]; + if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) { + instance[key] = responseBody[key]; + } + } + } + return instance; +} +function deserializeDictionaryType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error("\"value\" metadata for a Dictionary must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + var tempDictionary = {}; + for (var _i = 0, _a = Object.keys(responseBody); _i < _a.length; _i++) { + var key = _a[_i]; + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName); + } + return tempDictionary; + } + return responseBody; +} +function deserializeSequenceType(serializer, mapper, responseBody, objectName) { + /*jshint validthis: true */ + var element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error("element\" metadata for an Array must be defined in the " + + ("mapper and it must of type \"object\" in " + objectName)); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + var tempArray = []; + for (var i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], objectName + "[" + i + "]"); + } + return tempArray; + } + return responseBody; +} +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + var polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + var discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + var discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + var typeName = mapper.type.uberParent || mapper.type.className; + var indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + var polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return mapper.type.polymorphicDiscriminator + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +// TODO: why is this here? +export function serializeObject(toSerialize) { + if (toSerialize == undefined) + return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = base64.encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + var array = []; + for (var i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } + else if (typeof toSerialize === "object") { + var dictionary = {}; + for (var property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; +} +/** + * Utility function to create a K:V from a list of strings + */ +function strEnum(o) { + var result = {}; + for (var _i = 0, o_1 = o; _i < o_1.length; _i++) { + var key = o_1[_i]; + result[key] = key; + } + return result; +} +export var MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" +]); +//# sourceMappingURL=serializer.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serializer.js.map b/node_modules/@azure/ms-rest-js/es/lib/serializer.js.map new file mode 100644 index 000000000..9e1a1dd87 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serializer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../../lib/serializer.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACx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CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7C;QACD,OAAO,KAAK,CAAC;KACd;SAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QAC1C,IAAM,UAAU,GAA2B,EAAE,CAAC;QAC9C,KAAK,IAAM,QAAQ,IAAI,WAAW,EAAE;YAClC,UAAU,CAAC,QAAQ,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC/D;QACD,OAAO,UAAU,CAAC;KACnB;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,OAAO,CAAmB,CAAW;IAC5C,IAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,KAAkB,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,EAAE;QAAhB,IAAM,GAAG,UAAA;QACZ,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;KACnB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,OAAO,CAAC;IAChC,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,MAAM;IACN,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts new file mode 100644 index 000000000..26e489034 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts @@ -0,0 +1,148 @@ +/// +import { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +import { HttpClient } from "./httpClient"; +import { HttpOperationResponse, RestResponse } from "./httpOperationResponse"; +import { HttpPipelineLogger } from "./httpPipelineLogger"; +import { OperationArguments } from "./operationArguments"; +import { ParameterPath } from "./operationParameter"; +import { OperationSpec } from "./operationSpec"; +import { DeserializationContentTypes } from "./policies/deserializationPolicy"; +import { RequestPolicyFactory } from "./policies/requestPolicy"; +import { Mapper, Serializer } from "./serializer"; +import { RequestPrepareOptions, WebResourceLike } from "./webResource"; +import { OperationResponse } from "./operationResponse"; +import { ServiceCallback } from "./util/utils"; +import { Agent } from "http"; +/** + * HTTP proxy settings (Node.js only) + */ +export interface ProxySettings { + host: string; + port: number; + username?: string; + password?: string; +} +/** + * HTTP and HTTPS agents (Node.js only) + */ +export interface AgentSettings { + http: Agent; + https: Agent; +} +/** + * Options to be provided while creating the client. + */ +export interface ServiceClientOptions { + /** + * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP + * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns + * the requestPolicyFactories that will be used. + */ + requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => (void | RequestPolicyFactory[])); + /** + * The HttpClient that will be used to send HTTP requests. + */ + httpClient?: HttpClient; + /** + * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline. + */ + httpPipelineLogger?: HttpPipelineLogger; + /** + * If set to true, turn off the default retry policy. + */ + noRetryPolicy?: boolean; + /** + * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30. + */ + rpRegistrationRetryTimeout?: number; + /** + * Whether or not to generate a client request ID header for each HTTP request. + */ + generateClientRequestIdHeader?: boolean; + /** + * Whether to include credentials in CORS requests in the browser. + * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information. + */ + withCredentials?: boolean; + /** + * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a + * header to all outgoing requests with this header name and a random UUID as the request ID. + */ + clientRequestIdHeaderName?: string; + /** + * The content-types that will be associated with JSON or XML serialization. + */ + deserializationContentTypes?: DeserializationContentTypes; + /** + * The header name to use for the telemetry header while sending the request. If this is not + * specified, then "User-Agent" will be used when running on Node.js and "x-ms-command-name" will + * be used when running in a browser. + */ + userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string); + /** + * The string to be set to the telemetry header while sending the request, or a function that + * takes in the default user-agent string and returns the user-agent string that will be used. + */ + userAgent?: string | ((defaultUserAgent: string) => string); + /** + * Proxy settings which will be used for every HTTP request (Node.js only). + */ + proxySettings?: ProxySettings; + /** + * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only). + */ + agentSettings?: AgentSettings; +} +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +export declare class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + protected baseUri?: string; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + protected requestContentType?: string; + /** + * The HTTP client that will be used to send requests. + */ + private readonly _httpClient; + private readonly _requestPolicyOptions; + private readonly _requestPolicyFactories; + private readonly _withCredentials; + /** + * The ServiceClient constructor + * @constructor + * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication. + * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client. + */ + constructor(credentials?: ServiceClientCredentials, options?: ServiceClientOptions); + /** + * Send the provided httpRequest. + */ + sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise; +} +export declare function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void; +export declare type PropertyParent = { + [propertyName: string]: any; +}; +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export declare function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent; +export declare function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any; +export declare function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse; +//# sourceMappingURL=serviceClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts.map new file mode 100644 index 000000000..d04e5b2d1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceClient.d.ts","sourceRoot":"","sources":["../../lib/serviceClient.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAkF,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAqB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAyB,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAKtG,OAAO,EAAiB,oBAAoB,EAAkD,MAAM,0BAA0B,CAAC;AAK/H,OAAO,EAAqC,MAAM,EAAc,UAAU,EAAE,MAAM,cAAc,CAAC;AAIjG,OAAO,EAAsB,qBAAqB,EAAE,eAAe,EAAkC,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,C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,qBAAqB,EAAE,YAAY,EAAE,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAiE3H"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js new file mode 100644 index 000000000..565b6a109 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { __assign, __spreadArrays } from "tslib"; +import { DefaultHttpClient } from "./defaultHttpClient"; +import { getPathStringFromParameter, getPathStringFromParameterPath } from "./operationParameter"; +import { isStreamOperation } from "./operationSpec"; +import { deserializationPolicy } from "./policies/deserializationPolicy"; +import { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy"; +import { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +import { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +import { redirectPolicy } from "./policies/redirectPolicy"; +import { RequestPolicyOptions } from "./policies/requestPolicy"; +import { rpRegistrationPolicy } from "./policies/rpRegistrationPolicy"; +import { signingPolicy } from "./policies/signingPolicy"; +import { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { MapperType } from "./serializer"; +import { URLBuilder } from "./url"; +import * as utils from "./util/utils"; +import { stringifyXML } from "./util/xml"; +import { isWebResourceLike, WebResource } from "./webResource"; +import { agentPolicy } from "./policies/agentPolicy"; +import { proxyPolicy, getDefaultProxySettings } from "./policies/proxyPolicy"; +import { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +var ServiceClient = /** @class */ (function () { + /** + * The ServiceClient constructor + * @constructor + * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication. + * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client. + */ + function ServiceClient(credentials, options) { + if (!options) { + options = {}; + } + if (credentials && !credentials.signRequest) { + throw new Error("credentials argument needs to implement signRequest method"); + } + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new DefaultHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + var requestPolicyFactories; + if (Array.isArray(options.requestPolicyFactories)) { + requestPolicyFactories = options.requestPolicyFactories; + } + else { + requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options); + if (options.requestPolicyFactories) { + var newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + /** + * Send the provided httpRequest. + */ + ServiceClient.prototype.sendRequest = function (options) { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + var httpRequest; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } + else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } + catch (error) { + return Promise.reject(error); + } + var httpPipeline = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (var i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + }; + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + ServiceClient.prototype.sendOperationRequest = function (operationArguments, operationSpec, callback) { + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + var httpRequest = new WebResource(); + var result; + try { + var baseUri = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + var requestUrl = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (var _i = 0, _a = operationSpec.urlParameters; _i < _a.length; _i++) { + var urlParameter = _a[_i]; + var urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter)); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll("{" + (urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)) + "}", urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (var _b = 0, _c = operationSpec.queryParameters; _b < _c.length; _b++) { + var queryParameter = _c[_b]; + var queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue != undefined) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter)); + if (queryParameter.collectionFormat != undefined) { + if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + queryParameterValue = ""; + } + else { + for (var index in queryParameterValue) { + var item = queryParameterValue[index]; + queryParameterValue[index] = item == undefined ? "" : item.toString(); + } + } + } + else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || queryParameter.collectionFormat === QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (var index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== QueryCollectionFormat.Multi && queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + var contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + if (operationSpec.headerParameters) { + for (var _d = 0, _e = operationSpec.headerParameters; _d < _e.length; _d++) { + var headerParameter = _e[_d]; + var headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue != undefined) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter)); + var headerCollectionPrefix = headerParameter.mapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + for (var _f = 0, _g = Object.keys(headerValue); _f < _g.length; _f++) { + var key = _g[_f]; + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + var options = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (var customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + } + httpRequest.withCredentials = this._withCredentials; + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + if (httpRequest.streamResponseBody == undefined) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + result = this.sendRequest(httpRequest) + .then(function (res) { return flattenResponse(res, operationSpec.responses[res.status]); }); + } + catch (error) { + result = Promise.reject(error); + } + var cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(function (res) { return cb(null, res._response.parsedBody, res._response.request, res._response); }) + .catch(function (err) { return cb(err); }); + } + return result; + }; + return ServiceClient; +}()); +export { ServiceClient }; +export function serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) { + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + var bodyMapper = operationSpec.requestBody.mapper; + var required = bodyMapper.required, xmlName = bodyMapper.xmlName, xmlElementName = bodyMapper.xmlElementName, serializedName = bodyMapper.serializedName; + var typeName = bodyMapper.type.name; + try { + if (httpRequest.body != undefined || required) { + var requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString); + var isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(utils.prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName), { rootName: xmlName || serializedName }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName }); + } + } + else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } + catch (error) { + throw new Error("Error \"" + error.message + "\" occurred in serializing the payload - " + JSON.stringify(serializedName, undefined, " ") + "."); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (var _i = 0, _a = operationSpec.formDataParameters; _i < _a.length; _i++) { + var formDataParameter = _a[_i]; + var formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue != undefined) { + var formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter)); + } + } + } +} +function isRequestPolicyFactory(instance) { + return typeof instance.create === "function"; +} +function getValueOrFunctionResult(value, defaultValueCreator) { + var result; + if (typeof value === "string") { + result = value; + } + else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; +} +function createDefaultRequestPolicyFactories(credentials, options) { + var factories = []; + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + if (credentials) { + if (isRequestPolicyFactory(credentials)) { + factories.push(credentials); + } + else { + factories.push(signingPolicy(credentials)); + } + } + var userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + var userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + factories.push(deserializationPolicy(options.deserializationContentTypes)); + var proxySettings = options.proxySettings || getDefaultProxySettings(); + if (proxySettings) { + factories.push(proxyPolicy(proxySettings)); + } + if (options.agentSettings) { + factories.push(agentPolicy(options.agentSettings)); + } + return factories; +} +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export function getPropertyParent(parent, propertyPath) { + if (parent && propertyPath) { + var propertyPathLength = propertyPath.length; + for (var i = 0; i < propertyPathLength - 1; ++i) { + var propertyName = propertyPath[i]; + if (!parent[propertyName]) { + parent[propertyName] = {}; + } + parent = parent[propertyName]; + } + } + return parent; +} +function getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); +} +export function getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) { + var value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + var propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + var useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = parameterMapper.required || (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + // Serialize just for validation purposes. + var parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString); + } + } + else { + if (parameterMapper.required) { + value = {}; + } + for (var propertyName in parameterPath) { + var propertyMapper = parameterMapper.type.modelProperties[propertyName]; + var propertyPath = parameterPath[propertyName]; + var propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + var propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + var result = { propertyFound: false }; + var i = 0; + for (; i < parameterPath.length; ++i) { + var parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent != undefined && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} +export function flattenResponse(_response, responseSpec) { + var parsedHeaders = _response.parsedHeaders; + var bodyMapper = responseSpec && responseSpec.bodyMapper; + var addOperationResponse = function (obj) { + return Object.defineProperty(obj, "_response", { + value: _response + }); + }; + if (bodyMapper) { + var typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody })); + } + var modelProperties_1 = typeName === "Composite" && bodyMapper.type.modelProperties || {}; + var isPageableResponse = Object.keys(modelProperties_1).some(function (k) { return modelProperties_1[k].serializedName === ""; }); + if (typeName === "Sequence" || isPageableResponse) { + // We're expecting a sequece(array) make sure that the response body is in the + // correct format, if not make it an empty array [] + var parsedBody = Array.isArray(_response.parsedBody) + ? _response.parsedBody + : []; + var arrayResponse = __spreadArrays(parsedBody); + for (var _i = 0, _a = Object.keys(modelProperties_1); _i < _a.length; _i++) { + var key = _a[_i]; + if (modelProperties_1[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + if (parsedHeaders) { + for (var _b = 0, _c = Object.keys(parsedHeaders); _b < _c.length; _b++) { + var key = _c[_b]; + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); + } + } + if (bodyMapper || _response.request.method === "HEAD" || utils.isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse(__assign(__assign({}, parsedHeaders), { body: _response.parsedBody })); + } + return addOperationResponse(__assign(__assign({}, parsedHeaders), _response.parsedBody)); +} +//# sourceMappingURL=serviceClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js.map new file mode 100644 index 000000000..31d9d7ef7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/serviceClient.js.map @@ -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,IAAI,aAAa,EAAE;gBACjB,KAAkB,UAA0B,EAA1B,KAAA,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAA1B,cAA0B,EAA1B,IAA0B,EAAE;oBAAzC,IAAM,GAAG,SAAA;oBACZ,aAAa,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;iBACzC;aACF;YACD,oBAAoB,CAAC,aAAa,CAAC,CAAC;YACpC,OAAO,aAAa,CAAC;SACtB;QAED,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,YAAY,EAAE;YACzD,OAAO,oBAAoB,uBACtB,aAAa,GACb,SAAS,CAAC,UAAU,EACvB,CAAC;SACJ;KACF;IAED,IAAI,UAAU,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;QACpG,yCAAyC;QACzC,OAAO,oBAAoB,uBACtB,aAAa,KAChB,IAAI,EAAE,SAAS,CAAC,UAAU,IAC1B,CAAC;KACJ;IAED,OAAO,oBAAoB,uBACtB,aAAa,GACb,SAAS,CAAC,UAAU,EACvB,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/url.d.ts b/node_modules/@azure/ms-rest-js/es/lib/url.d.ts new file mode 100644 index 000000000..710361f8c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/url.d.ts @@ -0,0 +1,149 @@ +/** + * A class that handles the query portion of a URLBuilder. + */ +export declare class URLQuery { + private readonly _rawQuery; + /** + * Get whether or not there any query parameters in this URLQuery. + */ + any(): boolean; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + set(parameterName: string, parameterValue: any): void; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + get(parameterName: string): string | string[] | undefined; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + toString(): string; + /** + * Parse a URLQuery from the provided text. + */ + static parse(text: string): URLQuery; +} +/** + * A class that handles creating, modifying, and parsing URLs. + */ +export declare class URLBuilder { + private _scheme; + private _host; + private _port; + private _path; + private _query; + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + setScheme(scheme: string | undefined): void; + /** + * Get the scheme that has been set in this URL. + */ + getScheme(): string | undefined; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + setHost(host: string | undefined): void; + /** + * Get the host that has been set in this URL. + */ + getHost(): string | undefined; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + setPort(port: number | string | undefined): void; + /** + * Get the port that has been set in this URL. + */ + getPort(): string | undefined; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + setPath(path: string | undefined): void; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + appendPath(path: string | undefined): void; + /** + * Get the path that has been set in this URL. + */ + getPath(): string | undefined; + /** + * Set the query in this URL. + */ + setQuery(query: string | undefined): void; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + setQueryParameter(queryParameterName: string, queryParameterValue: any): void; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + getQueryParameterValue(queryParameterName: string): string | string[] | undefined; + /** + * Get the query in this URL. + */ + getQuery(): string | undefined; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + private set; + toString(): string; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + replaceAll(searchValue: string, replaceValue: string): void; + static parse(text: string): URLBuilder; +} +declare type URLTokenizerState = "SCHEME" | "SCHEME_OR_HOST" | "HOST" | "PORT" | "PATH" | "QUERY" | "DONE"; +declare type URLTokenType = "SCHEME" | "HOST" | "PORT" | "PATH" | "QUERY"; +export declare class URLToken { + readonly text: string; + readonly type: URLTokenType; + constructor(text: string, type: URLTokenType); + static scheme(text: string): URLToken; + static host(text: string): URLToken; + static port(text: string): URLToken; + static path(text: string): URLToken; + static query(text: string): URLToken; +} +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export declare function isAlphaNumericCharacter(character: string): boolean; +/** + * A class that tokenizes URL strings. + */ +export declare class URLTokenizer { + readonly _text: string; + readonly _textLength: number; + _currentState: URLTokenizerState; + _currentIndex: number; + _currentToken: URLToken | undefined; + constructor(_text: string, state?: URLTokenizerState); + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + current(): URLToken | undefined; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + next(): boolean; +} +export {}; +//# sourceMappingURL=url.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/url.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/url.d.ts.map new file mode 100644 index 000000000..5a616b760 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/url.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../lib/url.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2D;IAErF;;OAEG;IACI,GAAG,IAAI,OAAO;IAIrB;;;;OAIG;IACI,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,IAAI;IAW5D;;;OAGG;IACI,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAIhE;;OAEG;IACI,QAAQ,IAAI,MAAM;IAoBzB;;OAEG;WACW,KAAK,CAAC,IAA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ccf09 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/url.js @@ -0,0 +1,601 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { replaceAll } from "./util/utils"; +/** + * A class that handles the query portion of a URLBuilder. + */ +var URLQuery = /** @class */ (function () { + function URLQuery() { + this._rawQuery = {}; + } + /** + * Get whether or not there any query parameters in this URLQuery. + */ + URLQuery.prototype.any = function () { + return Object.keys(this._rawQuery).length > 0; + }; + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + URLQuery.prototype.set = function (parameterName, parameterValue) { + if (parameterName) { + if (parameterValue != undefined) { + var newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } + else { + delete this._rawQuery[parameterName]; + } + } + }; + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + URLQuery.prototype.get = function (parameterName) { + return parameterName ? this._rawQuery[parameterName] : undefined; + }; + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + URLQuery.prototype.toString = function () { + var result = ""; + for (var parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + var parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + var parameterStrings = []; + for (var _i = 0, parameterValue_1 = parameterValue; _i < parameterValue_1.length; _i++) { + var parameterValueElement = parameterValue_1[_i]; + parameterStrings.push(parameterName + "=" + parameterValueElement); + } + result += parameterStrings.join("&"); + } + else { + result += parameterName + "=" + parameterValue; + } + } + return result; + }; + /** + * Parse a URLQuery from the provided text. + */ + URLQuery.parse = function (text) { + var result = new URLQuery(); + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + var currentState = "ParameterName"; + var parameterName = ""; + var parameterValue = ""; + for (var i = 0; i < text.length; ++i) { + var currentCharacter = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + case "&": + parameterName = ""; + parameterValue = ""; + break; + default: + parameterName += currentCharacter; + break; + } + break; + case "ParameterValue": + switch (currentCharacter) { + case "=": + parameterName = ""; + parameterValue = ""; + currentState = "Invalid"; + break; + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + default: + parameterValue += currentCharacter; + break; + } + break; + case "Invalid": + if (currentCharacter === "&") { + currentState = "ParameterName"; + } + break; + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + return result; + }; + return URLQuery; +}()); +export { URLQuery }; +/** + * A class that handles creating, modifying, and parsing URLs. + */ +var URLBuilder = /** @class */ (function () { + function URLBuilder() { + } + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setScheme = function (scheme) { + if (!scheme) { + this._scheme = undefined; + } + else { + this.set(scheme, "SCHEME"); + } + }; + /** + * Get the scheme that has been set in this URL. + */ + URLBuilder.prototype.getScheme = function () { + return this._scheme; + }; + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setHost = function (host) { + if (!host) { + this._host = undefined; + } + else { + this.set(host, "SCHEME_OR_HOST"); + } + }; + /** + * Get the host that has been set in this URL. + */ + URLBuilder.prototype.getHost = function () { + return this._host; + }; + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + URLBuilder.prototype.setPort = function (port) { + if (port == undefined || port === "") { + this._port = undefined; + } + else { + this.set(port.toString(), "PORT"); + } + }; + /** + * Get the port that has been set in this URL. + */ + URLBuilder.prototype.getPort = function () { + return this._port; + }; + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + URLBuilder.prototype.setPath = function (path) { + if (!path) { + this._path = undefined; + } + else { + if (path.indexOf("://") !== -1) { + this.set(path, "SCHEME"); + } + else { + this.set(path, "PATH"); + } + } + }; + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + URLBuilder.prototype.appendPath = function (path) { + if (path) { + var currentPath = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + if (path.startsWith("/")) { + path = path.substring(1); + } + path = currentPath + path; + } + this.set(path, "PATH"); + } + }; + /** + * Get the path that has been set in this URL. + */ + URLBuilder.prototype.getPath = function () { + return this._path; + }; + /** + * Set the query in this URL. + */ + URLBuilder.prototype.setQuery = function (query) { + if (!query) { + this._query = undefined; + } + else { + this._query = URLQuery.parse(query); + } + }; + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + URLBuilder.prototype.setQueryParameter = function (queryParameterName, queryParameterValue) { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + }; + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + URLBuilder.prototype.getQueryParameterValue = function (queryParameterName) { + return this._query ? this._query.get(queryParameterName) : undefined; + }; + /** + * Get the query in this URL. + */ + URLBuilder.prototype.getQuery = function () { + return this._query ? this._query.toString() : undefined; + }; + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + URLBuilder.prototype.set = function (text, startState) { + var tokenizer = new URLTokenizer(text, startState); + while (tokenizer.next()) { + var token = tokenizer.current(); + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + case "HOST": + this._host = token.text || undefined; + break; + case "PORT": + this._port = token.text || undefined; + break; + case "PATH": + var tokenPath = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + default: + throw new Error("Unrecognized URLTokenType: " + token.type); + } + } + } + }; + URLBuilder.prototype.toString = function () { + var result = ""; + if (this._scheme) { + result += this._scheme + "://"; + } + if (this._host) { + result += this._host; + } + if (this._port) { + result += ":" + this._port; + } + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + if (this._query && this._query.any()) { + result += "?" + this._query.toString(); + } + return result; + }; + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + URLBuilder.prototype.replaceAll = function (searchValue, replaceValue) { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + }; + URLBuilder.parse = function (text) { + var result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + }; + return URLBuilder; +}()); +export { URLBuilder }; +var URLToken = /** @class */ (function () { + function URLToken(text, type) { + this.text = text; + this.type = type; + } + URLToken.scheme = function (text) { + return new URLToken(text, "SCHEME"); + }; + URLToken.host = function (text) { + return new URLToken(text, "HOST"); + }; + URLToken.port = function (text) { + return new URLToken(text, "PORT"); + }; + URLToken.path = function (text) { + return new URLToken(text, "PATH"); + }; + URLToken.query = function (text) { + return new URLToken(text, "QUERY"); + }; + return URLToken; +}()); +export { URLToken }; +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export function isAlphaNumericCharacter(character) { + var characterCode = character.charCodeAt(0); + return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) || + (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) || + (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */); +} +/** + * A class that tokenizes URL strings. + */ +var URLTokenizer = /** @class */ (function () { + function URLTokenizer(_text, state) { + this._text = _text; + this._textLength = _text ? _text.length : 0; + this._currentState = state != undefined ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + URLTokenizer.prototype.current = function () { + return this._currentToken; + }; + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + URLTokenizer.prototype.next = function () { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } + else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + case "HOST": + nextHost(this); + break; + case "PORT": + nextPort(this); + break; + case "PATH": + nextPath(this); + break; + case "QUERY": + nextQuery(this); + break; + default: + throw new Error("Unrecognized URLTokenizerState: " + this._currentState); + } + } + return !!this._currentToken; + }; + return URLTokenizer; +}()); +export { URLTokenizer }; +/** + * Read the remaining characters from this Tokenizer's character stream. + */ +function readRemaining(tokenizer) { + var result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; +} +/** + * Whether or not this URLTokenizer has a current character. + */ +function hasCurrentCharacter(tokenizer) { + return tokenizer._currentIndex < tokenizer._textLength; +} +/** + * Get the character in the text string at the current index. + */ +function getCurrentCharacter(tokenizer) { + return tokenizer._text[tokenizer._currentIndex]; +} +/** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ +function nextCharacter(tokenizer, step) { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } +} +/** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ +function peekCharacters(tokenizer, charactersToPeek) { + var endIndex = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); +} +/** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ +function readWhile(tokenizer, condition) { + var result = ""; + while (hasCurrentCharacter(tokenizer)) { + var currentCharacter = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } + else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + return result; +} +/** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ +function readWhileLetterOrDigit(tokenizer) { + return readWhile(tokenizer, function (character) { return isAlphaNumericCharacter(character); }); +} +/** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ +function readUntilCharacter(tokenizer) { + var terminatingCharacters = []; + for (var _i = 1; _i < arguments.length; _i++) { + terminatingCharacters[_i - 1] = arguments[_i]; + } + return readWhile(tokenizer, function (character) { return terminatingCharacters.indexOf(character) === -1; }); +} +function nextScheme(tokenizer) { + var scheme = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "HOST"; + } +} +function nextSchemeOrHost(tokenizer) { + var schemeOrHost = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } + else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } + } +} +function nextHost(tokenizer) { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + var host = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPort(tokenizer) { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + var port = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextPath(tokenizer) { + var path = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } + else { + tokenizer._currentState = "QUERY"; + } +} +function nextQuery(tokenizer) { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + var query = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; +} +//# sourceMappingURL=url.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/url.js.map b/node_modules/@azure/ms-rest-js/es/lib/url.js.map new file mode 100644 index 000000000..5830810e8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/url.js.map @@ -0,0 +1 @@ +{"version":3,"file":"url.js","sourceRoot":"","sources":["../../lib/url.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;GAEG;AACH;IAAA;QACmB,cAAS,GAAwD,EAAE,CAAC;IAiIvF,CAAC;IA/HC;;OAEG;IACI,sBAAG,GAAV;QACE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CA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a,GAAG,MAAM,CAAC;KAClC;SAAM,IAAI,mBAAmB,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE;QACjD,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;KAClC;SAAM;QACL,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC;KACnC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,SAAuB;IACvC,IAAM,IAAI,GAAW,kBAAkB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACxD,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE9C,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE;QACnC,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;KAClC;SAAM;QACL,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC;KACnC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,SAAuB;IACxC,IAAI,mBAAmB,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE;QAC1C,aAAa,CAAC,SAAS,CAAC,CAAC;KAC1B;IAED,IAAM,KAAK,GAAW,aAAa,CAAC,SAAS,CAAC,CAAC;IAC/C,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts new file mode 100644 index 000000000..5c40c44b1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts.map new file mode 100644 index 000000000..89074b251 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.browser.d.ts","sourceRoot":"","sources":["../../../lib/util/base64.browser.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAOtD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js new file mode 100644 index 000000000..1c76f7b25 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value) { + return btoa(value); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value) { + var str = ""; + for (var i = 0; i < value.length; i++) { + str += String.fromCharCode(value[i]); + } + return btoa(str); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value) { + var byteString = atob(value); + var arr = new Uint8Array(byteString.length); + for (var i = 0; i < byteString.length; i++) { + arr[i] = byteString.charCodeAt(i); + } + return arr; +} +//# sourceMappingURL=base64.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js.map new file mode 100644 index 000000000..47aea45f5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.browser.js","sourceRoot":"","sources":["../../../lib/util/base64.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACtC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAM,GAAG,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KACnC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts new file mode 100644 index 000000000..1dfd806b7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts @@ -0,0 +1,16 @@ +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export declare function encodeString(value: string): string; +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export declare function encodeByteArray(value: Uint8Array): string; +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export declare function decodeString(value: string): Uint8Array; +//# sourceMappingURL=base64.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts.map new file mode 100644 index 000000000..3af7f47b9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../lib/util/base64.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAKzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEtD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.js b/node_modules/@azure/ms-rest-js/es/lib/util/base64.js new file mode 100644 index 000000000..514bc43e5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value) { + return Buffer.from(value).toString("base64"); +} +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value) { + // Buffer.from accepts | -- the TypeScript definition is off here + // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length + var bufferValue = (value instanceof Buffer) ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); +} +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value) { + return Buffer.from(value, "base64"); +} +//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/base64.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/base64.js.map new file mode 100644 index 000000000..f680593b3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/base64.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../lib/util/base64.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,kGAAkG;IAClG,mGAAmG;IACnG,IAAM,WAAW,GAAG,CAAC,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAqB,CAAC,CAAC;IACjG,OAAO,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts new file mode 100644 index 000000000..3ae86c2a6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts @@ -0,0 +1,86 @@ +export declare const Constants: { + /** + * The ms-rest version + * @const + * @type {string} + */ + msRestVersion: string; + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: string; + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: string; + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: string; + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: string; + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: string; + GET: string; + DELETE: string; + POST: string; + MERGE: string; + HEAD: string; + PATCH: string; + }; + StatusCodes: { + TooManyRequests: number; + }; + }; + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: string; + AUTHORIZATION_SCHEME: string; + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: string; + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: string; + }; +}; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts.map new file mode 100644 index 000000000..cd8dcf80a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../lib/util/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;IACpB;;;;OAIG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;;QAID;;;;;WAKG;;;;;;;;;;;;;;IAgBL;;OAEG;;QAED;;;;;WAKG;;;QAKH;;;;;;;WAOG;;QAGH;;;;;WAKG;;;CAGN,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/constants.js b/node_modules/@azure/ms-rest-js/es/lib/util/constants.js new file mode 100644 index 000000000..97af93de9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/constants.js @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +export var Constants = { + /** + * The ms-rest version + * @const + * @type {string} + */ + msRestVersion: "2.1.0", + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + StatusCodes: { + TooManyRequests: 429 + } + }, + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + AUTHORIZATION_SCHEME: "Bearer", + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } +}; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/constants.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/constants.js.map new file mode 100644 index 000000000..817f45df2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../lib/util/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB;;;;OAIG;IACH,aAAa,EAAE,OAAO;IAEtB;;;;;OAKG;IACH,IAAI,EAAE,OAAO;IAEb;;;;;OAKG;IACH,KAAK,EAAE,QAAQ;IAEf;;;;;OAKG;IACH,UAAU,EAAE,YAAY;IAExB;;;;;OAKG;IACH,WAAW,EAAE,aAAa;IAE1B,aAAa,EAAE;QACb;;;;;WAKG;QACH,SAAS,EAAE;YACT,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;SACf;QAED,WAAW,EAAE;YACX,eAAe,EAAE,GAAG;SACrB;KACF;IAED;;OAEG;IACH,eAAe,EAAE;QACf;;;;;WAKG;QACH,aAAa,EAAE,eAAe;QAE9B,oBAAoB,EAAE,QAAQ;QAE9B;;;;;;;WAOG;QACH,WAAW,EAAE,aAAa;QAE1B;;;;;WAKG;QACH,UAAU,EAAE,YAAY;KACzB;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts new file mode 100644 index 000000000..56eabdc77 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts @@ -0,0 +1,157 @@ +import { HttpOperationResponse } from "../httpOperationResponse"; +import { RestError } from "../restError"; +import { WebResourceLike } from "../webResource"; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export declare const isNode: boolean; +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export declare function urlIsHTTPS(urlToCheck: { + protocol: string; +}): boolean; +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export declare function encodeUri(uri: string): string; +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export declare function stripResponse(response: HttpOperationResponse): any; +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResource} request The Http Request object + * + * @return {WebResource} The stripped version of Http Request. + */ +export declare function stripRequest(request: WebResourceLike): WebResourceLike; +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export declare function isValidUuid(uuid: string): boolean; +/** + * Provides an array of values of an object. For example + * for a given object { "a": "foo", "b": "bar" }, the method returns ["foo", "bar"]. + * + * @param {object} obj An object whose properties need to be enumerated so that it"s values can be provided as an array + * + * @return {any[]} An array of values of the given object. + */ +export declare function objectValues(obj: { + [key: string]: any; +}): any[]; +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export declare function generateUuid(): string; +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export declare function executePromisesSequentially(promiseFactories: Array, kickstart: any): Promise; +/** + * Merges source object into the target object + * @param {object} source The object that needs to be merged + * + * @param {object} target The object to be merged into + * + * @returns {object} Returns the merged target object. + */ +export declare function mergeObjects(source: { + [key: string]: any; +}, target: { + [key: string]: any; +}): { + [key: string]: any; +}; +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export declare function delay(t: number, value?: T): Promise; +/** + * Service callback that is returned for REST requests initiated by the service client. + */ +export interface ServiceCallback { + /** + * A method that will be invoked as a callback to a service function. + * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null. + * @param {TResult} [result] The deserialized response body if an error did not occur. + * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur. + * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur. + */ + (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void; +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export declare function promiseToCallback(promise: Promise): Function; +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export declare function promiseToServiceCallback(promise: Promise): Function; +export declare function prepareXMLRootList(obj: any, elementName: string): { + [x: string]: any; +}; +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export declare function applyMixins(targetCtor: any, sourceCtors: any[]): void; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export declare function isDuration(value: string): boolean; +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export declare function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined; +/** + * Determines whether the given enity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param value Any entity + * @return boolean - true is it is primitive type, false otherwise. + */ +export declare function isPrimitiveType(value: any): boolean; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts.map new file mode 100644 index 000000000..a7f8cb770 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/util/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,MAAM,SAAyG,CAAC;AAE7H;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,qBAAqB,GAAG,GAAG,CAMlE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAMtE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGjD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAAE,GAAG,GAAG,EAAE,CAahE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,gBAMvF;AAED;;;;;;;GAOG;AACH,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,OAAO,CAEnD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/utils.js b/node_modules/@azure/ms-rest-js/es/lib/util/utils.js new file mode 100644 index 000000000..94f1dd834 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/utils.js @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import uuidv4 from "uuid/v4"; +import { Constants } from "./constants"; +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export var isNode = (typeof process !== "undefined") && !!process.version && !!process.versions && !!process.versions.node; +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export function urlIsHTTPS(urlToCheck) { + return urlToCheck.protocol.toLowerCase() === Constants.HTTPS; +} +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export function encodeUri(uri) { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); +} +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export function stripResponse(response) { + var strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; +} +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResource} request The Http Request object + * + * @return {WebResource} The stripped version of Http Request. + */ +export function stripRequest(request) { + var strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; +} +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export function isValidUuid(uuid) { + var validUuidRegex = new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "ig"); + return validUuidRegex.test(uuid); +} +/** + * Provides an array of values of an object. For example + * for a given object { "a": "foo", "b": "bar" }, the method returns ["foo", "bar"]. + * + * @param {object} obj An object whose properties need to be enumerated so that it"s values can be provided as an array + * + * @return {any[]} An array of values of the given object. + */ +export function objectValues(obj) { + var result = []; + if (obj && obj instanceof Object) { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + result.push(obj[key]); + } + } + } + else { + throw new Error("The provided object " + JSON.stringify(obj, undefined, 2) + " is not a valid object that can be " + + "enumerated to provide its values as an array."); + } + return result; +} +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export function generateUuid() { + return uuidv4(); +} +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export function executePromisesSequentially(promiseFactories, kickstart) { + var result = Promise.resolve(kickstart); + promiseFactories.forEach(function (promiseFactory) { + result = result.then(promiseFactory); + }); + return result; +} +/** + * Merges source object into the target object + * @param {object} source The object that needs to be merged + * + * @param {object} target The object to be merged into + * + * @returns {object} Returns the merged target object. + */ +export function mergeObjects(source, target) { + Object.keys(source).forEach(function (key) { + target[key] = source[key]; + }); + return target; +} +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export function delay(t, value) { + return new Promise(function (resolve) { return setTimeout(function () { return resolve(value); }, t); }); +} +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export function promiseToCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + cb(undefined, data); + }, function (err) { + cb(err); + }); + }; +} +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export function promiseToServiceCallback(promise) { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return function (cb) { + promise.then(function (data) { + process.nextTick(cb, undefined, data.parsedBody, data.request, data); + }, function (err) { + process.nextTick(cb, err); + }); + }; +} +export function prepareXMLRootList(obj, elementName) { + var _a; + if (!Array.isArray(obj)) { + obj = [obj]; + } + return _a = {}, _a[elementName] = obj, _a; +} +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export function applyMixins(targetCtor, sourceCtors) { + sourceCtors.forEach(function (sourceCtors) { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(function (name) { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); +} +var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export function isDuration(value) { + return validateISODuration.test(value); +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +/** + * Determines whether the given enity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param value Any entity + * @return boolean - true is it is primitive type, false otherwise. + */ +export function isPrimitiveType(value) { + return (typeof value !== "object" && typeof value !== "function") || value === null; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/utils.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/utils.js.map new file mode 100644 index 000000000..603fcf903 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/util/utils.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,MAAM,MAAM,SAAS,CAAC;AAI7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,IAAM,MAAM,GAAG,CAAC,OAAO,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;AAE7H;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,UAAgC;IACzD,OAAO,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,KAAK,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,kBAAkB,CAAC,GAAG,CAAC;SAC3B,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,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KAAqK,CAAC;AAElM;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAAyB,EAAE,WAAmB,EAAE,YAAoB;IAC7F,OAAO,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;AAC5F,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAU;IACxC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC;AACtF,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts new file mode 100644 index 000000000..a9d4674c7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts @@ -0,0 +1,5 @@ +export declare function parseXML(str: string): Promise; +export declare function stringifyXML(obj: any, opts?: { + rootName?: string; +}): string; +//# sourceMappingURL=xml.browser.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts.map new file mode 100644 index 000000000..edd38ea4b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.browser.d.ts","sourceRoot":"","sources":["../../../lib/util/xml.browser.ts"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAUlD;AAgFD,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,UAIlE"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js new file mode 100644 index 000000000..b0017c499 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +var parser = new DOMParser(); +export function parseXML(str) { + try { + var dom = parser.parseFromString(str, "application/xml"); + throwIfError(dom); + var obj = domToObject(dom.childNodes[0]); + return Promise.resolve(obj); + } + catch (err) { + return Promise.reject(err); + } +} +var errorNS = ""; +try { + errorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0].namespaceURI; +} +catch (ignored) { + // Most browsers will return a document containing , but IE will throw. +} +function throwIfError(dom) { + if (errorNS) { + var parserErrors = dom.getElementsByTagNameNS(errorNS, "parsererror"); + if (parserErrors.length) { + throw new Error(parserErrors.item(0).innerHTML); + } + } +} +function isElement(node) { + return !!node.attributes; +} +/** + * Get the Element-typed version of the provided Node if the provided node is an element with + * attributes. If it isn't, then undefined is returned. + */ +function asElementWithAttributes(node) { + return isElement(node) && node.hasAttributes() ? node : undefined; +} +function domToObject(node) { + var result = {}; + var childNodeCount = node.childNodes.length; + var firstChildNode = node.childNodes[0]; + var onlyChildTextValue = (firstChildNode && childNodeCount === 1 && firstChildNode.nodeType === Node.TEXT_NODE && firstChildNode.nodeValue) || undefined; + var elementWithAttributes = asElementWithAttributes(node); + if (elementWithAttributes) { + result["$"] = {}; + for (var i = 0; i < elementWithAttributes.attributes.length; i++) { + var attr = elementWithAttributes.attributes[i]; + result["$"][attr.nodeName] = attr.nodeValue; + } + if (onlyChildTextValue) { + result["_"] = onlyChildTextValue; + } + } + else if (childNodeCount === 0) { + result = ""; + } + else if (onlyChildTextValue) { + result = onlyChildTextValue; + } + if (!onlyChildTextValue) { + for (var i = 0; i < childNodeCount; i++) { + var child = node.childNodes[i]; + // Ignore leading/trailing whitespace nodes + if (child.nodeType !== Node.TEXT_NODE) { + var childObject = domToObject(child); + if (!result[child.nodeName]) { + result[child.nodeName] = childObject; + } + else if (Array.isArray(result[child.nodeName])) { + result[child.nodeName].push(childObject); + } + else { + result[child.nodeName] = [result[child.nodeName], childObject]; + } + } + } + } + return result; +} +// tslint:disable-next-line:no-null-keyword +var doc = document.implementation.createDocument(null, null, null); +var serializer = new XMLSerializer(); +export function stringifyXML(obj, opts) { + var rootName = opts && opts.rootName || "root"; + var dom = buildNode(obj, rootName)[0]; + return '' + serializer.serializeToString(dom); +} +function buildAttributes(attrs) { + var result = []; + for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) { + var key = _a[_i]; + var attr = doc.createAttribute(key); + attr.value = attrs[key].toString(); + result.push(attr); + } + return result; +} +function buildNode(obj, elementName) { + if (typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean") { + var elem = doc.createElement(elementName); + elem.textContent = obj.toString(); + return [elem]; + } + else if (Array.isArray(obj)) { + var result = []; + for (var _i = 0, obj_1 = obj; _i < obj_1.length; _i++) { + var arrayElem = obj_1[_i]; + for (var _a = 0, _b = buildNode(arrayElem, elementName); _a < _b.length; _a++) { + var child = _b[_a]; + result.push(child); + } + } + return result; + } + else if (typeof obj === "object") { + var elem = doc.createElement(elementName); + for (var _c = 0, _d = Object.keys(obj); _c < _d.length; _c++) { + var key = _d[_c]; + if (key === "$") { + for (var _e = 0, _f = buildAttributes(obj[key]); _e < _f.length; _e++) { + var attr = _f[_e]; + elem.attributes.setNamedItem(attr); + } + } + else { + for (var _g = 0, _h = buildNode(obj[key], key); _g < _h.length; _g++) { + var child = _h[_g]; + elem.appendChild(child); + } + } + } + return [elem]; + } + else { + throw new Error("Illegal value passed to buildObject: " + obj); + } +} +//# sourceMappingURL=xml.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js.map new file mode 100644 index 000000000..35af76da5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.browser.js","sourceRoot":"","sources":["../../../lib/util/xml.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,IAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;AAC/B,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAI;QACF,IAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC3D,YAAY,CAAC,GAAG,CAAC,CAAC;QAElB,IAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;KAC7B;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KAC5B;AACH,CAAC;AAED,IAAI,OAAO,GAAG,EAAE,CAAC;AACjB,IAAI;IACF,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,YAAa,CAAC;CAC9G;AAAC,OAAO,OAAO,EAAE;IAChB,oFAAoF;CACrF;AAED,SAAS,YAAY,CAAC,GAAa;IACjC,IAAI,OAAO,EAAE;QACX,IAAM,YAAY,GAAG,GAAG,CAAC,sBAAsB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACxE,IAAI,YAAY,CAAC,MAAM,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI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C,CAAC;aACpB;SACF;QACD,OAAO,MAAM,CAAC;KACf;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAC5C,KAAkB,UAAgB,EAAhB,KAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAhB,cAAgB,EAAhB,IAAgB,EAAE;YAA/B,IAAM,GAAG,SAAA;YACZ,IAAI,GAAG,KAAK,GAAG,EAAE;gBACf,KAAmB,UAAyB,EAAzB,KAAA,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAzB,cAAyB,EAAzB,IAAyB,EAAE;oBAAzC,IAAM,IAAI,SAAA;oBACb,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;iBACpC;aACF;iBAAM;gBACL,KAAoB,UAAwB,EAAxB,KAAA,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAxB,cAAwB,EAAxB,IAAwB,EAAE;oBAAzC,IAAM,KAAK,SAAA;oBACd,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;iBACzB;aACF;SACF;QACD,OAAO,CAAC,IAAI,CAAC,CAAC;KACf;SACI;QACH,MAAM,IAAI,KAAK,CAAC,0CAAwC,GAAK,CAAC,CAAC;KAChE;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts b/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts new file mode 100644 index 000000000..3290810e7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts @@ -0,0 +1,5 @@ +export declare function stringifyXML(obj: any, opts?: { + rootName?: string; +}): string; +export declare function parseXML(str: string): Promise; +//# sourceMappingURL=xml.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts.map new file mode 100644 index 000000000..38c9adfef --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../lib/util/xml.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,UAUlE;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAmBlD"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.js b/node_modules/@azure/ms-rest-js/es/lib/util/xml.js new file mode 100644 index 000000000..c4784d48b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import * as xml2js from "xml2js"; +export function stringifyXML(obj, opts) { + var builder = new xml2js.Builder({ + explicitArray: false, + explicitCharkey: false, + rootName: (opts || {}).rootName, + renderOpts: { + pretty: false + } + }); + return builder.buildObject(obj); +} +export function parseXML(str) { + var xmlParser = new xml2js.Parser({ + explicitArray: false, + explicitCharkey: false, + explicitRoot: false + }); + return new Promise(function (resolve, reject) { + if (!str) { + reject(new Error("Document is empty")); + } + else { + xmlParser.parseString(str, function (err, res) { + if (err) { + reject(err); + } + else { + resolve(res); + } + }); + } + }); +} +//# sourceMappingURL=xml.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/util/xml.js.map b/node_modules/@azure/ms-rest-js/es/lib/util/xml.js.map new file mode 100644 index 000000000..260bb8f21 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/util/xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../../lib/util/xml.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,UAAU,YAAY,CAAC,GAAQ,EAAE,IAA4B;IACjE,IAAM,OAAO,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC;QACjC,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,KAAK;QACtB,QAAQ,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ;QAC/B,UAAU,EAAE;YACV,MAAM,EAAE,KAAK;SACd;KACF,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAM,SAAS,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC;QAClC,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,KAAK;QACtB,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;IACH,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACjC,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;SACxC;aAAM;YACL,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,UAAC,GAAW,EAAE,GAAS;gBAChD,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;qBAAM;oBACL,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts b/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts new file mode 100644 index 000000000..0878589cc --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts @@ -0,0 +1,325 @@ +/// +import { HttpHeadersLike } from "./httpHeaders"; +import { OperationSpec } from "./operationSpec"; +import { Mapper } from "./serializer"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { OperationResponse } from "./operationResponse"; +import { AgentSettings, ProxySettings } from "./serviceClient"; +export declare type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; +export declare type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream); +/** + * Fired in response to upload or download progress. + */ +export declare type TransferProgressEvent = { + /** + * The number of bytes loaded so far. + */ + loadedBytes: number; +}; +/** + * Allows the request to be aborted upon firing of the "abort" event. + * Compatible with the browser built-in AbortSignal and common polyfills. + */ +export interface AbortSignalLike { + readonly aborted: boolean; + dispatchEvent: (event: Event) => boolean; + onabort: ((this: AbortSignalLike, ev: Event) => any) | null; + addEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void; + removeEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void; +} +/** + * An abstraction over a REST call. + */ +export interface WebResourceLike { + /** + * The URL being accessed by the request. + */ + url: string; + /** + * The HTTP method to use when making the request. + */ + method: HttpMethods; + /** + * The HTTP body contents of the request. + */ + body?: any; + /** + * The HTTP headers to use when making the request. + */ + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse; + formData?: any; + /** + * A query string represented as an object. + */ + query?: { + [key: string]: any; + }; + /** + * Used to parse the response. + */ + operationSpec?: OperationSpec; + /** + * If credentials (cookies) should be sent along during an XHR. + */ + withCredentials: boolean; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout: number; + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + /** + * HTTP(S) agent configuration. + */ + agentSettings?: AgentSettings; + /** + * If the connection should be reused. + */ + keepAlive?: boolean; + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Sets options on the request. + */ + prepare(options: RequestPrepareOptions): WebResourceLike; + /** + * Clone this request object. + */ + clone(): WebResourceLike; +} +export declare function isWebResourceLike(object: any): object is WebResourceLike; +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +export declare class WebResource { + url: string; + method: HttpMethods; + body?: any; + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse); + formData?: any; + query?: { + [key: string]: any; + }; + operationSpec?: OperationSpec; + withCredentials: boolean; + timeout: number; + proxySettings?: ProxySettings; + keepAlive?: boolean; + agentSettings?: AgentSettings; + abortSignal?: AbortSignalLike; + /** Callback which fires upon upload progress. */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + constructor(url?: string, method?: HttpMethods, body?: any, query?: { + [key: string]: any; + }, headers?: { + [key: string]: any; + } | HttpHeadersLike, streamResponseBody?: boolean, withCredentials?: boolean, abortSignal?: AbortSignalLike, timeout?: number, onUploadProgress?: (progress: TransferProgressEvent) => void, onDownloadProgress?: (progress: TransferProgressEvent) => void, proxySettings?: ProxySettings, keepAlive?: boolean, agentSettings?: AgentSettings); + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + prepare(options: RequestPrepareOptions): WebResource; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + clone(): WebResource; +} +export interface RequestPrepareOptions { + /** + * The HTTP request method. Valid values are "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", + * or "PATCH". + */ + method: HttpMethods; + /** + * The request url. It may or may not have query parameters in it. Either provide the "url" or + * provide the "pathTemplate" in the options object. Both the options are mutually exclusive. + */ + url?: string; + /** + * A dictionary of query parameters to be appended to the url, where + * the "key" is the "query-parameter-name" and the "value" is the "query-parameter-value". + * The "query-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "query-parameter-value". + * Example: + * - query-parameter-value in "object" format: { "query-parameter-name": { value: "query-parameter-value", skipUrlEncoding: true } } + * - query-parameter-value in "string" format: { "query-parameter-name": "query-parameter-value"}. + * Note: "If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url. + */ + queryParameters?: { + [key: string]: any | ParameterValue; + }; + /** + * The path template of the request url. Either provide the "url" or provide the "pathTemplate" in + * the options object. Both the options are mutually exclusive. + * Example: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" + */ + pathTemplate?: string; + /** + * The base url of the request. Default value is: "https://management.azure.com". This is + * applicable only with pathTemplate. If you are providing options.url then it is expected that + * you provide the complete url. + */ + baseUrl?: string; + /** + * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate. + * Here the key is the "path-parameter-name" and the value is the "path-parameter-value". + * The "path-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "path-parameter-value". + * Example: + * - path-parameter-value in "object" format: { "path-parameter-name": { value: "path-parameter-value", skipUrlEncoding: true } } + * - path-parameter-value in "string" format: { "path-parameter-name": "path-parameter-value" }. + */ + pathParameters?: { + [key: string]: any | ParameterValue; + }; + formData?: { + [key: string]: any; + }; + /** + * A dictionary of request headers that need to be applied to the request. + * Here the key is the "header-name" and the value is the "header-value". The header-value MUST be of type string. + * - ContentType must be provided with the key name as "Content-Type". Default value "application/json; charset=utf-8". + * - "Transfer-Encoding" is set to "chunked" by default if "options.bodyIsStream" is set to true. + * - "Content-Type" is set to "application/octet-stream" by default if "options.bodyIsStream" is set to true. + * - "accept-language" by default is set to "en-US" + * - "x-ms-client-request-id" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true + */ + headers?: { + [key: string]: any; + }; + /** + * When set to true, instructs the client to not set "x-ms-client-request-id" header to a new Guid(). + */ + disableClientRequestId?: boolean; + /** + * The request body. It can be of any type. This value will be serialized if it is not a stream. + */ + body?: any; + /** + * Provides information on how to serialize the request body. + */ + serializationMapper?: Mapper; + /** + * A dictionary of mappers that may be used while [de]serialization. + */ + mappers?: { + [x: string]: any; + }; + /** + * Provides information on how to deserialize the response body. + */ + deserializationMapper?: object; + /** + * Indicates whether this method should JSON.stringify() the request body. Default value: false. + */ + disableJsonStringifyOnBody?: boolean; + /** + * Indicates whether the request body is a stream (useful for file upload scenarios). + */ + bodyIsStream?: boolean; + abortSignal?: AbortSignalLike; + onUploadProgress?: (progress: TransferProgressEvent) => void; + onDownloadProgress?: (progress: TransferProgressEvent) => void; +} +/** + * The Parameter value provided for path or query parameters in RequestPrepareOptions + */ +export interface ParameterValue { + value: any; + skipUrlEncoding: boolean; + [key: string]: any; +} +/** + * Describes the base structure of the options object that will be used in every operation. + */ +export interface RequestOptionsBase { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + [key: string]: any; +} +//# sourceMappingURL=webResource.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts.map new file mode 100644 index 000000000..14d663ad4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/webResource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webResource.d.ts","sourceRoot":"","sources":["../../lib/webResource.ts"],"names":[],"mappings":";AAGA,OAAO,EAAe,eAAe,EAAqB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAc,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE/D,oBAAY,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SA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AC/B;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7D,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,GAAG,CAAC;IACX,eAAe,EAAE,OAAO,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE/D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/webResource.js b/node_modules/@azure/ms-rest-js/es/lib/webResource.js new file mode 100644 index 000000000..c697bfeb6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/webResource.js @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpHeaders, isHttpHeadersLike } from "./httpHeaders"; +import { Serializer } from "./serializer"; +import { generateUuid } from "./util/utils"; +export function isWebResourceLike(object) { + if (typeof object !== "object") { + return false; + } + if (typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function") { + return true; + } + return false; +} +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +var WebResource = /** @class */ (function () { + function WebResource(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, agentSettings) { + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers)); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.agentSettings = agentSettings; + } + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + WebResource.prototype.validateRequestProperties = function () { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + }; + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + WebResource.prototype.prepare = function (options) { + if (!options) { + throw new Error("options object is required"); + } + if (options.method == undefined || typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && (options.url == undefined || typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error("options.url must be of type \"string\"."); + } + this.url = options.url; + } + // set the method + if (options.method) { + var validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error("The provided method \"" + options.method + "\" is invalid. Supported HTTP methods are: " + JSON.stringify(validMethods)); + } + } + this.method = options.method.toUpperCase(); + // construct the url if path template is provided + if (options.pathTemplate) { + var pathTemplate_1 = options.pathTemplate, pathParameters_1 = options.pathParameters; + if (typeof pathTemplate_1 !== "string") { + throw new Error("options.pathTemplate must be of type \"string\"."); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + var baseUrl = options.baseUrl; + var url_1 = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + (pathTemplate_1.startsWith("/") ? pathTemplate_1.slice(1) : pathTemplate_1); + var segments = url_1.match(/({\w*\s*\w*})/ig); + if (segments && segments.length) { + if (!pathParameters_1) { + throw new Error("pathTemplate: " + pathTemplate_1 + " has been provided. Hence, options.pathParameters must also be provided."); + } + segments.forEach(function (item) { + var pathParamName = item.slice(1, -1); + var pathParam = pathParameters_1[pathParamName]; + if (pathParam === null || pathParam === undefined || !(typeof pathParam === "string" || typeof pathParam === "object")) { + throw new Error("pathTemplate: " + pathTemplate_1 + " contains the path parameter " + pathParamName + + (" however, it is not present in " + pathParameters_1 + " - " + JSON.stringify(pathParameters_1, undefined, 2) + ".") + + ("The value of the path parameter can either be a \"string\" of the form { " + pathParamName + ": \"some sample value\" } or ") + + ("it can be an \"object\" of the form { \"" + pathParamName + "\": { value: \"some sample value\", skipUrlEncoding: true } }.")); + } + if (typeof pathParam.valueOf() === "string") { + url_1 = url_1.replace(item, encodeURIComponent(pathParam)); + } + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error("options.pathParameters[" + pathParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (pathParam.skipUrlEncoding) { + url_1 = url_1.replace(item, pathParam.value); + } + else { + url_1 = url_1.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url_1; + } + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + var queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error("options.queryParameters must be of type object. It should be a JSON object " + + "of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. " + + "The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }."); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + var queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (var queryParamName in queryParameters) { + var queryParam = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error("options.queryParameters[" + queryParamName + "] is of type \"object\" but it does not contain a \"value\" property."); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } + else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + } // end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + // add headers to the request if they are provided + if (options.headers) { + var headers = options.headers; + for (var _i = 0, _a = Object.keys(options.headers); _i < _a.length; _i++) { + var headerName = _a[_i]; + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", generateUuid()); + } + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body != undefined) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } + else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + return this; + }; + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + WebResource.prototype.clone = function () { + var result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.agentSettings); + if (this.formData) { + result.formData = this.formData; + } + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + return result; + }; + return WebResource; +}()); +export { WebResource }; +//# sourceMappingURL=webResource.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/webResource.js.map b/node_modules/@azure/ms-rest-js/es/lib/webResource.js.map new file mode 100644 index 000000000..2ce03bd29 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/webResource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webResource.js","sourceRoot":"","sources":["../../lib/webResource.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;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I,CAAC,uBAAuB,CAAC;SAC/D;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,kBAAC;AAAD,CAAC,AA1SD,IA0SC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts new file mode 100644 index 000000000..8a823d699 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts @@ -0,0 +1,12 @@ +import { HttpClient } from "./httpClient"; +import { HttpHeaders } from "./httpHeaders"; +import { WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +export declare class XhrHttpClient implements HttpClient { + sendRequest(request: WebResourceLike): Promise; +} +export declare function parseHeaders(xhr: XMLHttpRequest): HttpHeaders; +//# sourceMappingURL=xhrHttpClient.d.ts.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts.map b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts.map new file mode 100644 index 000000000..55048602c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xhrHttpClient.d.ts","sourceRoot":"","sources":["../../lib/xhrHttpClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAyB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH,qBAAa,aAAc,YAAW,UAAU;IACvC,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAqG7E;AAWD,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,eAU/C"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js new file mode 100644 index 000000000..c66a7448e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpHeaders } from "./httpHeaders"; +import { RestError } from "./restError"; +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +var XhrHttpClient = /** @class */ (function () { + function XhrHttpClient() { + } + XhrHttpClient.prototype.sendRequest = function (request) { + var xhr = new XMLHttpRequest(); + if (request.agentSettings) { + throw new Error("HTTP agent settings not supported in browser environment"); + } + if (request.proxySettings) { + throw new Error("HTTP proxy is not supported in browser environment"); + } + var abortSignal = request.abortSignal; + if (abortSignal) { + var listener_1 = function () { + xhr.abort(); + }; + abortSignal.addEventListener("abort", listener_1); + xhr.addEventListener("readystatechange", function () { + if (xhr.readyState === XMLHttpRequest.DONE) { + abortSignal.removeEventListener("abort", listener_1); + } + }); + } + addProgressListener(xhr.upload, request.onUploadProgress); + addProgressListener(xhr, request.onDownloadProgress); + if (request.formData) { + var formData = request.formData; + var requestForm_1 = new FormData(); + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm_1.append(key, value.value, value.options); + } + else { + requestForm_1.append(key, value); + } + }; + for (var _i = 0, _a = Object.keys(formData); _i < _a.length; _i++) { + var formKey = _a[_i]; + var formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } + else { + appendFormValue(formKey, formValue); + } + } + request.body = requestForm_1; + request.formData = undefined; + var contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + // browser will automatically apply a suitable content-type header + request.headers.remove("Content-Type"); + } + } + xhr.open(request.method, request.url); + xhr.timeout = request.timeout; + xhr.withCredentials = request.withCredentials; + for (var _b = 0, _c = request.headers.headersArray(); _b < _c.length; _b++) { + var header = _c[_b]; + xhr.setRequestHeader(header.name, header.value); + } + xhr.responseType = request.streamResponseBody ? "blob" : "text"; + // tslint:disable-next-line:no-null-keyword + xhr.send(request.body === undefined ? null : request.body); + if (request.streamResponseBody) { + return new Promise(function (resolve, reject) { + xhr.addEventListener("readystatechange", function () { + // Resolve as soon as headers are loaded + if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { + var blobBody = new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { + resolve(xhr.response); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + blobBody: blobBody + }); + } + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + else { + return new Promise(function (resolve, reject) { + xhr.addEventListener("load", function () { return resolve({ + request: request, + status: xhr.status, + headers: parseHeaders(xhr), + bodyAsText: xhr.responseText + }); }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + }; + return XhrHttpClient; +}()); +export { XhrHttpClient }; +function addProgressListener(xhr, listener) { + if (listener) { + xhr.addEventListener("progress", function (rawEvent) { return listener({ + loadedBytes: rawEvent.loaded + }); }); + } +} +// exported locally for testing +export function parseHeaders(xhr) { + var responseHeaders = new HttpHeaders(); + var headerLines = xhr.getAllResponseHeaders().trim().split(/[\r\n]+/); + for (var _i = 0, headerLines_1 = headerLines; _i < headerLines_1.length; _i++) { + var line = headerLines_1[_i]; + var index = line.indexOf(":"); + var headerName = line.slice(0, index); + var headerValue = line.slice(index + 2); + responseHeaders.set(headerName, headerValue); + } + return responseHeaders; +} +function rejectOnTerminalEvent(request, xhr, reject) { + xhr.addEventListener("error", function () { return reject(new RestError("Failed to send request to " + request.url, RestError.REQUEST_SEND_ERROR, undefined, request)); }); + xhr.addEventListener("abort", function () { return reject(new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, request)); }); + xhr.addEventListener("timeout", function () { return reject(new RestError("timeout of " + xhr.timeout + "ms exceeded", RestError.REQUEST_SEND_ERROR, undefined, request)); }); +} +//# sourceMappingURL=xhrHttpClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js.map b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js.map new file mode 100644 index 000000000..b8ef7f2ef --- /dev/null +++ b/node_modules/@azure/ms-rest-js/es/lib/xhrHttpClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xhrHttpClient.js","sourceRoot":"","sources":["../../lib/xhrHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH;IAAA;IAsGA,CAAC;IArGQ,mCAAW,GAAlB,UAAmB,OAAwB;QACzC,IAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QAEjC,IAAI,OAAO,CAAC,aAAa,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;SAC7E;QAED,IAAI,OAAO,CAAC,aAAa,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACvE;QAED,IAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACxC,IAAI,WAAW,EAAE;YACf,IAAM,UAAQ,GAAG;gBACf,GAAG,CAAC,KAAK,EAAE,CAAC;YACd,CAAC,CAAC;YACF,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAQ,CAAC,CAAC;YAChD,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;gBACvC,IAAI,GAAG,CAAC,UAAU,KAAK,cAAc,CAAC,IAAI,EAAE;oBAC1C,WAAW,CAAC,mBAAmB,CAAC,O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EAA/G,CAA+G,CAAC,CAAC;AACzJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/browserFetchHttpClient.ts b/node_modules/@azure/ms-rest-js/lib/browserFetchHttpClient.ts new file mode 100644 index 000000000..22271e225 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/browserFetchHttpClient.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { FetchHttpClient } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; + +export class BrowserFetchHttpClient extends FetchHttpClient { + prepareRequest(_httpRequest: WebResourceLike): Promise> { + return Promise.resolve({}); + } + + processRequest(_operationResponse: HttpOperationResponse): Promise { + return Promise.resolve(); + } + + fetch(input: RequestInfo, init?: RequestInit): Promise { + return fetch(input, init); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/apiKeyCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/apiKeyCredentials.ts new file mode 100644 index 000000000..e433c53cf --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/apiKeyCredentials.ts @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpHeaders } from "../httpHeaders"; +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; + +/** + * @interface ApiKeyCredentialOptions + * Describes the options to be provided while creating an instance of ApiKeyCredentials + */ +export interface ApiKeyCredentialOptions { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + inHeader?: { [x: string]: any }; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + inQuery?: { [x: string]: any }; +} + +/** + * Authenticates to a service using an API key. + */ +export class ApiKeyCredentials implements ServiceClientCredentials { + /** + * A key value pair of the header parameters that need to be applied to the request. + */ + private readonly inHeader?: { [x: string]: any }; + /** + * A key value pair of the query parameters that need to be applied to the request. + */ + private readonly inQuery?: { [x: string]: any }; + + /** + * @constructor + * @param {object} options Specifies the options to be provided for auth. Either header or query needs to be provided. + */ + constructor(options: ApiKeyCredentialOptions) { + if (!options || (options && !options.inHeader && !options.inQuery)) { + throw new Error(`options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.`); + } + this.inHeader = options.inHeader; + this.inQuery = options.inQuery; + } + + /** + * Signs a request with the values provided in the inHeader and inQuery parameter. + * + * @param {WebResource} webResource The WebResource to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike): Promise { + if (!webResource) { + return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type "object".`)); + } + + if (this.inHeader) { + if (!webResource.headers) { + webResource.headers = new HttpHeaders(); + } + for (const headerName in this.inHeader) { + webResource.headers.set(headerName, this.inHeader[headerName]); + } + } + + if (this.inQuery) { + if (!webResource.url) { + return Promise.reject(new Error(`url cannot be null in the request object.`)); + } + if (webResource.url.indexOf("?") < 0) { + webResource.url += "?"; + } + for (const key in this.inQuery) { + if (!webResource.url.endsWith("?")) { + webResource.url += "&"; + } + webResource.url += `${key}=${this.inQuery[key]}`; + } + } + + return Promise.resolve(webResource); + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/basicAuthenticationCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/basicAuthenticationCredentials.ts new file mode 100644 index 000000000..3fd2c9de8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/basicAuthenticationCredentials.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpHeaders } from "../httpHeaders"; +import * as base64 from "../util/base64"; +import { Constants } from "../util/constants"; +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; +const HeaderConstants = Constants.HeaderConstants; +const DEFAULT_AUTHORIZATION_SCHEME = "Basic"; + +export class BasicAuthenticationCredentials implements ServiceClientCredentials { + userName: string; + password: string; + authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME; + + /** + * Creates a new BasicAuthenticationCredentials object. + * + * @constructor + * @param {string} userName User name. + * @param {string} password Password. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(userName: string, password: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) { + if (userName === null || userName === undefined || typeof userName.valueOf() !== "string") { + throw new Error("userName cannot be null or undefined and must be of type string."); + } + if (password === null || password === undefined || typeof password.valueOf() !== "string") { + throw new Error("password cannot be null or undefined and must be of type string."); + } + this.userName = userName; + this.password = password; + this.authorizationScheme = authorizationScheme; + } + + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @returns {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike) { + const credentials = `${this.userName}:${this.password}`; + const encodedCredentials = `${this.authorizationScheme} ${base64.encodeString(credentials)}`; + if (!webResource.headers) webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials); + return Promise.resolve(webResource); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/credentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/credentials.ts new file mode 100644 index 000000000..7e9096bb3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/credentials.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export type Authenticator = (challenge: object) => Promise; diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/domainCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/domainCredentials.ts new file mode 100644 index 000000000..95a8e78f8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/domainCredentials.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { ApiKeyCredentials, ApiKeyCredentialOptions } from "./apiKeyCredentials"; + +export class DomainCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid DomainCredentials object. + * + * @constructor + * @param {string} domainKey The EventGrid domain key + */ + constructor(domainKey: string) { + if (!domainKey || (domainKey && typeof domainKey !== "string")) { + throw new Error("domainKey cannot be null or undefined and must be of type string."); + } + const options: ApiKeyCredentialOptions = { + inHeader: { + "aeg-sas-key": domainKey + } + }; + super(options); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/serviceClientCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/serviceClientCredentials.ts new file mode 100644 index 000000000..9a0247da0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/serviceClientCredentials.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { WebResourceLike } from "../webResource"; + +export interface ServiceClientCredentials { + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike/request to be signed. + * @returns {Promise} The signed request object; + */ + signRequest(webResource: WebResourceLike): Promise; +} diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/tokenCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/tokenCredentials.ts new file mode 100644 index 000000000..f7a938efa --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/tokenCredentials.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpHeaders } from "../httpHeaders"; +import { Constants } from "../util/constants"; +import { WebResourceLike } from "../webResource"; +import { ServiceClientCredentials } from "./serviceClientCredentials"; + +const HeaderConstants = Constants.HeaderConstants; +const DEFAULT_AUTHORIZATION_SCHEME = "Bearer"; + +/** + * A credentials object that uses a token string and a authorzation scheme to authenticate. + */ +export class TokenCredentials implements ServiceClientCredentials { + token: string; + authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME; + + /** + * Creates a new TokenCredentials object. + * + * @constructor + * @param {string} token The token. + * @param {string} [authorizationScheme] The authorization scheme. + */ + constructor(token: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) { + if (!token) { + throw new Error("token cannot be null or undefined."); + } + this.token = token; + this.authorizationScheme = authorizationScheme; + } + + /** + * Signs a request with the Authentication header. + * + * @param {WebResourceLike} webResource The WebResourceLike to be signed. + * @return {Promise} The signed request object. + */ + signRequest(webResource: WebResourceLike) { + if (!webResource.headers) webResource.headers = new HttpHeaders(); + webResource.headers.set(HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`); + return Promise.resolve(webResource); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/credentials/topicCredentials.ts b/node_modules/@azure/ms-rest-js/lib/credentials/topicCredentials.ts new file mode 100644 index 000000000..66e22fdd4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/credentials/topicCredentials.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { ApiKeyCredentials, ApiKeyCredentialOptions } from "./apiKeyCredentials"; + +export class TopicCredentials extends ApiKeyCredentials { + /** + * Creates a new EventGrid TopicCredentials object. + * + * @constructor + * @param {string} topicKey The EventGrid topic key + */ + constructor(topicKey: string) { + if (!topicKey || (topicKey && typeof topicKey !== "string")) { + throw new Error("topicKey cannot be null or undefined and must be of type string."); + } + const options: ApiKeyCredentialOptions = { + inHeader: { + "aeg-sas-key": topicKey + } + }; + super(options); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.browser.ts b/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.browser.ts new file mode 100644 index 000000000..5ac7a79d6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.browser.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient"; diff --git a/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.ts b/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.ts new file mode 100644 index 000000000..2f1c29dc6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/defaultHttpClient.ts @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient"; diff --git a/node_modules/@azure/ms-rest-js/lib/fetchHttpClient.ts b/node_modules/@azure/ms-rest-js/lib/fetchHttpClient.ts new file mode 100644 index 000000000..ef5ad003d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/fetchHttpClient.ts @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import AbortController from "abort-controller"; +import FormData from "form-data"; + +import { HttpClient } from "./httpClient"; +import { WebResourceLike } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { HttpHeaders, HttpHeadersLike } from "./httpHeaders"; +import { RestError } from "./restError"; +import { Readable, Transform } from "stream"; + +interface FetchError extends Error { + code?: string; + errno?: string; + type?: string; +} + +export abstract class FetchHttpClient implements HttpClient { + async sendRequest(httpRequest: WebResourceLike): Promise { + if (!httpRequest && typeof httpRequest !== "object") { + throw new Error("'httpRequest' (WebResource) cannot be null or undefined and must be of type object."); + } + + const abortController = new AbortController(); + if (httpRequest.abortSignal) { + if (httpRequest.abortSignal.aborted) { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + + httpRequest.abortSignal.addEventListener("abort", (event: Event) => { + if (event.type === "abort") { + abortController.abort(); + } + }); + } + + if (httpRequest.timeout) { + setTimeout(() => { + abortController.abort(); + }, httpRequest.timeout); + } + + if (httpRequest.formData) { + const formData: any = httpRequest.formData; + const requestForm = new FormData(); + const appendFormValue = (key: string, value: any) => { + // value function probably returns a stream so we can provide a fresh stream on each retry + if (typeof value === "function") { + value = value(); + } + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm.append(key, value.value, value.options); + } else { + requestForm.append(key, value); + } + }; + for (const formKey of Object.keys(formData)) { + const formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (let j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } else { + appendFormValue(formKey, formValue); + } + } + + httpRequest.body = requestForm; + httpRequest.formData = undefined; + const contentType = httpRequest.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + if (typeof requestForm.getBoundary === "function") { + httpRequest.headers.set("Content-Type", `multipart/form-data; boundary=${requestForm.getBoundary()}`); + } else { + // browser will automatically apply a suitable content-type header + httpRequest.headers.remove("Content-Type"); + } + } + } + + let body = httpRequest.body + ? (typeof httpRequest.body === "function" ? httpRequest.body() : httpRequest.body) + : undefined; + if (httpRequest.onUploadProgress && httpRequest.body) { + let loadedBytes = 0; + const uploadReportStream = new Transform({ + transform: (chunk: string | Buffer, _encoding, callback) => { + loadedBytes += chunk.length; + httpRequest.onUploadProgress!({ loadedBytes }); + callback(undefined, chunk); + } + }); + + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + + body = uploadReportStream; + } + + const platformSpecificRequestInit: Partial = await this.prepareRequest(httpRequest); + + const requestInit: RequestInit = { + body: body, + headers: httpRequest.headers.rawHeaders(), + method: httpRequest.method, + signal: abortController.signal, + ...platformSpecificRequestInit + }; + + try { + const response: Response = await this.fetch(httpRequest.url, requestInit); + + const headers = parseHeaders(response.headers); + const operationResponse: HttpOperationResponse = { + headers: headers, + request: httpRequest, + status: response.status, + readableStreamBody: httpRequest.streamResponseBody ? (response.body as unknown) as NodeJS.ReadableStream : undefined, + bodyAsText: !httpRequest.streamResponseBody ? await response.text() : undefined, + }; + + const onDownloadProgress = httpRequest.onDownloadProgress; + if (onDownloadProgress) { + const responseBody: ReadableStream | undefined = response.body || undefined; + + if (isReadableStream(responseBody)) { + let loadedBytes = 0; + const downloadReportStream = new Transform({ + transform: (chunk: string | Buffer, _encoding, callback) => { + loadedBytes += chunk.length; + onDownloadProgress({ loadedBytes }); + callback(undefined, chunk); + } + }); + responseBody.pipe(downloadReportStream); + operationResponse.readableStreamBody = downloadReportStream; + } else { + const length = parseInt(headers.get("Content-Length")!) || undefined; + if (length) { + // Calling callback for non-stream response for consistency with browser + onDownloadProgress({ loadedBytes: length }); + } + } + } + + await this.processRequest(operationResponse); + + return operationResponse; + } catch (error) { + const fetchError: FetchError = error; + if (fetchError.code === "ENOTFOUND") { + throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest); + } else if (fetchError.type === "aborted") { + throw new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, httpRequest); + } + + throw fetchError; + } finally { + } + } + + abstract async prepareRequest(httpRequest: WebResourceLike): Promise>; + abstract async processRequest(operationResponse: HttpOperationResponse): Promise; + abstract async fetch(input: RequestInfo, init?: RequestInit): Promise; +} + +function isReadableStream(body: any): body is Readable { + return body && typeof body.pipe === "function"; +} + +export function parseHeaders(headers: Headers): HttpHeadersLike { + const httpHeaders = new HttpHeaders(); + + headers.forEach((value, key) => { + httpHeaders.set(key, value); + }); + + return httpHeaders; +} diff --git a/node_modules/@azure/ms-rest-js/lib/httpClient.ts b/node_modules/@azure/ms-rest-js/lib/httpClient.ts new file mode 100644 index 000000000..47357ec33 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/httpClient.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { RequestPolicy } from "./policies/requestPolicy"; + +/** + * An interface that can send HttpRequests and receive promised HttpResponses. + */ +export interface HttpClient extends RequestPolicy { +} diff --git a/node_modules/@azure/ms-rest-js/lib/httpHeaders.ts b/node_modules/@azure/ms-rest-js/lib/httpHeaders.ts new file mode 100644 index 000000000..80ce1818a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/httpHeaders.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName: string) { + return headerName.toLowerCase(); +} + +/** + * An individual header within a HttpHeaders collection. + */ +export interface HttpHeader { + /** + * The name of the header. + */ + name: string; + + /** + * The value of the header. + */ + value: string; +} + +/** + * A HttpHeaders collection represented as a simple JSON object. + */ +export type RawHttpHeaders = { [headerName: string]: string }; + +/** + * A collection of HTTP header key/value pairs. + */ +export interface HttpHeadersLike { + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + set(headerName: string, headerValue: string | number): void; + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + get(headerName: string): string | undefined; + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName: string): boolean; + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + remove(headerName: string): boolean; + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders(): RawHttpHeaders; + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray(): HttpHeader[]; + /** + * Get the header names that are contained in this collection. + */ + headerNames(): string[]; + /** + * Get the header values that are contained in this collection. + */ + headerValues(): string[]; + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone(): HttpHeadersLike; + /** + * Get the JSON object representation of this HTTP header collection. + * The result is the same as `rawHeaders()`. + */ + toJson(): RawHttpHeaders; +} + +export function isHttpHeadersLike(object?: any): object is HttpHeadersLike { + if (!object || typeof object !== "object") { + return false; + } + + if ( + typeof object.rawHeaders === "function" && + typeof object.clone === "function" && + typeof object.get === "function" && + typeof object.set === "function" && + typeof object.contains === "function" && + typeof object.remove === "function" && + typeof object.headersArray === "function" && + typeof object.headerValues === "function" && + typeof object.headerNames === "function" && + typeof object.toJson === "function" + ) { + return true; + } + return false; +} + +/** + * A collection of HTTP header key/value pairs. + */ +export class HttpHeaders { + private readonly _headersMap: { [headerKey: string]: HttpHeader }; + + constructor(rawHeaders?: RawHttpHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (const headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName The name of the header to set. This value is case-insensitive. + * @param headerValue The value of the header to set. + */ + public set(headerName: string, headerValue: string | number): void { + this._headersMap[getHeaderKey(headerName)] = { name: headerName, value: headerValue.toString() }; + } + + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName The name of the header. + */ + public get(headerName: string): string | undefined { + const header: HttpHeader = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + } + + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + public contains(headerName: string): boolean { + return !!this._headersMap[getHeaderKey(headerName)]; + } + + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName The name of the header to remove. + */ + public remove(headerName: string): boolean { + const result: boolean = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + } + + /** + * Get the headers that are contained this collection as an object. + */ + public rawHeaders(): RawHttpHeaders { + const result: RawHttpHeaders = {}; + for (const headerKey in this._headersMap) { + const header: HttpHeader = this._headersMap[headerKey]; + result[header.name.toLowerCase()] = header.value; + } + return result; + } + + /** + * Get the headers that are contained in this collection as an array. + */ + public headersArray(): HttpHeader[] { + const headers: HttpHeader[] = []; + for (const headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + } + + /** + * Get the header names that are contained in this collection. + */ + public headerNames(): string[] { + const headerNames: string[] = []; + const headers: HttpHeader[] = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + } + + /** + * Get the header names that are contained in this collection. + */ + public headerValues(): string[] { + const headerValues: string[] = []; + const headers: HttpHeader[] = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + } + + /** + * Get the JSON object representation of this HTTP header collection. + */ + public toJson(): RawHttpHeaders { + return this.rawHeaders(); + } + + /** + * Get the string representation of this HTTP header collection. + */ + public toString(): string { + return JSON.stringify(this.toJson()); + } + + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + public clone(): HttpHeaders { + return new HttpHeaders(this.rawHeaders()); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/httpOperationResponse.ts b/node_modules/@azure/ms-rest-js/lib/httpOperationResponse.ts new file mode 100644 index 000000000..61944305a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/httpOperationResponse.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { WebResourceLike } from "./webResource"; +import { HttpHeadersLike } from "./httpHeaders"; + +/** + * The properties on an HTTP response which will always be present. + */ +export interface HttpResponse { + /** + * The raw request + */ + request: WebResourceLike; + + /** + * The HTTP response status (e.g. 200) + */ + status: number; + + /** + * The HTTP response headers. + */ + headers: HttpHeadersLike; +} + +declare global { + /** + * Stub declaration of the browser-only Blob type. + * Full type information can be obtained by including "lib": ["dom"] in tsconfig.json. + */ + interface Blob {} +} + +/** + * Wrapper object for http request and response. Deserialized object is stored in + * the `parsedBody` property when the response body is received in JSON or XML. + */ +export interface HttpOperationResponse extends HttpResponse { + /** + * The parsed HTTP response headers. + */ + parsedHeaders?: { [key: string]: any }; + + /** + * The response body as text (string format) + */ + bodyAsText?: string | null; + + /** + * The response body as parsed JSON or XML + */ + parsedBody?: any; + + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; +} + +/** + * The flattened response to a REST call. + * Contains the underlying HttpOperationResponse as well as + * the merged properties of the parsedBody, parsedHeaders, etc. + */ +export interface RestResponse { + /** + * The underlying HTTP response containing both raw and deserialized response data. + */ + _response: HttpOperationResponse; + + [key: string]: any; +} diff --git a/node_modules/@azure/ms-rest-js/lib/httpPipelineLogLevel.ts b/node_modules/@azure/ms-rest-js/lib/httpPipelineLogLevel.ts new file mode 100644 index 000000000..045be5bb2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/httpPipelineLogLevel.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/** + * The different levels of logs that can be used with the HttpPipelineLogger. + */ +export enum HttpPipelineLogLevel { + /** + * A log level that indicates that no logs will be logged. + */ + OFF, + + /** + * An error log. + */ + ERROR, + + /** + * A warning log. + */ + WARNING, + + /** + * An information log. + */ + INFO +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/httpPipelineLogger.ts b/node_modules/@azure/ms-rest-js/lib/httpPipelineLogger.ts new file mode 100644 index 000000000..ffec883fc --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/httpPipelineLogger.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; + +/** + * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages + * that can be used for debugging purposes. + */ +export interface HttpPipelineLogger { + /** + * The log level threshold for what logs will be logged. + */ + minimumLogLevel: HttpPipelineLogLevel; + + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} + +/** + * A HttpPipelineLogger that will send its logs to the console. + */ +export class ConsoleHttpPipelineLogger implements HttpPipelineLogger { + /** + * Create a new ConsoleHttpPipelineLogger. + * @param minimumLogLevel The log level threshold for what logs will be logged. + */ + constructor(public minimumLogLevel: HttpPipelineLogLevel) { + } + + /** + * Log the provided message. + * @param logLevel The HttpLogDetailLevel associated with this message. + * @param message The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void { + const logMessage = `${HttpPipelineLogLevel[logLevel]}: ${message}`; + switch (logLevel) { + case HttpPipelineLogLevel.ERROR: + console.error(logMessage); + break; + + case HttpPipelineLogLevel.WARNING: + console.warn(logMessage); + break; + + case HttpPipelineLogLevel.INFO: + console.log(logMessage); + break; + } + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/msRest.ts b/node_modules/@azure/ms-rest-js/lib/msRest.ts new file mode 100644 index 000000000..41c47124d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/msRest.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export { WebResource, WebResourceLike, HttpRequestBody, RequestPrepareOptions, HttpMethods, ParameterValue, RequestOptionsBase, TransferProgressEvent, AbortSignalLike } from "./webResource"; +export { DefaultHttpClient } from "./defaultHttpClient"; +export { HttpClient } from "./httpClient"; +export { HttpHeaders, HttpHeadersLike } from "./httpHeaders"; +export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse"; +export { HttpPipelineLogger } from "./httpPipelineLogger"; +export { HttpPipelineLogLevel } from "./httpPipelineLogLevel"; +export { RestError } from "./restError"; +export { OperationArguments } from "./operationArguments"; +export { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +export { OperationResponse } from "./operationResponse"; +export { OperationSpec } from "./operationSpec"; +export { ServiceClient, ServiceClientOptions, flattenResponse } from "./serviceClient"; +export { QueryCollectionFormat } from "./queryCollectionFormat"; +export { Constants } from "./util/constants"; +export { logPolicy } from "./policies/logPolicy"; +export { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from "./policies/requestPolicy"; +export { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +export { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy"; +export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +export { agentPolicy } from "./policies/agentPolicy"; +export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy"; +export { redirectPolicy } from "./policies/redirectPolicy"; +export { signingPolicy } from "./policies/signingPolicy"; +export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy"; +export { + MapperType, SimpleMapperType, CompositeMapperType, DictionaryMapperType, SequenceMapperType, EnumMapperType, + Mapper, BaseMapper, CompositeMapper, SequenceMapper, DictionaryMapper, EnumMapper, + MapperConstraints, PolymorphicDiscriminator, + Serializer, UrlParameterValue, serializeObject +} from "./serializer"; +export { + stripRequest, stripResponse, delay, + executePromisesSequentially, generateUuid, encodeUri, ServiceCallback, + promiseToCallback, promiseToServiceCallback, isValidUuid, + applyMixins, isNode, isDuration +} from "./util/utils"; +export { URLBuilder, URLQuery } from "./url"; + +// Credentials +export { TokenCredentials } from "./credentials/tokenCredentials"; +export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials"; +export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials"; +export { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +export { TopicCredentials } from "./credentials/topicCredentials"; +export { DomainCredentials } from "./credentials/domainCredentials"; +export { Authenticator } from "./credentials/credentials"; diff --git a/node_modules/@azure/ms-rest-js/lib/nodeFetchHttpClient.ts b/node_modules/@azure/ms-rest-js/lib/nodeFetchHttpClient.ts new file mode 100644 index 000000000..56f35087f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/nodeFetchHttpClient.ts @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import * as tough from "tough-cookie"; +import * as http from "http"; +import * as https from "https"; +import "node-fetch"; + +import { FetchHttpClient } from "./fetchHttpClient"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; +import { createProxyAgent, ProxyAgent } from "./proxyAgent"; + +interface GlobalWithFetch extends NodeJS.Global { + fetch: (input: RequestInfo, init?: RequestInit) => Promise; +} + +const globalWithFetch = global as GlobalWithFetch; +if (typeof globalWithFetch.fetch !== "function") { + const fetch = require("node-fetch").default; + globalWithFetch.fetch = fetch; +} + + +export class NodeFetchHttpClient extends FetchHttpClient { + private readonly cookieJar = new tough.CookieJar(undefined, { looseMode: true }); + + async fetch(input: RequestInfo, init?: RequestInit): Promise { + return fetch(input, init); + } + + async prepareRequest(httpRequest: WebResourceLike): Promise> { + const requestInit: Partial = {}; + + if (this.cookieJar && !httpRequest.headers.get("Cookie")) { + const cookieString = await new Promise((resolve, reject) => { + this.cookieJar!.getCookieString(httpRequest.url, (err, cookie) => { + if (err) { + reject(err); + } else { + resolve(cookie); + } + }); + }); + + httpRequest.headers.set("Cookie", cookieString); + } + + if (httpRequest.agentSettings) { + const {http: httpAgent, https: httpsAgent} = httpRequest.agentSettings; + if (httpsAgent && httpRequest.url.startsWith("https")) { + requestInit.agent = httpsAgent; + } else if (httpAgent) { + requestInit.agent = httpAgent; + } + } else if (httpRequest.proxySettings) { + const tunnel: ProxyAgent = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers); + requestInit.agent = tunnel.agent; + } + + if (httpRequest.keepAlive === true) { + if (requestInit.agent) { + requestInit.agent.keepAlive = true; + } else { + const options: http.AgentOptions | https.AgentOptions = { keepAlive: true }; + const agent = httpRequest.url.startsWith("https") ? new https.Agent(options) : new http.Agent(options); + requestInit.agent = agent; + } + } + + return requestInit; + } + + async processRequest(operationResponse: HttpOperationResponse): Promise { + if (this.cookieJar) { + const setCookieHeader = operationResponse.headers.get("Set-Cookie"); + if (setCookieHeader != undefined) { + await new Promise((resolve, reject) => { + this.cookieJar!.setCookie( + setCookieHeader, + operationResponse.request.url, + { ignoreError: true }, + err => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + } + } + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/operationArguments.ts b/node_modules/@azure/ms-rest-js/lib/operationArguments.ts new file mode 100644 index 000000000..b3420a40d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/operationArguments.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { RequestOptionsBase } from "./webResource"; + +/** + * A collection of properties that apply to a single invocation of an operation. + */ +export interface OperationArguments { + /** + * The parameters that were passed to the operation method. + */ + [parameterName: string]: any; + + /** + * The optional arugments that are provided to an operation. + */ + options?: RequestOptionsBase; +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/operationParameter.ts b/node_modules/@azure/ms-rest-js/lib/operationParameter.ts new file mode 100644 index 000000000..f99c69ac6 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/operationParameter.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { Mapper } from "./serializer"; + +export type ParameterPath = string | string[] | { [propertyName: string]: ParameterPath }; + +/** + * A common interface that all Operation parameter's extend. + */ +export interface OperationParameter { + /** + * The path to this parameter's value in OperationArguments or the object that contains paths for + * each property's value in OperationArguments. + */ + parameterPath: ParameterPath; + + /** + * The mapper that defines how to validate and serialize this parameter's value. + */ + mapper: Mapper; +} + +/** + * A parameter for an operation that will be substituted into the operation's request URL. + */ +export interface OperationURLParameter extends OperationParameter { + /** + * Whether or not to skip encoding the URL parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; +} + +/** + * A parameter for an operation that will be added as a query parameter to the operation's HTTP + * request. + */ +export interface OperationQueryParameter extends OperationParameter { + /** + * Whether or not to skip encoding the query parameter's value before adding it to the URL. + */ + skipEncoding?: boolean; + + /** + * If this query parameter's value is a collection, what type of format should the value be + * converted to. + */ + collectionFormat?: QueryCollectionFormat; +} + +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + */ +export function getPathStringFromParameter(parameter: OperationParameter): string { + return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper); +} + +export function getPathStringFromParameterPath(parameterPath: ParameterPath, mapper: Mapper): string { + let result: string; + if (typeof parameterPath === "string") { + result = parameterPath; + } else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } else { + result = mapper.serializedName!; + } + return result; +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/operationResponse.ts b/node_modules/@azure/ms-rest-js/lib/operationResponse.ts new file mode 100644 index 000000000..a3576eb84 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/operationResponse.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { Mapper } from "./serializer"; + +/** + * An OperationResponse that can be returned from an operation request for a single status code. + */ +export interface OperationResponse { + /** + * The mapper that will be used to deserialize the response headers. + */ + headersMapper?: Mapper; + + /** + * The mapper that will be used to deserialize the response body. + */ + bodyMapper?: Mapper; +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/operationSpec.ts b/node_modules/@azure/ms-rest-js/lib/operationSpec.ts new file mode 100644 index 000000000..43c61ea8a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/operationSpec.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { OperationParameter, OperationQueryParameter, OperationURLParameter } from "./operationParameter"; +import { OperationResponse } from "./operationResponse"; +import { MapperType, Serializer } from "./serializer"; +import { HttpMethods } from "./webResource"; + +/** + * A specification that defines an operation. + */ +export interface OperationSpec { + /** + * The serializer to use in this operation. + */ + readonly serializer: Serializer; + + /** + * The HTTP method that should be used by requests for this operation. + */ + readonly httpMethod: HttpMethods; + + /** + * The URL that was provided in the service's specification. This will still have all of the URL + * template variables in it. If this is not provided when the OperationSpec is created, then it + * will be populated by a "baseUri" property on the ServiceClient. + */ + readonly baseUrl?: string; + + /** + * The fixed path for this operation's URL. This will still have all of the URL template variables + * in it. + */ + readonly path?: string; + + /** + * The content type of the request body. This value will be used as the "Content-Type" header if + * it is provided. + */ + readonly contentType?: string; + + /** + * The parameter that will be used to construct the HTTP request's body. + */ + readonly requestBody?: OperationParameter; + + /** + * Whether or not this operation uses XML request and response bodies. + */ + readonly isXML?: boolean; + + /** + * The parameters to the operation method that will be substituted into the constructed URL. + */ + readonly urlParameters?: ReadonlyArray; + + /** + * The parameters to the operation method that will be added to the constructed URL's query. + */ + readonly queryParameters?: ReadonlyArray; + + /** + * The parameters to the operation method that will be converted to headers on the operation's + * HTTP request. + */ + readonly headerParameters?: ReadonlyArray; + + /** + * The parameters to the operation method that will be used to create a formdata body for the + * operation's HTTP request. + */ + readonly formDataParameters?: ReadonlyArray; + + /** + * The different types of responses that this operation can return based on what status code is + * returned. + */ + readonly responses: { [responseCode: string]: OperationResponse }; +} + +export function isStreamOperation(operationSpec: OperationSpec): boolean { + let result = false; + for (const statusCode in operationSpec.responses) { + const operationResponse: OperationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && operationResponse.bodyMapper.type.name === MapperType.Stream) { + result = true; + break; + } + } + return result; +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.browser.ts b/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.browser.ts new file mode 100644 index 000000000..840cdcbb2 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.browser.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { AgentSettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; + +const agentNotSupportedInBrowser = new Error("AgentPolicy is not supported in browser environment"); + +export function agentPolicy(_agentSettings?: AgentSettings): RequestPolicyFactory { + return { + create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => { + throw agentNotSupportedInBrowser; + } + }; +} + +export class AgentPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) { + super(nextPolicy, options); + throw agentNotSupportedInBrowser; + } + + public sendRequest(_request: WebResourceLike): Promise { + throw agentNotSupportedInBrowser; + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.ts new file mode 100644 index 000000000..46d399b1d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/agentPolicy.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { AgentSettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; + +export function agentPolicy(agentSettings?: AgentSettings): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new AgentPolicy(nextPolicy, options, agentSettings!); + } + }; +} + +export class AgentPolicy extends BaseRequestPolicy { + agentSettings: AgentSettings; + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, agentSettings: AgentSettings) { + super(nextPolicy, options); + this.agentSettings = agentSettings; + } + + public sendRequest(request: WebResourceLike): Promise { + if (!request.agentSettings) { + request.agentSettings = this.agentSettings; + } + return this._nextPolicy.sendRequest(request); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/deserializationPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/deserializationPolicy.ts new file mode 100644 index 000000000..986a4fef5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/deserializationPolicy.ts @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import { OperationResponse } from "../operationResponse"; +import { OperationSpec, isStreamOperation } from "../operationSpec"; +import { RestError } from "../restError"; +import { Mapper, MapperType } from "../serializer"; +import * as utils from "../util/utils"; +import { parseXML } from "../util/xml"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +/** + * The content-types that will indicate that an operation response should be deserialized in a + * particular way. + */ +export interface DeserializationContentTypes { + /** + * The content-types that indicate that an operation response should be deserialized as JSON. + * Defaults to [ "application/json", "text/json" ]. + */ + json?: string[]; + + /** + * The content-types that indicate that an operation response should be deserialized as XML. + * Defaults to [ "application/xml", "application/atom+xml" ]. + */ + xml?: string[]; +} + +/** + * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they + * pass through the HTTP pipeline. + */ +export function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new DeserializationPolicy(nextPolicy, deserializationContentTypes, options); + } + }; +} + +export const defaultJsonContentTypes = ["application/json", "text/json"]; +export const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; + +/** + * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the + * HTTP pipeline. + */ +export class DeserializationPolicy extends BaseRequestPolicy { + public readonly jsonContentTypes: string[]; + public readonly xmlContentTypes: string[]; + + constructor(nextPolicy: RequestPolicy, deserializationContentTypes: DeserializationContentTypes | undefined, options: RequestPolicyOptionsLike) { + super(nextPolicy, options); + + this.jsonContentTypes = deserializationContentTypes && deserializationContentTypes.json || defaultJsonContentTypes; + this.xmlContentTypes = deserializationContentTypes && deserializationContentTypes.xml || defaultXmlContentTypes; + } + + public async sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request).then((response: HttpOperationResponse) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response)); + } +} + +function getOperationResponse(parsedResponse: HttpOperationResponse): undefined | OperationResponse { + let result: OperationResponse | undefined; + const request: WebResourceLike = parsedResponse.request; + const operationSpec: OperationSpec | undefined = request.operationSpec; + if (operationSpec) { + const operationResponseGetter: undefined | ((operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse)) = request.operationResponseGetter; + if (!operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } else { + result = operationResponseGetter(operationSpec, parsedResponse); + } + } + return result; +} + +function shouldDeserializeResponse(parsedResponse: HttpOperationResponse): boolean { + const shouldDeserialize: undefined | boolean | ((response: HttpOperationResponse) => boolean) = parsedResponse.request.shouldDeserialize; + let result: boolean; + if (shouldDeserialize === undefined) { + result = true; + } else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } else { + result = shouldDeserialize(parsedResponse); + } + return result; +} + +export function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise { + return parse(jsonContentTypes, xmlContentTypes, response).then(parsedResponse => { + const shouldDeserialize: boolean = shouldDeserializeResponse(parsedResponse); + if (shouldDeserialize) { + const operationSpec: OperationSpec | undefined = parsedResponse.request.operationSpec; + if (operationSpec && operationSpec.responses) { + const statusCode: number = parsedResponse.status; + + const expectedStatusCodes: string[] = Object.keys(operationSpec.responses); + + const hasNoExpectedStatusCodes: boolean = (expectedStatusCodes.length === 0 || (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); + + const responseSpec: OperationResponse | undefined = getOperationResponse(parsedResponse); + + const isExpectedStatusCode: boolean = hasNoExpectedStatusCodes ? (200 <= statusCode && statusCode < 300) : !!responseSpec; + if (!isExpectedStatusCode) { + const defaultResponseSpec: OperationResponse = operationSpec.responses.default; + if (defaultResponseSpec) { + const initialErrorMessage: string = isStreamOperation(operationSpec) + ? `Unexpected status code: ${statusCode}` + : parsedResponse.bodyAsText as string; + + const error = new RestError(initialErrorMessage); + error.statusCode = statusCode; + error.request = utils.stripRequest(parsedResponse.request); + error.response = utils.stripResponse(parsedResponse); + + let parsedErrorResponse: { [key: string]: any } = parsedResponse.parsedBody; + try { + if (parsedErrorResponse) { + const defaultResponseBodyMapper: Mapper | undefined = defaultResponseSpec.bodyMapper; + if (defaultResponseBodyMapper && defaultResponseBodyMapper.serializedName === "CloudError") { + if (parsedErrorResponse.error) { + parsedErrorResponse = parsedErrorResponse.error; + } + if (parsedErrorResponse.code) { + error.code = parsedErrorResponse.code; + } + if (parsedErrorResponse.message) { + error.message = parsedErrorResponse.message; + } + } else { + let internalError: any = parsedErrorResponse; + if (parsedErrorResponse.error) { + internalError = parsedErrorResponse.error; + } + + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + } + + if (defaultResponseBodyMapper) { + let valueToDeserialize: any = parsedErrorResponse; + if (operationSpec.isXML && defaultResponseBodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof parsedErrorResponse === "object" + ? parsedErrorResponse[defaultResponseBodyMapper.xmlElementName!] + : []; + } + error.body = operationSpec.serializer.deserialize(defaultResponseBodyMapper, valueToDeserialize, "error.body"); + } + } + } catch (defaultError) { + error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`; + } + return Promise.reject(error); + } + } else if (responseSpec) { + if (responseSpec.bodyMapper) { + let valueToDeserialize: any = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) { + valueToDeserialize = typeof valueToDeserialize === "object" ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName!] : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody"); + } catch (error) { + const restError = new RestError(`Error ${error} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`); + restError.request = utils.stripRequest(parsedResponse.request); + restError.response = utils.stripResponse(parsedResponse); + return Promise.reject(restError); + } + } else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.rawHeaders(), "operationRes.parsedHeaders"); + } + } + } + } + return Promise.resolve(parsedResponse); + }); +} + +function parse(jsonContentTypes: string[], xmlContentTypes: string[], operationResponse: HttpOperationResponse): Promise { + const errorHandler = (err: Error & { code: string }) => { + const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; + const errCode = err.code || RestError.PARSE_ERROR; + const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse, operationResponse.bodyAsText); + return Promise.reject(e); + }; + + if (!operationResponse.request.streamResponseBody && operationResponse.bodyAsText) { + const text = operationResponse.bodyAsText; + const contentType: string = operationResponse.headers.get("Content-Type") || ""; + const contentComponents: string[] = !contentType ? [] : contentType.split(";").map(component => component.toLowerCase()); + if (contentComponents.length === 0 || contentComponents.some(component => jsonContentTypes.indexOf(component) !== -1)) { + return new Promise(resolve => { + operationResponse.parsedBody = JSON.parse(text); + resolve(operationResponse); + }).catch(errorHandler); + } else if (contentComponents.some(component => xmlContentTypes.indexOf(component) !== -1)) { + return parseXML(text) + .then(body => { + operationResponse.parsedBody = body; + return operationResponse; + }) + .catch(errorHandler); + } + } + + return Promise.resolve(operationResponse); +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/exponentialRetryPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/exponentialRetryPolicy.ts new file mode 100644 index 000000000..28f2b1b68 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/exponentialRetryPolicy.ts @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import * as utils from "../util/utils"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { RestError } from "../restError"; + +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} + +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} + +export function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} + +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; +const DEFAULT_CLIENT_RETRY_COUNT = 3; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; +const DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + */ +export class ExponentialRetryPolicy extends BaseRequestPolicy { + /** + * The client retry count. + */ + retryCount: number; + /** + * The client retry interval in milliseconds. + */ + retryInterval: number; + /** + * The minimum retry interval in milliseconds. + */ + minRetryInterval: number; + /** + * The maximum retry interval in milliseconds. + */ + maxRetryInterval: number; + + /** + * @constructor + * @param {RequestPolicy} nextPolicy The next RequestPolicy in the pipeline chain. + * @param {RequestPolicyOptionsLike} options The options for this RequestPolicy. + * @param {number} [retryCount] The client retry count. + * @param {number} [retryInterval] The client retry interval, in milliseconds. + * @param {number} [minRetryInterval] The minimum retry interval, in milliseconds. + * @param {number} [maxRetryInterval] The maximum retry interval, in milliseconds. + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) { + super(nextPolicy, options); + function isNumber(n: any): n is number { return typeof n === "number"; } + this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT; + this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL; + this.minRetryInterval = isNumber(minRetryInterval) ? minRetryInterval : DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + this.maxRetryInterval = isNumber(maxRetryInterval) ? maxRetryInterval : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + } + + public sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request.clone()) + .then(response => retry(this, request, response)) + .catch(error => retry(this, request, error.response, undefined, error)); + } +} + +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(policy: ExponentialRetryPolicy, statusCode: number | undefined, retryData: RetryData): boolean { + if (statusCode == undefined || (statusCode < 500 && statusCode !== 408) || statusCode === 501 || statusCode === 505) { + return false; + } + + let currentCount: number; + if (!retryData) { + throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null."); + } else { + currentCount = (retryData && retryData.retryCount); + } + + return (currentCount < policy.retryCount); +} + +/** + * Updates the retry data for the next attempt. + * + * @param {ExponentialRetryPolicy} policy The ExponentialRetryPolicy that this function is being called against. + * @param {RetryData} retryData The retry data. + * @param {RetryError} [err] The operation"s error, if any. + */ +function updateRetryData(policy: ExponentialRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + + retryData.error = err; + } + + // Adjust retry count + retryData.retryCount++; + + // Adjust retry interval + let incrementDelta = Math.pow(2, retryData.retryCount) - 1; + const boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + + return retryData; +} + +function retry(policy: ExponentialRetryPolicy, request: WebResourceLike, response?: HttpOperationResponse, retryData?: RetryData, requestError?: RetryError): Promise { + retryData = updateRetryData(policy, retryData, requestError); + const isAborted: boolean | undefined = request.abortSignal && request.abortSignal.aborted; + if (!isAborted && shouldRetry(policy, response && response.status, retryData)) { + return utils.delay(retryData.retryInterval) + .then(() => policy._nextPolicy.sendRequest(request.clone())) + .then(res => retry(policy, request, res, retryData, undefined)) + .catch(err => retry(policy, request, response, retryData, err)); + } else if (isAborted || requestError || !response) { + // If the operation failed in the end, return all errors instead of just the last one + const err = retryData.error || + new RestError( + "Failed to send the request.", + RestError.REQUEST_SEND_ERROR, + response && response.status, + response && response.request, + response); + return Promise.reject(err); + } else { + return Promise.resolve(response); + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/generateClientRequestIdPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/generateClientRequestIdPolicy.ts new file mode 100644 index 000000000..ef570126f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/generateClientRequestIdPolicy.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import * as utils from "../util/utils"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export function generateClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id"): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName); + } + }; +} + +export class GenerateClientRequestIdPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, private _requestIdHeaderName: string) { + super(nextPolicy, options); + } + + public sendRequest(request: WebResourceLike): Promise { + if (!request.headers.contains(this._requestIdHeaderName)) { + request.headers.set(this._requestIdHeaderName, utils.generateUuid()); + } + return this._nextPolicy.sendRequest(request); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/logPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/logPolicy.ts new file mode 100644 index 000000000..4f99b5839 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/logPolicy.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export function logPolicy(logger: any = console.log): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new LogPolicy(nextPolicy, options, logger); + } + }; +} + +export class LogPolicy extends BaseRequestPolicy { + logger?: any; + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, logger: any = console.log) { + super(nextPolicy, options); + this.logger = logger; + } + + public sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request).then(response => logResponse(this, response)); + } +} + +function logResponse(policy: LogPolicy, response: HttpOperationResponse): Promise { + policy.logger(`>> Request: ${JSON.stringify(response.request, undefined, 2)}`); + policy.logger(`>> Response status code: ${response.status}`); + const responseBody = response.bodyAsText; + policy.logger(`>> Body: ${responseBody}`); + return Promise.resolve(response); +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.browser.ts b/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.browser.ts new file mode 100644 index 000000000..04b708247 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.browser.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/* + * NOTE: When moving this file, please update "browser" section in package.json + * and "plugins" section in webpack.testconfig.ts. + */ + +import { TelemetryInfo } from "./userAgentPolicy"; + +interface NavigatorEx extends Navigator { + // oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2 + readonly oscpu: string; +} + +export function getDefaultUserAgentKey(): string { + return "x-ms-command-name"; +} + +export function getPlatformSpecificData(): TelemetryInfo[] { + const navigator = window.navigator as NavigatorEx; + const osInfo = { + key: "OS", + value: (navigator.oscpu || navigator.platform).replace(" ", "") + }; + + return [osInfo]; +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.ts new file mode 100644 index 000000000..29de62748 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/msRestUserAgentPolicy.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import * as os from "os"; +import { TelemetryInfo } from "./userAgentPolicy"; +import { Constants } from "../util/constants"; + +export function getDefaultUserAgentKey(): string { + return Constants.HeaderConstants.USER_AGENT; +} + +export function getPlatformSpecificData(): TelemetryInfo[] { + const runtimeInfo = { + key: "Node", + value: process.version + }; + + const osInfo = { + key: "OS", + value: `(${os.arch()}-${os.type()}-${os.release()})` + }; + + return [runtimeInfo, osInfo]; +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.browser.ts b/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.browser.ts new file mode 100644 index 000000000..898bc9c55 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.browser.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { ProxySettings } from "../serviceClient"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; + +const proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment"); + +export function getDefaultProxySettings(_proxyUrl?: string): ProxySettings | undefined { + return undefined; +} + +export function proxyPolicy(_proxySettings?: ProxySettings): RequestPolicyFactory { + return { + create: (_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike) => { + throw proxyNotSupportedInBrowser; + } + }; +} + +export class ProxyPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) { + super(nextPolicy, options); + throw proxyNotSupportedInBrowser; + } + + public sendRequest(_request: WebResourceLike): Promise { + throw proxyNotSupportedInBrowser; + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.ts new file mode 100644 index 000000000..eaeb87634 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/proxyPolicy.ts @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { ProxySettings } from "../serviceClient"; +import { WebResourceLike } from "../webResource"; +import { Constants } from "../util/constants"; +import { URLBuilder } from "../url"; + +function loadEnvironmentProxyValue(): string | undefined { + if (!process) { + return undefined; + } + + if (process.env[Constants.HTTPS_PROXY]) { + return process.env[Constants.HTTPS_PROXY]; + } else if (process.env[Constants.HTTPS_PROXY.toLowerCase()]) { + return process.env[Constants.HTTPS_PROXY.toLowerCase()]; + } else if (process.env[Constants.HTTP_PROXY]) { + return process.env[Constants.HTTP_PROXY]; + } else if (process.env[Constants.HTTP_PROXY.toLowerCase()]) { + return process.env[Constants.HTTP_PROXY.toLowerCase()]; + } + + return undefined; +} + +export function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + + const parsedUrl = URLBuilder.parse(proxyUrl); + return { + host: parsedUrl.getScheme() + "://" + parsedUrl.getHost(), + port: Number.parseInt(parsedUrl.getPort() || "80") + }; +} + + +export function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new ProxyPolicy(nextPolicy, options, proxySettings!); + } + }; +} + +export class ProxyPolicy extends BaseRequestPolicy { + proxySettings: ProxySettings; + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, proxySettings: ProxySettings) { + super(nextPolicy, options); + this.proxySettings = proxySettings; + } + + public sendRequest(request: WebResourceLike): Promise { + if (!request.proxySettings) { + request.proxySettings = this.proxySettings; + } + return this._nextPolicy.sendRequest(request); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/redirectPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/redirectPolicy.ts new file mode 100644 index 000000000..885fe394e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/redirectPolicy.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import { URLBuilder } from "../url"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export function redirectPolicy(maximumRetries = 20): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new RedirectPolicy(nextPolicy, options, maximumRetries); + } + }; +} + +export class RedirectPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly maxRetries = 20) { + super(nextPolicy, options); + } + + public sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request).then(response => handleRedirect(this, response, 0)); + } +} + +function handleRedirect(policy: RedirectPolicy, response: HttpOperationResponse, currentRetries: number): Promise { + const { request, status } = response; + const locationHeader = response.headers.get("location"); + if (locationHeader && + (status === 300 || status === 307 || (status === 303 && request.method === "POST")) && + (!policy.maxRetries || currentRetries < policy.maxRetries)) { + + const builder = URLBuilder.parse(request.url); + builder.setPath(locationHeader); + request.url = builder.toString(); + + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + } + + return policy._nextPolicy.sendRequest(request) + .then(res => handleRedirect(policy, res, currentRetries + 1)); + } + + return Promise.resolve(response); +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/requestPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/requestPolicy.ts new file mode 100644 index 000000000..61167e36b --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/requestPolicy.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import { HttpPipelineLogger } from "../httpPipelineLogger"; +import { HttpPipelineLogLevel } from "../httpPipelineLogLevel"; +import { WebResourceLike } from "../webResource"; + +/** + * Creates a new RequestPolicy per-request that uses the provided nextPolicy. + */ +export type RequestPolicyFactory = { + create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy +}; + +export interface RequestPolicy { + sendRequest(httpRequest: WebResourceLike): Promise; +} + +export abstract class BaseRequestPolicy implements RequestPolicy { + protected constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike) { + } + + public abstract sendRequest(webResource: WebResourceLike): Promise; + + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + public shouldLog(logLevel: HttpPipelineLogLevel): boolean { + return this._options.shouldLog(logLevel); + } + + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + public log(logLevel: HttpPipelineLogLevel, message: string): void { + this._options.log(logLevel, message); + } +} + +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export interface RequestPolicyOptionsLike { + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel: HttpPipelineLogLevel): boolean; + + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meet the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} + +/** + * Optional properties that can be used when creating a RequestPolicy. + */ +export class RequestPolicyOptions implements RequestPolicyOptionsLike { + constructor(private _logger?: HttpPipelineLogger) { + } + + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + public shouldLog(logLevel: HttpPipelineLogLevel): boolean { + return !!this._logger && + logLevel !== HttpPipelineLogLevel.OFF && + logLevel <= this._logger.minimumLogLevel; + } + + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel The log level of this log. + * @param message The message of this log. + */ + public log(logLevel: HttpPipelineLogLevel, message: string): void { + if (this._logger && this.shouldLog(logLevel)) { + this._logger.log(logLevel, message); + } + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/rpRegistrationPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/rpRegistrationPolicy.ts new file mode 100644 index 000000000..e82a99beb --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/rpRegistrationPolicy.ts @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +import { HttpOperationResponse } from "../httpOperationResponse"; +import * as utils from "../util/utils"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export function rpRegistrationPolicy(retryTimeout = 30): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new RPRegistrationPolicy(nextPolicy, options, retryTimeout); + } + }; +} + +export class RPRegistrationPolicy extends BaseRequestPolicy { + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, readonly _retryTimeout = 30) { + super(nextPolicy, options); + } + + public sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request.clone()) + .then(response => registerIfNeeded(this, request, response)); + } +} + + +function registerIfNeeded(policy: RPRegistrationPolicy, request: WebResourceLike, response: HttpOperationResponse): Promise { + if (response.status === 409) { + const rpName = checkRPNotRegisteredError(response.bodyAsText as string); + if (rpName) { + const urlPrefix = extractSubscriptionUrl(request.url); + return registerRP(policy, urlPrefix, rpName, request) + // Autoregistration of ${provider} failed for some reason. We will not return this error + // instead will return the initial response with 409 status code back to the user. + // do nothing here as we are returning the original response at the end of this method. + .catch(() => false) + .then(registrationStatus => { + if (registrationStatus) { + // Retry the original request. We have to change the x-ms-client-request-id + // otherwise Azure endpoint will return the initial 409 (cached) response. + request.headers.set("x-ms-client-request-id", utils.generateUuid()); + return policy._nextPolicy.sendRequest(request.clone()); + } + return response; + }); + } + } + + return Promise.resolve(response); +} + +/** + * Reuses the headers of the original request and url (if specified). + * @param {WebResourceLike} originalRequest The original request + * @param {boolean} reuseUrlToo Should the url from the original request be reused as well. Default false. + * @returns {object} A new request object with desired headers. + */ +function getRequestEssentials(originalRequest: WebResourceLike, reuseUrlToo = false): WebResourceLike { + const reqOptions: WebResourceLike = originalRequest.clone(); + if (reuseUrlToo) { + reqOptions.url = originalRequest.url; + } + + // We have to change the x-ms-client-request-id otherwise Azure endpoint + // will return the initial 409 (cached) response. + reqOptions.headers.set("x-ms-client-request-id", utils.generateUuid()); + + // Set content-type to application/json + reqOptions.headers.set("Content-Type", "application/json; charset=utf-8"); + + return reqOptions; +} + +/** + * Validates the error code and message associated with 409 response status code. If it matches to that of + * RP not registered then it returns the name of the RP else returns undefined. + * @param {string} body The response body received after making the original request. + * @returns {string} The name of the RP if condition is satisfied else undefined. + */ +function checkRPNotRegisteredError(body: string): string { + let result, responseBody; + if (body) { + try { + responseBody = JSON.parse(body); + } catch (err) { + // do nothing; + } + if (responseBody && responseBody.error && responseBody.error.message && + responseBody.error.code && responseBody.error.code === "MissingSubscriptionRegistration") { + const matchRes = responseBody.error.message.match(/.*'(.*)'/i); + if (matchRes) { + result = matchRes.pop(); + } + } + } + return result; +} + +/** + * Extracts the first part of the URL, just after subscription: + * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} url The original request url + * @returns {string} The url prefix as explained above. + */ +function extractSubscriptionUrl(url: string): string { + let result; + const matchRes = url.match(/.*\/subscriptions\/[a-f0-9-]+\//ig); + if (matchRes && matchRes[0]) { + result = matchRes[0]; + } else { + throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`); + } + return result; +} + +/** + * Registers the given provider. + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} urlPrefix https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/ + * @param {string} provider The provider name to be registered. + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @param {registrationCallback} callback The callback that handles the RP registration + */ +function registerRP(policy: RPRegistrationPolicy, urlPrefix: string, provider: string, originalRequest: WebResourceLike): Promise { + const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`; + const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`; + const reqOptions = getRequestEssentials(originalRequest); + reqOptions.method = "POST"; + reqOptions.url = postUrl; + + return policy._nextPolicy.sendRequest(reqOptions) + .then(response => { + if (response.status !== 200) { + throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`); + } + return getRegistrationStatus(policy, getUrl, originalRequest); + }); +} + +/** + * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds. + * Polling will happen till the registrationState property of the response body is "Registered". + * @param {RPRegistrationPolicy} policy The RPRegistrationPolicy this function is being called against. + * @param {string} url The request url for polling + * @param {WebResourceLike} originalRequest The original request sent by the user that returned a 409 response + * with a message that the provider is not registered. + * @returns {Promise} True if RP Registration is successful. + */ +function getRegistrationStatus(policy: RPRegistrationPolicy, url: string, originalRequest: WebResourceLike): Promise { + const reqOptions: any = getRequestEssentials(originalRequest); + reqOptions.url = url; + reqOptions.method = "GET"; + + return policy._nextPolicy.sendRequest(reqOptions).then(res => { + const obj = (res.parsedBody as any); + if (res.parsedBody && obj.registrationState && obj.registrationState === "Registered") { + return true; + } else { + return utils.delay(policy._retryTimeout * 1000).then(() => getRegistrationStatus(policy, url, originalRequest)); + } + }); +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/signingPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/signingPolicy.ts new file mode 100644 index 000000000..82d36e6da --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/signingPolicy.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { ServiceClientCredentials } from "../credentials/serviceClientCredentials"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicyFactory, RequestPolicy, RequestPolicyOptionsLike } from "./requestPolicy"; + +export function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new SigningPolicy(nextPolicy, options, authenticationProvider); + } + }; +} + +export class SigningPolicy extends BaseRequestPolicy { + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, public authenticationProvider: ServiceClientCredentials) { + super(nextPolicy, options); + } + + signRequest(request: WebResourceLike): Promise { + return this.authenticationProvider.signRequest(request); + } + + public sendRequest(request: WebResourceLike): Promise { + return this.signRequest(request).then(nextRequest => this._nextPolicy.sendRequest(nextRequest)); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/systemErrorRetryPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/systemErrorRetryPolicy.ts new file mode 100644 index 000000000..1650fbe76 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/systemErrorRetryPolicy.ts @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "../httpOperationResponse"; +import * as utils from "../util/utils"; +import { WebResourceLike } from "../webResource"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export interface RetryData { + retryCount: number; + retryInterval: number; + error?: RetryError; +} + +export interface RetryError extends Error { + message: string; + code?: string; + innerError?: RetryError; +} + +export function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval); + } + }; +} + +/** + * @class + * Instantiates a new "ExponentialRetryPolicyFilter" instance. + * + * @constructor + * @param {number} retryCount The client retry count. + * @param {number} retryInterval The client retry interval, in milliseconds. + * @param {number} minRetryInterval The minimum retry interval, in milliseconds. + * @param {number} maxRetryInterval The maximum retry interval, in milliseconds. + */ +export class SystemErrorRetryPolicy extends BaseRequestPolicy { + retryCount: number; + retryInterval: number; + minRetryInterval: number; + maxRetryInterval: number; + DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30; + DEFAULT_CLIENT_RETRY_COUNT = 3; + DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90; + DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3; + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number) { + super(nextPolicy, options); + this.retryCount = typeof retryCount === "number" ? retryCount : this.DEFAULT_CLIENT_RETRY_COUNT; + this.retryInterval = typeof retryInterval === "number" ? retryInterval : this.DEFAULT_CLIENT_RETRY_INTERVAL; + this.minRetryInterval = typeof minRetryInterval === "number" ? minRetryInterval : this.DEFAULT_CLIENT_MIN_RETRY_INTERVAL; + this.maxRetryInterval = typeof maxRetryInterval === "number" ? maxRetryInterval : this.DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + } + + public sendRequest(request: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(request.clone()).then(response => retry(this, request, response)); + } +} + +/** + * Determines if the operation should be retried and how long to wait until the next retry. + * + * @param {number} statusCode The HTTP status code. + * @param {RetryData} retryData The retry data. + * @return {boolean} True if the operation qualifies for a retry; false otherwise. + */ +function shouldRetry(policy: SystemErrorRetryPolicy, retryData: RetryData): boolean { + let currentCount; + if (!retryData) { + throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null."); + } else { + currentCount = (retryData && retryData.retryCount); + } + return (currentCount < policy.retryCount); +} + +/** + * Updates the retry data for the next attempt. + * + * @param {RetryData} retryData The retry data. + * @param {object} err The operation"s error, if any. + */ +function updateRetryData(policy: SystemErrorRetryPolicy, retryData?: RetryData, err?: RetryError): RetryData { + if (!retryData) { + retryData = { + retryCount: 0, + retryInterval: 0 + }; + } + + if (err) { + if (retryData.error) { + err.innerError = retryData.error; + } + + retryData.error = err; + } + + // Adjust retry count + retryData.retryCount++; + + // Adjust retry interval + let incrementDelta = Math.pow(2, retryData.retryCount) - 1; + const boundedRandDelta = policy.retryInterval * 0.8 + + Math.floor(Math.random() * (policy.retryInterval * 1.2 - policy.retryInterval * 0.8)); + incrementDelta *= boundedRandDelta; + + retryData.retryInterval = Math.min(policy.minRetryInterval + incrementDelta, policy.maxRetryInterval); + + return retryData; +} + +function retry(policy: SystemErrorRetryPolicy, request: WebResourceLike, operationResponse: HttpOperationResponse, retryData?: RetryData, err?: RetryError): Promise { + retryData = updateRetryData(policy, retryData, err); + if (err && err.code && shouldRetry(policy, retryData) && + (err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || err.code === "ENOENT")) { + // If previous operation ended with an error and the policy allows a retry, do that + return utils.delay(retryData.retryInterval) + .then(() => policy._nextPolicy.sendRequest(request.clone())) + .then(res => retry(policy, request, res, retryData, err)) + .catch(err => retry(policy, request, operationResponse, retryData, err)); + } else { + if (err != undefined) { + // If the operation failed in the end, return all errors instead of just the last one + err = retryData.error; + return Promise.reject(err); + } + return Promise.resolve(operationResponse); + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/policies/throttlingRetryPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/throttlingRetryPolicy.ts new file mode 100644 index 000000000..b8364b5e9 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/throttlingRetryPolicy.ts @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { BaseRequestPolicy, RequestPolicy, RequestPolicyOptionsLike, RequestPolicyFactory } from "./requestPolicy"; +import { WebResourceLike } from "../webResource"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { Constants } from "../util/constants"; +import { delay } from "../util/utils"; + +type ResponseHandler = (httpRequest: WebResourceLike, response: HttpOperationResponse) => Promise; +const StatusCodes = Constants.HttpConstants.StatusCodes; + +export function throttlingRetryPolicy(): RequestPolicyFactory { + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new ThrottlingRetryPolicy(nextPolicy, options); + } + }; +} + +/** + * To learn more, please refer to + * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, + * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and + * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + */ +export class ThrottlingRetryPolicy extends BaseRequestPolicy { + private _handleResponse: ResponseHandler; + + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, _handleResponse?: ResponseHandler) { + super(nextPolicy, options); + this._handleResponse = _handleResponse || this._defaultResponseHandler; + } + + public async sendRequest(httpRequest: WebResourceLike): Promise { + return this._nextPolicy.sendRequest(httpRequest.clone()).then(response => { + if (response.status !== StatusCodes.TooManyRequests) { + return response; + } else { + return this._handleResponse(httpRequest, response); + } + }); + } + + private async _defaultResponseHandler(httpRequest: WebResourceLike, httpResponse: HttpOperationResponse): Promise { + const retryAfterHeader: string | undefined = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER); + + if (retryAfterHeader) { + const delayInMs: number | undefined = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); + if (delayInMs) { + return delay(delayInMs).then((_: any) => this._nextPolicy.sendRequest(httpRequest)); + } + } + + return httpResponse; + } + + public static parseRetryAfterHeader(headerValue: string): number | undefined { + const retryAfterInSeconds = Number(headerValue); + if (Number.isNaN(retryAfterInSeconds)) { + return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue); + } else { + return retryAfterInSeconds * 1000; + } + } + + public static parseDateRetryAfterHeader(headerValue: string): number | undefined { + try { + const now: number = Date.now(); + const date: number = Date.parse(headerValue); + const diff = date - now; + + return Number.isNaN(diff) ? undefined : diff; + } catch (error) { + return undefined; + } + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/policies/userAgentPolicy.ts b/node_modules/@azure/ms-rest-js/lib/policies/userAgentPolicy.ts new file mode 100644 index 000000000..eb8176098 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/policies/userAgentPolicy.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpHeaders } from "../httpHeaders"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { Constants } from "../util/constants"; +import { WebResourceLike } from "../webResource"; +import { getDefaultUserAgentKey, getPlatformSpecificData } from "./msRestUserAgentPolicy"; +import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy"; + +export type TelemetryInfo = { key?: string; value?: string }; + +function getRuntimeInfo(): TelemetryInfo[] { + const msRestRuntime = { + key: "ms-rest-js", + value: Constants.msRestVersion + }; + + return [msRestRuntime]; +} + +function getUserAgentString(telemetryInfo: TelemetryInfo[], keySeparator = " ", valueSeparator = "/"): string { + return telemetryInfo.map(info => { + const value = info.value ? `${valueSeparator}${info.value}` : ""; + return `${info.key}${value}`; + }).join(keySeparator); +} + +export const getDefaultUserAgentHeaderName = getDefaultUserAgentKey; + +export function getDefaultUserAgentValue(): string { + const runtimeInfo = getRuntimeInfo(); + const platformSpecificData = getPlatformSpecificData(); + const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData)); + return userAgent; +} + +export function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory { + const key: string = (!userAgentData || userAgentData.key == undefined) ? getDefaultUserAgentKey() : userAgentData.key; + const value: string = (!userAgentData || userAgentData.value == undefined) ? getDefaultUserAgentValue() : userAgentData.value; + + return { + create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => { + return new UserAgentPolicy(nextPolicy, options, key, value); + } + }; +} + +export class UserAgentPolicy extends BaseRequestPolicy { + constructor(readonly _nextPolicy: RequestPolicy, readonly _options: RequestPolicyOptionsLike, protected headerKey: string, protected headerValue: string) { + super(_nextPolicy, _options); + } + + sendRequest(request: WebResourceLike): Promise { + this.addUserAgentHeader(request); + return this._nextPolicy.sendRequest(request); + } + + addUserAgentHeader(request: WebResourceLike): void { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + + if (!request.headers.get(this.headerKey) && this.headerValue) { + request.headers.set(this.headerKey, this.headerValue); + } + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/proxyAgent.ts b/node_modules/@azure/ms-rest-js/lib/proxyAgent.ts new file mode 100644 index 000000000..1b988b608 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/proxyAgent.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import * as http from "http"; +import * as https from "https"; +import * as tunnel from "tunnel"; + +import { ProxySettings } from "./serviceClient"; +import { URLBuilder } from "./url"; +import { HttpHeadersLike } from "./httpHeaders"; + +export type ProxyAgent = { isHttps: boolean; agent: http.Agent | https.Agent }; +export function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent { + const tunnelOptions: tunnel.HttpsOverHttpsOptions = { + proxy: { + host: URLBuilder.parse(proxySettings.host).getHost() as string, + port: proxySettings.port, + headers: (headers && headers.rawHeaders()) || {} + } + }; + + if ((proxySettings.username && proxySettings.password)) { + tunnelOptions.proxy!.proxyAuth = `${proxySettings.username}:${proxySettings.password}`; + } + + const requestScheme = URLBuilder.parse(requestUrl).getScheme() || ""; + const isRequestHttps = requestScheme.toLowerCase() === "https"; + const proxyScheme = URLBuilder.parse(proxySettings.host).getScheme() || ""; + const isProxyHttps = proxyScheme.toLowerCase() === "https"; + + const proxyAgent = { + isHttps: isRequestHttps, + agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) + }; + + return proxyAgent; +} + +export function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: tunnel.HttpsOverHttpsOptions): http.Agent | https.Agent { + if (isRequestHttps && isProxyHttps) { + return tunnel.httpsOverHttps(tunnelOptions); + } else if (isRequestHttps && !isProxyHttps) { + return tunnel.httpsOverHttp(tunnelOptions); + } else if (!isRequestHttps && isProxyHttps) { + return tunnel.httpOverHttps(tunnelOptions); + } else { + return tunnel.httpOverHttp(tunnelOptions); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/queryCollectionFormat.ts b/node_modules/@azure/ms-rest-js/lib/queryCollectionFormat.ts new file mode 100644 index 000000000..ba6cca81d --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/queryCollectionFormat.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/** + * The format that will be used to join an array of values together for a query parameter value. + */ +export enum QueryCollectionFormat { + Csv = ",", + Ssv = " ", + Tsv = "\t", + Pipes = "|", + Multi = "Multi", +} diff --git a/node_modules/@azure/ms-rest-js/lib/restError.ts b/node_modules/@azure/ms-rest-js/lib/restError.ts new file mode 100644 index 000000000..699fffd7e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/restError.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpOperationResponse } from "./httpOperationResponse"; +import { WebResourceLike } from "./webResource"; + +export class RestError extends Error { + static readonly REQUEST_SEND_ERROR: string = "REQUEST_SEND_ERROR"; + static readonly REQUEST_ABORTED_ERROR: string = "REQUEST_ABORTED_ERROR"; + static readonly PARSE_ERROR: string = "PARSE_ERROR"; + + code?: string; + statusCode?: number; + request?: WebResourceLike; + response?: HttpOperationResponse; + body?: any; + constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any) { + super(message); + this.code = code; + this.statusCode = statusCode; + this.request = request; + this.response = response; + this.body = body; + + Object.setPrototypeOf(this, RestError.prototype); + } +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/serializer.ts b/node_modules/@azure/ms-rest-js/lib/serializer.ts new file mode 100644 index 000000000..885015f63 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/serializer.ts @@ -0,0 +1,889 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import * as base64 from "./util/base64"; +import * as utils from "./util/utils"; + +export class Serializer { + constructor(public readonly modelMappers: { [key: string]: any } = {}, public readonly isXML?: boolean) { } + + validateConstraints(mapper: Mapper, value: any, objectName: string): void { + const failValidation = (constraintName: keyof MapperConstraints, constraintValue: any) => { + throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); + }; + if (mapper.constraints && (value != undefined)) { + const { + ExclusiveMaximum, + ExclusiveMinimum, + InclusiveMaximum, + InclusiveMinimum, + MaxItems, + MaxLength, + MinItems, + MinLength, + MultipleOf, + Pattern, + UniqueItems + } = mapper.constraints; + if (ExclusiveMaximum != undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum != undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum != undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum != undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems != undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength != undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems != undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength != undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf != undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + const pattern: RegExp = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if ((typeof value !== "string") || (value.match(pattern) === null)) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && value.some((item: any, i: number, ar: Array) => ar.indexOf(item) !== i)) { + failValidation("UniqueItems", UniqueItems); + } + } + } + + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param {Mapper} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} object A valid Javascript object to be serialized + * + * @param {string} objectName Name of the serialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid serialized Javascript object + */ + serialize(mapper: Mapper, object: any, objectName?: string): any { + let payload: any = {}; + const mapperType = mapper.type.name as string; + if (!objectName) { + objectName = mapper.serializedName!; + } + if (mapperType.match(/^Sequence$/ig) !== null) { + payload = []; + } + + if (mapper.isConstant) { + object = mapper.defaultValue; + } + + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + + const { required, nullable } = mapper; + + if (required && nullable && object === undefined) { + throw new Error(`${objectName} cannot be undefined.`); + } + if (required && !nullable && object == undefined) { + throw new Error(`${objectName} cannot be null or undefined.`); + } + if (!required && nullable === false && object === null) { + throw new Error(`${objectName} cannot be null.`); + } + + if (object == undefined) { + payload = object; + } else { + // Validate Constraints if any + this.validateConstraints(mapper, object, objectName); + if (mapperType.match(/^any$/ig) !== null) { + payload = object; + } else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/ig) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } else if (mapperType.match(/^Enum$/ig) !== null) { + const enumMapper: EnumMapper = mapper as EnumMapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/ig) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = serializeByteArrayType(objectName, object); + } else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = serializeBase64UrlType(objectName, object); + } else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = serializeSequenceType(this, mapper as SequenceMapper, object, objectName); + } else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = serializeDictionaryType(this, mapper as DictionaryMapper, object, objectName); + } else if (mapperType.match(/^Composite$/ig) !== null) { + payload = serializeCompositeType(this, mapper as CompositeMapper, object, objectName); + } + } + return payload; + } + + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param {object} mapper The mapper which defines the metadata of the serializable object + * + * @param {object|string|Array|number|boolean|Date|stream} responseBody A valid Javascript entity to be deserialized + * + * @param {string} objectName Name of the deserialized object + * + * @returns {object|string|Array|number|boolean|Date|stream} A valid deserialized Javascript object + */ + deserialize(mapper: Mapper, responseBody: any, objectName: string): any { + if (responseBody == undefined) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + + let payload: any; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName!; + } + + if (mapperType.match(/^Composite$/ig) !== null) { + payload = deserializeCompositeType(this, mapper as CompositeMapper, responseBody, objectName); + } else { + if (this.isXML) { + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$") and body ("_") properties, then just reduce the responseBody value to + * the body ("_") property. + */ + if (responseBody["$"] != undefined && responseBody["_"] != undefined) { + responseBody = responseBody["_"]; + } + } + + if (mapperType.match(/^Number$/ig) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } else if (mapperType.match(/^Boolean$/ig) !== null) { + if (responseBody === "true") { + payload = true; + } else if (responseBody === "false") { + payload = false; + } else { + payload = responseBody; + } + } else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/ig) !== null) { + payload = responseBody; + } else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/ig) !== null) { + payload = new Date(responseBody); + } else if (mapperType.match(/^UnixTime$/ig) !== null) { + payload = unixTimeToDate(responseBody); + } else if (mapperType.match(/^ByteArray$/ig) !== null) { + payload = base64.decodeString(responseBody); + } else if (mapperType.match(/^Base64Url$/ig) !== null) { + payload = base64UrlToByteArray(responseBody); + } else if (mapperType.match(/^Sequence$/ig) !== null) { + payload = deserializeSequenceType(this, mapper as SequenceMapper, responseBody, objectName); + } else if (mapperType.match(/^Dictionary$/ig) !== null) { + payload = deserializeDictionaryType(this, mapper as DictionaryMapper, responseBody, objectName); + } + } + + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + + return payload; + } +} + +function trimEnd(str: string, ch: string) { + let len = str.length; + while ((len - 1) >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} + +function bufferToBase64Url(buffer: any): string | undefined { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + } + // Uint8Array to Base64. + const str = base64.encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); +} + +function base64UrlToByteArray(str: string): Uint8Array | undefined { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/\-/g, "+").replace(/\_/g, "/"); + // Base64 to Uint8Array. + return base64.decodeString(str); +} + +function splitSerializeName(prop: string | undefined): string[] { + const classes: string[] = []; + let partialclass = ""; + if (prop) { + const subwords = prop.split("."); + + for (const item of subwords) { + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + + return classes; +} + +function dateToUnixTime(d: string | Date): number | undefined { + if (!d) { + return undefined; + } + + if (typeof d.valueOf() === "string") { + d = new Date(d as string); + } + return Math.floor((d as Date).getTime() / 1000); +} + +function unixTimeToDate(n: number): Date | undefined { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} + +function serializeBasicTypes(typeName: string, objectName: string, value: any): any { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/ig) !== null) { + if (typeof value !== "number") { + throw new Error(`${objectName} with value ${value} must be of type number.`); + } + } else if (typeName.match(/^String$/ig) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(`${objectName} with value "${value}" must be of type string.`); + } + } else if (typeName.match(/^Uuid$/ig) !== null) { + if (!(typeof value.valueOf() === "string" && utils.isValidUuid(value))) { + throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + } + } else if (typeName.match(/^Boolean$/ig) !== null) { + if (typeof value !== "boolean") { + throw new Error(`${objectName} with value ${value} must be of type boolean.`); + } + } else if (typeName.match(/^Stream$/ig) !== null) { + const objectType = typeof value; + if (objectType !== "string" && + objectType !== "function" && + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + !(typeof Blob === "function" && value instanceof Blob)) { + throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`); + } + } + } + return value; +} + +function serializeEnumType(objectName: string, allowedValues: Array, value: any): any { + if (!allowedValues) { + throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); + } + const isPresent = allowedValues.some((item) => { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); + } + return value; +} + +function serializeByteArrayType(objectName: string, value: any): any { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = base64.encodeByteArray(value); + } + return value; +} + +function serializeBase64UrlType(objectName: string, value: any): any { + if (value != undefined) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = bufferToBase64Url(value); + } + return value; +} + +function serializeDateTypes(typeName: string, value: any, objectName: string) { + if (value != undefined) { + if (typeName.match(/^Date$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = (value instanceof Date) ? value.toISOString().substring(0, 10) : new Date(value).toISOString().substring(0, 10); + } else if (typeName.match(/^DateTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = (value instanceof Date) ? value.toISOString() : new Date(value).toISOString(); + } else if (typeName.match(/^DateTimeRfc1123$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + } + value = (value instanceof Date) ? value.toUTCString() : new Date(value).toUTCString(); + } else if (typeName.match(/^UnixTime$/ig) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` + + `for it to be serialized in UnixTime/Epoch format.`); + } + value = dateToUnixTime(value); + } else if (typeName.match(/^TimeSpan$/ig) !== null) { + if (!utils.isDuration(value)) { + throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + } + value = value; + } + } + return value; +} + +function serializeSequenceType(serializer: Serializer, mapper: SequenceMapper, object: any, objectName: string) { + if (!Array.isArray(object)) { + throw new Error(`${objectName} must be of type Array.`); + } + const elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); + } + const tempArray = []; + for (let i = 0; i < object.length; i++) { + tempArray[i] = serializer.serialize(elementType, object[i], objectName); + } + return tempArray; +} + +function serializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, object: any, objectName: string) { + if (typeof object !== "object") { + throw new Error(`${objectName} must be of type object.`); + } + const valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); + } + const tempDictionary: { [key: string]: any } = {}; + for (const key of Object.keys(object)) { + tempDictionary[key] = serializer.serialize(valueType, object[key], objectName + "." + key); + } + return tempDictionary; +} + +/** + * Resolves a composite mapper's modelProperties. + * @param serializer the serializer containing the entire set of mappers + * @param mapper the composite mapper to resolve + */ +function resolveModelProperties(serializer: Serializer, mapper: CompositeMapper, objectName: string): { [propertyName: string]: Mapper } { + let modelProps = mapper.type.modelProperties; + if (!modelProps) { + const className = mapper.type.className; + if (!className) { + throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, undefined, 2)}".`); + } + + const modelMapper = serializer.modelMappers[className]; + if (!modelMapper) { + throw new Error(`mapper() cannot be null or undefined for model "${className}".`); + } + modelProps = modelMapper.type.modelProperties; + if (!modelProps) { + throw new Error(`modelProperties cannot be null or undefined in the ` + + `mapper "${JSON.stringify(modelMapper)}" of type "${className}" for object "${objectName}".`); + } + } + + return modelProps; +} + +function serializeCompositeType(serializer: Serializer, mapper: CompositeMapper, object: any, objectName: string) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + + if (object != undefined) { + const payload: any = {}; + const modelProps = resolveModelProperties(serializer, mapper, objectName); + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + + let propName: string | undefined; + let parentObject: any = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } else { + const paths = splitSerializeName(propertyMapper.serializedName!); + propName = paths.pop(); + + for (const pathName of paths) { + const childObject = parentObject[pathName]; + if ((childObject == undefined) && (object[key] != undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + + if (parentObject != undefined) { + const propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + + let toSerialize = object[key]; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && polymorphicDiscriminator.clientName === key && toSerialize == undefined) { + toSerialize = mapper.serializedName; + } + + const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName); + if (serializedValue !== undefined && propName != undefined) { + if (propertyMapper.xmlIsAttribute) { + // $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject.$ = parentObject.$ || {}; + parentObject.$[propName] = serializedValue; + } else if (propertyMapper.xmlIsWrapped) { + parentObject[propName] = { [propertyMapper.xmlElementName!]: serializedValue }; + } else { + parentObject[propName] = serializedValue; + } + } + } + } + + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const propNames = Object.keys(modelProps); + for (const clientPropName in object) { + const isAdditionalProperty = propNames.every(pn => pn !== clientPropName); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]'); + } + } + } + + return payload; + } + return object; +} + +function isSpecialXmlProperty(propertyName: string): boolean { + return ["$", "_"].includes(propertyName); +} + +function deserializeCompositeType(serializer: Serializer, mapper: CompositeMapper, responseBody: any, objectName: string): any { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + + const modelProps = resolveModelProperties(serializer, mapper, objectName); + let instance: { [key: string]: any } = {}; + const handledPropertyNames: string[] = []; + + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + const paths = splitSerializeName(modelProps[key].serializedName!); + handledPropertyNames.push(paths[0]); + const { serializedName, xmlName, xmlElementName } = propertyMapper; + let propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + + const headerCollectionPrefix = (propertyMapper as DictionaryMapper).headerCollectionPrefix; + if (headerCollectionPrefix) { + const dictionary: any = {}; + for (const headerKey of Object.keys(responseBody)) { + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize((propertyMapper as DictionaryMapper).type.value, responseBody[headerKey], propertyObjectName); + } + + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody.$) { + instance[key] = serializer.deserialize(propertyMapper, responseBody.$[xmlName!], propertyObjectName); + } else { + const propertyName = xmlElementName || xmlName || serializedName; + let unwrappedProperty = responseBody[propertyName!]; + if (propertyMapper.xmlIsWrapped) { + unwrappedProperty = responseBody[xmlName!]; + unwrappedProperty = unwrappedProperty && unwrappedProperty[xmlElementName!]; + + const isEmptyWrappedList = unwrappedProperty === undefined; + if (isEmptyWrappedList) { + unwrappedProperty = []; + } + } + instance[key] = serializer.deserialize(propertyMapper, unwrappedProperty, propertyObjectName); + } + } else { + // deserialize the property if it is present in the provided responseBody instance + let propertyInstance; + let res = responseBody; + // traversing the object step by step. + for (const item of paths) { + if (!res) break; + res = res[item]; + } + propertyInstance = res; + const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && key === polymorphicDiscriminator.clientName && propertyInstance == undefined) { + propertyInstance = mapper.serializedName; + } + + let serializedValue; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + instance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + } else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName); + instance[key] = serializedValue; + } + } + } + + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const isAdditionalProperty = (responsePropName: string) => { + for (const clientPropName in modelProps) { + const paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + + for (const responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]'); + } + } + } else if (responseBody) { + for (const key of Object.keys(responseBody)) { + if (instance[key] === undefined && !handledPropertyNames.includes(key) && !isSpecialXmlProperty(key)) { + instance[key] = responseBody[key]; + } + } + } + + return instance; +} + +function deserializeDictionaryType(serializer: Serializer, mapper: DictionaryMapper, responseBody: any, objectName: string): any { + /*jshint validthis: true */ + const value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + const tempDictionary: { [key: string]: any } = {}; + for (const key of Object.keys(responseBody)) { + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName); + } + return tempDictionary; + } + return responseBody; +} + +function deserializeSequenceType(serializer: Serializer, mapper: SequenceMapper, responseBody: any, objectName: string): any { + /*jshint validthis: true */ + const element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + + const tempArray = []; + for (let i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`); + } + return tempArray; + } + return responseBody; +} + +function getPolymorphicMapper(serializer: Serializer, mapper: CompositeMapper, object: any, polymorphicPropertyName: "clientName" | "serializedName"): CompositeMapper { + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName != undefined) { + const discriminatorValue = object[discriminatorName]; + if (discriminatorValue != undefined) { + const typeName = mapper.type.uberParent || mapper.type.className; + const indexDiscriminator = discriminatorValue === typeName + ? discriminatorValue + : typeName + "." + discriminatorValue; + const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator]; + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} + +function getPolymorphicDiscriminatorRecursively(serializer: Serializer, mapper: CompositeMapper): PolymorphicDiscriminator | undefined { + return mapper.type.polymorphicDiscriminator + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) + || getPolymorphicDiscriminatorSafely(serializer, mapper.type.className); +} + +function getPolymorphicDiscriminatorSafely(serializer: Serializer, typeName?: string) { + return (typeName && serializer.modelMappers[typeName] && serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} + +export interface MapperConstraints { + InclusiveMaximum?: number; + ExclusiveMaximum?: number; + InclusiveMinimum?: number; + ExclusiveMinimum?: number; + MaxLength?: number; + MinLength?: number; + Pattern?: RegExp; + MaxItems?: number; + MinItems?: number; + UniqueItems?: true; + MultipleOf?: number; +} + +export type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType; + +export interface SimpleMapperType { + name: "Base64Url" + | "Boolean" + | "ByteArray" + | "Date" + | "DateTime" + | "DateTimeRfc1123" + | "Object" + | "Stream" + | "String" + | "TimeSpan" + | "UnixTime" + | "Uuid" + | "Number" + | "any"; +} + +export interface CompositeMapperType { + name: "Composite"; + + // Only one of the two below properties should be present. + // Use className to reference another type definition, + // and use modelProperties/additionalProperties when the reference to the other type has been resolved. + className?: string; + + modelProperties?: { [propertyName: string]: Mapper }; + additionalProperties?: Mapper; + + uberParent?: string; + polymorphicDiscriminator?: PolymorphicDiscriminator; +} + +export interface SequenceMapperType { + name: "Sequence"; + element: Mapper; +} + +export interface DictionaryMapperType { + name: "Dictionary"; + value: Mapper; +} + +export interface EnumMapperType { + name: "Enum"; + allowedValues: any[]; +} + +export interface BaseMapper { + xmlName?: string; + xmlIsAttribute?: boolean; + xmlElementName?: string; + xmlIsWrapped?: boolean; + readOnly?: boolean; + isConstant?: boolean; + required?: boolean; + nullable?: boolean; + serializedName?: string; + type: MapperType; + defaultValue?: any; + constraints?: MapperConstraints; +} + +export type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper; + +export interface PolymorphicDiscriminator { + serializedName: string; + clientName: string; + [key: string]: string; +} + +export interface CompositeMapper extends BaseMapper { + type: CompositeMapperType; +} + +export interface SequenceMapper extends BaseMapper { + type: SequenceMapperType; +} + +export interface DictionaryMapper extends BaseMapper { + type: DictionaryMapperType; + headerCollectionPrefix?: string; +} + +export interface EnumMapper extends BaseMapper { + type: EnumMapperType; +} + +export interface UrlParameterValue { + value: string; + skipUrlEncoding: boolean; +} + +// TODO: why is this here? +export function serializeObject(toSerialize: any): any { + if (toSerialize == undefined) return undefined; + if (toSerialize instanceof Uint8Array) { + toSerialize = base64.encodeByteArray(toSerialize); + return toSerialize; + } + else if (toSerialize instanceof Date) { + return toSerialize.toISOString(); + } + else if (Array.isArray(toSerialize)) { + const array = []; + for (let i = 0; i < toSerialize.length; i++) { + array.push(serializeObject(toSerialize[i])); + } + return array; + } else if (typeof toSerialize === "object") { + const dictionary: { [key: string]: any } = {}; + for (const property in toSerialize) { + dictionary[property] = serializeObject(toSerialize[property]); + } + return dictionary; + } + return toSerialize; +} + +/** + * Utility function to create a K:V from a list of strings + */ +function strEnum(o: Array): { [K in T]: K } { + const result: any = {}; + for (const key of o) { + result[key] = key; + } + return result; +} + +export const MapperType = strEnum([ + "Base64Url", + "Boolean", + "ByteArray", + "Composite", + "Date", + "DateTime", + "DateTimeRfc1123", + "Dictionary", + "Enum", + "Number", + "Object", + "Sequence", + "String", + "Stream", + "TimeSpan", + "UnixTime" +]); diff --git a/node_modules/@azure/ms-rest-js/lib/serviceClient.ts b/node_modules/@azure/ms-rest-js/lib/serviceClient.ts new file mode 100644 index 000000000..1ff6f13a3 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/serviceClient.ts @@ -0,0 +1,620 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { ServiceClientCredentials } from "./credentials/serviceClientCredentials"; +import { DefaultHttpClient } from "./defaultHttpClient"; +import { HttpClient } from "./httpClient"; +import { HttpOperationResponse, RestResponse } from "./httpOperationResponse"; +import { HttpPipelineLogger } from "./httpPipelineLogger"; +import { OperationArguments } from "./operationArguments"; +import { getPathStringFromParameter, getPathStringFromParameterPath, OperationParameter, ParameterPath } from "./operationParameter"; +import { isStreamOperation, OperationSpec } from "./operationSpec"; +import { deserializationPolicy, DeserializationContentTypes } from "./policies/deserializationPolicy"; +import { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy"; +import { generateClientRequestIdPolicy } from "./policies/generateClientRequestIdPolicy"; +import { userAgentPolicy, getDefaultUserAgentHeaderName, getDefaultUserAgentValue } from "./policies/userAgentPolicy"; +import { redirectPolicy } from "./policies/redirectPolicy"; +import { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions, RequestPolicyOptionsLike } from "./policies/requestPolicy"; +import { rpRegistrationPolicy } from "./policies/rpRegistrationPolicy"; +import { signingPolicy } from "./policies/signingPolicy"; +import { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy"; +import { QueryCollectionFormat } from "./queryCollectionFormat"; +import { CompositeMapper, DictionaryMapper, Mapper, MapperType, Serializer } from "./serializer"; +import { URLBuilder } from "./url"; +import * as utils from "./util/utils"; +import { stringifyXML } from "./util/xml"; +import { RequestOptionsBase, RequestPrepareOptions, WebResourceLike, isWebResourceLike, WebResource } from "./webResource"; +import { OperationResponse } from "./operationResponse"; +import { ServiceCallback } from "./util/utils"; +import { agentPolicy } from "./policies/agentPolicy"; +import { proxyPolicy, getDefaultProxySettings } from "./policies/proxyPolicy"; +import { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy"; +import { Agent } from "http"; + + +/** + * HTTP proxy settings (Node.js only) + */ +export interface ProxySettings { + host: string; + port: number; + username?: string; + password?: string; +} + +/** + * HTTP and HTTPS agents (Node.js only) + */ +export interface AgentSettings { + http: Agent; + https: Agent; +} + +/** + * Options to be provided while creating the client. + */ +export interface ServiceClientOptions { + /** + * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP + * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns + * the requestPolicyFactories that will be used. + */ + requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => (void | RequestPolicyFactory[])); + /** + * The HttpClient that will be used to send HTTP requests. + */ + httpClient?: HttpClient; + /** + * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline. + */ + httpPipelineLogger?: HttpPipelineLogger; + /** + * If set to true, turn off the default retry policy. + */ + noRetryPolicy?: boolean; + /** + * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30. + */ + rpRegistrationRetryTimeout?: number; + /** + * Whether or not to generate a client request ID header for each HTTP request. + */ + generateClientRequestIdHeader?: boolean; + /** + * Whether to include credentials in CORS requests in the browser. + * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information. + */ + withCredentials?: boolean; + /** + * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a + * header to all outgoing requests with this header name and a random UUID as the request ID. + */ + clientRequestIdHeaderName?: string; + /** + * The content-types that will be associated with JSON or XML serialization. + */ + deserializationContentTypes?: DeserializationContentTypes; + /** + * The header name to use for the telemetry header while sending the request. If this is not + * specified, then "User-Agent" will be used when running on Node.js and "x-ms-command-name" will + * be used when running in a browser. + */ + userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string); + /** + * The string to be set to the telemetry header while sending the request, or a function that + * takes in the default user-agent string and returns the user-agent string that will be used. + */ + userAgent?: string | ((defaultUserAgent: string) => string); + /** + * Proxy settings which will be used for every HTTP request (Node.js only). + */ + proxySettings?: ProxySettings; + /** + * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only). + */ + agentSettings?: AgentSettings; +} + +/** + * @class + * Initializes a new instance of the ServiceClient. + */ +export class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + protected baseUri?: string; + + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + protected requestContentType?: string; + + + /** + * The HTTP client that will be used to send requests. + */ + private readonly _httpClient: HttpClient; + private readonly _requestPolicyOptions: RequestPolicyOptionsLike; + + private readonly _requestPolicyFactories: RequestPolicyFactory[]; + private readonly _withCredentials: boolean; + + /** + * The ServiceClient constructor + * @constructor + * @param {ServiceClientCredentials} [credentials] The credentials object used for authentication. + * @param {ServiceClientOptions} [options] The service client options that govern the behavior of the client. + */ + constructor(credentials?: ServiceClientCredentials, options?: ServiceClientOptions) { + if (!options) { + options = {}; + } + + if (credentials && !credentials.signRequest) { + throw new Error("credentials argument needs to implement signRequest method"); + } + + this._withCredentials = options.withCredentials || false; + this._httpClient = options.httpClient || new DefaultHttpClient(); + this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger); + + let requestPolicyFactories: RequestPolicyFactory[]; + if (Array.isArray(options.requestPolicyFactories)) { + requestPolicyFactories = options.requestPolicyFactories; + } else { + requestPolicyFactories = createDefaultRequestPolicyFactories(credentials, options); + if (options.requestPolicyFactories) { + const newRequestPolicyFactories: void | RequestPolicyFactory[] = options.requestPolicyFactories(requestPolicyFactories); + if (newRequestPolicyFactories) { + requestPolicyFactories = newRequestPolicyFactories; + } + } + } + this._requestPolicyFactories = requestPolicyFactories; + } + + /** + * Send the provided httpRequest. + */ + sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise { + if (options === null || options === undefined || typeof options !== "object") { + throw new Error("options cannot be null or undefined and it must be of type object."); + } + + let httpRequest: WebResourceLike; + try { + if (isWebResourceLike(options)) { + options.validateRequestProperties(); + httpRequest = options; + } else { + httpRequest = new WebResource(); + httpRequest = httpRequest.prepare(options); + } + } catch (error) { + return Promise.reject(error); + } + + let httpPipeline: RequestPolicy = this._httpClient; + if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) { + for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) { + httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions); + } + } + return httpPipeline.sendRequest(httpRequest); + } + + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @param {OperationArguments} operationArguments The arguments that the HTTP request's templated values will be populated from. + * @param {OperationSpec} operationSpec The OperationSpec to use to populate the httpRequest. + * @param {ServiceCallback} callback The callback to call when the response is received. + */ + sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback): Promise { + if (typeof operationArguments.options === "function") { + callback = operationArguments.options; + operationArguments.options = undefined; + } + + const httpRequest = new WebResource(); + + let result: Promise; + try { + const baseUri: string | undefined = operationSpec.baseUrl || this.baseUri; + if (!baseUri) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use."); + } + + httpRequest.method = operationSpec.httpMethod; + httpRequest.operationSpec = operationSpec; + + const requestUrl: URLBuilder = URLBuilder.parse(baseUri); + if (operationSpec.path) { + requestUrl.appendPath(operationSpec.path); + } + if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) { + for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue: string = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter)); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue); + } + } + if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) { + for (const queryParameter of operationSpec.queryParameters) { + let queryParameterValue: any = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer); + if (queryParameterValue != undefined) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter)); + if (queryParameter.collectionFormat != undefined) { + if (queryParameter.collectionFormat === QueryCollectionFormat.Multi) { + if (queryParameterValue.length === 0) { + queryParameterValue = ""; + } else { + for (const index in queryParameterValue) { + const item = queryParameterValue[index]; + queryParameterValue[index] = item == undefined ? "" : item.toString(); + } + } + } else if (queryParameter.collectionFormat === QueryCollectionFormat.Ssv || queryParameter.collectionFormat === QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + for (const index in queryParameterValue) { + if (queryParameterValue[index] !== undefined && queryParameterValue[index] !== null) { + queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]); + } + } + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + if (queryParameter.collectionFormat != undefined && queryParameter.collectionFormat !== QueryCollectionFormat.Multi && queryParameter.collectionFormat !== QueryCollectionFormat.Ssv && queryParameter.collectionFormat !== QueryCollectionFormat.Tsv) { + queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat); + } + requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue); + } + } + } + httpRequest.url = requestUrl.toString(); + + const contentType = operationSpec.contentType || this.requestContentType; + if (contentType) { + httpRequest.headers.set("Content-Type", contentType); + } + + if (operationSpec.headerParameters) { + for (const headerParameter of operationSpec.headerParameters) { + let headerValue: any = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer); + if (headerValue != undefined) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter)); + const headerCollectionPrefix = (headerParameter.mapper as DictionaryMapper).headerCollectionPrefix; + if (headerCollectionPrefix) { + for (const key of Object.keys(headerValue)) { + httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } else { + httpRequest.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue); + } + } + } + } + + const options: RequestOptionsBase | undefined = operationArguments.options; + if (options) { + if (options.customHeaders) { + for (const customHeaderName in options.customHeaders) { + httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]); + } + } + + if (options.abortSignal) { + httpRequest.abortSignal = options.abortSignal; + } + + if (options.timeout) { + httpRequest.timeout = options.timeout; + } + + if (options.onUploadProgress) { + httpRequest.onUploadProgress = options.onUploadProgress; + } + + if (options.onDownloadProgress) { + httpRequest.onDownloadProgress = options.onDownloadProgress; + } + } + + httpRequest.withCredentials = this._withCredentials; + + serializeRequestBody(this, httpRequest, operationArguments, operationSpec); + + if (httpRequest.streamResponseBody == undefined) { + httpRequest.streamResponseBody = isStreamOperation(operationSpec); + } + + result = this.sendRequest(httpRequest) + .then(res => flattenResponse(res, operationSpec.responses[res.status])); + } catch (error) { + result = Promise.reject(error); + } + + const cb = callback; + if (cb) { + result + // tslint:disable-next-line:no-null-keyword + .then(res => cb(null, res._response.parsedBody, res._response.request, res._response)) + .catch(err => cb(err)); + } + + return result; + } +} + +export function serializeRequestBody(serviceClient: ServiceClient, httpRequest: WebResourceLike, operationArguments: OperationArguments, operationSpec: OperationSpec): void { + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer); + + const bodyMapper = operationSpec.requestBody.mapper; + const { required, xmlName, xmlElementName, serializedName } = bodyMapper; + const typeName = bodyMapper.type.name; + try { + if (httpRequest.body != undefined || required) { + const requestBodyParameterPathString: string = getPathStringFromParameter(operationSpec.requestBody); + httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString); + const isStream = typeName === MapperType.Stream; + if (operationSpec.isXML) { + if (typeName === MapperType.Sequence) { + httpRequest.body = stringifyXML(utils.prepareXMLRootList(httpRequest.body, xmlElementName || xmlName || serializedName!), { rootName: xmlName || serializedName }); + } + else if (!isStream) { + httpRequest.body = stringifyXML(httpRequest.body, { rootName: xmlName || serializedName }); + } + } else if (!isStream) { + httpRequest.body = JSON.stringify(httpRequest.body); + } + } + } catch (error) { + throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, " ")}.`); + } + } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + httpRequest.formData = {}; + for (const formDataParameter of operationSpec.formDataParameters) { + const formDataParameterValue: any = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer); + if (formDataParameterValue != undefined) { + const formDataParameterPropertyName: string = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter); + httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter)); + } + } + } +} + +function isRequestPolicyFactory(instance: any): instance is RequestPolicyFactory { + return typeof instance.create === "function"; +} + +function getValueOrFunctionResult(value: undefined | string | ((defaultValue: string) => string), defaultValueCreator: (() => string)): string { + let result: string; + if (typeof value === "string") { + result = value; + } else { + result = defaultValueCreator(); + if (typeof value === "function") { + result = value(result); + } + } + return result; +} + +function createDefaultRequestPolicyFactories(credentials: ServiceClientCredentials | RequestPolicyFactory | undefined, options: ServiceClientOptions): RequestPolicyFactory[] { + const factories: RequestPolicyFactory[] = []; + + if (options.generateClientRequestIdHeader) { + factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName)); + } + + if (credentials) { + if (isRequestPolicyFactory(credentials)) { + factories.push(credentials); + } else { + factories.push(signingPolicy(credentials)); + } + } + + const userAgentHeaderName: string = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName); + const userAgentHeaderValue: string = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue); + if (userAgentHeaderName && userAgentHeaderValue) { + factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue })); + } + factories.push(redirectPolicy()); + factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout)); + + if (!options.noRetryPolicy) { + factories.push(exponentialRetryPolicy()); + factories.push(systemErrorRetryPolicy()); + factories.push(throttlingRetryPolicy()); + } + + factories.push(deserializationPolicy(options.deserializationContentTypes)); + + const proxySettings = options.proxySettings || getDefaultProxySettings(); + if (proxySettings) { + factories.push(proxyPolicy(proxySettings)); + } + + if (options.agentSettings) { + factories.push(agentPolicy(options.agentSettings)); + } + + return factories; +} + +export type PropertyParent = { [propertyName: string]: any }; + +/** + * Get the property parent for the property at the provided path when starting with the provided + * parent object. + */ +export function getPropertyParent(parent: PropertyParent, propertyPath: string[]): PropertyParent { + if (parent && propertyPath) { + const propertyPathLength: number = propertyPath.length; + for (let i = 0; i < propertyPathLength - 1; ++i) { + const propertyName: string = propertyPath[i]; + if (!parent[propertyName]) { + parent[propertyName] = {}; + } + parent = parent[propertyName]; + } + } + return parent; +} + +function getOperationArgumentValueFromParameter(serviceClient: ServiceClient, operationArguments: OperationArguments, parameter: OperationParameter, serializer: Serializer): any { + return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer); +} + +export function getOperationArgumentValueFromParameterPath(serviceClient: ServiceClient, operationArguments: OperationArguments, parameterPath: ParameterPath, parameterMapper: Mapper, serializer: Serializer): any { + let value: any; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; + } + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } else { + let propertySearchResult: PropertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound) { + propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath); + } + + let useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = parameterMapper.required || (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + + // Serialize just for validation purposes. + const parameterPathString: string = getPathStringFromParameterPath(parameterPath, parameterMapper); + serializer.serialize(parameterMapper, value, parameterPathString); + } + } else { + if (parameterMapper.required) { + value = {}; + } + + for (const propertyName in parameterPath) { + const propertyMapper: Mapper = (parameterMapper as CompositeMapper).type.modelProperties![propertyName]; + const propertyPath: ParameterPath = parameterPath[propertyName]; + const propertyValue: any = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer); + // Serialize just for validation purposes. + const propertyPathString: string = getPathStringFromParameterPath(propertyPath, propertyMapper); + serializer.serialize(propertyMapper, propertyValue, propertyPathString); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} + +interface PropertySearchResult { + propertyValue?: any; + propertyFound: boolean; +} + +function getPropertyFromParameterPath(parent: { [parameterName: string]: any }, parameterPath: string[]): PropertySearchResult { + const result: PropertySearchResult = { propertyFound: false }; + let i = 0; + for (; i < parameterPath.length; ++i) { + const parameterPathPart: string = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent != undefined && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} + +export function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse { + const parsedHeaders = _response.parsedHeaders; + const bodyMapper = responseSpec && responseSpec.bodyMapper; + + const addOperationResponse = (obj: {}) => + Object.defineProperty(obj, "_response", { + value: _response + }); + + if (bodyMapper) { + const typeName = bodyMapper.type.name; + if (typeName === "Stream") { + return addOperationResponse({ + ...parsedHeaders, + blobBody: _response.blobBody, + readableStreamBody: _response.readableStreamBody + }); + } + + const modelProperties = typeName === "Composite" && (bodyMapper as CompositeMapper).type.modelProperties || {}; + const isPageableResponse = Object.keys(modelProperties).some(k => modelProperties[k].serializedName === ""); + if (typeName === "Sequence" || isPageableResponse) { + // We're expecting a sequece(array) make sure that the response body is in the + // correct format, if not make it an empty array [] + const parsedBody = + Array.isArray(_response.parsedBody) + ? _response.parsedBody + : []; + const arrayResponse = [...parsedBody] as RestResponse & any[]; + + for (const key of Object.keys(modelProperties)) { + if (modelProperties[key].serializedName) { + arrayResponse[key] = _response.parsedBody[key]; + } + } + + if (parsedHeaders) { + for (const key of Object.keys(parsedHeaders)) { + arrayResponse[key] = parsedHeaders[key]; + } + } + addOperationResponse(arrayResponse); + return arrayResponse; + } + + if (typeName === "Composite" || typeName === "Dictionary") { + return addOperationResponse({ + ...parsedHeaders, + ..._response.parsedBody + }); + } + } + + if (bodyMapper || _response.request.method === "HEAD" || utils.isPrimitiveType(_response.parsedBody)) { + // primitive body types and HEAD booleans + return addOperationResponse({ + ...parsedHeaders, + body: _response.parsedBody + }); + } + + return addOperationResponse({ + ...parsedHeaders, + ..._response.parsedBody + }); +} diff --git a/node_modules/@azure/ms-rest-js/lib/url.ts b/node_modules/@azure/ms-rest-js/lib/url.ts new file mode 100644 index 000000000..6549403d8 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/url.ts @@ -0,0 +1,664 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { replaceAll } from "./util/utils"; + +type URLQueryParseState = "ParameterName" | "ParameterValue" | "Invalid"; + +/** + * A class that handles the query portion of a URLBuilder. + */ +export class URLQuery { + private readonly _rawQuery: { [queryParameterName: string]: string | string[] } = {}; + + /** + * Get whether or not there any query parameters in this URLQuery. + */ + public any(): boolean { + return Object.keys(this._rawQuery).length > 0; + } + + /** + * Set a query parameter with the provided name and value. If the parameterValue is undefined or + * empty, then this will attempt to remove an existing query parameter with the provided + * parameterName. + */ + public set(parameterName: string, parameterValue: any): void { + if (parameterName) { + if (parameterValue != undefined) { + const newValue = Array.isArray(parameterValue) ? parameterValue : parameterValue.toString(); + this._rawQuery[parameterName] = newValue; + } else { + delete this._rawQuery[parameterName]; + } + } + } + + /** + * Get the value of the query parameter with the provided name. If no parameter exists with the + * provided parameter name, then undefined will be returned. + */ + public get(parameterName: string): string | string[] | undefined { + return parameterName ? this._rawQuery[parameterName] : undefined; + } + + /** + * Get the string representation of this query. The return value will not start with a "?". + */ + public toString(): string { + let result = ""; + for (const parameterName in this._rawQuery) { + if (result) { + result += "&"; + } + const parameterValue = this._rawQuery[parameterName]; + if (Array.isArray(parameterValue)) { + const parameterStrings = []; + for (const parameterValueElement of parameterValue) { + parameterStrings.push(`${parameterName}=${parameterValueElement}`); + } + result += parameterStrings.join("&"); + } else { + result += `${parameterName}=${parameterValue}`; + } + } + return result; + } + + /** + * Parse a URLQuery from the provided text. + */ + public static parse(text: string): URLQuery { + const result = new URLQuery(); + + if (text) { + if (text.startsWith("?")) { + text = text.substring(1); + } + + let currentState: URLQueryParseState = "ParameterName"; + + let parameterName = ""; + let parameterValue = ""; + for (let i = 0; i < text.length; ++i) { + const currentCharacter: string = text[i]; + switch (currentState) { + case "ParameterName": + switch (currentCharacter) { + case "=": + currentState = "ParameterValue"; + break; + + case "&": + parameterName = ""; + parameterValue = ""; + break; + + default: + parameterName += currentCharacter; + break; + } + break; + + case "ParameterValue": + switch (currentCharacter) { + case "=": + parameterName = ""; + parameterValue = ""; + currentState = "Invalid"; + break; + + case "&": + result.set(parameterName, parameterValue); + parameterName = ""; + parameterValue = ""; + currentState = "ParameterName"; + break; + + default: + parameterValue += currentCharacter; + break; + } + break; + + case "Invalid": + if (currentCharacter === "&") { + currentState = "ParameterName"; + } + break; + + default: + throw new Error("Unrecognized URLQuery parse state: " + currentState); + } + } + if (currentState === "ParameterValue") { + result.set(parameterName, parameterValue); + } + } + + return result; + } +} + +/** + * A class that handles creating, modifying, and parsing URLs. + */ +export class URLBuilder { + private _scheme: string | undefined; + private _host: string | undefined; + private _port: string | undefined; + private _path: string | undefined; + private _query: URLQuery | undefined; + + /** + * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL + * (such as a host, port, path, or query), those parts will be added to this URL as well. + */ + public setScheme(scheme: string | undefined): void { + if (!scheme) { + this._scheme = undefined; + } else { + this.set(scheme, "SCHEME"); + } + } + + /** + * Get the scheme that has been set in this URL. + */ + public getScheme(): string | undefined { + return this._scheme; + } + + /** + * Set the host for this URL. If the provided host contains other parts of a URL (such as a + * port, path, or query), those parts will be added to this URL as well. + */ + public setHost(host: string | undefined): void { + if (!host) { + this._host = undefined; + } else { + this.set(host, "SCHEME_OR_HOST"); + } + } + + /** + * Get the host that has been set in this URL. + */ + public getHost(): string | undefined { + return this._host; + } + + /** + * Set the port for this URL. If the provided port contains other parts of a URL (such as a + * path or query), those parts will be added to this URL as well. + */ + public setPort(port: number | string | undefined): void { + if (port == undefined || port === "") { + this._port = undefined; + } else { + this.set(port.toString(), "PORT"); + } + } + + /** + * Get the port that has been set in this URL. + */ + public getPort(): string | undefined { + return this._port; + } + + /** + * Set the path for this URL. If the provided path contains a query, then it will be added to + * this URL as well. + */ + public setPath(path: string | undefined): void { + if (!path) { + this._path = undefined; + } else { + if (path.indexOf("://") !== -1) { + this.set(path, "SCHEME"); + } else { + this.set(path, "PATH"); + } + } + } + + /** + * Append the provided path to this URL's existing path. If the provided path contains a query, + * then it will be added to this URL as well. + */ + public appendPath(path: string | undefined): void { + if (path) { + let currentPath: string | undefined = this.getPath(); + if (currentPath) { + if (!currentPath.endsWith("/")) { + currentPath += "/"; + } + + if (path.startsWith("/")) { + path = path.substring(1); + } + + path = currentPath + path; + } + this.set(path, "PATH"); + } + } + + /** + * Get the path that has been set in this URL. + */ + public getPath(): string | undefined { + return this._path; + } + + /** + * Set the query in this URL. + */ + public setQuery(query: string | undefined): void { + if (!query) { + this._query = undefined; + } else { + this._query = URLQuery.parse(query); + } + } + + /** + * Set a query parameter with the provided name and value in this URL's query. If the provided + * query parameter value is undefined or empty, then the query parameter will be removed if it + * existed. + */ + public setQueryParameter(queryParameterName: string, queryParameterValue: any): void { + if (queryParameterName) { + if (!this._query) { + this._query = new URLQuery(); + } + this._query.set(queryParameterName, queryParameterValue); + } + } + + /** + * Get the value of the query parameter with the provided query parameter name. If no query + * parameter exists with the provided name, then undefined will be returned. + */ + public getQueryParameterValue(queryParameterName: string): string | string[] | undefined { + return this._query ? this._query.get(queryParameterName) : undefined; + } + + /** + * Get the query in this URL. + */ + public getQuery(): string | undefined { + return this._query ? this._query.toString() : undefined; + } + + /** + * Set the parts of this URL by parsing the provided text using the provided startState. + */ + private set(text: string, startState: URLTokenizerState): void { + const tokenizer = new URLTokenizer(text, startState); + + while (tokenizer.next()) { + const token: URLToken | undefined = tokenizer.current(); + if (token) { + switch (token.type) { + case "SCHEME": + this._scheme = token.text || undefined; + break; + + case "HOST": + this._host = token.text || undefined; + break; + + case "PORT": + this._port = token.text || undefined; + break; + + case "PATH": + const tokenPath: string | undefined = token.text || undefined; + if (!this._path || this._path === "/" || tokenPath !== "/") { + this._path = tokenPath; + } + break; + + case "QUERY": + this._query = URLQuery.parse(token.text); + break; + + default: + throw new Error(`Unrecognized URLTokenType: ${token.type}`); + } + } + } + } + + public toString(): string { + let result = ""; + + if (this._scheme) { + result += `${this._scheme}://`; + } + + if (this._host) { + result += this._host; + } + + if (this._port) { + result += `:${this._port}`; + } + + if (this._path) { + if (!this._path.startsWith("/")) { + result += "/"; + } + result += this._path; + } + + if (this._query && this._query.any()) { + result += `?${this._query.toString()}`; + } + + return result; + } + + /** + * If the provided searchValue is found in this URLBuilder, then replace it with the provided + * replaceValue. + */ + public replaceAll(searchValue: string, replaceValue: string): void { + if (searchValue) { + this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue)); + this.setHost(replaceAll(this.getHost(), searchValue, replaceValue)); + this.setPort(replaceAll(this.getPort(), searchValue, replaceValue)); + this.setPath(replaceAll(this.getPath(), searchValue, replaceValue)); + this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue)); + } + } + + public static parse(text: string): URLBuilder { + const result = new URLBuilder(); + result.set(text, "SCHEME_OR_HOST"); + return result; + } +} + +type URLTokenizerState = "SCHEME" | "SCHEME_OR_HOST" | "HOST" | "PORT" | "PATH" | "QUERY" | "DONE"; + +type URLTokenType = "SCHEME" | "HOST" | "PORT" | "PATH" | "QUERY"; + +export class URLToken { + public constructor(public readonly text: string, public readonly type: URLTokenType) { + } + + public static scheme(text: string): URLToken { + return new URLToken(text, "SCHEME"); + } + + public static host(text: string): URLToken { + return new URLToken(text, "HOST"); + } + + public static port(text: string): URLToken { + return new URLToken(text, "PORT"); + } + + public static path(text: string): URLToken { + return new URLToken(text, "PATH"); + } + + public static query(text: string): URLToken { + return new URLToken(text, "QUERY"); + } +} + +/** + * Get whether or not the provided character (single character string) is an alphanumeric (letter or + * digit) character. + */ +export function isAlphaNumericCharacter(character: string): boolean { + const characterCode: number = character.charCodeAt(0); + return (48 /* '0' */ <= characterCode && characterCode <= 57 /* '9' */) || + (65 /* 'A' */ <= characterCode && characterCode <= 90 /* 'Z' */) || + (97 /* 'a' */ <= characterCode && characterCode <= 122 /* 'z' */); +} + +/** + * A class that tokenizes URL strings. + */ +export class URLTokenizer { + readonly _textLength: number; + _currentState: URLTokenizerState; + _currentIndex: number; + _currentToken: URLToken | undefined; + + public constructor(readonly _text: string, state?: URLTokenizerState) { + this._textLength = _text ? _text.length : 0; + this._currentState = state != undefined ? state : "SCHEME_OR_HOST"; + this._currentIndex = 0; + } + + /** + * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer + * hasn't started or has finished tokenizing. + */ + public current(): URLToken | undefined { + return this._currentToken; + } + + /** + * Advance to the next URLToken and return whether or not a URLToken was found. + */ + public next(): boolean { + if (!hasCurrentCharacter(this)) { + this._currentToken = undefined; + } else { + switch (this._currentState) { + case "SCHEME": + nextScheme(this); + break; + + case "SCHEME_OR_HOST": + nextSchemeOrHost(this); + break; + + case "HOST": + nextHost(this); + break; + + case "PORT": + nextPort(this); + break; + + case "PATH": + nextPath(this); + break; + + case "QUERY": + nextQuery(this); + break; + + default: + throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`); + } + } + return !!this._currentToken; + } +} + + +/** + * Read the remaining characters from this Tokenizer's character stream. + */ +function readRemaining(tokenizer: URLTokenizer): string { + let result = ""; + if (tokenizer._currentIndex < tokenizer._textLength) { + result = tokenizer._text.substring(tokenizer._currentIndex); + tokenizer._currentIndex = tokenizer._textLength; + } + return result; +} + +/** + * Whether or not this URLTokenizer has a current character. + */ +function hasCurrentCharacter(tokenizer: URLTokenizer): boolean { + return tokenizer._currentIndex < tokenizer._textLength; +} + +/** + * Get the character in the text string at the current index. + */ +function getCurrentCharacter(tokenizer: URLTokenizer): string { + return tokenizer._text[tokenizer._currentIndex]; +} + +/** + * Advance to the character in text that is "step" characters ahead. If no step value is provided, + * then step will default to 1. + */ +function nextCharacter(tokenizer: URLTokenizer, step?: number): void { + if (hasCurrentCharacter(tokenizer)) { + if (!step) { + step = 1; + } + tokenizer._currentIndex += step; + } +} + +/** + * Starting with the current character, peek "charactersToPeek" number of characters ahead in this + * Tokenizer's stream of characters. + */ +function peekCharacters(tokenizer: URLTokenizer, charactersToPeek: number): string { + let endIndex: number = tokenizer._currentIndex + charactersToPeek; + if (tokenizer._textLength < endIndex) { + endIndex = tokenizer._textLength; + } + return tokenizer._text.substring(tokenizer._currentIndex, endIndex); +} + +/** + * Read characters from this Tokenizer until the end of the stream or until the provided condition + * is false when provided the current character. + */ +function readWhile(tokenizer: URLTokenizer, condition: (character: string) => boolean): string { + let result = ""; + + while (hasCurrentCharacter(tokenizer)) { + const currentCharacter: string = getCurrentCharacter(tokenizer); + if (!condition(currentCharacter)) { + break; + } else { + result += currentCharacter; + nextCharacter(tokenizer); + } + } + + return result; +} + +/** + * Read characters from this Tokenizer until a non-alphanumeric character or the end of the + * character stream is reached. + */ +function readWhileLetterOrDigit(tokenizer: URLTokenizer): string { + return readWhile(tokenizer, (character: string) => isAlphaNumericCharacter(character)); +} + +/** + * Read characters from this Tokenizer until one of the provided terminating characters is read or + * the end of the character stream is reached. + */ +function readUntilCharacter(tokenizer: URLTokenizer, ...terminatingCharacters: string[]): string { + return readWhile(tokenizer, (character: string) => terminatingCharacters.indexOf(character) === -1); +} + +function nextScheme(tokenizer: URLTokenizer): void { + const scheme: string = readWhileLetterOrDigit(tokenizer); + tokenizer._currentToken = URLToken.scheme(scheme); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } else { + tokenizer._currentState = "HOST"; + } +} + +function nextSchemeOrHost(tokenizer: URLTokenizer): void { + const schemeOrHost: string = readUntilCharacter(tokenizer, ":", "/", "?"); + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "DONE"; + } else if (getCurrentCharacter(tokenizer) === ":") { + if (peekCharacters(tokenizer, 3) === "://") { + tokenizer._currentToken = URLToken.scheme(schemeOrHost); + tokenizer._currentState = "HOST"; + } else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + tokenizer._currentState = "PORT"; + } + } else { + tokenizer._currentToken = URLToken.host(schemeOrHost); + if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } else { + tokenizer._currentState = "QUERY"; + } + } +} + +function nextHost(tokenizer: URLTokenizer): void { + if (peekCharacters(tokenizer, 3) === "://") { + nextCharacter(tokenizer, 3); + } + + const host: string = readUntilCharacter(tokenizer, ":", "/", "?"); + tokenizer._currentToken = URLToken.host(host); + + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } else if (getCurrentCharacter(tokenizer) === ":") { + tokenizer._currentState = "PORT"; + } else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } else { + tokenizer._currentState = "QUERY"; + } +} + +function nextPort(tokenizer: URLTokenizer): void { + if (getCurrentCharacter(tokenizer) === ":") { + nextCharacter(tokenizer); + } + + const port: string = readUntilCharacter(tokenizer, "/", "?"); + tokenizer._currentToken = URLToken.port(port); + + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } else if (getCurrentCharacter(tokenizer) === "/") { + tokenizer._currentState = "PATH"; + } else { + tokenizer._currentState = "QUERY"; + } +} + +function nextPath(tokenizer: URLTokenizer): void { + const path: string = readUntilCharacter(tokenizer, "?"); + tokenizer._currentToken = URLToken.path(path); + + if (!hasCurrentCharacter(tokenizer)) { + tokenizer._currentState = "DONE"; + } else { + tokenizer._currentState = "QUERY"; + } +} + +function nextQuery(tokenizer: URLTokenizer): void { + if (getCurrentCharacter(tokenizer) === "?") { + nextCharacter(tokenizer); + } + + const query: string = readRemaining(tokenizer); + tokenizer._currentToken = URLToken.query(query); + tokenizer._currentState = "DONE"; +} diff --git a/node_modules/@azure/ms-rest-js/lib/util/base64.browser.ts b/node_modules/@azure/ms-rest-js/lib/util/base64.browser.ts new file mode 100644 index 000000000..e6b597419 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/base64.browser.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value: string): string { + return btoa(value); +} + +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value: Uint8Array): string { + let str = ""; + for (let i = 0; i < value.length; i++) { + str += String.fromCharCode(value[i]); + } + return btoa(str); +} + +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value: string): Uint8Array { + const byteString = atob(value); + const arr = new Uint8Array(byteString.length); + for (let i = 0; i < byteString.length; i++) { + arr[i] = byteString.charCodeAt(i); + } + return arr; +} diff --git a/node_modules/@azure/ms-rest-js/lib/util/base64.ts b/node_modules/@azure/ms-rest-js/lib/util/base64.ts new file mode 100644 index 000000000..03b3bdc60 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/base64.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +/** + * Encodes a string in base64 format. + * @param value the string to encode + */ +export function encodeString(value: string): string { + return Buffer.from(value).toString("base64"); +} + +/** + * Encodes a byte array in base64 format. + * @param value the Uint8Aray to encode + */ +export function encodeByteArray(value: Uint8Array): string { + // Buffer.from accepts | -- the TypeScript definition is off here + // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length + const bufferValue = (value instanceof Buffer) ? value : Buffer.from(value.buffer as ArrayBuffer); + return bufferValue.toString("base64"); +} + +/** + * Decodes a base64 string into a byte array. + * @param value the base64 string to decode + */ +export function decodeString(value: string): Uint8Array { + return Buffer.from(value, "base64"); +} diff --git a/node_modules/@azure/ms-rest-js/lib/util/constants.ts b/node_modules/@azure/ms-rest-js/lib/util/constants.ts new file mode 100644 index 000000000..c8363d5b4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/constants.ts @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +export const Constants = { + /** + * The ms-rest version + * @const + * @type {string} + */ + msRestVersion: "2.1.0", + + /** + * Specifies HTTP. + * + * @const + * @type {string} + */ + HTTP: "http:", + + /** + * Specifies HTTPS. + * + * @const + * @type {string} + */ + HTTPS: "https:", + + /** + * Specifies HTTP Proxy. + * + * @const + * @type {string} + */ + HTTP_PROXY: "HTTP_PROXY", + + /** + * Specifies HTTPS Proxy. + * + * @const + * @type {string} + */ + HTTPS_PROXY: "HTTPS_PROXY", + + HttpConstants: { + /** + * Http Verbs + * + * @const + * @enum {string} + */ + HttpVerbs: { + PUT: "PUT", + GET: "GET", + DELETE: "DELETE", + POST: "POST", + MERGE: "MERGE", + HEAD: "HEAD", + PATCH: "PATCH" + }, + + StatusCodes: { + TooManyRequests: 429 + } + }, + + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + * + * @const + * @type {string} + */ + AUTHORIZATION: "authorization", + + AUTHORIZATION_SCHEME: "Bearer", + + /** + * The Retry-After response-header field can be used with a 503 (Service + * Unavailable) or 349 (Too Many Requests) responses to indicate how long + * the service is expected to be unavailable to the requesting client. + * + * @const + * @type {string} + */ + RETRY_AFTER: "Retry-After", + + /** + * The UserAgent header. + * + * @const + * @type {string} + */ + USER_AGENT: "User-Agent" + } +}; diff --git a/node_modules/@azure/ms-rest-js/lib/util/utils.ts b/node_modules/@azure/ms-rest-js/lib/util/utils.ts new file mode 100644 index 000000000..71a6cb0a1 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/utils.ts @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import uuidv4 from "uuid/v4"; +import { HttpOperationResponse } from "../httpOperationResponse"; +import { RestError } from "../restError"; +import { WebResourceLike } from "../webResource"; +import { Constants } from "./constants"; + +/** + * A constant that indicates whether the environment is node.js or browser based. + */ +export const isNode = (typeof process !== "undefined") && !!process.version && !!process.versions && !!process.versions.node; + +/** + * Checks if a parsed URL is HTTPS + * + * @param {object} urlToCheck The url to check + * @return {boolean} True if the URL is HTTPS; false otherwise. + */ +export function urlIsHTTPS(urlToCheck: { protocol: string }): boolean { + return urlToCheck.protocol.toLowerCase() === Constants.HTTPS; +} + +/** + * Encodes an URI. + * + * @param {string} uri The URI to be encoded. + * @return {string} The encoded URI. + */ +export function encodeUri(uri: string): string { + return encodeURIComponent(uri) + .replace(/!/g, "%21") + .replace(/"/g, "%27") + .replace(/\(/g, "%28") + .replace(/\)/g, "%29") + .replace(/\*/g, "%2A"); +} + +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param {HttpOperationResponse} response The Http Response + * + * @return {object} The stripped version of Http Response. + */ +export function stripResponse(response: HttpOperationResponse): any { + const strippedResponse: any = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; +} + +/** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param {WebResource} request The Http Request object + * + * @return {WebResource} The stripped version of Http Request. + */ +export function stripRequest(request: WebResourceLike): WebResourceLike { + const strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; +} + +/** + * Validates the given uuid as a string + * + * @param {string} uuid The uuid as a string that needs to be validated + * + * @return {boolean} True if the uuid is valid; false otherwise. + */ +export function isValidUuid(uuid: string): boolean { + const validUuidRegex = new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "ig"); + return validUuidRegex.test(uuid); +} + +/** + * Provides an array of values of an object. For example + * for a given object { "a": "foo", "b": "bar" }, the method returns ["foo", "bar"]. + * + * @param {object} obj An object whose properties need to be enumerated so that it"s values can be provided as an array + * + * @return {any[]} An array of values of the given object. + */ +export function objectValues(obj: { [key: string]: any; }): any[] { + const result: any[] = []; + if (obj && obj instanceof Object) { + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + result.push((obj)[key]); + } + } + } else { + throw new Error(`The provided object ${JSON.stringify(obj, undefined, 2)} is not a valid object that can be ` + + `enumerated to provide its values as an array.`); + } + return result; +} + +/** + * Generated UUID + * + * @return {string} RFC4122 v4 UUID. + */ +export function generateUuid(): string { + return uuidv4(); +} + +/** + * Executes an array of promises sequentially. Inspiration of this method is here: + * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises! + * + * @param {Array} promiseFactories An array of promise factories(A function that return a promise) + * + * @param {any} [kickstart] Input to the first promise that is used to kickstart the promise chain. + * If not provided then the promise chain starts with undefined. + * + * @return A chain of resolved or rejected promises + */ +export function executePromisesSequentially(promiseFactories: Array, kickstart: any) { + let result = Promise.resolve(kickstart); + promiseFactories.forEach((promiseFactory) => { + result = result.then(promiseFactory); + }); + return result; +} + +/** + * Merges source object into the target object + * @param {object} source The object that needs to be merged + * + * @param {object} target The object to be merged into + * + * @returns {object} Returns the merged target object. + */ +export function mergeObjects(source: { [key: string]: any; }, target: { [key: string]: any; }) { + Object.keys(source).forEach((key) => { + target[key] = source[key]; + }); + return target; +} + +/** + * A wrapper for setTimeout that resolves a promise after t milliseconds. + * @param {number} t The number of milliseconds to be delayed. + * @param {T} value The value to be resolved with after a timeout of t milliseconds. + * @returns {Promise} Resolved promise + */ +export function delay(t: number, value?: T): Promise { + return new Promise((resolve) => setTimeout(() => resolve(value), t)); +} + +/** + * Service callback that is returned for REST requests initiated by the service client. + */ +export interface ServiceCallback { + /** + * A method that will be invoked as a callback to a service function. + * @param {Error | RestError | null} err The error occurred if any, while executing the request; otherwise null. + * @param {TResult} [result] The deserialized response body if an error did not occur. + * @param {WebResourceLike} [request] The raw/actual request sent to the server if an error did not occur. + * @param {HttpOperationResponse} [response] The raw/actual response from the server if an error did not occur. + */ + (err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void; +} + +/** + * Converts a Promise to a callback. + * @param {Promise} promise The Promise to be converted to a callback + * @returns {Function} A function that takes the callback (cb: Function): void + * @deprecated generated code should instead depend on responseToBody + */ +export function promiseToCallback(promise: Promise): Function { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return (cb: Function): void => { + promise.then((data: any) => { + cb(undefined, data); + }, (err: Error) => { + cb(err); + }); + }; +} + +/** + * Converts a Promise to a service callback. + * @param {Promise} promise - The Promise of HttpOperationResponse to be converted to a service callback + * @returns {Function} A function that takes the service callback (cb: ServiceCallback): void + */ +export function promiseToServiceCallback(promise: Promise): Function { + if (typeof promise.then !== "function") { + throw new Error("The provided input is not a Promise."); + } + return (cb: ServiceCallback): void => { + promise.then((data: HttpOperationResponse) => { + process.nextTick(cb, undefined, data.parsedBody as T, data.request, data); + }, (err: Error) => { + process.nextTick(cb, err); + }); + }; +} + +export function prepareXMLRootList(obj: any, elementName: string) { + if (!Array.isArray(obj)) { + obj = [obj]; + } + return { [elementName]: obj }; +} + +/** + * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor + * @param {object} targetCtor The target object on which the properties need to be applied. + * @param {Array} sourceCtors An array of source objects from which the properties need to be taken. + */ +export function applyMixins(targetCtor: any, sourceCtors: any[]): void { + sourceCtors.forEach(sourceCtors => { + Object.getOwnPropertyNames(sourceCtors.prototype).forEach(name => { + targetCtor.prototype[name] = sourceCtors.prototype[name]; + }); + }); +} + +const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + +/** + * Indicates whether the given string is in ISO 8601 format. + * @param {string} value The value to be validated for ISO 8601 duration format. + * @return {boolean} `true` if valid, `false` otherwise. + */ +export function isDuration(value: string): boolean { + return validateISODuration.test(value); +} + +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param {string | undefined} value The value to search and replace in. + * @param {string} searchValue The value to search for in the value argument. + * @param {string} replaceValue The value to replace searchValue with in the value argument. + * @returns {string | undefined} The value where each instance of searchValue was replaced with replacedValue. + */ +export function replaceAll(value: string | undefined, searchValue: string, replaceValue: string): string | undefined { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} + +/** + * Determines whether the given enity is a basic/primitive type + * (string, number, boolean, null, undefined). + * @param value Any entity + * @return boolean - true is it is primitive type, false otherwise. + */ +export function isPrimitiveType(value: any): boolean { + return (typeof value !== "object" && typeof value !== "function") || value === null; +} \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/lib/util/xml.browser.ts b/node_modules/@azure/ms-rest-js/lib/util/xml.browser.ts new file mode 100644 index 000000000..5fdb2a4c7 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/xml.browser.ts @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +const parser = new DOMParser(); +export function parseXML(str: string): Promise { + try { + const dom = parser.parseFromString(str, "application/xml"); + throwIfError(dom); + + const obj = domToObject(dom.childNodes[0]); + return Promise.resolve(obj); + } catch (err) { + return Promise.reject(err); + } +} + +let errorNS = ""; +try { + errorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0].namespaceURI!; +} catch (ignored) { + // Most browsers will return a document containing , but IE will throw. +} + +function throwIfError(dom: Document) { + if (errorNS) { + const parserErrors = dom.getElementsByTagNameNS(errorNS, "parsererror"); + if (parserErrors.length) { + throw new Error(parserErrors.item(0)!.innerHTML); + } + } +} + +function isElement(node: Node): node is Element { + return !!(node as Element).attributes; +} + +/** + * Get the Element-typed version of the provided Node if the provided node is an element with + * attributes. If it isn't, then undefined is returned. + */ +function asElementWithAttributes(node: Node): Element | undefined { + return isElement(node) && node.hasAttributes() ? node : undefined; +} + +function domToObject(node: Node): any { + let result: any = {}; + + const childNodeCount: number = node.childNodes.length; + + const firstChildNode: Node = node.childNodes[0]; + const onlyChildTextValue: string | undefined = (firstChildNode && childNodeCount === 1 && firstChildNode.nodeType === Node.TEXT_NODE && firstChildNode.nodeValue) || undefined; + + const elementWithAttributes: Element | undefined = asElementWithAttributes(node); + if (elementWithAttributes) { + result["$"] = {}; + + for (let i = 0; i < elementWithAttributes.attributes.length; i++) { + const attr = elementWithAttributes.attributes[i]; + result["$"][attr.nodeName] = attr.nodeValue; + } + + if (onlyChildTextValue) { + result["_"] = onlyChildTextValue; + } + } else if (childNodeCount === 0) { + result = ""; + } else if (onlyChildTextValue) { + result = onlyChildTextValue; + } + + if (!onlyChildTextValue) { + for (let i = 0; i < childNodeCount; i++) { + const child = node.childNodes[i]; + // Ignore leading/trailing whitespace nodes + if (child.nodeType !== Node.TEXT_NODE) { + const childObject: any = domToObject(child); + if (!result[child.nodeName]) { + result[child.nodeName] = childObject; + } else if (Array.isArray(result[child.nodeName])) { + result[child.nodeName].push(childObject); + } else { + result[child.nodeName] = [result[child.nodeName], childObject]; + } + } + } + } + + return result; +} + +// tslint:disable-next-line:no-null-keyword +const doc = document.implementation.createDocument(null, null, null); +const serializer = new XMLSerializer(); + +export function stringifyXML(obj: any, opts?: { rootName?: string }) { + const rootName = opts && opts.rootName || "root"; + const dom = buildNode(obj, rootName)[0]; + return '' + serializer.serializeToString(dom); +} + +function buildAttributes(attrs: { [key: string]: { toString(): string; } }): Attr[] { + const result = []; + for (const key of Object.keys(attrs)) { + const attr = doc.createAttribute(key); + attr.value = attrs[key].toString(); + result.push(attr); + } + return result; +} + +function buildNode(obj: any, elementName: string): Node[] { + if (typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean") { + const elem = doc.createElement(elementName); + elem.textContent = obj.toString(); + return [elem]; + } + else if (Array.isArray(obj)) { + const result = []; + for (const arrayElem of obj) { + for (const child of buildNode(arrayElem, elementName)) { + result.push(child); + } + } + return result; + } else if (typeof obj === "object") { + const elem = doc.createElement(elementName); + for (const key of Object.keys(obj)) { + if (key === "$") { + for (const attr of buildAttributes(obj[key])) { + elem.attributes.setNamedItem(attr); + } + } else { + for (const child of buildNode(obj[key], key)) { + elem.appendChild(child); + } + } + } + return [elem]; + } + else { + throw new Error(`Illegal value passed to buildObject: ${obj}`); + } +} diff --git a/node_modules/@azure/ms-rest-js/lib/util/xml.ts b/node_modules/@azure/ms-rest-js/lib/util/xml.ts new file mode 100644 index 000000000..d11d75ac0 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/util/xml.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import * as xml2js from "xml2js"; + +export function stringifyXML(obj: any, opts?: { rootName?: string }) { + const builder = new xml2js.Builder({ + explicitArray: false, + explicitCharkey: false, + rootName: (opts || {}).rootName, + renderOpts: { + pretty: false + } + }); + return builder.buildObject(obj); +} + +export function parseXML(str: string): Promise { + const xmlParser = new xml2js.Parser({ + explicitArray: false, + explicitCharkey: false, + explicitRoot: false + }); + return new Promise((resolve, reject) => { + if (!str) { + reject(new Error("Document is empty")); + } else { + xmlParser.parseString(str, (err?: Error, res?: any) => { + if (err) { + reject(err); + } else { + resolve(res); + } + }); + } + }); +} diff --git a/node_modules/@azure/ms-rest-js/lib/webResource.ts b/node_modules/@azure/ms-rest-js/lib/webResource.ts new file mode 100644 index 000000000..8ce5ff897 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/webResource.ts @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpHeaders, HttpHeadersLike, isHttpHeadersLike } from "./httpHeaders"; +import { OperationSpec } from "./operationSpec"; +import { Mapper, Serializer } from "./serializer"; +import { generateUuid } from "./util/utils"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { OperationResponse } from "./operationResponse"; +import { AgentSettings, ProxySettings } from "./serviceClient"; + +export type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; +export type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream); + +/** + * Fired in response to upload or download progress. + */ +export type TransferProgressEvent = { + /** + * The number of bytes loaded so far. + */ + loadedBytes: number +}; + +/** + * Allows the request to be aborted upon firing of the "abort" event. + * Compatible with the browser built-in AbortSignal and common polyfills. + */ +export interface AbortSignalLike { + readonly aborted: boolean; + dispatchEvent: (event: Event) => boolean; + onabort: ((this: AbortSignalLike, ev: Event) => any) | null; + addEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void; + removeEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void; +} + +/** + * An abstraction over a REST call. + */ +export interface WebResourceLike { + /** + * The URL being accessed by the request. + */ + url: string; + /** + * The HTTP method to use when making the request. + */ + method: HttpMethods; + /** + * The HTTP body contents of the request. + */ + body?: any; + /** + * The HTTP headers to use when making the request. + */ + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: ( + operationSpec: OperationSpec, + response: HttpOperationResponse + ) => undefined | OperationResponse; + formData?: any; + /** + * A query string represented as an object. + */ + query?: { [key: string]: any }; + /** + * Used to parse the response. + */ + operationSpec?: OperationSpec; + /** + * If credentials (cookies) should be sent along during an XHR. + */ + withCredentials: boolean; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout: number; + /** + * Proxy configuration. + */ + proxySettings?: ProxySettings; + /** + * HTTP(S) agent configuration. + */ + agentSettings?: AgentSettings; + /** + * If the connection should be reused. + */ + keepAlive?: boolean; + + /** + * Used to abort the request later. + */ + abortSignal?: AbortSignalLike; + + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void; + + /** + * Sets options on the request. + */ + prepare(options: RequestPrepareOptions): WebResourceLike; + /** + * Clone this request object. + */ + clone(): WebResourceLike; +} + +export function isWebResourceLike(object: any): object is WebResourceLike { + if (typeof object !== "object") { + return false; + } + if ( + typeof object.url === "string" && + typeof object.method === "string" && + typeof object.headers === "object" && + isHttpHeadersLike(object.headers) && + typeof object.validateRequestProperties === "function" && + typeof object.prepare === "function" && + typeof object.clone === "function" + ) { + return true; + } + return false; +} + +/** + * Creates a new WebResource object. + * + * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary + * properties to initiate a request. + * + * @constructor + */ +export class WebResource { + url: string; + method: HttpMethods; + body?: any; + headers: HttpHeadersLike; + /** + * Whether or not the body of the HttpOperationResponse should be treated as a stream. + */ + streamResponseBody?: boolean; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * A function that returns the proper OperationResponse for the given OperationSpec and + * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will + * be used. + */ + operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse); + formData?: any; + query?: { [key: string]: any; }; + operationSpec?: OperationSpec; + withCredentials: boolean; + timeout: number; + proxySettings?: ProxySettings; + keepAlive?: boolean; + agentSettings?: AgentSettings; + + abortSignal?: AbortSignalLike; + + /** Callback which fires upon upload progress. */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + + /** Callback which fires upon download progress. */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + + constructor( + url?: string, + method?: HttpMethods, + body?: any, + query?: { [key: string]: any; }, + headers?: { [key: string]: any; } | HttpHeadersLike, + streamResponseBody?: boolean, + withCredentials?: boolean, + abortSignal?: AbortSignalLike, + timeout?: number, + onUploadProgress?: (progress: TransferProgressEvent) => void, + onDownloadProgress?: (progress: TransferProgressEvent) => void, + proxySettings?: ProxySettings, + keepAlive?: boolean, + agentSettings?: AgentSettings) { + + this.streamResponseBody = streamResponseBody; + this.url = url || ""; + this.method = method || "GET"; + this.headers = (isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers)); + this.body = body; + this.query = query; + this.formData = undefined; + this.withCredentials = withCredentials || false; + this.abortSignal = abortSignal; + this.timeout = timeout || 0; + this.onUploadProgress = onUploadProgress; + this.onDownloadProgress = onDownloadProgress; + this.proxySettings = proxySettings; + this.keepAlive = keepAlive; + this.agentSettings = agentSettings; + } + + /** + * Validates that the required properties such as method, url, headers["Content-Type"], + * headers["accept-language"] are defined. It will throw an error if one of the above + * mentioned properties are not defined. + */ + validateRequestProperties(): void { + if (!this.method) { + throw new Error("WebResource.method is required."); + } + if (!this.url) { + throw new Error("WebResource.url is required."); + } + } + + /** + * Prepares the request. + * @param {RequestPrepareOptions} options Options to provide for preparing the request. + * @returns {WebResource} Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline. + */ + prepare(options: RequestPrepareOptions): WebResource { + if (!options) { + throw new Error("options object is required"); + } + + if (options.method == undefined || typeof options.method.valueOf() !== "string") { + throw new Error("options.method must be a string."); + } + + if (options.url && options.pathTemplate) { + throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + } + + + if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && (options.url == undefined || typeof options.url.valueOf() !== "string")) { + throw new Error("Please provide exactly one of options.pathTemplate or options.url."); + } + + // set the url if it is provided. + if (options.url) { + if (typeof options.url !== "string") { + throw new Error("options.url must be of type \"string\"."); + } + this.url = options.url; + } + + // set the method + if (options.method) { + const validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; + if (validMethods.indexOf(options.method.toUpperCase()) === -1) { + throw new Error("The provided method \"" + options.method + "\" is invalid. Supported HTTP methods are: " + JSON.stringify(validMethods)); + } + } + this.method = (options.method.toUpperCase() as HttpMethods); + + // construct the url if path template is provided + if (options.pathTemplate) { + const { pathTemplate, pathParameters } = options; + if (typeof pathTemplate !== "string") { + throw new Error("options.pathTemplate must be of type \"string\"."); + } + if (!options.baseUrl) { + options.baseUrl = "https://management.azure.com"; + } + const baseUrl = options.baseUrl; + let url = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + (pathTemplate.startsWith("/") ? pathTemplate.slice(1) : pathTemplate); + const segments = url.match(/({\w*\s*\w*})/ig); + if (segments && segments.length) { + if (!pathParameters) { + throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`); + } + segments.forEach(function (item) { + const pathParamName = item.slice(1, -1); + const pathParam = (pathParameters as { [key: string]: any })[pathParamName]; + if (pathParam === null || pathParam === undefined || !(typeof pathParam === "string" || typeof pathParam === "object")) { + throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` + + ` however, it is not present in ${pathParameters} - ${JSON.stringify(pathParameters, undefined, 2)}.` + + `The value of the path parameter can either be a "string" of the form { ${pathParamName}: "some sample value" } or ` + + `it can be an "object" of the form { "${pathParamName}": { value: "some sample value", skipUrlEncoding: true } }.`); + } + + if (typeof pathParam.valueOf() === "string") { + url = url.replace(item, encodeURIComponent(pathParam)); + } + + if (typeof pathParam.valueOf() === "object") { + if (!pathParam.value) { + throw new Error(`options.pathParameters[${pathParamName}] is of type "object" but it does not contain a "value" property.`); + } + if (pathParam.skipUrlEncoding) { + url = url.replace(item, pathParam.value); + } else { + url = url.replace(item, encodeURIComponent(pathParam.value)); + } + } + }); + } + this.url = url; + } + + // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option. + if (options.queryParameters) { + const queryParameters = options.queryParameters; + if (typeof queryParameters !== "object") { + throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` + + `of "query-parameter-name" as the key and the "query-parameter-value" as the value. ` + + `The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.`); + } + // append question mark if it is not present in the url + if (this.url && this.url.indexOf("?") === -1) { + this.url += "?"; + } + // construct queryString + const queryParams = []; + // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest(). + this.query = {}; + for (const queryParamName in queryParameters) { + const queryParam: any = queryParameters[queryParamName]; + if (queryParam) { + if (typeof queryParam === "string") { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); + this.query[queryParamName] = encodeURIComponent(queryParam); + } + else if (typeof queryParam === "object") { + if (!queryParam.value) { + throw new Error(`options.queryParameters[${queryParamName}] is of type "object" but it does not contain a "value" property.`); + } + if (queryParam.skipUrlEncoding) { + queryParams.push(queryParamName + "=" + queryParam.value); + this.query[queryParamName] = queryParam.value; + } else { + queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam.value)); + this.query[queryParamName] = encodeURIComponent(queryParam.value); + } + } + } + }// end-of-for + // append the queryString + this.url += queryParams.join("&"); + } + + // add headers to the request if they are provided + if (options.headers) { + const headers = options.headers; + for (const headerName of Object.keys(options.headers)) { + this.headers.set(headerName, headers[headerName]); + } + } + // ensure accept-language is set correctly + if (!this.headers.get("accept-language")) { + this.headers.set("accept-language", "en-US"); + } + // ensure the request-id is set correctly + if (!this.headers.get("x-ms-client-request-id") && !options.disableClientRequestId) { + this.headers.set("x-ms-client-request-id", generateUuid()); + } + + // default + if (!this.headers.get("Content-Type")) { + this.headers.set("Content-Type", "application/json; charset=utf-8"); + } + + // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicilty + this.body = options.body; + if (options.body != undefined) { + // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream. + if (options.bodyIsStream) { + if (!this.headers.get("Transfer-Encoding")) { + this.headers.set("Transfer-Encoding", "chunked"); + } + if (this.headers.get("Content-Type") !== "application/octet-stream") { + this.headers.set("Content-Type", "application/octet-stream"); + } + } else { + if (options.serializationMapper) { + this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + } + if (!options.disableJsonStringifyOnBody) { + this.body = JSON.stringify(options.body); + } + } + } + + this.abortSignal = options.abortSignal; + this.onDownloadProgress = options.onDownloadProgress; + this.onUploadProgress = options.onUploadProgress; + + return this; + } + + /** + * Clone this WebResource HTTP request object. + * @returns {WebResource} The clone of this WebResource HTTP request object. + */ + clone(): WebResource { + const result = new WebResource( + this.url, + this.method, + this.body, + this.query, + this.headers && this.headers.clone(), + this.streamResponseBody, + this.withCredentials, + this.abortSignal, + this.timeout, + this.onUploadProgress, + this.onDownloadProgress, + this.proxySettings, + this.keepAlive, + this.agentSettings); + + if (this.formData) { + result.formData = this.formData; + } + + if (this.operationSpec) { + result.operationSpec = this.operationSpec; + } + + if (this.shouldDeserialize) { + result.shouldDeserialize = this.shouldDeserialize; + } + + if (this.operationResponseGetter) { + result.operationResponseGetter = this.operationResponseGetter; + } + + return result; + } +} + +export interface RequestPrepareOptions { + /** + * The HTTP request method. Valid values are "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", + * or "PATCH". + */ + method: HttpMethods; + /** + * The request url. It may or may not have query parameters in it. Either provide the "url" or + * provide the "pathTemplate" in the options object. Both the options are mutually exclusive. + */ + url?: string; + /** + * A dictionary of query parameters to be appended to the url, where + * the "key" is the "query-parameter-name" and the "value" is the "query-parameter-value". + * The "query-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "query-parameter-value". + * Example: + * - query-parameter-value in "object" format: { "query-parameter-name": { value: "query-parameter-value", skipUrlEncoding: true } } + * - query-parameter-value in "string" format: { "query-parameter-name": "query-parameter-value"}. + * Note: "If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url. + */ + queryParameters?: { [key: string]: any | ParameterValue }; + /** + * The path template of the request url. Either provide the "url" or provide the "pathTemplate" in + * the options object. Both the options are mutually exclusive. + * Example: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}" + */ + pathTemplate?: string; + /** + * The base url of the request. Default value is: "https://management.azure.com". This is + * applicable only with pathTemplate. If you are providing options.url then it is expected that + * you provide the complete url. + */ + baseUrl?: string; + /** + * A dictionary of path parameters that need to be replaced with actual values in the pathTemplate. + * Here the key is the "path-parameter-name" and the value is the "path-parameter-value". + * The "path-parameter-value" can be of type "string" or it can be of type "object". + * The "object" format should be used when you want to skip url encoding. While using the object format, + * the object must have a property named value which provides the "path-parameter-value". + * Example: + * - path-parameter-value in "object" format: { "path-parameter-name": { value: "path-parameter-value", skipUrlEncoding: true } } + * - path-parameter-value in "string" format: { "path-parameter-name": "path-parameter-value" }. + */ + pathParameters?: { [key: string]: any | ParameterValue }; + formData?: { [key: string]: any }; + /** + * A dictionary of request headers that need to be applied to the request. + * Here the key is the "header-name" and the value is the "header-value". The header-value MUST be of type string. + * - ContentType must be provided with the key name as "Content-Type". Default value "application/json; charset=utf-8". + * - "Transfer-Encoding" is set to "chunked" by default if "options.bodyIsStream" is set to true. + * - "Content-Type" is set to "application/octet-stream" by default if "options.bodyIsStream" is set to true. + * - "accept-language" by default is set to "en-US" + * - "x-ms-client-request-id" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true + */ + headers?: { [key: string]: any }; + /** + * When set to true, instructs the client to not set "x-ms-client-request-id" header to a new Guid(). + */ + disableClientRequestId?: boolean; + /** + * The request body. It can be of any type. This value will be serialized if it is not a stream. + */ + body?: any; + /** + * Provides information on how to serialize the request body. + */ + serializationMapper?: Mapper; + /** + * A dictionary of mappers that may be used while [de]serialization. + */ + mappers?: { [x: string]: any }; + /** + * Provides information on how to deserialize the response body. + */ + deserializationMapper?: object; + /** + * Indicates whether this method should JSON.stringify() the request body. Default value: false. + */ + disableJsonStringifyOnBody?: boolean; + /** + * Indicates whether the request body is a stream (useful for file upload scenarios). + */ + bodyIsStream?: boolean; + abortSignal?: AbortSignalLike; + onUploadProgress?: (progress: TransferProgressEvent) => void; + onDownloadProgress?: (progress: TransferProgressEvent) => void; +} + +/** + * The Parameter value provided for path or query parameters in RequestPrepareOptions + */ +export interface ParameterValue { + value: any; + skipUrlEncoding: boolean; + [key: string]: any; +} + +/** + * Describes the base structure of the options object that will be used in every operation. + */ +export interface RequestOptionsBase { + /** + * @property {object} [customHeaders] User defined custom request headers that + * will be applied before the request is sent. + */ + customHeaders?: { [key: string]: string }; + + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + + /** + * The number of milliseconds a request can take before automatically being terminated. + */ + timeout?: number; + + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + + [key: string]: any; +} diff --git a/node_modules/@azure/ms-rest-js/lib/xhrHttpClient.ts b/node_modules/@azure/ms-rest-js/lib/xhrHttpClient.ts new file mode 100644 index 000000000..245deba63 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/lib/xhrHttpClient.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +import { HttpClient } from "./httpClient"; +import { HttpHeaders } from "./httpHeaders"; +import { WebResourceLike, TransferProgressEvent } from "./webResource"; +import { HttpOperationResponse } from "./httpOperationResponse"; +import { RestError } from "./restError"; + +/** + * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests. + */ +export class XhrHttpClient implements HttpClient { + public sendRequest(request: WebResourceLike): Promise { + const xhr = new XMLHttpRequest(); + + if (request.agentSettings) { + throw new Error("HTTP agent settings not supported in browser environment"); + } + + if (request.proxySettings) { + throw new Error("HTTP proxy is not supported in browser environment"); + } + + const abortSignal = request.abortSignal; + if (abortSignal) { + const listener = () => { + xhr.abort(); + }; + abortSignal.addEventListener("abort", listener); + xhr.addEventListener("readystatechange", () => { + if (xhr.readyState === XMLHttpRequest.DONE) { + abortSignal.removeEventListener("abort", listener); + } + }); + } + + addProgressListener(xhr.upload, request.onUploadProgress); + addProgressListener(xhr, request.onDownloadProgress); + + if (request.formData) { + const formData = request.formData; + const requestForm = new FormData(); + const appendFormValue = (key: string, value: any) => { + if (value && value.hasOwnProperty("value") && value.hasOwnProperty("options")) { + requestForm.append(key, value.value, value.options); + } else { + requestForm.append(key, value); + } + }; + for (const formKey of Object.keys(formData)) { + const formValue = formData[formKey]; + if (Array.isArray(formValue)) { + for (let j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]); + } + } else { + appendFormValue(formKey, formValue); + } + } + + request.body = requestForm; + request.formData = undefined; + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("multipart/form-data") !== -1) { + // browser will automatically apply a suitable content-type header + request.headers.remove("Content-Type"); + } + } + + xhr.open(request.method, request.url); + xhr.timeout = request.timeout; + xhr.withCredentials = request.withCredentials; + for (const header of request.headers.headersArray()) { + xhr.setRequestHeader(header.name, header.value); + } + xhr.responseType = request.streamResponseBody ? "blob" : "text"; + + // tslint:disable-next-line:no-null-keyword + xhr.send(request.body === undefined ? null : request.body); + + if (request.streamResponseBody) { + return new Promise((resolve, reject) => { + xhr.addEventListener("readystatechange", () => { + // Resolve as soon as headers are loaded + if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) { + const blobBody = new Promise((resolve, reject) => { + xhr.addEventListener("load", () => { + resolve(xhr.response); + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + resolve({ + request, + status: xhr.status, + headers: parseHeaders(xhr), + blobBody + }); + } + }); + rejectOnTerminalEvent(request, xhr, reject); + }); + } else { + return new Promise(function (resolve, reject) { + xhr.addEventListener("load", () => resolve({ + request, + status: xhr.status, + headers: parseHeaders(xhr), + bodyAsText: xhr.responseText + })); + rejectOnTerminalEvent(request, xhr, reject); + }); + } + } +} + +function addProgressListener(xhr: XMLHttpRequestEventTarget, listener?: (progress: TransferProgressEvent) => void) { + if (listener) { + xhr.addEventListener("progress", rawEvent => listener({ + loadedBytes: rawEvent.loaded + })); + } +} + +// exported locally for testing +export function parseHeaders(xhr: XMLHttpRequest) { + const responseHeaders = new HttpHeaders(); + const headerLines = xhr.getAllResponseHeaders().trim().split(/[\r\n]+/); + for (const line of headerLines) { + const index = line.indexOf(":"); + const headerName = line.slice(0, index); + const headerValue = line.slice(index + 2); + responseHeaders.set(headerName, headerValue); + } + return responseHeaders; +} + +function rejectOnTerminalEvent(request: WebResourceLike, xhr: XMLHttpRequest, reject: (err: any) => void) { + xhr.addEventListener("error", () => reject(new RestError(`Failed to send request to ${request.url}`, RestError.REQUEST_SEND_ERROR, undefined, request))); + xhr.addEventListener("abort", () => reject(new RestError("The request was aborted", RestError.REQUEST_ABORTED_ERROR, undefined, request))); + xhr.addEventListener("timeout", () => reject(new RestError(`timeout of ${xhr.timeout}ms exceeded`, RestError.REQUEST_SEND_ERROR, undefined, request))); +} diff --git a/node_modules/@azure/ms-rest-js/node_modules/.bin/uuid b/node_modules/@azure/ms-rest-js/node_modules/.bin/uuid new file mode 120000 index 000000000..b3e45bc53 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/AUTHORS b/node_modules/@azure/ms-rest-js/node_modules/uuid/AUTHORS new file mode 100644 index 000000000..5a1052306 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/CHANGELOG.md b/node_modules/@azure/ms-rest-js/node_modules/uuid/CHANGELOG.md new file mode 100644 index 000000000..f811b8a0c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + + +### Bug Fixes + +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +* Fix typo (#178) +* Simple typo fix (#165) + +### Features +* v5 support in CLI (#197) +* V5 support (#188) + + +# 3.0.1 (2016-11-28) + +* split uuid versions into separate files + + +# 3.0.0 (2016-11-17) + +* remove .parse and .unparse + + +# 2.0.0 + +* Removed uuid.BufferClass + + +# 1.4.0 + +* Improved module context detection +* Removed public RNG functions + + +# 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + + +# 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/LICENSE.md b/node_modules/@azure/ms-rest-js/node_modules/uuid/LICENSE.md new file mode 100644 index 000000000..8c84e3986 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/README.md b/node_modules/@azure/ms-rest-js/node_modules/uuid/README.md new file mode 100644 index 000000000..1752e4751 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/README.md @@ -0,0 +1,276 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/bin/uuid b/node_modules/@azure/ms-rest-js/node_modules/uuid/bin/uuid new file mode 100755 index 000000000..502626e60 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/index.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/index.js new file mode 100644 index 000000000..e96791ab4 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/bytesToUuid.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 000000000..24b60412a --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,26 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5-browser.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 000000000..9b3b6c7ef --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5.js new file mode 100644 index 000000000..7044b872f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng-browser.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 000000000..6361fb814 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng.js new file mode 100644 index 000000000..58f0dc9cf --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1-browser.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 000000000..5758ed75c --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1.js new file mode 100644 index 000000000..0b54b2507 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/v35.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/v35.js new file mode 100644 index 000000000..8b066cc5e --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/package.json b/node_modules/@azure/ms-rest-js/node_modules/uuid/package.json new file mode 100644 index 000000000..ae38aa966 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/package.json @@ -0,0 +1,100 @@ +{ + "_from": "uuid@^3.3.2", + "_id": "uuid@3.4.0", + "_inBundle": false, + "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "_location": "/@azure/ms-rest-js/uuid", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "uuid@^3.3.2", + "name": "uuid", + "escapedName": "uuid", + "rawSpec": "^3.3.2", + "saveSpec": null, + "fetchSpec": "^3.3.2" + }, + "_requiredBy": [ + "/@azure/ms-rest-js" + ], + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "_shasum": "b23e4358afa8a202fe7a100af1f5f883f02007ee", + "_spec": "uuid@^3.3.2", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/ms-rest-js", + "bin": { + "uuid": "bin/uuid" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "bugs": { + "url": "https://github.com/uuidjs/uuid/issues" + }, + "bundleDependencies": false, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "contributors": [ + { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + }, + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" + }, + { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + } + ], + "deprecated": false, + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "devDependencies": { + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "homepage": "https://github.com/uuidjs/uuid#readme", + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "name": "uuid", + "repository": { + "type": "git", + "url": "git+https://github.com/uuidjs/uuid.git" + }, + "scripts": { + "lint": "eslint .", + "md": "runmd --watch --output=README.md README_js.md", + "prepare": "runmd --output=README.md README_js.md", + "release": "standard-version", + "test": "npm run lint && mocha test/test.js" + }, + "version": "3.4.0" +} diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/v1.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/v1.js new file mode 100644 index 000000000..8c245de43 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/v3.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/v3.js new file mode 100644 index 000000000..ee7e14c0f --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/v4.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/v4.js new file mode 100644 index 000000000..1f07be1c5 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/node_modules/@azure/ms-rest-js/node_modules/uuid/v5.js b/node_modules/@azure/ms-rest-js/node_modules/uuid/v5.js new file mode 100644 index 000000000..4945baf38 --- /dev/null +++ b/node_modules/@azure/ms-rest-js/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/node_modules/@azure/ms-rest-js/package.json b/node_modules/@azure/ms-rest-js/package.json new file mode 100644 index 000000000..bb59d68dc --- /dev/null +++ b/node_modules/@azure/ms-rest-js/package.json @@ -0,0 +1,200 @@ +{ + "_from": "@azure/ms-rest-js@^2.0.7", + "_id": "@azure/ms-rest-js@2.1.0", + "_inBundle": false, + "_integrity": "sha512-4BXLVImYRt+jcUmEJ5LUWglI8RBNVQndY6IcyvQ4U8O4kIXdmlRz3cJdA/RpXf5rKT38KOoTO2T6Z1f6Z1HDBg==", + "_location": "/@azure/ms-rest-js", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/ms-rest-js@^2.0.7", + "name": "@azure/ms-rest-js", + "escapedName": "@azure%2fms-rest-js", + "scope": "@azure", + "rawSpec": "^2.0.7", + "saveSpec": null, + "fetchSpec": "^2.0.7" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.1.0.tgz", + "_shasum": "41bc541984983b5242dfbcf699ea281acd045946", + "_spec": "@azure/ms-rest-js@^2.0.7", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "author": { + "name": "Microsoft Corporation", + "email": "azsdkteam@microsoft.com", + "url": "https://github.com/Azure/ms-rest-js" + }, + "browser": { + "./es/lib/policies/msRestUserAgentPolicy.js": "./es/lib/policies/msRestUserAgentPolicy.browser.js", + "./es/lib/policies/agentPolicy.js": "./es/lib/policies/agentPolicy.browser.js", + "./es/lib/policies/proxyPolicy.js": "./es/lib/policies/proxyPolicy.browser.js", + "./es/lib/util/base64.js": "./es/lib/util/base64.browser.js", + "./es/lib/util/xml.js": "./es/lib/util/xml.browser.js", + "./es/lib/defaultHttpClient.js": "./es/lib/defaultHttpClient.browser.js" + }, + "bugs": { + "url": "http://github.com/Azure/ms-rest-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@types/node-fetch": "^2.3.7", + "@types/tunnel": "0.0.1", + "abort-controller": "^3.0.0", + "form-data": "^2.5.0", + "node-fetch": "^2.6.0", + "tough-cookie": "^3.0.1", + "tslib": "^1.10.0", + "tunnel": "0.0.6", + "uuid": "^3.3.2", + "xml2js": "^0.4.19" + }, + "deprecated": false, + "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", + "devDependencies": { + "@azure/logger-js": "^1.1.0", + "@ts-common/azure-js-dev-tools": "^19.4.0", + "@types/chai": "^4.1.7", + "@types/express": "^4.17.0", + "@types/fetch-mock": "^7.3.1", + "@types/form-data": "^2.2.1", + "@types/glob": "^7.1.1", + "@types/karma": "^3.0.3", + "@types/mocha": "^5.2.7", + "@types/node": "^12.0.12", + "@types/semver": "^6.0.1", + "@types/sinon": "^7.0.13", + "@types/tough-cookie": "^2.3.5", + "@types/uuid": "^3.4.5", + "@types/webpack": "^4.4.34", + "@types/webpack-dev-middleware": "^2.0.3", + "@types/xml2js": "^0.4.4", + "abortcontroller-polyfill": "^1.3.0", + "chai": "^4.2.0", + "express": "^4.17.1", + "fetch-mock": "^7.3.3", + "glob": "^7.1.4", + "karma": "^4.1.0", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-firefox-launcher": "^1.1.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-typescript-es6-transform": "^4.1.1", + "karma-webpack": "^4.0.2", + "mocha": "^6.1.4", + "mocha-chrome": "^2.0.0", + "mocha-junit-reporter": "^1.23.0", + "mocha-multi-reporters": "^1.1.7", + "npm-run-all": "^4.1.5", + "nyc": "^14.1.1", + "rollup": "^1.16.6", + "rollup-plugin-commonjs": "^10.0.1", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-multi-entry": "^2.1.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-resolve": "0.0.1-predev.1", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-visualizer": "^2.4.4", + "semver": "^6.2.0", + "shx": "^0.3.2", + "sinon": "^7.3.2", + "terser": "^4.0.2", + "ts-loader": "^6.0.4", + "ts-node": "^8.3.0", + "tslint": "^5.18.0", + "tslint-eslint-rules": "^5.4.0", + "typescript": "^3.5.2", + "webpack": "^4.35.2", + "webpack-cli": "^3.3.5", + "webpack-dev-middleware": "^3.7.0", + "xhr-mock": "^2.4.1", + "yarn": "^1.16.0" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "es/lib/**/*.js", + "es/lib/**/*.js.map", + "es/lib/**/*.d.ts", + "es/lib/**/*.d.ts.map", + "lib/**/*.ts", + "LICENSE", + "README.md", + "ThirdPartyNotices.txt" + ], + "homepage": "https://github.com/Azure/ms-rest-js", + "keywords": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime" + ], + "license": "MIT", + "main": "./dist/msRest.node.js", + "module": "./es/lib/msRest.js", + "name": "@azure/ms-rest-js", + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "coverage/**/*", + "**/*.d.ts", + "**/*.js" + ], + "reporter": [ + "text", + "html", + "cobertura" + ], + "all": true + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Azure/ms-rest-js.git" + }, + "scripts": { + "build": "run-p build:scripts build:lib", + "build:lib": "run-s build:tsc build:rollup build:minify-browser", + "build:minify-browser": "terser -c -m --comments --source-map \"content='./dist/msRest.browser.js.map'\" -o ./dist/msRest.browser.min.js ./dist/msRest.browser.js", + "build:rollup": "rollup -c rollup.config.ts", + "build:scripts": "tsc -p ./.scripts/", + "build:test-browser": "webpack --config webpack.testconfig.ts", + "build:tsc": "tsc -p tsconfig.es.json", + "check:everything": "ts-node ./.scripts/checkEverything.ts", + "check:foronlycalls": "ts-node ./.scripts/checkForOnlyCalls.ts", + "check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts", + "dep:autorest.typescript": "npx ts-node .scripts/testDependentProjects.ts autorest.typescript 'gulp build' 'gulp regenerate' 'npm run local'", + "dep:ms-rest-azure-js": "npx ts-node .scripts/testDependentProjects.ts ms-rest-azure-js", + "latest": "ts-node ./.scripts/latest.ts", + "local": "ts-node ./.scripts/local.ts", + "prepack": "npm i && npm run build", + "publish-preview": "mocha --no-colors && shx rm -rf dist/test && node ./.scripts/publish", + "test": "run-p test:tslint test:unit test:karma", + "test:karma": "npm run build:test-browser && node ./node_modules/karma/bin/karma start karma.conf.ts --browsers ChromeNoSecurity --single-run ", + "test:karma:debug": "npm run build:test-browser && node ./node_modules/karma/bin/karma start karma.conf.ts --log-level debug --browsers ChromeDebugging --debug --auto-watch", + "test:karma:debugff": "npm run build:test-browser && node ./node_modules/karma/bin/karma start karma.conf.ts --log-level debug --browsers FirefoxDebugging --debug --auto-watch", + "test:tslint": "tslint -p .", + "test:unit": "nyc mocha" + }, + "sideEffects": false, + "tags": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime" + ], + "types": "./es/lib/msRest.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/@azure/storage-blob/CHANGELOG.md b/node_modules/@azure/storage-blob/CHANGELOG.md new file mode 100644 index 000000000..3371f031d --- /dev/null +++ b/node_modules/@azure/storage-blob/CHANGELOG.md @@ -0,0 +1,379 @@ +# Release History + +## 12.3.0 (2020-11-10) + +- Added `BlockBlobClient.uploadData(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options)` for parallel uploading. It's avaiable in both Node.js and browsers. +- Added new SAS permissions Move(m) and Execute(e) for Blob and Container. Also supports specifying an authorized object ID via `saoid` and a correlation ID via `scid` for user delegation SAS. + +## 12.3.0-beta.1 (2020-10-13) + +- Updated Azure Storage Service API version to 2020-02-10. +- Added support for Blob Last Access Time tracking. +- Added support for Blob Query Arrow output format. +- Added support for Container Soft Delete. + +## 12.2.1 (2020-09-17) + +- Bug fix - Fixes an issue where`BlockBlobClient.uploadStream()` will give an "Invalid Verb" error when keep-alive is enabled. Fixed bug [11187](https://github.com/Azure/azure-sdk-for-js/issues/11187). + +## 12.2.0 (2020-09-08) + +- Added RehydratePriority to BlobProperties and BlobItemProperties. +- Fixed `BlockBlobClient.uploadStream()` to support `bufferSize` larger than `buffer.constants.MAX_LENGTH`. +- Added support for Object Replication Service. +- Added custom domain support. +- Supported Append Blob Seal. +- Supported tags conditional operations. +- The Static Website Service now supports a DefaultIndexDocumentPath for a global HTTP 200 route within the static website. You can get it by `BlobServiceClient.getProperties()` and set it via `blobServiceClient.setProperties()`. +- Bug fix - `credential` parameter of `newPipeline()` function is now optional. If not specified, `AnonymousCredential` is used. Fixes bug [9628](https://github.com/Azure/azure-sdk-for-js/issues/9628). +- Bug fix - high level upload functions `BlockBlobClient.uploadFile()`, `BlockBlobClient.uploadStream()` and `BlockBlobClient.uploadBrowserData()` now support setting tier. Fixes bug [9062](https://github.com/Azure/azure-sdk-for-js/issues/9062). +- Optimized error semantic for `listBlobsByHierarchy()`. Using `listBlobsByHierarchy()` with empty `delimiter` will now fail-fast. +- Bug fix - Content-Length header is no more ignored. Fixes bugs [8903](https://github.com/Azure/azure-sdk-for-js/issues/8903), [9300](https://github.com/Azure/azure-sdk-for-js/issues/9300) and [10614](https://github.com/Azure/azure-sdk-for-js/issues/10614). + +## 12.2.0-preview.1 (2020.07) + +- Updated Azure Storage Service API version to 2019-12-12. +- Supported quick query. Added a new API `BlockBlobClient.query()`. +- Supported blob versioning. +- Supported blob tags. +- Increased the maximum block size for Block Blob from 100MiB to 4000MiB(~4GB). And thereby supporting ~200TB maximum size for Block Blob. +- Added convenience method `createIfNotExists` for `ContainerClient`, `AppendBlobClient` and `PageBlobClient`. +- Added convenience method `deleteIfExists` for `ContainerClient` and `BlobClients`. + +## 12.1.2 (2020.05) + +- Fix data corruption failure error [issue #6411](https://github.com/Azure/azure-sdk-for-js/issues/6411) when downloading compressed files. [PR #7993](https://github.com/Azure/azure-sdk-for-js/pull/7993) +- Fix un-handled TypeError [issue #8499](https://github.com/Azure/azure-sdk-for-js/issues/8499) in Electron applications. [PR #8568](https://github.com/Azure/azure-sdk-for-js/pull/8568) +- Updated to use `@opentelemetry/api` 0.6.1 via `@azure/core-tracing`. [PR #7998](https://github.com/Azure/azure-sdk-for-js/pull/7998) +- Updated to use `typescript` 3.8.3. [PR #8659](https://github.com/Azure/azure-sdk-for-js/pull/8659) + +## 12.1.1 (2020.03) + +- Bug fix - Blob SAS's `sr` field is now properly set when generating SAS for a blob using a stored policy with `signedpermissions`. For more details about Service SAS, please refer to [link](https://docs.microsoft.com/rest/api/storageservices/create-service-sas). +- Fixed unexpected hang issue when uploading empty body. Fixed bug [6904](https://github.com/Azure/azure-sdk-for-js/issues/6904). + +## 12.1.0 (2020.02) + +- Updated Azure Storage Service API version to 2019-07-07. +- Add support for Encryption Scope, which is similar to regular CPK, except the encryption key is provided by name. +- MD5 and CRC headers for Blob Copy: add `contentMD5`and `xMsContentCrc64` to `BlobCopyFromURLHeaders` and `sourceContentMD5` to `BlobSyncCopyFromURLOptions`. +- Add `getPageRangesDiffForManagedDisks` to `PageBlobClient`. +- Fixed a bug where the package didn't work as expected when bundling web applications. [PR #7298](https://github.com/Azure/azure-sdk-for-js/pull/7298) + +## 12.0.2 (2020.01) + +- Bug fix - Name properties on clients now support more kinds of endpoints(IPv4/v6 hosts, single word domains). [PR #6753](https://github.com/Azure/azure-sdk-for-js/pull/6753) +- Service clients now share a single http client instance by default. [PR #6657](https://github.com/Azure/azure-sdk-for-js/pull/6657) + + Previously, a new http client was created for each service client if none was provided by the user. This could result in TCP port exhaustion under heavy usage with the keepAlive option enabled because each http client has its own persistent TCP connection. This change creates a single http client instance which is shared among all service clients by default. + +## 12.0.1 (2019-12-04) + +- Updated to use OpenTelemetry 0.2 via `@azure/core-tracing` +- Bug Fix - Convert empty prefixes (`""`) to `undefined` when passed as options to the `listContainers`, `listBlobsFlat`, and `listBlobsByHierarchy` methods to avoid sending an invalid request to the service. Fixes bug [5817](https://github.com/Azure/azure-sdk-for-js/issues/5817). +- Added a warning to the documentation of `downloadToBuffer` that explains the limitations of Node.js `Buffer` sizes to around 2GB on 64-bit architectures and 1GB on 32-bit architectures. +- Documented the behavior of `getProperties` methods with respect to metadata keys and their casing inconsistency when compared to the metadata keys returned through corresponding "list" methods with the `includeMetadata` option. + +## 12.0.0 (2019.11) + +- This release marks the general availability of the `@azure/storage-blob` package. +- Bug Fix - Previous versions of `@azure/storage-blob` preview library failed for React apps because of the usage of `fs.stat` method which is not available in browsers and due to the presence of some circular dependencies. Both of these issues are fixed in this new release. +- [Breaking] The custom browser and retry policies that are specific to the Storage libraries have been + renamed to have the `Storage` prefix. [PR 5862](https://github.com/Azure/azure-sdk-for-js/pull/5862). + Below are the entities that now have the Storage prefix + - BrowserPolicy + - BrowserPolicyFactory + - RetryPolicy + - RetryPolicyType + - RetryOptions + - RetryPolicyFactory +- [Breaking] `LeaseClient` is renamed to `BlobLeaseClient`. The helper method `getLeaseClient` on both `BlobClient` and `ContainerClient` is renamed to `getBlobLeaseClient`. +- [Breaking] The properties in the `StoragePipelineOptions` interface have been updated as below: + - The `proxy` property of type `ProxySettings | string` has been renamed to `proxyOptions` and + will be of type `ProxyOptions`. If you have been passing url directly, split the value into `host` + and `port` then pass it as a json object. + - The `telemetry` property of type `TelemetryOptions` has been renamed to `userAgentOptions` of + type `UserAgentOptions`. + - The `logger` is no longer a property available to configure. To enable logging, please see the + [Troubleshooting](https://github.com/Azure/azure-sdk-for-js/blob/0ddc2f3c3d4658b20d96910acc37a77e5209e5e3/sdk/storage/storage-blob/README.md#troubleshooting) section of our readme. + - The `UniqueRequestIdPolicy` and `KeepAlivePolicy` are no longer exported from this library. The + corresponding policies from the `@azure/core-http` library are meant to be used instead. +- `beginCopyFromURL` is added to the `BlobClient`, it returns a poller that can be used to watch the status of a copy operation. It also supports cancelling a pending copy. +- Updates to `BlockBlobClient.uploadStream` + - [Breaking] `maxBuffers` attribute of is renamed to `maxConcurrency` + - Added default values for parameters, bufferSize = `8MB` and maxConcurrency = `5` +- [Breaking] Bug Fix - The page object returned from `ContainerClient.listContainers` had its `containerItems` property set to an empty string instead of an empty array if the storage account has no blob containers. The issue is fixed in this new release. +- `BlobClient.downloadToBuffer()` helper method has a new overload where it is not required to pass the `Buffer`. Attributes `offset` and `count` are optional, downloads the entire blob if they are not provided. +- [Breaking] The default browser bundle has been removed from the npm package. Bundling your application with a bundler such as Webpack is the recommended approach to building a browser bundle. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## 12.0.0-preview.5 (2019.10) + +- [Breaking] `IPRange` is renamed to `SasIPRange`. [PR #5551](https://github.com/Azure/azure-sdk-for-js/pull/5551) +- Created new interface `CommonOptions`. This interface is for standard options that apply to all methods that invoke remote operations. This interface currently contains options that enable client-side tracing of the SDK. [PR #5550](https://github.com/Azure/azure-sdk-for-js/pull/5550) +- [Breaking] `Models` is no longer exported in public API surface. Instead generated model types required by the public API are explicitly re-exported. In the case where convenience layer already defined a type with conflicting name, the model type is aliased with `Model` suffix. [PR #5567](https://github.com/Azure/azure-sdk-for-js/pull/5567) +- [Breaking] Cancelling an operation now throws a standardized error with the name `AbortError`. [PR #5633](https://github.com/Azure/azure-sdk-for-js/pull/5663) +- [Breaking] `blobName` on `AppendBlobClient`, `BlobClient`, `BlockBlobClient` and `PageBlobClient` is renamed to `name`. [PR #5613](https://github.com/Azure/azure-sdk-for-js/pull/5613) +- [Breaking] New `BlobBatchClient` allowing batched requests to the Azure Storage Blob service. [PR #5634](https://github.com/Azure/azure-sdk-for-js/pull/5634) + - Renamed `BatchRequest` to `BlobBatch`, flattened `BatchDeleteRequest` and `BatchSetTierRequest` into `BlobBatch` + - Moved `submitBatch` code from `BlobServiceClient` into new `BlobBatchClient`, created new `deleteBlobs` and `setBlobsAccessTier` helpers on `BlobBatchClient` + `BlobBatchClient` contains `setBlobsAccessTier`, `submitBatch` and `deleteBlobs` helper methods. `BlobBatch` represents an aggregated set of operations on blobs, `delete` and `setAccessTier` functionalities are supported currently. +- [Breaking] Flattened the conditions type `BlobRequestConditions` instead of current nested one. It replaces `ContainerAccessConditions` and `BlobAccessConditions`. + In addition, various conditions fields are renamed into simply `conditions` except `sourceModifiedAccessConditions` which is renamed to `sourceConditions`. + This makes it more convenient to pass in conditional request options. [PR #5672](https://github.com/Azure/azure-sdk-for-js/pull/5672). + + An example: + + ```js + { + blobAccessConditions: { + modifiedAccessConditions: { + ifMatch: uploadResponse.eTag + } + } + ``` + + turns into + + ```js + { + conditions: { + ifMatch: uploadResponse.eTag + } + ``` + +- [Breaking] `eTag` attribute is renamed to `etag`. [PR #5674](https://github.com/Azure/azure-sdk-for-js/pull/5674) +- [Breaking] `body` field from `RestError` Object in core-http Library is removed, the `response` property on the error will now have the `parsedBody` & `headers` along with raw body & headers that are already present. PRs [#5670](https://github.com/Azure/azure-sdk-for-js/pull/5670), [#5437](https://github.com/Azure/azure-sdk-for-js/pull/5437) + - Errors from the storage service can be seen in an extra field `details` with the expected error code. [#5688](https://github.com/Azure/azure-sdk-for-js/pull/5688) +- [Breaking] `progress` callback in the option bags of all the helper methods is renamed to `onProgress`. [PR #5676](https://github.com/Azure/azure-sdk-for-js/pull/5676) +- [Breaking] Consolidated `PageRange` and `ClearRange` types. They now have `offset` and `count` attributes as opposed to the older `start` and `end` attributes. + [PR #5632](https://github.com/Azure/azure-sdk-for-js/pull/5632) +- [Breaking] Type of the `permissions` attribute in the options bag `BlobSASSignatureValues` to be passed into `generateBlobSASQueryParameters` is changed to `BlobSASPermissions` from type `string`. [PR #5626](https://github.com/Azure/azure-sdk-for-js/pull/5626) + - Similarly, `AccountSASPermissions` for `generateAccountSASQueryParameters` instead of type `string`. + - Example - permissions attribute in `generateBlobSASQueryParameters` + - `permissions: BlobSASPermissions.parse("racwd").toString()` changes to `BlobSASPermissions.parse("racwd")` +- Renames for following Options interfaces. [PR #5650](https://github.com/Azure/azure-sdk-for-js/pull/5650) + - `DownloadFromBlobOptions` -> `BlobDownloadToBufferOptions`, + - `UploadStreamToBlockBlobOptions` -> `BlockBlobUploadStreamOptions`, + - `UploadToBlockBlobOptions` -> `BlockBlobParallelUploadOptions` +- [Breaking] Appropriate attribute renames in all the interfaces. PRs [#5580](https://github.com/Azure/azure-sdk-for-js/pull/5580),[#5630](https://github.com/Azure/azure-sdk-for-js/pull/5630) + - Example - `nextMarker` -> `continuationToken`, `HTTPClient` -> `HttpClient`, `permission` -> `permissions`, `parallelism` -> `concurrency` +- Bug fix - Name properties on clients now support the Emulator. [PR #5557](https://github.com/Azure/azure-sdk-for-js/pull/5557) + - emulator url when the blobEndpoint is `http://127.0.0.1:10000/devstoreaccount1` supported + - emulator connection string shorthands are supported + - `UseDevelopmentStorage=true` + - (with proxyURI) `UseDevelopmentStorage=true;DevelopmentStorageProxyUri=proxyURI` +- [Breaking] `encrypted` attribute is removed from `BlobMetadata` interface. [PR #5612](https://github.com/Azure/azure-sdk-for-js/pull/5612) +- [Breaking] Return type of `downloadToBuffer` helper method on `BlobClient` is changed to `Promise` from `Promise` [PR #5624](https://github.com/Azure/azure-sdk-for-js/pull/5624) +- [Breaking] IE11 needs `Object.assign` polyfill loaded. [PR #5727](https://github.com/Azure/azure-sdk-for-js/pull/5727) + +## 12.0.0-preview.4 (2019.10) + +- [Breaking] Replace string array with boolean flags to specify dataset to include when listing containers or blobs. + - For listing containers + Before this change the option is specified as + ```js + blobServiceClient.listContainers({ + include: "metadata" + }); + ``` + After this change: + ```js + blobServiceClient.listContainers({ + includeMetadata: true + }); + ``` + - For listing blobs + Before this change the option is specified as + ```js + containerClient.listBlobsFlat({ + include: ["snapshots", "metadata", "uncommittedblobs", "copy", "deleted"] + }); + ``` + After this change: + ```js + containerClient.listBlobsFlat({ + includeCopy: true, + includeDeleted: true, + includeMetadata: true, + includeSnapshots: true, + includeUncommitedBlobs: true + }); + ``` +- [Breaking] `BlobClient.setTier()` is renamed to `BlobClient.setAccessTier()`. +- [Breaking] Fixed typo - `chanageLease` -> `changeLease`, a method on `LeaseClient`. +- Library tries to load the proxy settings from the environment variables like HTTP_PROXY if the proxy settings are not provided when clients like `BlobServiceClient` or `BlobClient` are instantiated. +- Added development connection string support to connect to the storage emulator [Azurite - Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite) + - Development Connection String + - `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;` + - Shorthand notation is also supported + - `UseDevelopmentStorage=true` (or `UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri`) +- Added name properties on all the clients for convenience. + - `accountName` is added to `AppendBlobClient`, `BlobClient`, `BlobServiceClient`, `BlockBlobClient`, `ContainerClient` and `PageBlobClient`. + - `containerName` is added to `AppendBlobClient`, `BlobClient`, `BlockBlobClient`, `ContainerClient` and `PageBlobClient`. + - `blobName` is added to `AppendBlobClient`, `BlobClient`, `BlockBlobClient` and `PageBlobClient`. +- [Breaking] `Models.StorageServiceProperties` is renamed to `Models.BlobServiceProperties` +- [Breaking] `Models.StorageServiceStats` is renamed to `Models.BlobServiceStatistics` +- [Breaking] `UserDelegationKey.signedOid` is renamed to `UserDelegationKey.signedObjectId`. `UserDelegationKey.signedTid` is renamed to `UserDelegationKey.signedTenantId`. + +## 12.0.0-preview.3 (2019.09) + +- [Breaking] `RawTokenCredential` is dropped. TokenCredential implementations can be found in the [@azure/identity](https://www.npmjs.com/package/@azure/identity) library for authentication. +- Updated Azure Storage Service API version to 2019-02-02. +- A new API `BlobServiceClient.submitBatch()` supports Blob Batch operation which allows multiple requests to be sent within a single request body. +- Added support for customer provided encryption key. +- Added support for rehydrate priority with additional option to methods `BlobClient.startCopyFromURL()` and `BlobClient.setTier()`. +- APIs `BlobClient.startCopyFromURL()`, `BlockBlobClient.upload()`, `BlockBlobClient.commitBlockList()` and `PageBlobClient.create()` now support set the blob tier within the API call. +- Responses for all APIs now return x-ms-client-request-id through `clientRequestId` that was passed in on the request from client-side. +- Exposed options to accept CRC64 as a transactional data integrity mechanism for data transfer APIs. +- Added overloads of `generateBlobSASQueryParameters` functions to generate user delegation SAS. +- `expiry` and `start` in `AccessPolicy` are now optional in `ContainerClient.setAccessPolicy` and `ContainerClient.getAccessPolicy`. +- Exported `HttpRequestBody` type for who wants to implement a customized HTTP client. +- Fixed a bug of `BlobClient.downloadToBuffer()` when provided offset is not 0. +- Fixed a bug that `Aborter` cannot work during retry interval. +- Fixed a bug that `Aborter` throws timeout error even though it succeeds of `BlockBlobClient.download()`. +- Fixed a bug that "err.code.toUpperCase is not a function" when retries in browser. +- Export `RetryPolicyType`. +- `Aborter` doesn't require `dom` as tsconfig lib requirement anymore for `Event` type. +- Service SAS generation now supports snapshot access control from 2018-11-09 in `generateBlobSASQueryParameters()`. +- Service SAS generation now supports snapshot access control from API version 2018-11-09 in `generateBlobSASQueryParameters()`. +- A new API `PageBlobClient.uploadPagesFromURL()` allows pages in a page blob to be written using a range of another blob as a source. This permits synchronous server-side copies to be orchestrated for page blobs of any size. +- A new API `AppendBlobClient.appendBlockFromURL()` commits a new block of data to the end of an append blob. Method uses a range of another blob as a source. This permits synchronous server-side copies to be orchestrated for append blobs of any size. +- A new API `BlobClient.syncCopyFromURL()` allows a block blob to be copied synchronously using a URL as a source. This API has a maximum size of 256 MB and preserves metadata and block list. +- A new API `BlobServiceClient.getUserDelegationKey()` added to get a key that can be used to generate a user delegation SAS (shared access signature). +- Updated HTTP client from axios to node-fetch in Node.js runtime. +- A new option `keepAliveOptions` added to parameter of `newPipeline()` which controls keep-alive configurations. Keep-alive is enabled by default. +- Pass through `options.abortSignal` to the optional `abortSignal` attribute in option bags instead of using `AbortSignal.none` as the default value when `options.abortSignal` is not specified. +- Basic HTTP proxy authentication support is added. Proxy settings can be passed in the options while creating a new client. Example - [typescript/proxyAuth.ts](https://github.com/Azure/azure-sdk-for-js/blob/@azure/storage-blob_12.0.0-preview.3/sdk/storage/storage-blob/samples/typescript/proxyAuth.ts) +- Connection strings for explicit storage endpoints are supported. - [Configure Azure Storage connection strings](https://docs.microsoft.com/azure/storage/common/storage-configure-connection-string#create-a-connection-string-for-an-explicit-storage-endpoint) + +## 12.0.0-preview.2 (2019.08) + +- [Breaking] Aborter class is no longer exposed from the package. Use the package [@azure/abort-controller](https://www.npmjs.com/package/@azure/abort-controller) to pass an abort signal to any of the async operations. + `AbortController.timeout()` can be utitlized as an abort signal. +- Generalized the credential parameter in client constructors to support `{SharedKeyCredential | AnonymousCredential | TokenCredential}` credentials as a union type. +- Storage service allows SAS connection string with SAS string and endpoints along with the Account connection string(account name, key and endpoint). + In this preview, SAS connection string support is added to the existing connection string client constructors and static methods. + - Account connection string example - `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + - SAS connection string example - `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + - SAS connection string is supported in both NodeJS and browser runtimes unlike the Account Connection String which is supported only in the NodeJS runtime. + +## 12.0.0-preview.1 (2019.07) + +- [Breaking] Client types are renamed from *URL to *Client. + BlobURL, BlockBlobURL, ContainerURL, ServiceURL, StorageURL to BlobClient, BlockBlobClient, ContainerClient, BlobServiceClient, StorageClient respectively. +- [Breaking] Aborter parameters are now moved into option bags. + - `abortSignal` attrubute(optional) in the option-bag of respective module has to be utitlized for the `Aborter.timeout()` functionality. + - `Aborter.none` is the default value. +- [Breaking] I- prefixes are removed from interface names + - Example- `IBlobDownloadOptions` is updated to `BlobDownloadOptions`, the new names must to be used. +- [Breaking] The static methods to create client types are removed. The functionality is moved into new instance methods added to the parent clients. +- [Breaking] The telemetry strings have been updated. + - `Azure-Storage/${SDK_VERSION}` is updated to `azsdk-js-storagefile/${SDK_VERSION}`. +- [Breaking]  withPipeline method is removed. +- Async iterators with pagination support are added for listing methods + - `listContainers()`, `listBlobsFlat()` and `listBlobsByHierarchy()` + - Please refer to the samples for async iterators in the `samples` folder. +- [Breaking]  Methods that list segments(`listBlobFlatSegment()` and `listContainersSegment()`) are no longer exposed in public api. +- [Breaking]  High level convenience functions are moved into clients as their instance member function. + - `uploadFileToBlockBlob()`, `uploadStreamToBlockBlob()` and `uploadBrowserDataToBlockBlob()` -> `BlockBlobClient.uploadFile()`, `BlockBlobClient.uploadStream()` and `BlockBlobClient.uploadBrowserData()` respectively + - `downloadBlobToBuffer()` -> `BlobClient.downloadToBuffer()` +- [Breaking] `StorageClient` is no longer exposed. `StorageClient.newPipeline()` static method is moved to the top level exported function `newPipeline()`. +- [Breaking] `TokenCredential` has been renamed to `RawTokenCredential` to make way for the new `@azure/identity` library's `TokenCredential` interface. +- [Breaking] Blob/Container member methods that manage leases are removed. A new type `LeaseClient` is added to manage leases. +- Updated dependency `@azure/ms-rest-js` to `@azure/core-http`. +- Constructor overloads added into client types so they can be constructed from a url and a pipeline/credential and connection string. + - Constructors with overloads - `AppendBlobClient`, `BlobClient`, `BlobServiceClient`, `BlockBlobClient`, `ContainerClient` and `PageBlobClient` + - Connection string method is supported only in Node.js (not browsers). +- Creation/Deletion of child resources are duplicated to parent client type. +- HTTP proxy support is added (Node.js only). + - Please refer to the `proxyAuth.ts` sample in the `samples/typescript` folder. +- Request and response headers are now logged at INFO level, with sensitive data redacted. +- `downloadToFile()` is added to `BlobClient`. +- Exported `HttpRequestBody` type to allow implementation of a customized HTTP client. + +For release notes and more information please visit https://aka.ms/azsdk/releases/july2019preview + +## 10.5.0 (2019.09) + +- Updated Azure Storage Service API version to 2019-02-02. +- A new API `ServiceURL.submitBatch()` supports Blob Batch operation which allows multiple requests to be sent within a single request body. +- Added support for customer provided encryption key. +- Added support for rehydrate priority with additional option to methods `BlobURL.startCopyFromURL()` and `BlobURL.setTier()`. +- APIs `BlobURL.startCopyFromURL()`, `BlockBlobURL.upload()`, `BlockBlobURL.commitBlockList()` and `PageBlobURL.create()` now support set the blob tier within the API call. +- Responses for all APIs now return x-ms-client-request-id through `clientRequestId` that was passed in on the request from client-side. +- Exposed options to accept CRC64 as a transactional data integrity mechanism for data transfer APIs. + +## 10.4.1 (2019.08) + +- Added overloads of `generateBlobSASQueryParameters` functions to generate user delegation SAS. +- `expiry` and `start` in `AccessPolicy` are now optional in `ContainerURL.setAccessPolicy` and `ContainerURL.getAccessPolicy`. + +## 10.4.0 (2019.07) + +- Updated Azure Storage Service API version to [2018-11-09](https://docs.microsoft.com/rest/api/storageservices/version-2018-11-09). +- Improved comments for `BlockBlobURL.upload()`. +- Exported `HttpRequestBody` type for who wants to implement a customized HTTP client. +- Fixed a bug of `downloadBlobToBuffer()` and `downloadAzureFileToBuffer()` when provided offset is not 0. +- Fixed a bug that `Aborter` cannot work during retry interval. +- Fixed a bug that `Aborter` throws timeout error even though it succeeds of `BlockBlobUrl.download()`. +- Fixed a bug that "err.code.toUpperCase is not a function" when retries in browser. +- Export `RetryPolicyType`. +- `Aborter` doesn't require `dom` as tsconfig lib requirement anymore for `Event` type. +- Service SAS generation now supports snapshot access control from 2018-11-09 in `generateBlobSASQueryParameters()`. +- Service SAS generation now supports snapshot access control from API version 2018-11-09 in `generateBlobSASQueryParameters()`. +- A new API `PageBlobURL.uploadPagesFromURL()` allows pages in a page blob to be written using a range of another blob as a source. This permits synchronous server-side copies to be orchestrated for page blobs of any size. +- A new API `AppendBlobURL.appendBlockFromURL()` commits a new block of data to the end of an append blob. Method uses a range of another blob as a source. This permits synchronous server-side copies to be orchestrated for append blobs of any size. +- A new API `BlobURL.syncCopyFromURL()` allows a block blob to be copied synchronously using a URL as a source. This API has a maximum size of 256 MB and preserves metadata and block list. +- A new API `ServiceURL.getUserDelegationKey()` added to get a key that can be used to generate a user delegation SAS (shared access signature). +- Updated HTTP client from axios to node-fetch in Node.js runtime. +- A new option `keepAliveOptions` added to parameter of `StorageURL.newPipeline()` which controls keep-alive configurations. Keep-alive is enabled by default. + +## 10.3.0 (2018.12) + +- [Breaking] Updated convenience layer methods enum type parameters into typescript union types, this will help reducing bundle footprint. +- [Breaking] Updated URL encoding strategy for `url` parameters of `new XXXURL(url, pipeline)` methods, such as `new BlobURL(url, pipeline)`. + - URL will accept both encoded or non-encoded URL string. It will escape non-escaped special characters, like Chinese characters. However, if blob name includes `?` or `%`, `url` must be encoded manually. +- [Breaking] `SASQueryParameters` is not going to be exported in browser bundle, and will be exported in Node.js runtime. +- [Breaking] IE11 needs `Array.prototype.includes` and `Object.keys` polyfills loaded. +- Updated dependency `ms-rest-js` to `@azure/ms-rest-js`. +- Fixed `Aborter.timeout()` misleading scale description. +- Added option `maxSingleShotSize` to customize concurrency upload threshold in bytes for highlevel uploading APIs, like `uploadBrowserDataToBlockBlob` or `uploadFileToBlockBlob`. +- Removed default 60s server timeout value for retry options `tryTimeoutInMs` to avoid large blob download stream unexcepted ending. +- Fixed an issue that when body is string with special characters, `BlockBlobULR.upload` will fail to upload. + +## 10.2.0-preview (2018.11) + +- [Breaking] Updated names of exported interfaces `IHTTPPipelineLogger` & `IHTTPClient` to `IHttpPipelineLogger` & `IHttpClient`. +- [Breaking] For `setMetadata()` and `setHTTPHeaders()`, `metadata` and `blobHTTPHeaders` are moved from `options` into top level parameter list. +- Fixed bugs and typos in samples. +- Fixed a bug during generateAccountSASQueryParameters() that generated signature is not valid. +- Fixed a bug during generateBlobSASQueryParameters() that cache-control, content-type, content-disposition, content-encoding and content-language are not supported. +- Fixed a bug in SAS generation that start and expiry time format is not correct. +- Removed `File` from `uploadBrowserDataToBlockBlob` parameter type list, because `File` extends `Blob` which is already in the list. +- Fixed typos in `IRange` comments. +- Removed useless `marker` field from option of `ServiceURL.listContainersSegment` method. +- Fixed a bug that `timeout` parameter should use second as unit instead of millisecond. +- Added stream retry when `BlobURL.download` response stream unexcepted ends. + +## 10.1.0-preview (2018.09) + +- Fixed sharedkey authentication error when blob names have spaces. +- Updated samples in readme and sample folder to fix undefined headers. +- Updated readme samples to make it runnable as copy/paste. +- More documentation around ACCOUNT_SAS and CORS in readme.md and contributing.md. +- Size of browser bundle is reduced from 229KB to 175KB (minified version). Thanks Brian Terlson & Rikki Gibson! +- Set `sideEffects` option to `true` in package.json, which helps webpack4 for tree shaking. +- Updated `browser` and `module` option in package.json, webpack will try to load ES6 module. +- Added prettier config file. +- Fixed typos and unused imports. +- [Breaking] Dropped built-in polyfills for `String`, and following polyfills need to be loaded external for IE11 now: + - `Promise` + - `String.prototype.startsWith` + - `String.prototype.endsWith` + - `String.prototype.repeat` + - `String.prototype.includes` +- [Breaking] `Aborter.None` is renamed to `Aborter.none` for JavaScript naming conventions. + +## 10.0.0-preview (2018.09) + +- Initial Release. API version 2018-03-28 supported. Please see the README for information on the new design. diff --git a/node_modules/@azure/storage-blob/LICENSE b/node_modules/@azure/storage-blob/LICENSE new file mode 100644 index 000000000..ea8fb1516 --- /dev/null +++ b/node_modules/@azure/storage-blob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@azure/storage-blob/README.md b/node_modules/@azure/storage-blob/README.md new file mode 100644 index 000000000..c40b938ae --- /dev/null +++ b/node_modules/@azure/storage-blob/README.md @@ -0,0 +1,538 @@ +# Azure Storage Blob client library for JavaScript + +Azure Storage Blob is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that does not adhere to a particular data model or definition, such as text or binary data. + +This project provides a client library in JavaScript that makes it easy to consume Microsoft Azure Storage Blob service. + +Use the client libraries in this package to: + +- Get/Set Blob Service Properties +- Create/List/Delete Containers +- Create/Read/List/Update/Delete Block Blobs +- Create/Read/List/Update/Delete Page Blobs +- Create/Read/List/Update/Delete Append Blobs + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob) | +[Package (npm)](https://www.npmjs.com/package/@azure/storage-blob/) | +[API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/storage-blob) | +[Product documentation](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview) | +[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob/samples) | +[Azure Storage Blob REST APIs](https://docs.microsoft.com/rest/api/storageservices/blob-service-rest-api) + +## Getting started + +**Prerequisites**: You must have an [Azure subscription](https://azure.microsoft.com/free/) and a [Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal) to use this package. If you are using this package in a Node.js application, then Node.js version 8.0.0 or higher is required. + +### Install the package + +The preferred way to install the Azure Storage Blob client library for JavaScript is to use the npm package manager. Type the following into a terminal window: + +```bash +npm install @azure/storage-blob +``` + +### Authenticate the client + +Azure Storage supports several ways to authenticate. In order to interact with the Azure Blob Storage service you'll need to create an instance of a Storage client - `BlobServiceClient`, `ContainerClient`, or `BlobClient` for example. See [samples for creating the `BlobServiceClient`](#create-the-blob-service-client) to learn more about authentication. + +- [Azure Active Directory](#with-defaultazurecredential-from-azureidentity-package) +- [Shared Key](#with-storagesharedkeycredential) +- [Shared access signatures](#with-sas-token) + +#### Azure Active Directory + +The Azure Blob Storage service supports the use of Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. Please see the [README for `@azure/identity`](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) for more details and samples to get you started. + +### Compatibility + +This library is compatible with Node.js and browsers, and validated against LTS Node.js versions (>=8.16.0) and latest versions of Chrome, Firefox and Edge. + +#### Compatible with IE11 + +You need polyfills to make this library work with IE11. The easiest way is to use [@babel/polyfill](https://babeljs.io/docs/en/babel-polyfill), or [polyfill service](https://polyfill.io/v2/docs/). + +You can also load separate polyfills for missed ES feature(s). +This library depends on following ES features which need external polyfills loaded. + +- `Promise` +- `String.prototype.startsWith` +- `String.prototype.endsWith` +- `String.prototype.repeat` +- `String.prototype.includes` +- `Array.prototype.includes` +- `Object.assign` +- `Object.keys` (Overrides the IE11's `Object.keys` with a polyfill to enable the [ES6 behavior](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes)) +- `Symbol` +- `Symbol.iterator` + +#### Differences between Node.js and browsers + +There are differences between Node.js and browsers runtime. When getting started with this library, pay attention to APIs or classes marked with _"ONLY AVAILABLE IN NODE.JS RUNTIME"_ or _"ONLY AVAILABLE IN BROWSERS"_. + +- If a blob holds compressed data in `gzip` or `deflate` format and its content encoding is set accordingly, downloading behavior is different between Node.js and browsers. In Node.js storage clients will download the blob in its compressed format, while in browsers the data will be downloaded in de-compressed format. + +##### Features, interfaces, classes or functions only available in Node.js + +- Shared Key Authorization based on account name and account key + - `StorageSharedKeyCredential` +- Shared Access Signature(SAS) generation + - `generateAccountSASQueryParameters()` + - `generateBlobSASQueryParameters()` +- Parallel uploading and downloading. Note that `BlockBlobClient.uploadData()` is available in both Node.js and browsers. + - `BlockBlobClient.uploadFile()` + - `BlockBlobClient.uploadStream()` + - `BlobClient.downloadToBuffer()` + - `BlobClient.downloadToFile()` + +##### Features, interfaces, classes or functions only available in browsers + +- Parallel uploading and downloading + - `BlockBlobClient.uploadBrowserData()` + +### JavaScript Bundle + +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +#### Special bundling notes for IE11 + +Currently only `Parcel` and `Rollup` work well with Storage client libraries for IE11. + +If `Parcel` is used then no further work is needed. If using Rollup, an additional step is needed to transform the bundled output to the format that IE11 supports. + +Assuming `bundled-output.js` is the result from `Rollup`: + +```bash +tsc --allowJS --target es5 bundled-output.js --outfile final-output.js +``` + +### CORS + +You need to set up [Cross-Origin Resource Sharing (CORS)](https://docs.microsoft.com/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s). + +For example, you can create following CORS settings for debugging. But please customize the settings carefully according to your requirements in production environment. + +- Allowed origins: \* +- Allowed verbs: DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT +- Allowed headers: \* +- Exposed headers: \* +- Maximum age (seconds): 86400 + +## Key concepts + +Blob storage is designed for: + +- Serving images or documents directly to a browser. +- Storing files for distributed access. +- Streaming video and audio. +- Writing to log files. +- Storing data for backup and restore, disaster recovery, and archiving. +- Storing data for analysis by an on-premises or Azure-hosted service. + +Blob storage offers three types of resources: + +- The _storage account_ used via `BlobServiceClient` +- A _container_ in the storage account used via `ContainerClient` +- A _blob_ in a container used via `BlobClient` + +## Examples + +- [Import the package](#import-the-package) +- [Create the blob service client](#create-the-blob-service-client) +- [Create a new container](#create-a-new-container) +- [List the containers](#list-the-containers) +- [Create a blob by uploading data](#create-a-blob-by-uploading-data) +- [List blobs inside a container](#list-blobs-inside-a-container) +- [Download a blob and convert it to a string (Node.js)](#download-a-blob-and-convert-it-to-a-string-nodejs) +- [Download a blob and convert it to a string (Browsers)](#download-a-blob-and-convert-it-to-a-string-browsers) + +### Import the package + +To use the clients, import the package into your file: + +```javascript +const AzureStorageBlob = require("@azure/storage-blob"); +``` + +Alternatively, selectively import only the types you need: + +```javascript +const { BlobServiceClient, StorageSharedKeyCredential } = require("@azure/storage-blob"); +``` + +### Create the blob service client + +The `BlobServiceClient` requires an URL to the blob service and an access credential. It also optionally accepts some settings in the `options` parameter. + +#### with `DefaultAzureCredential` from `@azure/identity` package + +**Recommended way to instantiate a `BlobServiceClient`** + +Setup : Reference - Authorize access to blobs and queues with Azure Active Directory from a client application - https://docs.microsoft.com/azure/storage/common/storage-auth-aad-app + +- Register a new AAD application and give permissions to access Azure Storage on behalf of the signed-in user + + - Register a new application in the Azure Active Directory(in the azure-portal) - https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app + - In the `API permissions` section, select `Add a permission` and choose `Microsoft APIs`. + - Pick `Azure Storage` and select the checkbox next to `user_impersonation` and then click `Add permissions`. This would allow the application to access Azure Storage on behalf of the signed-in user. + +- Grant access to Azure Blob data with RBAC in the Azure Portal + + - RBAC roles for blobs and queues - https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal. + - In the azure portal, go to your storage-account and assign **Storage Blob Data Contributor** role to the registered AAD application from `Access control (IAM)` tab (in the left-side-navbar of your storage account in the azure-portal). + +- Environment setup for the sample + - From the overview page of your AAD Application, note down the `CLIENT ID` and `TENANT ID`. In the "Certificates & Secrets" tab, create a secret and note that down. + - Make sure you have AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET as environment variables to successfully execute the sample(Can leverage process.env). + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +// Enter your storage account name +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); +``` + +See the [Azure AD Auth sample](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/samples/javascript/azureAdAuth.js) for a complete example using this method. + +[Note - Above steps are only for Node.js] + +#### using connection string + +Alternatively, you can instantiate a `BlobServiceClient` using the `fromConnectionString()` static method with the full connection string as the argument. (The connection string can be obtained from the azure portal.) [ONLY AVAILABLE IN NODE.JS RUNTIME] + +```javascript +const { BlobServiceClient } = require("@azure/storage-blob"); + +const connStr = ""; + +const blobServiceClient = BlobServiceClient.fromConnectionString(connStr); +``` + +#### with `StorageSharedKeyCredential` + +Alternatively, you instantiate a `BlobServiceClient` with a `StorageSharedKeyCredential` by passing account-name and account-key as arguments. (The account-name and account-key can be obtained from the azure portal.) +[ONLY AVAILABLE IN NODE.JS RUNTIME] + +```javascript +const { BlobServiceClient, StorageSharedKeyCredential } = require("@azure/storage-blob"); + +// Enter your storage account name and shared key +const account = ""; +const accountKey = ""; + +// Use StorageSharedKeyCredential with storage account and account key +// StorageSharedKeyCredential is only available in Node.js runtime, not in browsers +const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey); +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + sharedKeyCredential +); +``` + +#### with SAS Token + +Also, You can instantiate a `BlobServiceClient` with a shared access signatures (SAS). You can get the SAS token from the Azure Portal or generate one using `generateAccountSASQueryParameters()`. + +```javascript +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const sas = ""; + +const blobServiceClient = new BlobServiceClient(`https://${account}.blob.core.windows.net${sas}`); +``` + +### Create a new container + +Use `BlobServiceClient.getContainerClient()` to get a container client instance then create a new container resource. + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +async function main() { + // Create a container + const containerName = `newcontainer${new Date().getTime()}`; + const containerClient = blobServiceClient.getContainerClient(containerName); + const createContainerResponse = await containerClient.create(); + console.log(`Create container ${containerName} successfully`, createContainerResponse.requestId); +} + +main(); +``` + +### List the containers + +Use `BlobServiceClient.listContainers()` function to iterate the containers, +with the new `for-await-of` syntax: + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +async function main() { + let i = 1; + let containers = blobServiceClient.listContainers(); + for await (const container of containers) { + console.log(`Container ${i++}: ${container.name}`); + } +} + +main(); +``` + +Alternatively without using `for-await-of`: + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +async function main() { + let i = 1; + let iter = blobServiceClient.listContainers(); + let containerItem = await iter.next(); + while (!containerItem.done) { + console.log(`Container ${i++}: ${containerItem.value.name}`); + containerItem = await iter.next(); + } +} + +main(); +``` + +In addition, pagination is supported for listing too via `byPage()`: + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +async function main() { + let i = 1; + for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + if (response.containerItems) { + for (const container of response.containerItems) { + console.log(`Container ${i++}: ${container.name}`); + } + } + } +} + +main(); +``` + +For a complete sample on iterating containers please see [samples/src/iterators-containers.ts](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/samples/typescript/src/iterators-containers.ts). + +### Create a blob by uploading data + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +const containerName = ""; + +async function main() { + const containerClient = blobServiceClient.getContainerClient(containerName); + + const content = "Hello world!"; + const blobName = "newblob" + new Date().getTime(); + const blockBlobClient = containerClient.getBlockBlobClient(blobName); + const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + console.log(`Upload block blob ${blobName} successfully`, uploadBlobResponse.requestId); +} + +main(); +``` + +### List blobs inside a container + +Similar to listing containers. + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +const containerName = ""; + +async function main() { + const containerClient = blobServiceClient.getContainerClient(containerName); + + let i = 1; + let blobs = containerClient.listBlobsFlat(); + for await (const blob of blobs) { + console.log(`Blob ${i++}: ${blob.name}`); + } +} + +main(); +``` + +For a complete sample on iterating blobs please see [samples/src/iterators-blobs.ts](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/samples/typescript/src/iterators-blobs.ts). + +### Download a blob and convert it to a string (Node.js) + +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const defaultAzureCredential = new DefaultAzureCredential(); + +const blobServiceClient = new BlobServiceClient( + `https://${account}.blob.core.windows.net`, + defaultAzureCredential +); + +const containerName = ""; +const blobName = ""; + +async function main() { + const containerClient = blobServiceClient.getContainerClient(containerName); + const blobClient = containerClient.getBlobClient(blobName); + + // Get blob content from position 0 to the end + // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + const downloadBlockBlobResponse = await blobClient.download(); + const downloaded = ( + await streamToBuffer(downloadBlockBlobResponse.readableStreamBody) + ).toString(); + console.log("Downloaded blob content:", downloaded); + + // [Node.js only] A helper method used to read a Node.js readable stream into a Buffer + async function streamToBuffer(readableStream) { + return new Promise((resolve, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + }); + readableStream.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + }); + } +} + +main(); +``` + +### Download a blob and convert it to a string (Browsers). + +Please refer to the [JavaScript Bundle](#javascript-bundle) section for more information on using this library in the browser. + +```javascript +const { BlobServiceClient } = require("@azure/storage-blob"); + +const account = ""; +const sas = ""; +const containerName = ""; +const blobName = ""; + +const blobServiceClient = new BlobServiceClient(`https://${account}.blob.core.windows.net${sas}`); + +async function main() { + const containerClient = blobServiceClient.getContainerClient(containerName); + const blobClient = containerClient.getBlobClient(blobName); + + // Get blob content from position 0 to the end + // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + const downloadBlockBlobResponse = await blobClient.download(); + const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + console.log("Downloaded blob content", downloaded); + + // [Browsers only] A helper method used to convert a browser Blob into string. + async function blobToString(blob) { + const fileReader = new FileReader(); + return new Promise((resolve, reject) => { + fileReader.onloadend = (ev) => { + resolve(ev.target.result); + }; + fileReader.onerror = reject; + fileReader.readAsText(blob); + }); + } +} + +main(); +``` + +A complete example of basic scenarios is at [samples/src/basic.ts](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/samples/typescript/src/basic.ts). + +## Troubleshooting + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +import { setLogLevel } from "@azure/logger"; + +setLogLevel("info"); +``` + +## Next steps + +More code samples: + +- [Blob Storage Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob/samples/javascript) +- [Blob Storage Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob/samples/typescript) +- [Blob Storage Test Cases](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob/test/) + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code. + +Also refer to [Storage specific guide](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/CONTRIBUTING.md) for additional information on setting up the test environment for storage libraries. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2FREADME.png) diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js new file mode 100644 index 000000000..ae6f8d969 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js @@ -0,0 +1 @@ +//# sourceMappingURL=BatchResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js.map new file mode 100644 index 000000000..273336f88 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BatchResponse.js","sourceRoot":"","sources":["../../../src/BatchResponse.ts"],"names":[],"mappings":"","sourcesContent":["import { BatchSubRequest } from \"./BlobBatch\";\nimport { HttpHeaders } from \"@azure/core-http\";\n\n/**\n * The response data associated with a single request within a batch operation.\n */\nexport interface BatchSubResponse {\n /**\n * The status code of the sub operation.\n */\n status: number;\n\n /**\n * The status message of the sub operation.\n */\n statusMessage: string;\n\n /**\n * The error code of the sub operation, if the sub operation failed.\n */\n errorCode?: string;\n\n /**\n * The HTTP response headers.\n */\n headers: HttpHeaders;\n\n /**\n * The body as text.\n */\n bodyAsText?: string;\n\n /**\n * The batch sub request corresponding to the sub response.\n */\n _request: BatchSubRequest;\n}\n\n/**\n * The multipart/mixed response which contains the response for each subrequest.\n */\nexport interface ParsedBatchResponse {\n /**\n * The parsed sub responses.\n */\n subResponses: BatchSubResponse[];\n\n /**\n * The succeeded executed sub responses' count;\n */\n subResponsesSucceededCount: number;\n\n /**\n * The failed executed sub responses' count;\n */\n subResponsesFailedCount: number;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js new file mode 100644 index 000000000..a70aa900f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js @@ -0,0 +1,135 @@ +import { __awaiter, __generator } from "tslib"; +import { HttpHeaders } from "@azure/core-http"; +import { HTTP_VERSION_1_1, HTTP_LINE_ENDING, HeaderConstants, HTTPURLConnection } from "./utils/constants"; +import { getBodyAsText } from "./BatchUtils"; +var HTTP_HEADER_DELIMITER = ": "; +var SPACE_DELIMITER = " "; +var NOT_FOUND = -1; +/** + * Util class for parsing batch response. + */ +var BatchResponseParser = /** @class */ (function () { + function BatchResponseParser(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) { + // In special case(reported), server may return invalid content-type which could not be parsed. + throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); + } + if (!subRequests || subRequests.size === 0) { + // This should be prevent during coding. + throw new RangeError("Invalid state: subRequests is not provided or size is 0."); + } + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = "--" + this.responseBatchBoundary + HTTP_LINE_ENDING; + this.batchResponseEnding = "--" + this.responseBatchBoundary + "--"; + } + // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + BatchResponseParser.prototype.parseBatchResponse = function () { + return __awaiter(this, void 0, void 0, function () { + var responseBodyAsText, subResponses, subResponseCount, deserializedSubResponses, subResponsesSucceededCount, subResponsesFailedCount, index, subResponse, deserializedSubResponse, responseLines, subRespHeaderStartFound, subRespHeaderEndFound, subRespFailed, contentId, _i, responseLines_1, responseLine, tokens, tokens; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse + // sub request's response. + if (this.batchResponse._response.status != HTTPURLConnection.HTTP_ACCEPTED) { + throw new Error("Invalid state: batch request failed with status: '" + this.batchResponse._response.status + "'."); + } + return [4 /*yield*/, getBodyAsText(this.batchResponse)]; + case 1: + responseBodyAsText = _a.sent(); + subResponses = responseBodyAsText + .split(this.batchResponseEnding)[0] // string after ending is useless + .split(this.perResponsePrefix) + .slice(1); + subResponseCount = subResponses.length; + // Defensive coding in case of potential error parsing. + // Note: subResponseCount == 1 is special case where sub request is invalid. + // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. + // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. + if (subResponseCount != this.subRequests.size && subResponseCount != 1) { + throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); + } + deserializedSubResponses = new Array(subResponseCount); + subResponsesSucceededCount = 0; + subResponsesFailedCount = 0; + // Parse sub subResponses. + for (index = 0; index < subResponseCount; index++) { + subResponse = subResponses[index]; + deserializedSubResponses[index] = {}; + deserializedSubResponse = deserializedSubResponses[index]; + deserializedSubResponse.headers = new HttpHeaders(); + responseLines = subResponse.split("" + HTTP_LINE_ENDING); + subRespHeaderStartFound = false; + subRespHeaderEndFound = false; + subRespFailed = false; + contentId = NOT_FOUND; + for (_i = 0, responseLines_1 = responseLines; _i < responseLines_1.length; _i++) { + responseLine = responseLines_1[_i]; + if (!subRespHeaderStartFound) { + // Convention line to indicate content ID + if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + } + // Http version line with status code indicates the start of sub request's response. + // Example: HTTP/1.1 202 Accepted + if (responseLine.startsWith(HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * + } + if (responseLine.trim() === "") { + // Sub response's header start line already found, and the first empty line indicates header end line found. + if (!subRespHeaderEndFound) { + subRespHeaderEndFound = true; + } + continue; // Skip empty line + } + // Note: when code reach here, it indicates subRespHeaderStartFound == true + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { + // Defensive coding to prevent from missing valuable lines. + throw new Error("Invalid state: find non-empty line '" + responseLine + "' without HTTP header delimiter '" + HTTP_HEADER_DELIMITER + "'."); + } + tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } + else { + // Assemble body of sub response. + if (!deserializedSubResponse.bodyAsText) { + deserializedSubResponse.bodyAsText = ""; + } + deserializedSubResponse.bodyAsText += responseLine; + } + } // Inner for end + if (contentId != NOT_FOUND) { + deserializedSubResponse._request = this.subRequests.get(contentId); + } + if (subRespFailed) { + subResponsesFailedCount++; + } + else { + subResponsesSucceededCount++; + } + } + return [2 /*return*/, { + subResponses: deserializedSubResponses, + subResponsesSucceededCount: subResponsesSucceededCount, + subResponsesFailedCount: subResponsesFailedCount + }]; + } + }); + }); + }; + return BatchResponseParser; +}()); +export { BatchResponseParser }; +//# sourceMappingURL=BatchResponseParser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js.map new file mode 100644 index 000000000..c45aaf883 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchResponseParser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BatchResponseParser.js","sourceRoot":"","sources":["../../../src/BatchResponseParser.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,IAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,IAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,IAAM,SAAS,GAAG,CAAC,CAAC,CAAC;AAErB;;GAEG;AACH;IAOE,6BACE,aAA8C,EAC9C,W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;qCACzC;oCAED,uBAAuB,CAAC,UAAU,IAAI,YAAY,CAAC;iCACpD;6BACF,CAAC,gBAAgB;4BAElB,IAAI,SAAS,IAAI,SAAS,EAAE;gCAC1B,uBAAuB,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC;6BACrE;4BAED,IAAI,aAAa,EAAE;gCACjB,uBAAuB,EAAE,CAAC;6BAC3B;iCAAM;gCACL,0BAA0B,EAAE,CAAC;6BAC9B;yBACF;wBAED,sBAAO;gCACL,YAAY,EAAE,wBAAwB;gCACtC,0BAA0B,EAAE,0BAA0B;gCACtD,uBAAuB,EAAE,uBAAuB;6BACjD,EAAC;;;;KACH;IACH,0BAAC;AAAD,CAAC,AA/ID,IA+IC","sourcesContent":["import { HttpHeaders } from \"@azure/core-http\";\n\nimport { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport {\n HTTP_VERSION_1_1,\n HTTP_LINE_ENDING,\n HeaderConstants,\n HTTPURLConnection\n} from \"./utils/constants\";\nimport { getBodyAsText } from \"./BatchUtils\";\nimport { BatchSubRequest } from \"./BlobBatch\";\nimport { BatchSubResponse, ParsedBatchResponse } from \"./BatchResponse\";\n\nconst HTTP_HEADER_DELIMITER = \": \";\nconst SPACE_DELIMITER = \" \";\nconst NOT_FOUND = -1;\n\n/**\n * Util class for parsing batch response.\n */\nexport class BatchResponseParser {\n private readonly batchResponse: ServiceSubmitBatchResponseModel;\n private readonly responseBatchBoundary: string;\n private readonly perResponsePrefix: string;\n private readonly batchResponseEnding: string;\n private readonly subRequests: Map;\n\n constructor(\n batchResponse: ServiceSubmitBatchResponseModel,\n subRequests: Map\n ) {\n if (!batchResponse || !batchResponse.contentType) {\n // In special case(reported), server may return invalid content-type which could not be parsed.\n throw new RangeError(\"batchResponse is malformed or doesn't contain valid content-type.\");\n }\n\n if (!subRequests || subRequests.size === 0) {\n // This should be prevent during coding.\n throw new RangeError(\"Invalid state: subRequests is not provided or size is 0.\");\n }\n\n this.batchResponse = batchResponse;\n this.subRequests = subRequests;\n this.responseBatchBoundary = this.batchResponse.contentType!.split(\"=\")[1];\n this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`;\n this.batchResponseEnding = `--${this.responseBatchBoundary}--`;\n }\n\n // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response\n public async parseBatchResponse(): Promise {\n // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse\n // sub request's response.\n if (this.batchResponse._response.status != HTTPURLConnection.HTTP_ACCEPTED) {\n throw new Error(\n `Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`\n );\n }\n\n let responseBodyAsText = await getBodyAsText(this.batchResponse);\n\n let subResponses = responseBodyAsText\n .split(this.batchResponseEnding)[0] // string after ending is useless\n .split(this.perResponsePrefix)\n .slice(1); // string before first response boundary is useless\n let subResponseCount = subResponses.length;\n\n // Defensive coding in case of potential error parsing.\n // Note: subResponseCount == 1 is special case where sub request is invalid.\n // We try to prevent such cases through early validation, e.g. validate sub request count >= 1.\n // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user.\n if (subResponseCount != this.subRequests.size && subResponseCount != 1) {\n throw new Error(\"Invalid state: sub responses' count is not equal to sub requests' count.\");\n }\n\n let deserializedSubResponses: Array = new Array(subResponseCount);\n let subResponsesSucceededCount: number = 0;\n let subResponsesFailedCount: number = 0;\n\n // Parse sub subResponses.\n for (let index = 0; index < subResponseCount; index++) {\n const subResponse = subResponses[index];\n deserializedSubResponses[index] = {} as BatchSubResponse;\n let deserializedSubResponse = deserializedSubResponses[index];\n deserializedSubResponse.headers = new HttpHeaders();\n\n let responseLines = subResponse.split(`${HTTP_LINE_ENDING}`);\n let subRespHeaderStartFound = false;\n let subRespHeaderEndFound = false;\n let subRespFailed = false;\n let contentId = NOT_FOUND;\n\n for (const responseLine of responseLines) {\n if (!subRespHeaderStartFound) {\n // Convention line to indicate content ID\n if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) {\n contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]);\n }\n\n // Http version line with status code indicates the start of sub request's response.\n // Example: HTTP/1.1 202 Accepted\n if (responseLine.startsWith(HTTP_VERSION_1_1)) {\n subRespHeaderStartFound = true;\n\n let tokens = responseLine.split(SPACE_DELIMITER);\n deserializedSubResponse.status = parseInt(tokens[1]);\n deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER);\n }\n\n continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: *\n }\n\n if (responseLine.trim() === \"\") {\n // Sub response's header start line already found, and the first empty line indicates header end line found.\n if (!subRespHeaderEndFound) {\n subRespHeaderEndFound = true;\n }\n\n continue; // Skip empty line\n }\n\n // Note: when code reach here, it indicates subRespHeaderStartFound == true\n if (!subRespHeaderEndFound) {\n if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) {\n // Defensive coding to prevent from missing valuable lines.\n throw new Error(\n `Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`\n );\n }\n\n // Parse headers of sub response.\n let tokens = responseLine.split(HTTP_HEADER_DELIMITER);\n deserializedSubResponse.headers.set(tokens[0], tokens[1]);\n if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) {\n deserializedSubResponse.errorCode = tokens[1];\n subRespFailed = true;\n }\n } else {\n // Assemble body of sub response.\n if (!deserializedSubResponse.bodyAsText) {\n deserializedSubResponse.bodyAsText = \"\";\n }\n\n deserializedSubResponse.bodyAsText += responseLine;\n }\n } // Inner for end\n\n if (contentId != NOT_FOUND) {\n deserializedSubResponse._request = this.subRequests.get(contentId)!;\n }\n\n if (subRespFailed) {\n subResponsesFailedCount++;\n } else {\n subResponsesSucceededCount++;\n }\n }\n\n return {\n subResponses: deserializedSubResponses,\n subResponsesSucceededCount: subResponsesSucceededCount,\n subResponsesFailedCount: subResponsesFailedCount\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js new file mode 100644 index 000000000..220f13e69 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js @@ -0,0 +1,20 @@ +import { __awaiter, __generator } from "tslib"; +import { blobToString } from "./utils/utils.browser"; +export function getBodyAsText(batchResponse) { + return __awaiter(this, void 0, void 0, function () { + var blob; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, batchResponse.blobBody]; + case 1: + blob = (_a.sent()); + return [4 /*yield*/, blobToString(blob)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); +} +export function utf8ByteLength(str) { + return new Blob([str]).size; +} +//# sourceMappingURL=BatchUtils.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js.map new file mode 100644 index 000000000..fcaea4197 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BatchUtils.browser.js","sourceRoot":"","sources":["../../../src/BatchUtils.browser.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,UAAgB,aAAa,CACjC,aAA8C;;;;;wBAEhC,qBAAM,aAAa,CAAC,QAAQ,EAAA;;oBAApC,IAAI,GAAG,CAAC,SAA4B,CAAS;oBAC5C,qBAAM,YAAY,CAAC,IAAI,CAAC,EAAA;wBAA/B,sBAAO,SAAwB,EAAC;;;;CACjC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9B,CAAC","sourcesContent":["import { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport { blobToString } from \"./utils/utils.browser\";\n\nexport async function getBodyAsText(\n batchResponse: ServiceSubmitBatchResponseModel\n): Promise {\n const blob = (await batchResponse.blobBody) as Blob;\n return await blobToString(blob);\n}\n\nexport function utf8ByteLength(str: string): number {\n return new Blob([str]).size;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js new file mode 100644 index 000000000..40e41c467 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js @@ -0,0 +1,24 @@ +import { __awaiter, __generator } from "tslib"; +import { streamToBuffer2 } from "./utils/utils.node"; +import { BATCH_MAX_PAYLOAD_IN_BYTES } from "./utils/constants"; +export function getBodyAsText(batchResponse) { + return __awaiter(this, void 0, void 0, function () { + var buffer, responseLength; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); + return [4 /*yield*/, streamToBuffer2(batchResponse.readableStreamBody, buffer)]; + case 1: + responseLength = _a.sent(); + // Slice the buffer to trim the empty ending. + buffer = buffer.slice(0, responseLength); + return [2 /*return*/, buffer.toString()]; + } + }); + }); +} +export function utf8ByteLength(str) { + return Buffer.byteLength(str); +} +//# sourceMappingURL=BatchUtils.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js.map new file mode 100644 index 000000000..04ab79c70 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BatchUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BatchUtils.js","sourceRoot":"","sources":["../../../src/BatchUtils.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D,MAAM,UAAgB,aAAa,CACjC,aAA8C;;;;;;oBAE1C,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;oBAEjC,qBAAM,eAAe,CACxC,aAAa,CAAC,kBAA2C,EACzD,MAAM,CACP,EAAA;;oBAHG,cAAc,GAAG,SAGpB;oBAED,6CAA6C;oBAC7C,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;oBAEzC,sBAAO,MAAM,CAAC,QAAQ,EAAE,EAAC;;;;CAC1B;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport { streamToBuffer2 } from \"./utils/utils.node\";\nimport { BATCH_MAX_PAYLOAD_IN_BYTES } from \"./utils/constants\";\n\nexport async function getBodyAsText(\n batchResponse: ServiceSubmitBatchResponseModel\n): Promise {\n let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);\n\n let responseLength = await streamToBuffer2(\n batchResponse.readableStreamBody as NodeJS.ReadableStream,\n buffer\n );\n\n // Slice the buffer to trim the empty ending.\n buffer = buffer.slice(0, responseLength);\n\n return buffer.toString();\n}\n\nexport function utf8ByteLength(str: string): number {\n return Buffer.byteLength(str);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js new file mode 100644 index 000000000..fe757382c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js @@ -0,0 +1,360 @@ +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy, deserializationPolicy, generateUuid, HttpHeaders, WebResource, isTokenCredential, bearerTokenAuthenticationPolicy, isNode } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { BlobClient } from "./Clients"; +import { Mutex } from "./utils/Mutex"; +import { Pipeline } from "./Pipeline"; +import { getURLPath, getURLPathAndQuery, iEqual } from "./utils/utils.common"; +import { HeaderConstants, BATCH_MAX_REQUEST, HTTP_VERSION_1_1, HTTP_LINE_ENDING, StorageOAuthScopes } from "./utils/constants"; +import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; +import { createSpan } from "./utils/tracing"; +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + * + * @export + * @class BlobBatch + */ +var BlobBatch = /** @class */ (function () { + function BlobBatch() { + this.batch = "batch"; + this.batchRequest = new InnerBatchRequest(); + } + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + BlobBatch.prototype.getMultiPartContentType = function () { + return this.batchRequest.getMultipartContentType(); + }; + /** + * Get assembled HTTP request body for sub requests. + */ + BlobBatch.prototype.getHttpRequestBody = function () { + return this.batchRequest.getHttpRequestBody(); + }; + /** + * Get sub requests that are added into the batch request. + */ + BlobBatch.prototype.getSubRequests = function () { + return this.batchRequest.getSubRequests(); + }; + BlobBatch.prototype.addSubRequestInternal = function (subRequest, assembleSubRequestFunc) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Mutex.lock(this.batch)]; + case 1: + _a.sent(); + _a.label = 2; + case 2: + _a.trys.push([2, , 4, 6]); + this.batchRequest.preAddSubRequest(subRequest); + return [4 /*yield*/, assembleSubRequestFunc()]; + case 3: + _a.sent(); + this.batchRequest.postAddSubRequest(subRequest); + return [3 /*break*/, 6]; + case 4: return [4 /*yield*/, Mutex.unlock(this.batch)]; + case 5: + _a.sent(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + BlobBatch.prototype.setBatchType = function (batchType) { + if (!this.batchType) { + this.batchType = batchType; + } + if (this.batchType !== batchType) { + throw new RangeError("BlobBatch only supports one operation type per batch and it already is being used for " + this.batchType + " operations."); + } + }; + BlobBatch.prototype.deleteBlob = function (urlOrBlobClient, credentialOrOptions, options) { + return __awaiter(this, void 0, void 0, function () { + var url, credential, _a, span, spanOptions, e_1; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (typeof urlOrBlobClient === "string" && + ((isNode && credentialOrOptions instanceof StorageSharedKeyCredential) || + credentialOrOptions instanceof AnonymousCredential || + isTokenCredential(credentialOrOptions))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrOptions; + } + else if (urlOrBlobClient instanceof BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + _a = createSpan("BatchDeleteRequest-addSubRequest", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + this.setBatchType("delete"); + return [4 /*yield*/, this.addSubRequestInternal({ + url: url, + credential: credential + }, function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); })]; + case 2: + _b.sent(); + return [3 /*break*/, 5]; + case 3: + e_1 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BlobBatch.prototype.setBlobAccessTier = function (urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + return __awaiter(this, void 0, void 0, function () { + var url, credential, tier, _a, span, spanOptions, e_2; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (typeof urlOrBlobClient === "string" && + ((isNode && credentialOrTier instanceof StorageSharedKeyCredential) || + credentialOrTier instanceof AnonymousCredential || + isTokenCredential(credentialOrTier))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrTier; + tier = tierOrOptions; + } + else if (urlOrBlobClient instanceof BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier = credentialOrTier; + options = tierOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + _a = createSpan("BatchSetTierRequest-addSubRequest", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + this.setBatchType("setAccessTier"); + return [4 /*yield*/, this.addSubRequestInternal({ + url: url, + credential: credential + }, function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); })]; + case 2: + _b.sent(); + return [3 /*break*/, 5]; + case 3: + e_2 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobBatch; +}()); +export { BlobBatch }; +/** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ +var InnerBatchRequest = /** @class */ (function () { + function InnerBatchRequest() { + this.operationCount = 0; + this.body = ""; + var tempGuid = generateUuid(); + // batch_{batchid} + this.boundary = "batch_" + tempGuid; + // --batch_{batchid} + // Content-Type: application/http + // Content-Transfer-Encoding: binary + this.subRequestPrefix = "--" + this.boundary + HTTP_LINE_ENDING + HeaderConstants.CONTENT_TYPE + ": application/http" + HTTP_LINE_ENDING + HeaderConstants.CONTENT_TRANSFER_ENCODING + ": binary"; + // multipart/mixed; boundary=batch_{batchid} + this.multipartContentType = "multipart/mixed; boundary=" + this.boundary; + // --batch_{batchid}-- + this.batchRequestEnding = "--" + this.boundary + "--"; + this.subRequests = new Map(); + } + /** + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + InnerBatchRequest.prototype.createPipeline = function (credential) { + var isAnonymousCreds = credential instanceof AnonymousCredential; + var policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory] + var factories = new Array(policyFactoryLength); + factories[0] = deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer + factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers + if (!isAnonymousCreds) { + factories[2] = isTokenCredential(credential) + ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes) + : credential; + } + factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire + return new Pipeline(factories, {}); + }; + InnerBatchRequest.prototype.appendSubRequestToBody = function (request) { + // Start to assemble sub request + this.body += [ + this.subRequestPrefix, + HeaderConstants.CONTENT_ID + ": " + this.operationCount, + "", + request.method.toString() + " " + getURLPathAndQuery(request.url) + " " + HTTP_VERSION_1_1 + HTTP_LINE_ENDING // sub request start line with method + ].join(HTTP_LINE_ENDING); + for (var _i = 0, _a = request.headers.headersArray(); _i < _a.length; _i++) { + var header = _a[_i]; + this.body += header.name + ": " + header.value + HTTP_LINE_ENDING; + } + this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line + // No body to assemble for current batch request support + // End to assemble sub request + }; + InnerBatchRequest.prototype.preAddSubRequest = function (subRequest) { + if (this.operationCount >= BATCH_MAX_REQUEST) { + throw new RangeError("Cannot exceed " + BATCH_MAX_REQUEST + " sub requests in a single batch"); + } + // Fast fail if url for sub request is invalid + var path = getURLPath(subRequest.url); + if (!path || path == "") { + throw new RangeError("Invalid url for sub request: '" + subRequest.url + "'"); + } + }; + InnerBatchRequest.prototype.postAddSubRequest = function (subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + }; + // Return the http request body with assembling the ending line to the sub request body. + InnerBatchRequest.prototype.getHttpRequestBody = function () { + return "" + this.body + this.batchRequestEnding + HTTP_LINE_ENDING; + }; + InnerBatchRequest.prototype.getMultipartContentType = function () { + return this.multipartContentType; + }; + InnerBatchRequest.prototype.getSubRequests = function () { + return this.subRequests; + }; + return InnerBatchRequest; +}()); +var BatchRequestAssemblePolicy = /** @class */ (function (_super) { + __extends(BatchRequestAssemblePolicy, _super); + function BatchRequestAssemblePolicy(batchRequest, nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.dummyResponse = { + request: new WebResource(), + status: 200, + headers: new HttpHeaders() + }; + _this.batchRequest = batchRequest; + return _this; + } + BatchRequestAssemblePolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.batchRequest.appendSubRequestToBody(request)]; + case 1: + _a.sent(); + return [2 /*return*/, this.dummyResponse]; // Intercept request from going to wire + } + }); + }); + }; + return BatchRequestAssemblePolicy; +}(BaseRequestPolicy)); +var BatchRequestAssemblePolicyFactory = /** @class */ (function () { + function BatchRequestAssemblePolicyFactory(batchRequest) { + this.batchRequest = batchRequest; + } + BatchRequestAssemblePolicyFactory.prototype.create = function (nextPolicy, options) { + return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options); + }; + return BatchRequestAssemblePolicyFactory; +}()); +var BatchHeaderFilterPolicy = /** @class */ (function (_super) { + __extends(BatchHeaderFilterPolicy, _super); + function BatchHeaderFilterPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + BatchHeaderFilterPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + var xMsHeaderName, _i, _a, header; + return __generator(this, function (_b) { + xMsHeaderName = ""; + for (_i = 0, _a = request.headers.headersArray(); _i < _a.length; _i++) { + header = _a[_i]; + if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) { + xMsHeaderName = header.name; + } + } + if (xMsHeaderName !== "") { + request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header. + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return BatchHeaderFilterPolicy; +}(BaseRequestPolicy)); +var BatchHeaderFilterPolicyFactory = /** @class */ (function () { + function BatchHeaderFilterPolicyFactory() { + } + BatchHeaderFilterPolicyFactory.prototype.create = function (nextPolicy, options) { + return new BatchHeaderFilterPolicy(nextPolicy, options); + }; + return BatchHeaderFilterPolicyFactory; +}()); +//# sourceMappingURL=BlobBatch.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js.map new file mode 100644 index 000000000..bab669508 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobBatch.js","sourceRoot":"","sources":["../../../src/BlobBatch.ts"],"names":[],"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UAAyB,OAAoB;;;;gBACvC,aAAa,GAAG,EAAE,CAAC;gBAEvB,WAAmD,EAA9B,KAAA,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,EAA9B,cAA8B,EAA9B,IAA8B,EAAE;oBAA1C,MAAM;oBACf,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,YAAY,CAAC,EAAE;wBACrD,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC;qBAC7B;iBACF;gBAED,IAAI,aAAa,KAAK,EAAE,EAAE;oBACxB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,2DAA2D;iBACnG;gBAED,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,8BAAC;AAAD,CAAC,AApBD,CAAsC,iBAAiB,GAoBtD;AAED;IACE;IAAe,CAAC;IAET,+CAAM,GAAb,UAAc,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,uBAAuB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IACH,qCAAC;AAAD,CAAC,AAND,IAMC","sourcesContent":["import {\n BaseRequestPolicy,\n deserializationPolicy,\n generateUuid,\n HttpHeaders,\n HttpOperationResponse,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n WebResource,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n isNode\n} from \"@azure/core-http\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { BlobClient, BlobDeleteOptions, BlobSetTierOptions } from \"./Clients\";\nimport { AccessTier } from \"./generatedModels\";\nimport { Mutex } from \"./utils/Mutex\";\nimport { Pipeline } from \"./Pipeline\";\nimport { getURLPath, getURLPathAndQuery, iEqual } from \"./utils/utils.common\";\nimport {\n HeaderConstants,\n BATCH_MAX_REQUEST,\n HTTP_VERSION_1_1,\n HTTP_LINE_ENDING,\n StorageOAuthScopes\n} from \"./utils/constants\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { createSpan } from \"./utils/tracing\";\n\n/**\n * A request associated with a batch operation.\n */\nexport interface BatchSubRequest {\n /**\n * The URL of the resource to request operation.\n *\n * @type {string}\n * @memberof BatchSubRequest\n */\n url: string;\n\n /**\n * The credential used for sub request.\n * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service.\n * You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n *\n * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential}\n * @memberof BatchSubRequest\n */\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n}\n\n/**\n * A BlobBatch represents an aggregated set of operations on blobs.\n * Currently, only `delete` and `setAccessTier` are supported.\n *\n * @export\n * @class BlobBatch\n */\nexport class BlobBatch {\n private batchRequest: InnerBatchRequest;\n private readonly batch: string = \"batch\";\n private batchType: \"delete\" | \"setAccessTier\" | undefined;\n\n constructor() {\n this.batchRequest = new InnerBatchRequest();\n }\n\n /**\n * Get the value of Content-Type for a batch request.\n * The value must be multipart/mixed with a batch boundary.\n * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252\n */\n public getMultiPartContentType(): string {\n return this.batchRequest.getMultipartContentType();\n }\n\n /**\n * Get assembled HTTP request body for sub requests.\n */\n public getHttpRequestBody(): string {\n return this.batchRequest.getHttpRequestBody();\n }\n\n /**\n * Get sub requests that are added into the batch request.\n */\n public getSubRequests(): Map {\n return this.batchRequest.getSubRequests();\n }\n\n private async addSubRequestInternal(\n subRequest: BatchSubRequest,\n assembleSubRequestFunc: () => Promise\n ): Promise {\n await Mutex.lock(this.batch);\n\n try {\n this.batchRequest.preAddSubRequest(subRequest);\n await assembleSubRequestFunc();\n this.batchRequest.postAddSubRequest(subRequest);\n } finally {\n await Mutex.unlock(this.batch);\n }\n }\n\n private setBatchType(batchType: \"delete\" | \"setAccessTier\"): void {\n if (!this.batchType) {\n this.batchType = batchType;\n }\n if (this.batchType !== batchType) {\n throw new RangeError(\n `BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`\n );\n }\n }\n\n /**\n * The deleteBlob operation marks the specified blob or snapshot for deletion.\n * The blob is later deleted during garbage collection.\n * Only one kind of operation is allowed per batch request.\n *\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string} url The url of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async deleteBlob(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: BlobDeleteOptions\n ): Promise;\n\n /**\n * The deleteBlob operation marks the specified blob or snapshot for deletion.\n * The blob is later deleted during garbage collection.\n * Only one kind of operation is allowed per batch request.\n *\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient} blobClient The BlobClient.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions): Promise;\n\n public async deleteBlob(\n urlOrBlobClient: string | BlobClient,\n credentialOrOptions:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | BlobDeleteOptions\n | undefined,\n options?: BlobDeleteOptions\n ): Promise {\n let url: string;\n let credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n if (\n typeof urlOrBlobClient === \"string\" &&\n ((isNode && credentialOrOptions instanceof StorageSharedKeyCredential) ||\n credentialOrOptions instanceof AnonymousCredential ||\n isTokenCredential(credentialOrOptions))\n ) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrOptions;\n } else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n options = credentialOrOptions as BlobDeleteOptions;\n } else {\n throw new RangeError(\n \"Invalid arguments. Either url and credential, or BlobClient need be provided.\"\n );\n }\n\n if (!options) {\n options = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BatchDeleteRequest-addSubRequest\",\n options.tracingOptions\n );\n\n try {\n this.setBatchType(\"delete\");\n await this.addSubRequestInternal(\n {\n url: url,\n credential: credential\n },\n async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The setBlobAccessTier operation sets the tier on a blob.\n * The operation is allowed on block blobs in a blob storage or general purpose v2 account.\n * Only one kind of operation is allowed per batch request.\n *\n * A block blob's tier determines Hot/Cool/Archive storage type.\n * This operation does not update the blob's ETag.\n * For detailed information about block blob level tiering\n * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).\n * The operation will be authenticated and authorized\n * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string} url The url of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async setBlobAccessTier(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n /**\n * The setBlobAccessTier operation sets the tier on a blob.\n * The operation is allowed on block blobs in a blob storage or general purpose v2 account.\n * Only one kind of operation is allowed per batch request.\n *\n * A block blob's tier determines Hot/Cool/Archive storage type.\n * This operation does not update the blob's ETag.\n * For detailed information about block blob level tiering\n * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).\n * The operation will be authenticated and authorized\n * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient} blobClient The BlobClient.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async setBlobAccessTier(\n blobClient: BlobClient,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n public async setBlobAccessTier(\n urlOrBlobClient: string | BlobClient,\n credentialOrTier:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | AccessTier,\n tierOrOptions?: AccessTier | BlobSetTierOptions,\n options?: BlobSetTierOptions\n ): Promise {\n let url: string;\n let credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n let tier: AccessTier;\n\n if (\n typeof urlOrBlobClient === \"string\" &&\n ((isNode && credentialOrTier instanceof StorageSharedKeyCredential) ||\n credentialOrTier instanceof AnonymousCredential ||\n isTokenCredential(credentialOrTier))\n ) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrTier as\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential;\n tier = tierOrOptions as AccessTier;\n } else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n tier = credentialOrTier as AccessTier;\n options = tierOrOptions as BlobSetTierOptions;\n } else {\n throw new RangeError(\n \"Invalid arguments. Either url and credential, or BlobClient need be provided.\"\n );\n }\n\n if (!options) {\n options = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BatchSetTierRequest-addSubRequest\",\n options.tracingOptions\n );\n\n try {\n this.setBatchType(\"setAccessTier\");\n await this.addSubRequestInternal(\n {\n url: url,\n credential: credential\n },\n async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(\n tier,\n {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n }\n );\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Inner batch request class which is responsible for assembling and serializing sub requests.\n * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled.\n */\nclass InnerBatchRequest {\n private operationCount: number;\n private body: string;\n private subRequests: Map;\n private readonly boundary: string;\n private readonly subRequestPrefix: string;\n private readonly multipartContentType: string;\n private readonly batchRequestEnding: string;\n\n constructor() {\n this.operationCount = 0;\n this.body = \"\";\n\n let tempGuid = generateUuid();\n\n // batch_{batchid}\n this.boundary = `batch_${tempGuid}`;\n // --batch_{batchid}\n // Content-Type: application/http\n // Content-Transfer-Encoding: binary\n this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`;\n // multipart/mixed; boundary=batch_{batchid}\n this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`;\n // --batch_{batchid}--\n this.batchRequestEnding = `--${this.boundary}--`;\n\n this.subRequests = new Map();\n }\n\n /**\n * Create pipeline to assemble sub requests. The idea here is to use existing\n * credential and serialization/deserialization components, with additional policies to\n * filter unnecessary headers, assemble sub requests into request's body\n * and intercept request from going to wire.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n */\n public createPipeline(\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential\n ): Pipeline {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n let factories: RequestPolicyFactory[] = new Array(policyFactoryLength);\n\n factories[0] = deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n\n return new Pipeline(factories, {});\n }\n\n public appendSubRequestToBody(request: WebResource) {\n // Start to assemble sub request\n this.body += [\n this.subRequestPrefix, // sub request constant prefix\n `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID\n \"\", // empty line after sub request's content ID\n `${request.method.toString()} ${getURLPathAndQuery(\n request.url\n )} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method\n ].join(HTTP_LINE_ENDING);\n\n for (const header of request.headers.headersArray()) {\n this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;\n }\n\n this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line\n // No body to assemble for current batch request support\n // End to assemble sub request\n }\n\n public preAddSubRequest(subRequest: BatchSubRequest) {\n if (this.operationCount >= BATCH_MAX_REQUEST) {\n throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`);\n }\n\n // Fast fail if url for sub request is invalid\n const path = getURLPath(subRequest.url);\n if (!path || path == \"\") {\n throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`);\n }\n }\n\n public postAddSubRequest(subRequest: BatchSubRequest) {\n this.subRequests.set(this.operationCount, subRequest);\n this.operationCount++;\n }\n\n // Return the http request body with assembling the ending line to the sub request body.\n public getHttpRequestBody(): string {\n return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`;\n }\n\n public getMultipartContentType(): string {\n return this.multipartContentType;\n }\n\n public getSubRequests(): Map {\n return this.subRequests;\n }\n}\n\nclass BatchRequestAssemblePolicy extends BaseRequestPolicy {\n private batchRequest: InnerBatchRequest;\n private readonly dummyResponse: HttpOperationResponse = {\n request: new WebResource(),\n status: 200,\n headers: new HttpHeaders()\n };\n\n constructor(\n batchRequest: InnerBatchRequest,\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ) {\n super(nextPolicy, options);\n\n this.batchRequest = batchRequest;\n }\n\n public async sendRequest(request: WebResource): Promise {\n await this.batchRequest.appendSubRequestToBody(request);\n\n return this.dummyResponse; // Intercept request from going to wire\n }\n}\n\nclass BatchRequestAssemblePolicyFactory implements RequestPolicyFactory {\n private batchRequest: InnerBatchRequest;\n\n constructor(batchRequest: InnerBatchRequest) {\n this.batchRequest = batchRequest;\n }\n\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): BatchRequestAssemblePolicy {\n return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options);\n }\n}\n\nclass BatchHeaderFilterPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n public async sendRequest(request: WebResource): Promise {\n let xMsHeaderName = \"\";\n\n for (const header of request.headers.headersArray()) {\n if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) {\n xMsHeaderName = header.name;\n }\n }\n\n if (xMsHeaderName !== \"\") {\n request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header.\n }\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n\nclass BatchHeaderFilterPolicyFactory implements RequestPolicyFactory {\n constructor() {}\n\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): BatchHeaderFilterPolicy {\n return new BatchHeaderFilterPolicy(nextPolicy, options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js new file mode 100644 index 000000000..45a90dd71 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __assign, __awaiter, __generator } from "tslib"; +import { BatchResponseParser } from "./BatchResponseParser"; +import { utf8ByteLength } from "./BatchUtils"; +import { BlobBatch } from "./BlobBatch"; +import { CanonicalCode } from "@opentelemetry/api"; +import { createSpan } from "./utils/tracing"; +import { Service } from "./generated/src/operations"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { StorageClientContext } from "./generated/src/storageClientContext"; +import { Pipeline, newPipeline } from "./Pipeline"; +/** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + */ +var BlobBatchClient = /** @class */ (function () { + function BlobBatchClient(url, credentialOrPipeline, options) { + var pipeline; + if (credentialOrPipeline instanceof Pipeline) { + pipeline = credentialOrPipeline; + } + else if (!credentialOrPipeline) { + // no credential provided + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + pipeline = newPipeline(credentialOrPipeline, options); + } + var storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions()); + this._serviceContext = new Service(storageClientContext); + } + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + BlobBatchClient.prototype.createBatch = function () { + return new BlobBatch(); + }; + BlobBatchClient.prototype.deleteBlobs = function (urlsOrBlobClients, credentialOrOptions, options) { + return __awaiter(this, void 0, void 0, function () { + var batch, _i, urlsOrBlobClients_1, urlOrBlobClient; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + batch = new BlobBatch(); + _i = 0, urlsOrBlobClients_1 = urlsOrBlobClients; + _a.label = 1; + case 1: + if (!(_i < urlsOrBlobClients_1.length)) return [3 /*break*/, 6]; + urlOrBlobClient = urlsOrBlobClients_1[_i]; + if (!(typeof urlOrBlobClient === "string")) return [3 /*break*/, 3]; + return [4 /*yield*/, batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options)]; + case 2: + _a.sent(); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, batch.deleteBlob(urlOrBlobClient, credentialOrOptions)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + _i++; + return [3 /*break*/, 1]; + case 6: return [2 /*return*/, this.submitBatch(batch)]; + } + }); + }); + }; + BlobBatchClient.prototype.setBlobsAccessTier = function (urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { + return __awaiter(this, void 0, void 0, function () { + var batch, _i, urlsOrBlobClients_2, urlOrBlobClient; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + batch = new BlobBatch(); + _i = 0, urlsOrBlobClients_2 = urlsOrBlobClients; + _a.label = 1; + case 1: + if (!(_i < urlsOrBlobClients_2.length)) return [3 /*break*/, 6]; + urlOrBlobClient = urlsOrBlobClients_2[_i]; + if (!(typeof urlOrBlobClient === "string")) return [3 /*break*/, 3]; + return [4 /*yield*/, batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options)]; + case 2: + _a.sent(); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + _i++; + return [3 /*break*/, 1]; + case 6: return [2 /*return*/, this.submitBatch(batch)]; + } + }); + }); + }; + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob(urlInString0, credential0); + * await batchRequest.deleteBlob(urlInString1, credential1, { + * deleteSnapshots: "include" + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); + * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { + * conditions: { leaseId: leaseId } + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @param {BlobBatch} batchRequest A set of Delete or SetTier operations. + * @param {BlobBatchSubmitBatchOptionalParams} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + BlobBatchClient.prototype.submitBatch = function (batchRequest, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, batchRequestBody, rawBatchResponse, batchResponseParser, responseSummary, res, e_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!batchRequest || batchRequest.getSubRequests().size == 0) { + throw new RangeError("Batch request should contain one or more sub requests."); + } + _a = createSpan("BlobBatchClient-submitBatch", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + batchRequestBody = batchRequest.getHttpRequestBody(); + return [4 /*yield*/, this._serviceContext.submitBatch(batchRequestBody, utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), __assign(__assign({}, options), { spanOptions: spanOptions }))]; + case 2: + rawBatchResponse = _b.sent(); + batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + return [4 /*yield*/, batchResponseParser.parseBatchResponse()]; + case 3: + responseSummary = _b.sent(); + res = { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount + }; + return [2 /*return*/, res]; + case 4: + e_1 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + return BlobBatchClient; +}()); +export { BlobBatchClient }; +//# sourceMappingURL=BlobBatchClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js.map new file mode 100644 index 000000000..cbf60b96f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobBatchClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobBatchClient.js","sourceRoot":"","sources":["../../../src/BlobBatchClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AASlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,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AAgB,EAChB,cAAc,CAAC,gBAAgB,CAAC,EAChC,YAAY,CAAC,uBAAuB,EAAE,wBAEjC,OAAO,KACV,WAAW,aAAA,IAEd,EAAA;;wBARK,gBAAgB,GAAoC,SAQzD;wBAGK,mBAAmB,GAAG,IAAI,mBAAmB,CACjD,gBAAgB,EAChB,YAAY,CAAC,cAAc,EAAE,CAC9B,CAAC;wBACsB,qBAAM,mBAAmB,CAAC,kBAAkB,EAAE,EAAA;;wBAAhE,eAAe,GAAG,SAA8C;wBAEhE,GAAG,GAAiC;4BACxC,SAAS,EAAE,gBAAgB,CAAC,SAAS;4BACrC,WAAW,EAAE,gBAAgB,CAAC,WAAW;4BACzC,SAAS,EAAE,gBAAgB,CAAC,SAAS;4BACrC,SAAS,EAAE,gBAAgB,CAAC,SAAS;4BACrC,eAAe,EAAE,gBAAgB,CAAC,eAAe;4BACjD,OAAO,EAAE,gBAAgB,CAAC,OAAO;4BACjC,YAAY,EAAE,eAAe,CAAC,YAAY;4BAC1C,0BAA0B,EAAE,eAAe,CAAC,0BAA0B;4BACtE,uBAAuB,EAAE,eAAe,CAAC,uBAAuB;yBACjE,CAAC;wBAEF,sBAAO,GAAG,EAAC;;;wBAEX,IAAI,CAAC,SAAS,CAAC;4BACb,IAAI,EAAE,aAAa,CAAC,OAAO;4BAC3B,OAAO,EAAE,GAAC,CAAC,OAAO;yBACnB,CAAC,CAAC;wBACH,MAAM,GAAC,CAAC;;wBAER,IAAI,CAAC,GAAG,EAAE,CAAC;;;;;;KAEd;IACH,sBAAC;AAAD,CAAC,AA7RD,IA6RC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n AccessTier,\n ServiceSubmitBatchHeaders,\n ServiceSubmitBatchOptionalParamsModel,\n ServiceSubmitBatchResponseModel\n} from \"./generatedModels\";\nimport { ParsedBatchResponse } from \"./BatchResponse\";\nimport { BatchResponseParser } from \"./BatchResponseParser\";\nimport { utf8ByteLength } from \"./BatchUtils\";\nimport { BlobBatch } from \"./BlobBatch\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { createSpan } from \"./utils/tracing\";\nimport { HttpResponse, TokenCredential } from \"@azure/core-http\";\nimport { Service } from \"./generated/src/operations\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { CommonOptions } from \"./StorageClient\";\nimport { BlobDeleteOptions, BlobClient, BlobSetTierOptions } from \"./Clients\";\nimport { StorageClientContext } from \"./generated/src/storageClientContext\";\nimport { Pipeline, StoragePipelineOptions, newPipeline } from \"./Pipeline\";\n\n/**\n * Options to configure the Service - Submit Batch Optional Params.\n *\n * @export\n * @interface BlobBatchSubmitBatchOptionalParams\n */\nexport interface BlobBatchSubmitBatchOptionalParams\n extends ServiceSubmitBatchOptionalParamsModel,\n CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobBatchSubmitBatchOptionalParams\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Contains response data for blob batch operations.\n */\nexport declare type BlobBatchSubmitBatchResponse = ParsedBatchResponse &\n ServiceSubmitBatchHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceSubmitBatchHeaders;\n };\n };\n\n/**\n * Contains response data for the {@link deleteBlobs} operation.\n */\nexport declare type BlobBatchDeleteBlobsResponse = BlobBatchSubmitBatchResponse;\n\n/**\n * Contains response data for the {@link setBlobsAccessTier} operation.\n */\nexport declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchResponse;\n\n/**\n * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n */\nexport class BlobBatchClient {\n private _serviceContext: Service;\n\n /**\n * Creates an instance of BlobBatchClient.\n *\n * @param {string} url A url pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Options to configure the HTTP pipeline.\n * @memberof BlobBatchClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobBatchClient.\n *\n * @param {string} url A url pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobBatchClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n if (credentialOrPipeline instanceof Pipeline) {\n pipeline = credentialOrPipeline;\n } else if (!credentialOrPipeline) {\n // no credential provided\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n\n const storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions());\n\n this._serviceContext = new Service(storageClientContext);\n }\n\n /**\n * Creates a {@link BlobBatch}.\n * A BlobBatch represents an aggregated set of operations on blobs.\n */\n public createBatch(): BlobBatch {\n return new BlobBatch();\n }\n\n /**\n * Create multiple delete operations to mark the specified blobs or snapshots for deletion.\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operations will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string[]} urls The urls of the blob resources to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async deleteBlobs(\n urls: string[],\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: BlobDeleteOptions\n ): Promise;\n\n /**\n * Create multiple delete operations to mark the specified blobs or snapshots for deletion.\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation(subrequest) will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient[]} blobClients The BlobClients for the blobs to delete.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async deleteBlobs(\n blobClients: BlobClient[],\n options?: BlobDeleteOptions\n ): Promise;\n\n public async deleteBlobs(\n urlsOrBlobClients: string[] | BlobClient[],\n credentialOrOptions:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | BlobDeleteOptions\n | undefined,\n options?: BlobDeleteOptions\n ): Promise {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions as TokenCredential, options);\n } else {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions as BlobDeleteOptions);\n }\n }\n return this.submitBatch(batch);\n }\n\n /**\n * Create multiple set tier operations to set the tier on a blob.\n * The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).\n * The operation(subrequest) will be authenticated and authorized\n * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string[]} urls The urls of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async setBlobsAccessTier(\n urls: string[],\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n /**\n * Create multiple set tier operations to set the tier on a blob.\n * The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).\n * The operation(subrequest) will be authenticated and authorized\n * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient[]} blobClients The BlobClients for the blobs which should have a new tier set.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async setBlobsAccessTier(\n blobClients: BlobClient[],\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n public async setBlobsAccessTier(\n urlsOrBlobClients: string[] | BlobClient[],\n credentialOrTier:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | AccessTier,\n tierOrOptions?: AccessTier | BlobSetTierOptions,\n options?: BlobSetTierOptions\n ): Promise {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.setBlobAccessTier(\n urlOrBlobClient,\n credentialOrTier as TokenCredential,\n tierOrOptions as AccessTier,\n options\n );\n } else {\n await batch.setBlobAccessTier(\n urlOrBlobClient,\n credentialOrTier as AccessTier,\n tierOrOptions as BlobSetTierOptions\n );\n }\n }\n return this.submitBatch(batch);\n }\n\n /**\n * Submit batch request which consists of multiple subrequests.\n *\n * Get `blobBatchClient` and other details before running the snippets.\n * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`\n *\n * Example usage:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.deleteBlob(urlInString0, credential0);\n * await batchRequest.deleteBlob(urlInString1, credential1, {\n * deleteSnapshots: \"include\"\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * Example using a lease:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.setBlobAccessTier(blockBlobClient0, \"Cool\");\n * await batchRequest.setBlobAccessTier(blockBlobClient1, \"Cool\", {\n * conditions: { leaseId: leaseId }\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @param {BlobBatch} batchRequest A set of Delete or SetTier operations.\n * @param {BlobBatchSubmitBatchOptionalParams} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async submitBatch(\n batchRequest: BlobBatch,\n options: BlobBatchSubmitBatchOptionalParams = {}\n ): Promise {\n if (!batchRequest || batchRequest.getSubRequests().size == 0) {\n throw new RangeError(\"Batch request should contain one or more sub requests.\");\n }\n\n const { span, spanOptions } = createSpan(\"BlobBatchClient-submitBatch\", options.tracingOptions);\n try {\n const batchRequestBody = batchRequest.getHttpRequestBody();\n\n const rawBatchResponse: ServiceSubmitBatchResponseModel = await this._serviceContext.submitBatch(\n batchRequestBody,\n utf8ByteLength(batchRequestBody),\n batchRequest.getMultiPartContentType(),\n {\n ...options,\n spanOptions\n }\n );\n\n // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202).\n const batchResponseParser = new BatchResponseParser(\n rawBatchResponse,\n batchRequest.getSubRequests()\n );\n const responseSummary = await batchResponseParser.parseBatchResponse();\n\n const res: BlobBatchSubmitBatchResponse = {\n _response: rawBatchResponse._response,\n contentType: rawBatchResponse.contentType,\n errorCode: rawBatchResponse.errorCode,\n requestId: rawBatchResponse.requestId,\n clientRequestId: rawBatchResponse.clientRequestId,\n version: rawBatchResponse.version,\n subResponses: responseSummary.subResponses,\n subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,\n subResponsesFailedCount: responseSummary.subResponsesFailedCount\n };\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js new file mode 100644 index 000000000..ca4a16c2e --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// This file is used as a shim of "BlobDownloadResponse" for some browser bundlers +// when trying to bundle "BlobDownloadResponse" +// "BlobDownloadResponse" class is only available in Node.js runtime +export var BlobDownloadResponse = 1; +//# sourceMappingURL=BlobDownloadResponse.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map new file mode 100644 index 000000000..1579ffeca --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobDownloadResponse.browser.js","sourceRoot":"","sources":["../../../src/BlobDownloadResponse.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,kFAAkF;AAClF,+CAA+C;AAC/C,oEAAoE;AACpE,MAAM,CAAC,IAAM,oBAAoB,GAAG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// This file is used as a shim of \"BlobDownloadResponse\" for some browser bundlers\n// when trying to bundle \"BlobDownloadResponse\"\n// \"BlobDownloadResponse\" class is only available in Node.js runtime\nexport const BlobDownloadResponse = 1;\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js new file mode 100644 index 000000000..c95188aa0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js @@ -0,0 +1,685 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { isNode } from "@azure/core-http"; +import { RetriableReadableStream } from "./utils/RetriableReadableStream"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. + * + * @export + * @class BlobDownloadResponse + * @implements {BlobDownloadResponseParsed} + */ +var BlobDownloadResponse = /** @class */ (function () { + /** + * Creates an instance of BlobDownloadResponse. + * + * @param {BlobDownloadResponseParsed} originalResponse + * @param {ReadableStreamGetter} getter + * @param {number} offset + * @param {number} count + * @param {RetriableReadableStreamOptions} [options={}] + * @memberof BlobDownloadResponse + */ + function BlobDownloadResponse(originalResponse, getter, offset, count, options) { + if (options === void 0) { options = {}; } + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + } + Object.defineProperty(BlobDownloadResponse.prototype, "acceptRanges", { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.acceptRanges; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "cacheControl", { + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.cacheControl; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentDisposition", { + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentDisposition; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentEncoding", { + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentEncoding; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentLanguage", { + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentLanguage; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobSequenceNumber", { + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobSequenceNumber; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobType", { + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentLength", { + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentLength; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentMD5", { + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentRange", { + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentRange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentType", { + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyCompletedOn", { + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyCompletedOn; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyId", { + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyProgress", { + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyProgress; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copySource", { + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copySource; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyStatus", { + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyStatusDescription", { + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyStatusDescription; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseDuration", { + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseDuration; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseState", { + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseState; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseStatus", { + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "date", { + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.date; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobCommittedBlockCount", { + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobCommittedBlockCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "etag", { + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.etag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "tagCount", { + /** + * The number of tags associated with the blob + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.tagCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "errorCode", { + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.errorCode; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "isServerEncrypted", { + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.isServerEncrypted; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobContentMD5", { + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobContentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "lastModified", { + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.lastModified; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "lastAccessed", { + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.lastAccessed; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "metadata", { + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.metadata; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "requestId", { + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.requestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "clientRequestId", { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.clientRequestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "version", { + /** + * Indicates the version of the Blob service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.version; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "versionId", { + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.versionId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "encryptionKeySha256", { + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.encryptionKeySha256; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentCrc64", { + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentCrc64; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "objectReplicationDestinationPolicyId", { + /** + * Object Replication Policy Id of the destination blob. + * + * @readonly + * @type {(string| undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.objectReplicationDestinationPolicyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "objectReplicationSourceProperties", { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @readonly + * @type {(ObjectReplicationPolicy[] | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.objectReplicationSourceProperties; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "isSealed", { + /** + * If this blob has been sealed. + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.isSealed; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentAsBlob", { + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobBody; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "readableStreamBody", { + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will automatically retry when internal read stream unexpected ends. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return isNode ? this.blobDownloadStream : undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "_response", { + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse._response; + }, + enumerable: false, + configurable: true + }); + return BlobDownloadResponse; +}()); +export { BlobDownloadResponse }; +//# sourceMappingURL=BlobDownloadResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js.map new file mode 100644 index 000000000..79e089ac7 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobDownloadResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobDownloadResponse.js","sourceRoot":"","sources":["../../../src/BlobDownloadResponse.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAAgB,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAWxD,OAAO,EAEL,uBAAuB,EAExB,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH;IA+gBE;;;;;;;;;OASG;IACH,8BACE,gBAA4C,EAC5C,MAA4B,EAC5B,MAAc,EACd,KAAa,EACb,OAA4C;QAA5C,wBAAA,EAAA,YAA4C;QAE5C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAuB,CACnD,IAAI,CAAC,gBAAgB,CAAC,kBAAmB,EACzC,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;IA/hBD,sBAAW,8CAAY;QARvB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IAUD,sBAAW,8CAAY;QARvB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IAWD,sBAAW,oDAAkB;QAT7B;;;;;;;;WAQG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;QAClD,CAAC;;;OAAA;IAUD,sBAAW,iDAAe;QAR1B;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAA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E,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IASD,sBAAW,sEAAoC;QAP/C;;;;;;WAMG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,oCAAoC,CAAC;QACpE,CAAC;;;OAAA;IASD,sBAAW,mEAAiC;QAP5C;;;;;;WAMG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,iCAAiC,CAAC;QACjE,CAAC;;;OAAA;IASD,sBAAW,0CAAQ;QAPnB;;;;;;WAMG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QACxC,CAAC;;;OAAA;IAUD,sBAAW,+CAAa;QARxB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QACxC,CAAC;;;OAAA;IAYD,sBAAW,oDAAkB;QAV7B;;;;;;;;;WASG;aACH;YACE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,CAAC;;;OAAA;IAQD,sBAAW,2CAAS;QANpB;;;;;WAKG;aACH;YAGE,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;QACzC,CAAC;;;OAAA;IA+BH,2BAAC;AAAD,CAAC,AAziBD,IAyiBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { HttpResponse, isNode } from \"@azure/core-http\";\n\nimport {\n BlobDownloadHeaders,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType\n} from \"./generatedModels\";\nimport { BlobDownloadResponseParsed, Metadata, ObjectReplicationPolicy } from \"./models\";\nimport {\n ReadableStreamGetter,\n RetriableReadableStream,\n RetriableReadableStreamOptions\n} from \"./utils/RetriableReadableStream\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will\n * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot\n * trigger retries defined in pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js\n * Readable stream.\n *\n * @export\n * @class BlobDownloadResponse\n * @implements {BlobDownloadResponseParsed}\n */\nexport class BlobDownloadResponse implements BlobDownloadResponseParsed {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n * @type {(BlobType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyCompletedOn(): Date | undefined {\n return this.originalResponse.copyCompletedOn;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n * @type {(CopyStatusType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n * @type {(LeaseDurationType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n * @type {(LeaseStateType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n * @type {(LeaseStatusType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The number of tags associated with the blob\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get tagCount(): number | undefined {\n return this.originalResponse.tagCount;\n }\n\n /**\n * The error code.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * Returns the UTC date and time generated by the service that indicates the time at which the blob was\n * last read or written to.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get lastAccessed(): Date | undefined {\n return this.originalResponse.lastAccessed;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n * @type {(Metadata | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the Blob service used\n * to execute the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * Indicates the versionId of the downloaded blob version.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get versionId(): string | undefined {\n return this.originalResponse.versionId;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n *\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @readonly\n * @type {(string| undefined)}\n * @memberof BlobDownloadResponse\n */\n public get objectReplicationDestinationPolicyId(): string | undefined {\n return this.originalResponse.objectReplicationDestinationPolicyId;\n }\n\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @readonly\n * @type {(ObjectReplicationPolicy[] | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get objectReplicationSourceProperties(): ObjectReplicationPolicy[] | undefined {\n return this.originalResponse.objectReplicationSourceProperties;\n }\n\n /**\n * If this blob has been sealed.\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get isSealed(): boolean | undefined {\n return this.originalResponse.isSealed;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n * @type {(Promise | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentAsBlob(): Promise | undefined {\n return this.originalResponse.blobBody;\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will automatically retry when internal read stream unexpected ends.\n *\n * @readonly\n * @type {(NodeJS.ReadableStream | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return isNode ? this.blobDownloadStream : undefined;\n }\n\n /**\n * The HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobDownloadResponse\n */\n public get _response(): HttpResponse & {\n parsedHeaders: BlobDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobDownloadResponseParsed;\n private blobDownloadStream?: RetriableReadableStream;\n\n /**\n * Creates an instance of BlobDownloadResponse.\n *\n * @param {BlobDownloadResponseParsed} originalResponse\n * @param {ReadableStreamGetter} getter\n * @param {number} offset\n * @param {number} count\n * @param {RetriableReadableStreamOptions} [options={}]\n * @memberof BlobDownloadResponse\n */\n public constructor(\n originalResponse: BlobDownloadResponseParsed,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new RetriableReadableStream(\n this.originalResponse.readableStreamBody!,\n getter,\n offset,\n count,\n options\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js new file mode 100644 index 000000000..624ffa02a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN BROWSER RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will + * parse avor data returned by blob query. + * + * @export + * @class BlobQueryResponse + * @implements {BlobDownloadResponseModel} + */ +var BlobQueryResponse = /** @class */ (function () { + /** + * Creates an instance of BlobQueryResponse. + * + * @param {BlobQueryResponseModel} originalResponse + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQueryResponse + */ + function BlobQueryResponse(originalResponse, _options) { + if (_options === void 0) { _options = {}; } + this.originalResponse = originalResponse; + } + Object.defineProperty(BlobQueryResponse.prototype, "acceptRanges", { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.acceptRanges; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "cacheControl", { + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.cacheControl; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentDisposition", { + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentDisposition; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentEncoding", { + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentEncoding; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLanguage", { + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLanguage; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobSequenceNumber", { + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobSequenceNumber; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobType", { + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLength", { + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLength; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentMD5", { + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentRange", { + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentRange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentType", { + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyCompletedOn", { + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyId", { + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyProgress", { + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyProgress; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copySource", { + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copySource; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatus", { + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatusDescription", { + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatusDescription; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseDuration", { + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseDuration; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseState", { + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseState; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseStatus", { + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "date", { + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.date; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobCommittedBlockCount", { + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobCommittedBlockCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "etag", { + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.etag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "errorCode", { + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.errorCode; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "isServerEncrypted", { + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.isServerEncrypted; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobContentMD5", { + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobContentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "lastModified", { + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.lastModified; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "metadata", { + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.metadata; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "requestId", { + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.requestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "clientRequestId", { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.clientRequestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "version", { + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.version; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "encryptionKeySha256", { + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.encryptionKeySha256; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentCrc64", { + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentCrc64; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobBody", { + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + throw Error("Quick query in browser is not supported yet."); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "readableStreamBody", { + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "_response", { + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse._response; + }, + enumerable: false, + configurable: true + }); + return BlobQueryResponse; +}()); +export { BlobQueryResponse }; +//# sourceMappingURL=BlobQueryResponse.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map new file mode 100644 index 000000000..d5e86fcee --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobQueryResponse.browser.js","sourceRoot":"","sources":["../../../src/BlobQueryResponse.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAiBlC;;;;;;;;;GASG;AACH;IAycE;;;;;;OAMG;IACH,2BACE,gBAAwC,EACxC,QAA0C;QAA1C,yBAAA,EAAA,aAA0C;QAE1C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IA5cD,sBAAW,2CAAY;QARvB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IAUD,sBAAW,2CAAY;QARvB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IAWD,sBAAW,iDAAkB;QAT7B;;;;;;;;WAQG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;QAClD,C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QD,sBAAW,wCAAS;QANpB;;;;;WAKG;aACH;YAGE,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;QACzC,CAAC;;;OAAA;IAiBH,wBAAC;AAAD,CAAC,AAtdD,IAsdC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { HttpResponse } from \"@azure/core-http\";\n\nimport {\n BlobDownloadResponseModel,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n BlobDownloadHeaders,\n BlobQueryResponseModel\n} from \"./generatedModels\";\nimport { Metadata } from \"./models\";\nimport { BlobQuickQueryStreamOptions } from \"./utils/BlobQuickQueryStream\";\n\n/**\n * ONLY AVAILABLE IN BROWSER RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will\n * parse avor data returned by blob query.\n *\n * @export\n * @class BlobQueryResponse\n * @implements {BlobDownloadResponseModel}\n */\nexport class BlobQueryResponse implements BlobDownloadResponseModel {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n * @type {(BlobType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyCompletedOn(): Date | undefined {\n return undefined;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n * @type {(CopyStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n * @type {(LeaseDurationType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n * @type {(LeaseStateType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n * @type {(LeaseStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The error code.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobQueryResponse\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n * @type {(Metadata | undefined)}\n * @memberof BlobQueryResponse\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the File service used\n * to execute the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n *\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n * @type {(Promise | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobBody(): Promise | undefined {\n throw Error(`Quick query in browser is not supported yet.`);\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * @readonly\n * @type {(NodeJS.ReadableStream | undefined)}\n * @memberof BlobQueryResponse\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return undefined;\n }\n\n /**\n * The HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobQueryResponse\n */\n public get _response(): HttpResponse & {\n parsedHeaders: BlobDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobQueryResponseModel;\n\n /**\n * Creates an instance of BlobQueryResponse.\n *\n * @param {BlobQueryResponseModel} originalResponse\n * @param {BlobQuickQueryStreamOptions} [options={}]\n * @memberof BlobQueryResponse\n */\n public constructor(\n originalResponse: BlobQueryResponseModel,\n _options: BlobQuickQueryStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js new file mode 100644 index 000000000..0f32e93a3 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { isNode } from "@azure/core-http"; +import { BlobQuickQueryStream } from "./utils/BlobQuickQueryStream"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avor data returned by blob query. + * + * @export + * @class BlobQueryResponse + * @implements {BlobDownloadResponseModel} + */ +var BlobQueryResponse = /** @class */ (function () { + /** + * Creates an instance of BlobQueryResponse. + * + * @param {BlobQueryResponseModel} originalResponse + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQueryResponse + */ + function BlobQueryResponse(originalResponse, options) { + if (options === void 0) { options = {}; } + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + } + Object.defineProperty(BlobQueryResponse.prototype, "acceptRanges", { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.acceptRanges; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "cacheControl", { + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.cacheControl; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentDisposition", { + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentDisposition; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentEncoding", { + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentEncoding; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLanguage", { + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLanguage; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobSequenceNumber", { + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobSequenceNumber; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobType", { + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLength", { + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLength; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentMD5", { + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentRange", { + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentRange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentType", { + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyCompletedOn", { + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyId", { + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyProgress", { + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyProgress; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copySource", { + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copySource; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatus", { + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatusDescription", { + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatusDescription; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseDuration", { + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseDuration; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseState", { + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseState; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseStatus", { + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "date", { + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.date; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobCommittedBlockCount", { + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobCommittedBlockCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "etag", { + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.etag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "errorCode", { + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.errorCode; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "isServerEncrypted", { + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.isServerEncrypted; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobContentMD5", { + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobContentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "lastModified", { + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.lastModified; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "metadata", { + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.metadata; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "requestId", { + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.requestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "clientRequestId", { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.clientRequestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "version", { + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.version; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "encryptionKeySha256", { + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.encryptionKeySha256; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentCrc64", { + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentCrc64; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobBody", { + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "readableStreamBody", { + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return isNode ? this.blobDownloadStream : undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "_response", { + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse._response; + }, + enumerable: false, + configurable: true + }); + return BlobQueryResponse; +}()); +export { BlobQueryResponse }; +//# sourceMappingURL=BlobQueryResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js.map new file mode 100644 index 000000000..545ed0104 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobQueryResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobQueryResponse.js","sourceRoot":"","sources":["../../../src/B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D,sBAAW,wCAAS;QARpB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;QACzC,CAAC;;;OAAA;IAUD,sBAAW,8CAAe;QAR1B;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;QAC/C,CAAC;;;OAAA;IAUD,sBAAW,sCAAO;QARlB;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;QACvC,CAAC;;;OAAA;IAUD,sBAAW,kDAAmB;QAR9B;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;QACnD,CAAC;;;OAAA;IAWD,sBAAW,2CAAY;QATvB;;;;;;;;WAQG;aACH;YACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;QAC5C,CAAC;;;OAAA;IAUD,sBAAW,uCAAQ;QARnB;;;;;;;WAOG;aACH;YACE,OAAO,SAAS,CAAC;QACnB,CAAC;;;OAAA;IAYD,sBAAW,iDAAkB;QAV7B;;;;;;;;;WASG;aACH;YACE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,CAAC;;;OAAA;IAQD,sBAAW,wCAAS;QANpB;;;;;WAKG;aACH;YAGE,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;QACzC,CAAC;;;OAAA;IAsBH,wBAAC;AAAD,CAAC,AA7dD,IA6dC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { HttpResponse, isNode } from \"@azure/core-http\";\n\nimport {\n BlobDownloadResponseModel,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n BlobDownloadHeaders,\n BlobQueryResponseModel\n} from \"./generatedModels\";\nimport { Metadata } from \"./models\";\nimport { BlobQuickQueryStream, BlobQuickQueryStreamOptions } from \"./utils/BlobQuickQueryStream\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will\n * parse avor data returned by blob query.\n *\n * @export\n * @class BlobQueryResponse\n * @implements {BlobDownloadResponseModel}\n */\nexport class BlobQueryResponse implements BlobDownloadResponseModel {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n * @type {(BlobType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyCompletedOn(): Date | undefined {\n return undefined;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n * @type {(CopyStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n * @type {(LeaseDurationType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n * @type {(LeaseStateType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n * @type {(LeaseStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The error code.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobQueryResponse\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n * @type {(Metadata | undefined)}\n * @memberof BlobQueryResponse\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the File service used\n * to execute the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n *\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n * @type {(Promise | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobBody(): Promise | undefined {\n return undefined;\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will parse avor data returned by blob query.\n *\n * @readonly\n * @type {(NodeJS.ReadableStream | undefined)}\n * @memberof BlobQueryResponse\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return isNode ? this.blobDownloadStream : undefined;\n }\n\n /**\n * The HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobQueryResponse\n */\n public get _response(): HttpResponse & {\n parsedHeaders: BlobDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobQueryResponseModel;\n private blobDownloadStream?: BlobQuickQueryStream;\n\n /**\n * Creates an instance of BlobQueryResponse.\n *\n * @param {BlobQueryResponseModel} originalResponse\n * @param {BlobQuickQueryStreamOptions} [options={}]\n * @memberof BlobQueryResponse\n */\n public constructor(\n originalResponse: BlobQueryResponseModel,\n options: BlobQuickQueryStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new BlobQuickQueryStream(\n this.originalResponse.readableStreamBody!,\n options\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js new file mode 100644 index 000000000..f0d6e7006 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js @@ -0,0 +1,974 @@ +import { __assign, __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter, __extends, __generator, __values } from "tslib"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { isTokenCredential, isNode, getDefaultProxySettings } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { Container, Service } from "./generated/src/operations"; +import { newPipeline, Pipeline } from "./Pipeline"; +import { ContainerClient } from "./Clients"; +import { appendToURLPath, extractConnectionStringParts } from "./utils/utils.common"; +import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import "@azure/core-paging"; +import { truncatedISO8061Date } from "./utils/utils.common"; +import { createSpan } from "./utils/tracing"; +import { BlobBatchClient } from "./BlobBatchClient"; +import { StorageClient } from "./StorageClient"; +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + * + * @export + * @class BlobServiceClient + */ +var BlobServiceClient = /** @class */ (function (_super) { + __extends(BlobServiceClient, _super); + function BlobServiceClient(url, credentialOrPipeline, options) { + var _this = this; + var pipeline; + if (credentialOrPipeline instanceof Pipeline) { + pipeline = credentialOrPipeline; + } + else if ((isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) || + credentialOrPipeline instanceof AnonymousCredential || + isTokenCredential(credentialOrPipeline)) { + pipeline = newPipeline(credentialOrPipeline, options); + } + else { + // The second parameter is undefined. Use anonymous credential + pipeline = newPipeline(new AnonymousCredential(), options); + } + _this = _super.call(this, url, pipeline) || this; + _this.serviceContext = new Service(_this.storageClientContext); + return _this; + } + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + */ + BlobServiceClient.fromConnectionString = function (connectionString, options) { + options = options || {}; + var extractedCreds = extractConnectionStringParts(connectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + var pipeline = newPipeline(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + var pipeline = newPipeline(new AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + }; + /** + * Creates a {@link ContainerClient} object + * + * @param {string} containerName A container name + * @returns {ContainerClient} A new ContainerClient object for the given container name. + * @memberof BlobServiceClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + BlobServiceClient.prototype.getContainerClient = function (containerName) { + return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + }; + /** + * Create a Blob container. + * + * @param {string} containerName Name of the container to create. + * @param {ContainerCreateOptions} [options] Options to configure Container Create operation. + * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.createContainer = function (containerName, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, containerCreateResponse, e_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-createContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(containerName); + return [4 /*yield*/, containerClient.create(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + containerCreateResponse = _b.sent(); + return [2 /*return*/, { + containerClient: containerClient, + containerCreateResponse: containerCreateResponse + }]; + case 3: + e_1 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Deletes a Blob container. + * + * @param {string} containerName Name of the container to delete. + * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.deleteContainer = function (containerName, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, e_2; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-deleteContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(containerName); + return [4 /*yield*/, containerClient.delete(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_2 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param {string} deletedContainerName Name of the previously deleted container. + * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.undeleteContainer = function (deletedContainerName, deletedContainerVersion, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, containerContext, containerUndeleteResponse, e_3; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-undeleteContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); + containerContext = new Container(containerClient["storageClientContext"]); + return [4 /*yield*/, containerContext.restore(__assign(__assign({ deletedContainerName: deletedContainerName, + deletedContainerVersion: deletedContainerVersion }, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + containerUndeleteResponse = _b.sent(); + return [2 /*return*/, { containerClient: containerClient, containerUndeleteResponse: containerUndeleteResponse }]; + case 3: + e_3 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_3.message + }); + throw e_3; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation. + * @returns {Promise} Response data for the Service Get Properties operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getProperties = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_4; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_4 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_4.message + }); + throw e_4; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties} + * + * @param {BlobServiceProperties} properties + * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation. + * @returns {Promise} Response data for the Service Set Properties operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.setProperties = function (properties, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_5; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-setProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_5 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_5.message + }); + throw e_5; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats} + * + * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation. + * @returns {Promise} Response data for the Service Get Statistics operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getStatistics = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_6; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getStatistics", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_6 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_6.message + }); + throw e_6; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation. + * @returns {Promise} Response data for the Service Get Account Info operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getAccountInfo = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_7; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getAccountInfo", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_7 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_7.message + }); + throw e_7; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns a list of the containers under the specified account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation. + * @returns {Promise} Response data for the Service List Container Segment operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listContainersSegment = function (marker, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_8; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-listContainersSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.listContainersSegment(__assign(__assign({ abortSignal: options.abortSignal, marker: marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, spanOptions: spanOptions }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_8 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_8.message + }); + throw e_8; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {Promise} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsSegment = function (tagFilterSqlExpression, marker, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_9; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-findBlobsByTagsSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker: marker, + maxPageSize: options.maxPageSize, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_9 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_9.message + }); + throw e_9; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsSegments = function (tagFilterSqlExpression, marker, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function findBlobsByTagsSegments_1() { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 6]; + _a.label = 1; + case 1: return [4 /*yield*/, __await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options))]; + case 2: + response = _a.sent(); + response.blobs = response.blobs || []; + marker = response.continuationToken; + return [4 /*yield*/, __await(response)]; + case 3: return [4 /*yield*/, _a.sent()]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + if (marker) return [3 /*break*/, 1]; + _a.label = 6; + case 6: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsItems = function (tagFilterSqlExpression, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function findBlobsByTagsItems_1() { + var marker, _a, _b, segment, e_10_1; + var e_10, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = __asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, __await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + segment = _b.value; + return [5 /*yield**/, __values(__asyncDelegator(__asyncValues(segment.blobs)))]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_10_1 = _d.sent(); + e_10 = { error: e_10_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, __await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_10) throw e_10.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags. + * @returns {PagedAsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTags = function (tagFilterSqlExpression, options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + // AsyncIterableIterator to iterate over blobs + var listSegmentOptions = __assign({}, options); + var iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, __assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + }, + _a; + }; + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listSegments = function (marker, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listSegments_1() { + var listContainersSegmentResponse; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, __await(this.listContainersSegment(marker, options))]; + case 2: + listContainersSegmentResponse = _a.sent(); + listContainersSegmentResponse.containerItems = + listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + return [4 /*yield*/, __await(listContainersSegmentResponse)]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for Container Items + * + * @private + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listItems = function (options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listItems_1() { + var marker, _a, _b, segment, e_11_1; + var e_11, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = __asyncValues(this.listSegments(marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, __await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + segment = _b.value; + return [5 /*yield**/, __values(__asyncDelegator(__asyncValues(segment.containerItems)))]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_11_1 = _d.sent(); + e_11 = { error: e_11_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, __await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_11) throw e_11.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.listContainers(); + * let containerItem = await iter.next(); + * while (!containerItem.done) { + * console.log(`Container ${i++}: ${containerItem.value.name}`); + * containerItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param {ServiceListContainersOptions} [options={}] Options to list containers. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listContainers = function (options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + if (options.prefix === "") { + options.prefix = undefined; + } + var include = []; + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + // AsyncIterableIterator to iterate over containers + var listSegmentOptions = __assign(__assign({}, options), (include.length > 0 ? { include: include } : {})); + var iter = this.listItems(listSegmentOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listSegments(settings.continuationToken, __assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + }, + _a; + }; + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * + * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time + * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time + * @returns {Promise} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getUserDelegationKey = function (startsOn, expiresOn, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, userDelegationKey, res, e_12; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getUserDelegationKey", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getUserDelegationKey({ + startsOn: truncatedISO8061Date(startsOn, false), + expiresOn: truncatedISO8061Date(expiresOn, false) + }, { + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: + response = _b.sent(); + userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value + }; + res = __assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + return [2 /*return*/, res]; + case 3: + e_12 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_12.message + }); + throw e_12; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns {BlobBatchClient} A new BlobBatchClient object for this service. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getBlobBatchClient = function () { + return new BlobBatchClient(this.url, this.pipeline); + }; + return BlobServiceClient; +}(StorageClient)); +export { BlobServiceClient }; +//# sourceMappingURL=BlobServiceClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js.map new file mode 100644 index 000000000..f4fe821cf --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/BlobServiceClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobServiceClient.js","sourceRoot":"","sources":["../../../src/BlobServiceClient.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAEL,iBAAiB,EACjB,MAAM,EAEN,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAmBnD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAA0B,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAwD,MAAM,WAAW,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAiB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAsT/D;;;;;;GAMG;AACH;IAAuC,qCAAa;IAmGlD,2BACE,GAAW,EACX,oBAIY,EACZ,OAAgC;QAPlC,iBAwBC;QAfC,IAAI,QAAkB,CAAC;QACvB,IAAI,oBAAoB,YAAY,QAAQ,EAAE;YAC5C,QAAQ,GAAG,oBAAoB,CAAC;SACjC;aAAM,IACL,CAAC,MAAM,IAAI,oBAAoB,YAAY,0BAA0B,CAAC;YACtE,oBAAoB,YAAY,mBAAmB;YACnD,iBAAiB,CAAC,oBAAoB,CA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,EAAE,CAAC;;;;;;KAEd;IAED;;;;;;;OAOG;IACI,8CAAkB,GAAzB;QACE,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC;IACH,wBAAC;AAAD,CAAC,AAl5BD,CAAuC,aAAa,GAk5BnD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport {\n TokenCredential,\n isTokenCredential,\n isNode,\n HttpResponse,\n getDefaultProxySettings\n} from \"@azure/core-http\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n ServiceGetUserDelegationKeyHeaders,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ServiceGetPropertiesResponse,\n BlobServiceProperties,\n ServiceSetPropertiesResponse,\n ServiceGetStatisticsResponse,\n ServiceGetAccountInfoResponse,\n ServiceListContainersSegmentResponse,\n ContainerItem,\n ListContainersIncludeType,\n UserDelegationKeyModel,\n ServiceFindBlobsByTagsSegmentResponse,\n FilterBlobItem,\n ContainerUndeleteResponse\n} from \"./generatedModels\";\nimport { Container, Service } from \"./generated/src/operations\";\nimport { newPipeline, StoragePipelineOptions, Pipeline } from \"./Pipeline\";\nimport { ContainerClient, ContainerCreateOptions, ContainerDeleteMethodOptions } from \"./Clients\";\nimport { appendToURLPath, extractConnectionStringParts } from \"./utils/utils.common\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\nimport { createSpan } from \"./utils/tracing\";\nimport { BlobBatchClient } from \"./BlobBatchClient\";\nimport { CommonOptions, StorageClient } from \"./StorageClient\";\n\n/**\n * Options to configure the {@link BlobServiceClient.getProperties} operation.\n *\n * @export\n * @interface ServiceGetPropertiesOptions\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.setProperties} operation.\n *\n * @export\n * @interface ServiceSetPropertiesOptions\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceSetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.getAccountInfo} operation.\n *\n * @export\n * @interface ServiceGetAccountInfoOptions\n */\nexport interface ServiceGetAccountInfoOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetAccountInfoOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.getStatistics} operation.\n *\n * @export\n * @interface ServiceGetStatisticsOptions\n */\nexport interface ServiceGetStatisticsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetStatisticsOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the Service - Get User Delegation Key.\n *\n * @export\n * @interface ServiceGetUserDelegationKeyOptions\n */\nexport interface ServiceGetUserDelegationKeyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetStatisticsOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainerSegment} operation.\n *\n * @interface ServiceListContainersSegmentOptions\n */\ninterface ServiceListContainersSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the container's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: ListContainersIncludeType | ListContainersIncludeType[];\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTagsSegment} operation.\n *\n * @interface ServiceFindBlobsByTagsSegmentOptions\n */\ninterface ServiceFindBlobsByTagsSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceFindBlobsByTagsSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Specifies the maximum number of blobs\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n * @type {number}\n * @memberof ServiceFindBlobsByTagsSegmentOptions\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainers} operation.\n *\n * @export\n * @interface ServiceListContainersOptions\n */\nexport interface ServiceListContainersOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the container's metadata\n * should be returned as part of the response body.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted containers should be included in the response.\n *\n * @type {boolean}\n * @memberof ServiceListContainersOptions\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.\n *\n * @export\n * @interface ServiceFindBlobByTagsOptions\n */\nexport interface ServiceFindBlobByTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * A user delegation key.\n */\nexport interface UserDelegationKey {\n /**\n * The Azure Active Directory object ID in GUID format.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedObjectId: string;\n /**\n * The Azure Active Directory tenant ID in GUID format.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedTenantId: string;\n /**\n * The date-time the key is active.\n *\n * @type {Date}\n * @memberof UserDelegationKey\n */\n signedStartsOn: Date;\n /**\n * The date-time the key expires.\n *\n * @type {Date}\n * @memberof UserDelegationKey\n */\n signedExpiresOn: Date;\n /**\n * Abbreviation of the Azure Storage service that accepts the key.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedService: string;\n /**\n * The service version that created the key.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedVersion: string;\n /**\n * The key as a base64 string.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n value: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = UserDelegationKey &\n ServiceGetUserDelegationKeyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetUserDelegationKeyHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: UserDelegationKeyModel;\n };\n };\n\n/**\n * Options to configure {@link BlobServiceClient.undeleteContainer} operation.\n *\n * @export\n * @interface ServiceUndeleteContainerOptions\n */\nexport interface ServiceUndeleteContainerOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceUndeleteContainerOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Optional. Specifies the new name of the restored container.\n * Will use its original name if this is not specified.\n *\n * @type {string}\n * @memberof ServiceUndeleteContainerOptions\n */\n destinationContainerName?: string;\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n *\n * @export\n * @class BlobServiceClient\n */\nexport class BlobServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n *\n * @private\n * @type {Service}\n * @memberof BlobServiceClient\n */\n private serviceContext: Service;\n\n /**\n *\n * Creates an instance of BlobServiceClient from connection string.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobServiceClient\n */\n public static fromConnectionString(connectionString: string, options?: StoragePipelineOptions) {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n }\n\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobServiceClient\n *\n * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```js\n * const account = \"\";\n *\n * const defaultAzureCredential = new DefaultAzureCredential();\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * defaultAzureCredential\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```js\n * const account = \"\"\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, \"\");\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * sharedKeyCredential\n * );\n * ```\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobServiceClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n if (credentialOrPipeline instanceof Pipeline) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = new Service(this.storageClientContext);\n }\n\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param {string} containerName A container name\n * @returns {ContainerClient} A new ContainerClient object for the given container name.\n * @memberof BlobServiceClient\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * ```\n */\n public getContainerClient(containerName: string): ContainerClient {\n return new ContainerClient(\n appendToURLPath(this.url, encodeURIComponent(containerName)),\n this.pipeline\n );\n }\n\n /**\n * Create a Blob container.\n *\n * @param {string} containerName Name of the container to create.\n * @param {ContainerCreateOptions} [options] Options to configure Container Create operation.\n * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client.\n * @memberof BlobServiceClient\n */\n public async createContainer(\n containerName: string,\n options: ContainerCreateOptions = {}\n ): Promise<{\n containerClient: ContainerClient;\n containerCreateResponse: ContainerCreateResponse;\n }> {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-createContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n containerClient,\n containerCreateResponse\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes a Blob container.\n *\n * @param {string} containerName Name of the container to delete.\n * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation.\n * @returns {Promise} Container deletion response.\n * @memberof BlobServiceClient\n */\n public async deleteContainer(\n containerName: string,\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-deleteContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(containerName);\n return await containerClient.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param {string} deletedContainerName Name of the previously deleted container.\n * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container.\n * @returns {Promise} Container deletion response.\n * @memberof BlobServiceClient\n */\n public async undeleteContainer(\n deletedContainerName: string,\n deletedContainerVersion: string,\n options: ServiceUndeleteContainerOptions = {}\n ): Promise<{\n containerClient: ContainerClient;\n containerUndeleteResponse: ContainerUndeleteResponse;\n }> {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-undeleteContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(\n options.destinationContainerName || deletedContainerName\n );\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerUndeleteResponse = await containerContext.restore({\n deletedContainerName,\n deletedContainerVersion,\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return { containerClient, containerUndeleteResponse };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation.\n * @returns {Promise} Response data for the Service Get Properties operation.\n * @memberof BlobServiceClient\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getProperties\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getProperties({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties}\n *\n * @param {BlobServiceProperties} properties\n * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation.\n * @returns {Promise} Response data for the Service Set Properties operation.\n * @memberof BlobServiceClient\n */\n public async setProperties(\n properties: BlobServiceProperties,\n options: ServiceSetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-setProperties\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.setProperties(properties, {\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats}\n *\n * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation.\n * @returns {Promise} Response data for the Service Get Statistics operation.\n * @memberof BlobServiceClient\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getStatistics\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getStatistics({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information\n *\n * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation.\n * @returns {Promise} Response data for the Service Get Account Info operation.\n * @memberof BlobServiceClient\n */\n public async getAccountInfo(\n options: ServiceGetAccountInfoOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getAccountInfo\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getAccountInfo({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns a list of the containers under the specified account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param {string} [marker] A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation.\n * @returns {Promise} Response data for the Service List Container Segment operation.\n * @memberof BlobServiceClient\n */\n private async listContainersSegment(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-listContainersSegment\",\n options.tracingOptions\n );\n\n try {\n return await this.serviceContext.listContainersSegment({\n abortSignal: options.abortSignal,\n marker,\n ...options,\n include: typeof options.include === \"string\" ? [options.include] : options.include,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags.\n * @returns {Promise}\n * @memberof BlobServiceClient\n */\n private async findBlobsByTagsSegment(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): Promise {\n // TODO: Rename response.blobs to response.blobItems?\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-findBlobsByTagsSegment\",\n options.tracingOptions\n );\n\n try {\n return await this.serviceContext.filterBlobs({\n abortSignal: options.abortSignal,\n where: tagFilterSqlExpression,\n marker,\n maxPageSize: options.maxPageSize,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *findBlobsByTagsSegments(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): AsyncIterableIterator {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options);\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield response;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *findBlobsByTagsItems(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const segment of this.findBlobsByTagsSegments(\n tagFilterSqlExpression,\n marker,\n options\n )) {\n yield* segment.blobs;\n }\n }\n\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags.\n * @returns {PagedAsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n public findBlobsByTags(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobByTagsOptions = {}\n ): PagedAsyncIterableIterator {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions: ServiceFindBlobsByTagsSegmentOptions = {\n ...options\n };\n\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions\n });\n }\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @private\n * @param {string} [marker] A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {}\n ): AsyncIterableIterator {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = await this.listContainersSegment(marker, options);\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield await listContainersSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @private\n * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *listItems(\n options: ServiceListContainersSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n yield* segment.containerItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.listContainers();\n * let containerItem = await iter.next();\n * while (!containerItem.done) {\n * console.log(`Container ${i++}: ${containerItem.value.name}`);\n * containerItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param {ServiceListContainersOptions} [options={}] Options to list containers.\n * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging.\n * @memberof BlobServiceClient\n */\n public listContainers(\n options: ServiceListContainersOptions = {}\n ): PagedAsyncIterableIterator {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListContainersIncludeType[] = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions: ServiceListContainersSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include } : {})\n };\n\n const iter = this.listItems(listSegmentOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions\n });\n }\n };\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key\n *\n * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time\n * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time\n * @returns {Promise}\n * @memberof BlobServiceClient\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getUserDelegationKey\",\n options.tracingOptions\n );\n try {\n const response = await this.serviceContext.getUserDelegationKey(\n {\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false)\n },\n {\n abortSignal: options.abortSignal,\n spanOptions\n }\n );\n\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\n signedService: response.signedService,\n signedVersion: response.signedVersion,\n value: response.value\n };\n\n const res: ServiceGetUserDelegationKeyResponse = {\n _response: response._response,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n version: response.version,\n date: response.date,\n errorCode: response.errorCode,\n ...userDelegationKey\n };\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns {BlobBatchClient} A new BlobBatchClient object for this service.\n * @memberof BlobServiceClient\n */\n public getBlobBatchClient(): BlobBatchClient {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js new file mode 100644 index 000000000..3052ea2f7 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js @@ -0,0 +1,4887 @@ +import { __assign, __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter, __extends, __generator, __values } from "tslib"; +import { generateUuid, getDefaultProxySettings, isNode, isTokenCredential, URLBuilder } from "@azure/core-http"; +import { CanonicalCode } from "@opentelemetry/api"; +import { BlobDownloadResponse } from "./BlobDownloadResponse"; +import { BlobQueryResponse } from "./BlobQueryResponse"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; +import { AppendBlob, Blob as StorageBlob, BlockBlob, Container, PageBlob } from "./generated/src/operations"; +import { StorageClientContext } from "./generated/src/storageClient"; +import { ensureCpkIfSpecified, toAccessTier } from "./models"; +import { rangeResponseFromModel } from "./PageBlobRangeResponse"; +import { newPipeline, Pipeline } from "./Pipeline"; +import { BlobBeginCopyFromUrlPoller } from "./pollers/BlobStartCopyFromUrlPoller"; +import { rangeToString } from "./Range"; +import { StorageClient } from "./StorageClient"; +import { Batch } from "./utils/Batch"; +import { BufferScheduler } from "../../storage-common/src"; +import { BLOCK_BLOB_MAX_BLOCKS, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, DEFAULT_BLOCK_BUFFER_SIZE_BYTES, DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, ETagAny, ETagNone, URLConstants } from "./utils/constants"; +import { createSpan } from "./utils/tracing"; +import { appendToURLPath, extractConnectionStringParts, generateBlockID, isIpEndpointStyle, parseObjectReplicationRecord, setURLParameter, toBlobTags, toBlobTagsString, toQuerySerialization, toTags, truncatedISO8061Date } from "./utils/utils.common"; +import { fsCreateReadStream, fsStat, readStreamToLocalFile, streamToBuffer } from "./utils/utils.node"; +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + * + * @export + * @class BlobClient + */ +var BlobClient = /** @class */ (function (_super) { + __extends(BlobClient, _super); + function BlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _a; + var _this = this; + options = options || {}; + var pipeline; + var url; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + (_a = _this.getBlobAndContainerNamesFromUrl(), _this._name = _a.blobName, _this._containerName = _a.containerName); + _this.blobContext = new StorageBlob(_this.storageClientContext); + return _this; + } + Object.defineProperty(BlobClient.prototype, "name", { + /** + * The name of the blob. + */ + get: function () { + return this._name; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobClient.prototype, "containerName", { + /** + * The name of the storage container the blob is associated with. + */ + get: function () { + return this._containerName; + }, + enumerable: false, + configurable: true + }); + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp + * @memberof BlobClient + */ + BlobClient.prototype.withSnapshot = function (snapshot) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param {string} versionId The versionId. + * @returns {BlobClient} A new BlobClient object pointing to the version of this blob. + * @memberof BlobClient + */ + BlobClient.prototype.withVersion = function (versionId) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); + }; + /** + * Creates a AppendBlobClient object. + * + * @returns {AppendBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getAppendBlobClient = function () { + return new AppendBlobClient(this.url, this.pipeline); + }; + /** + * Creates a BlockBlobClient object. + * + * @returns {BlockBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getBlockBlobClient = function () { + return new BlockBlobClient(this.url, this.pipeline); + }; + /** + * Creates a PageBlobClient object. + * + * @returns {PageBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getPageBlobClient = function () { + return new PageBlobClient(this.url, this.pipeline); + }; + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation. + * @returns {Promise} + * @memberof BlobClient + * + * Example usage (Node.js): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); + * console.log("Downloaded blob content:", downloaded.toString()); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * Example usage (browser): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + * console.log( + * "Downloaded blob content", + * downloaded + * ); + * + * async function blobToString(blob: Blob): Promise { + * const fileReader = new FileReader(); + * return new Promise((resolve, reject) => { + * fileReader.onloadend = (ev: any) => { + * resolve(ev.target!.result); + * }; + * fileReader.onerror = reject; + * fileReader.readAsText(blob); + * }); + * } + * ``` + */ + BlobClient.prototype.download = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res_1, wrappedRes, e_1; + var _this = this; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + _b = createSpan("BlobClient-download", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onDownloadProgress: isNode ? undefined : options.onProgress, + range: offset === 0 && !count ? undefined : rangeToString({ offset: offset, count: count }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: + res_1 = _c.sent(); + wrappedRes = __assign(__assign({}, res_1), { _response: res_1._response, objectReplicationDestinationPolicyId: res_1.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res_1.objectReplicationRules) }); + // Return browser response immediately + if (!isNode) { + return [2 /*return*/, wrappedRes]; + } + // We support retrying when download stream unexpected ends in Node.js runtime + // Following code shouldn't be bundled into browser build, however some + // bundlers may try to bundle following code and "FileReadResponse.ts". + // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" + // The config is in package.json "browser" field + if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { + // TODO: Default value or make it a required parameter? + options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + } + if (res_1.contentLength === undefined) { + throw new RangeError("File download response doesn't contain valid content length header"); + } + if (!res_1.etag) { + throw new RangeError("File download response doesn't contain valid etag header"); + } + return [2 /*return*/, new BlobDownloadResponse(wrappedRes, function (start) { return __awaiter(_this, void 0, void 0, function () { + var updatedOptions; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + updatedOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res_1.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions + }, + range: rangeToString({ + count: offset + res_1.contentLength - start, + offset: start + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey + }; + return [4 /*yield*/, this.blobContext.download(__assign({ abortSignal: options.abortSignal }, updatedOptions))]; + case 1: + // Debug purpose only + // console.log( + // `Read from internal stream, range: ${ + // updatedOptions.range + // }, options: ${JSON.stringify(updatedOptions)}` + // ); + return [2 /*return*/, (_b.sent()).readableStreamBody]; + } + }); + }); }, offset, res_1.contentLength, { + abortSignal: options.abortSignal, + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress + })]; + case 3: + e_1 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param {BlobExistsOptions} [options] options to Exists operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.exists = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_2; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-exists", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 2: + _b.sent(); + return [2 /*return*/, true]; + case 3: + e_2 = _b.sent(); + if (e_2.statusCode === 404) { + span.setStatus({ + code: CanonicalCode.NOT_FOUND, + message: "Expected exception when checking blob existence" + }); + return [2 /*return*/, false]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.getProperties = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res, e_3; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-getProperties", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: + res = _c.sent(); + return [2 /*return*/, __assign(__assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) })]; + case 3: + e_3 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_3.message + }); + throw e_3; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.delete = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_4; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-delete", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.deleteMethod({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_4 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_4.message + }); + throw e_4; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.deleteIfExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_5; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("BlobClient-deleteIfExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.delete(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, __assign(__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_5 = _d.sent(); + if (((_a = e_5.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { + span.setStatus({ + code: CanonicalCode.NOT_FOUND, + message: "Expected exception when deleting a blob or snapshot only if it exists." + }); + return [2 /*return*/, __assign(__assign({ succeeded: false }, (_b = e_5.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_5.response })]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_5.message + }); + throw e_5; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * + * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.undelete = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_6; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-undelete", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.undelete({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_6 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_6.message + }); + throw e_6; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setHTTPHeaders = function (blobHTTPHeaders, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_7; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setHTTPHeaders", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.setHTTPHeaders({ + abortSignal: options.abortSignal, + blobHTTPHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_7 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_7.message + }); + throw e_7; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setMetadata = function (metadata, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_8; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setMetadata", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_8 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_8.message + }); + throw e_8; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param {Tags} tags + * @param {BlobSetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setTags = function (tags, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_9; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setTags", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.setTags({ + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions, + tags: toBlobTags(tags) + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_9 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_9.message + }); + throw e_9; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the tags associated with the underlying blob. + * + * @param {BlobGetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.getTags = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, response, wrappedResponse, e_10; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-getTags", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.getTags({ + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _c.sent(); + wrappedResponse = __assign(__assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_10 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_10.message + }); + throw e_10; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob. + * @memberof BlobClient + */ + BlobClient.prototype.getBlobLeaseClient = function (proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + }; + /** + * Creates a read-only snapshot of a blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * + * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.createSnapshot = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_11; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-createSnapshot", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_11 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_11.message + }); + throw e_11; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * Example using automatic polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using manual polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * while (!poller.isDone()) { + * await poller.poll(); + * } + * const result = copyPoller.getResult(); + * ``` + * + * Example using progress updates: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * } + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using a changing polling interval (default 15 seconds): + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * intervalInMs: 1000 // poll blob every 1 second for copy progress + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using copy cancellation: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // cancel operation after starting it. + * try { + * await copyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * await copyPoller.getResult(); + * } catch (err) { + * if (err.name === 'PollerCancelledError') { + * console.log('The copy was cancelled.'); + * } + * } + * ``` + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + */ + BlobClient.prototype.beginCopyFromURL = function (copySource, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var client, poller; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + client = { + abortCopyFromURL: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.abortCopyFromURL.apply(_this, args); + }, + getProperties: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.getProperties.apply(_this, args); + }, + startCopyFromURL: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.startCopyFromURL.apply(_this, args); + } + }; + poller = new BlobBeginCopyFromUrlPoller({ + blobClient: client, + copySource: copySource, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options + }); + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + return [4 /*yield*/, poller.poll()]; + case 1: + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + _a.sent(); + return [2 /*return*/, poller]; + } + }); + }); + }; + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * + * @param {string} copyId Id of the Copy From URL operation. + * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.abortCopyFromURL = function (copyId, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_12; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-abortCopyFromURL", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_12 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_12.message + }); + throw e_12; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * + * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param {BlobSyncCopyFromURLOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.syncCopyFromURL = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_13; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-syncCopyFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.copyFromURL(copySource, { + abortSignal: options.abortSignal, + metadata: options.metadata, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + sourceContentMD5: options.sourceContentMD5, + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_13 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_13.message + }); + throw e_13; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * + * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setAccessTier = function (tier, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_14; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setAccessTier", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.setTier(toAccessTier(tier), { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + rehydratePriority: options.rehydratePriority, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_14 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_14.message + }); + throw e_14; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BlobClient.prototype.downloadToBuffer = function (param1, param2, param3, param4) { + if (param4 === void 0) { param4 = {}; } + return __awaiter(this, void 0, void 0, function () { + var buffer, offset, count, options, _a, span, spanOptions, response, transferProgress_1, batch, _loop_1, off, e_15; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + offset = 0; + count = 0; + options = param4; + if (param1 instanceof Buffer) { + buffer = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; + } + else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; + } + _a = createSpan("BlobClient-downloadToBuffer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + if (!options.blockSize) { + options.blockSize = 0; + } + if (options.blockSize < 0) { + throw new RangeError("blockSize option must be >= 0"); + } + if (options.blockSize === 0) { + options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + if (offset < 0) { + throw new RangeError("offset option must be >= 0"); + } + if (count && count <= 0) { + throw new RangeError("count option must be > 0"); + } + if (!options.conditions) { + options.conditions = {}; + } + if (!!count) return [3 /*break*/, 3]; + return [4 /*yield*/, this.getProperties(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + count = response.contentLength - offset; + if (count < 0) { + throw new RangeError("offset " + offset + " shouldn't be larger than blob size " + response.contentLength); + } + _b.label = 3; + case 3: + // Allocate the buffer of size = count if the buffer is not provided + if (!buffer) { + try { + buffer = Buffer.alloc(count); + } + catch (error) { + throw new Error("Unable to allocate the buffer of size: " + count + "(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\t " + error.message); + } + } + if (buffer.length < count) { + throw new RangeError("The buffer's size should be equal to or larger than the request count of bytes: " + count); + } + transferProgress_1 = 0; + batch = new Batch(options.concurrency); + _loop_1 = function (off) { + batch.addOperation(function () { return __awaiter(_this, void 0, void 0, function () { + var chunkEnd, response, stream; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + chunkEnd = offset + count; + if (off + options.blockSize < chunkEnd) { + chunkEnd = off + options.blockSize; + } + return [4 /*yield*/, this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + response = _a.sent(); + stream = response.readableStreamBody; + return [4 /*yield*/, streamToBuffer(stream, buffer, off - offset, chunkEnd - offset)]; + case 2: + _a.sent(); + // Update progress after block is downloaded, in case of block trying + // Could provide finer grained progress updating inside HTTP requests, + // only if convenience layer download try is enabled + transferProgress_1 += chunkEnd - off; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress_1 }); + } + return [2 /*return*/]; + } + }); + }); }); + }; + for (off = offset; off < offset + count; off = off + options.blockSize) { + _loop_1(off); + } + return [4 /*yield*/, batch.do()]; + case 4: + _b.sent(); + return [2 /*return*/, buffer]; + case 5: + e_15 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_15.message + }); + throw e_15; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param {string} filePath + * @param {number} [offset] From which position of the block blob to download. + * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined. + * @param {BlobDownloadOptions} [options] Options to Blob download options. + * @returns {Promise} The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + * @memberof BlobClient + */ + BlobClient.prototype.downloadToFile = function (filePath, offset, count, options) { + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, e_16; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-downloadToFile", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + return [4 /*yield*/, this.download(offset, count, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + if (!response.readableStreamBody) return [3 /*break*/, 4]; + return [4 /*yield*/, readStreamToLocalFile(response.readableStreamBody, filePath)]; + case 3: + _b.sent(); + _b.label = 4; + case 4: + // The stream is no longer accessible so setting it to undefined. + response.blobDownloadStream = undefined; + return [2 /*return*/, response]; + case 5: + e_16 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_16.message + }); + throw e_16; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + BlobClient.prototype.getBlobAndContainerNamesFromUrl = function () { + var containerName; + var blobName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` + // http://localhost:10001/devstoreaccount1/containername/blob + var parsedUrl = URLBuilder.parse(this.url); + if (parsedUrl.getHost().split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername/blob". + // .getPath() -> /containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob + // .getPath() -> /devstoreaccount1/containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } + else { + // "https://customdomain.com/containername/blob". + // .getPath() -> /containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + // decode the encoded blobName, containerName - to get all the special characters that might be present in them + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + // Azure Storage Server will replace "\" with "/" in the blob names + // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName + blobName = blobName.replace(/\\/g, "/"); + if (!blobName) { + throw new Error("Provided blobName is invalid."); + } + else if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return { blobName: blobName, containerName: containerName }; + } + catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } + }; + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.startCopyFromURL = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_17; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-startCopyFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.startCopyFromURL(copySource, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions + }, + rehydratePriority: options.rehydratePriority, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + sealBlob: options.sealBlob, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_17 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_17.message + }); + throw e_17; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobClient; +}(StorageClient)); +export { BlobClient }; +/** + * AppendBlobClient defines a set of operations applicable to append blobs. + * + * @export + * @class AppendBlobClient + * @extends {BlobClient} + */ +var AppendBlobClient = /** @class */ (function (_super) { + __extends(AppendBlobClient, _super); + function AppendBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + // The second parameter is undefined. Use anonymous credential. + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.appendBlobContext = new AppendBlob(_this.storageClientContext); + return _this; + } + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.withSnapshot = function (snapshot) { + return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const appendBlobClient = containerClient.getAppendBlobClient(""); + * await appendBlobClient.create(); + * ``` + */ + AppendBlobClient.prototype.create = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_18; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-create", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_18 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_18.message + }); + throw e_18; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.createIfNotExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, conditions, res, e_19; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("AppendBlobClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + conditions = { ifNoneMatch: ETagAny }; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.create(__assign(__assign({}, options), { conditions: conditions, tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, __assign(__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_19 = _d.sent(); + if (((_a = e_19.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { + span.setStatus({ + code: CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a blob only if it does not already exist." + }); + return [2 /*return*/, __assign(__assign({ succeeded: false }, (_b = e_19.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_19.response })]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_19.message + }); + throw e_19; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Seals the append blob, making it read only. + * + * @param {AppendBlobSealOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.seal = function (options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_20; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-seal", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_20 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_20.message + }); + throw e_20; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * + * @param {HttpRequestBody} body Data to be appended. + * @param {number} contentLength Length of the body in bytes. + * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + AppendBlobClient.prototype.appendBlock = function (body, contentLength, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_21; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-appendBlock", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.appendBlock(body, contentLength, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_21 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_21.message + }); + throw e_21; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * + * @param {string} sourceURL + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param {number} sourceOffset Offset in source to be appended + * @param {number} count Number of bytes to be appended as a block + * @param {AppendBlobAppendBlockFromURLOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.appendBlockFromURL = function (sourceURL, sourceOffset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_22; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-appendBlockFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: rangeToString({ offset: sourceOffset, count: count }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_22 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_22.message + }); + throw e_22; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return AppendBlobClient; +}(BlobClient)); +export { AppendBlobClient }; +/** + * BlockBlobClient defines a set of operations applicable to block blobs. + * + * @export + * @class BlockBlobClient + * @extends {BlobClient} + */ +var BlockBlobClient = /** @class */ (function (_super) { + __extends(BlockBlobClient, _super); + function BlockBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.blockBlobContext = new BlockBlob(_this.storageClientContext); + _this._blobContext = new StorageBlob(_this.storageClientContext); + return _this; + } + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.withSnapshot = function (snapshot) { + return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); + * console.log("Query blob content:", downloaded); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param {string} query + * @param {BlockBlobQueryOptions} [options={}] + * @returns {Promise} + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.query = function (query, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, response, e_23; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + _b = createSpan("BlockBlobClient-query", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + if (!isNode) { + throw new Error("This operation currently is only supported in Node.js."); + } + return [4 /*yield*/, this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + expression: query, + inputSerialization: toQuerySerialization(options.inputTextConfiguration), + outputSerialization: toQuerySerialization(options.outputTextConfiguration) + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _c.sent(); + return [2 /*return*/, new BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError + })]; + case 3: + e_23 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_23.message + }); + throw e_23; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation. + * @returns {Promise} Response data for the Block Blob Upload operation. + * @memberof BlockBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + BlockBlobClient.prototype.upload = function (body, contentLength, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_24; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("BlockBlobClient-upload", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.upload(body, contentLength, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_24 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_24.message + }); + throw e_24; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {HttpRequestBody} body Data to upload to the staging area. + * @param {number} contentLength Number of bytes to upload. + * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation. + * @returns {Promise} Response data for the Block Blob Stage Block operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.stageBlock = function (blockId, body, contentLength, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_25; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-stageBlock", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.stageBlock(blockId, contentLength, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + onUploadProgress: options.onProgress, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_25 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_25.message + }); + throw e_25; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {string} sourceURL Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation. + * @returns {Promise} Response data for the Block Blob Stage Block From URL operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.stageBlockFromURL = function (blockId, sourceURL, offset, count, options) { + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_26; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-stageBlockFromURL", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset: offset, count: count }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_26 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_26.message + }); + throw e_26; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * + * @param {string[]} blocks Array of 64-byte value that is base64-encoded + * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation. + * @returns {Promise} Response data for the Block Blob Commit Block List operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.commitBlockList = function (blocks, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_27; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("BlockBlobClient-commitBlockList", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.commitBlockList({ latest: blocks }, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_27 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_27.message + }); + throw e_27; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * + * @param {BlockListType} listType Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation. + * @returns {Promise} Response data for the Block Blob Get Block List operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.getBlockList = function (listType, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res, e_28; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlockBlobClient-getBlockList", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blockBlobContext.getBlockList(listType, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + res = _c.sent(); + if (!res.committedBlocks) { + res.committedBlocks = []; + } + if (!res.uncommittedBlocks) { + res.uncommittedBlocks = []; + } + return [2 /*return*/, res]; + case 3: + e_28 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_28.message + }); + throw e_28; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + // High level functions + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @export + * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] + * @returns {Promise} + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadData = function (data, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, buffer_1, browserBlob_1; + return __generator(this, function (_b) { + _a = createSpan("BlockBlobClient-uploadData", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + try { + if (isNode) { + if (data instanceof Buffer) { + buffer_1 = data; + } + else if (data instanceof ArrayBuffer) { + buffer_1 = Buffer.from(data); + } + else { + data = data; + buffer_1 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return [2 /*return*/, this.uploadSeekableInternal(function (offset, size) { return buffer_1.slice(offset, offset + size); }, buffer_1.byteLength, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + } + else { + browserBlob_1 = new Blob([data]); + return [2 /*return*/, this.uploadSeekableInternal(function (offset, size) { return browserBlob_1.slice(offset, offset + size); }, browserBlob_1.size, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + } + } + catch (e) { + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } + finally { + span.end(); + } + return [2 /*return*/]; + }); + }); + }; + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * @deprecated Use {@link uploadData} instead. + * + * @export + * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadBrowserData = function (browserData, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, browserBlob_2, e_29; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-uploadBrowserData", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + browserBlob_2 = new Blob([browserData]); + return [4 /*yield*/, this.uploadSeekableInternal(function (offset, size) { return browserBlob_2.slice(offset, offset + size); }, browserBlob_2.size, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_29 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_29.message + }); + throw e_29; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory + * @param {number} size size of the data to upload. + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadSeekableInternal = function (bodyFactory, size, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, numBlocks_1, blockList_1, blockIDPrefix_1, transferProgress_2, batch, _loop_2, i, e_30; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.blockSize) { + options.blockSize = 0; + } + if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError("blockSize option must be >= 0 and <= " + BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES); + } + if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) { + options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + } + if (options.maxSingleShotSize < 0 || + options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError("maxSingleShotSize option must be >= 0 and <= " + BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES); + } + if (options.blockSize === 0) { + if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(size + " is too larger to upload to a block blob."); + } + if (size > options.maxSingleShotSize) { + options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); + if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + } + } + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("BlockBlobClient-uploadSeekableInternal", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + if (!(size <= options.maxSingleShotSize)) return [3 /*break*/, 3]; + return [4 /*yield*/, this.upload(bodyFactory(0, size), size, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + numBlocks_1 = Math.floor((size - 1) / options.blockSize) + 1; + if (numBlocks_1 > BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError("The buffer's size is too big or the BlockSize is too small;" + + ("the number of blocks must be <= " + BLOCK_BLOB_MAX_BLOCKS)); + } + blockList_1 = []; + blockIDPrefix_1 = generateUuid(); + transferProgress_2 = 0; + batch = new Batch(options.concurrency); + _loop_2 = function (i) { + batch.addOperation(function () { return __awaiter(_this, void 0, void 0, function () { + var blockID, start, end, contentLength; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + blockID = generateBlockID(blockIDPrefix_1, i); + start = options.blockSize * i; + end = i === numBlocks_1 - 1 ? size : start + options.blockSize; + contentLength = end - start; + blockList_1.push(blockID); + return [4 /*yield*/, this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + _a.sent(); + // Update progress after block is successfully uploaded to server, in case of block trying + // TODO: Hook with convenience layer progress event in finer level + transferProgress_2 += contentLength; + if (options.onProgress) { + options.onProgress({ + loadedBytes: transferProgress_2 + }); + } + return [2 /*return*/]; + } + }); + }); }); + }; + for (i = 0; i < numBlocks_1; i++) { + _loop_2(i); + } + return [4 /*yield*/, batch.do()]; + case 4: + _b.sent(); + return [2 /*return*/, this.commitBlockList(blockList_1, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 5: + e_30 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_30.message + }); + throw e_30; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param {string} filePath Full path of local file + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {(Promise)} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadFile = function (filePath, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, size, e_31; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-uploadFile", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + return [4 /*yield*/, fsStat(filePath)]; + case 2: + size = (_b.sent()).size; + return [4 /*yield*/, this.uploadSeekableInternal(function (offset, count) { + return function () { + return fsCreateReadStream(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset + }); + }; + }, size, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 3: return [2 /*return*/, _b.sent()]; + case 4: + e_31 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_31.message + }); + throw e_31; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param {Readable} stream Node.js Readable stream + * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadStream = function (stream, bufferSize, maxConcurrency, options) { + if (bufferSize === void 0) { bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES; } + if (maxConcurrency === void 0) { maxConcurrency = 5; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blockNum_1, blockIDPrefix_2, transferProgress_3, blockList_2, scheduler, e_32; + var _this = this; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("BlockBlobClient-uploadStream", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + blockNum_1 = 0; + blockIDPrefix_2 = generateUuid(); + transferProgress_3 = 0; + blockList_2 = []; + scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, function (body, length) { return __awaiter(_this, void 0, void 0, function () { + var blockID; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + blockID = generateBlockID(blockIDPrefix_2, blockNum_1); + blockList_2.push(blockID); + blockNum_1++; + return [4 /*yield*/, this.stageBlock(blockID, body, length, { + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + _a.sent(); + // Update progress after block is successfully uploaded to server, in case of block trying + transferProgress_3 += length; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress_3 }); + } + return [2 /*return*/]; + } + }); + }); }, + // concurrency should set a smaller value than maxConcurrency, which is helpful to + // reduce the possibility when a outgoing handler waits for stream data, in + // this situation, outgoing handlers are blocked. + // Outgoing queue shouldn't be empty. + Math.ceil((maxConcurrency / 4) * 3)); + return [4 /*yield*/, scheduler.do()]; + case 2: + _b.sent(); + return [4 /*yield*/, this.commitBlockList(blockList_2, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 3: return [2 /*return*/, _b.sent()]; + case 4: + e_32 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_32.message + }); + throw e_32; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + return BlockBlobClient; +}(BlobClient)); +export { BlockBlobClient }; +/** + * PageBlobClient defines a set of operations applicable to page blobs. + * + * @export + * @class PageBlobClient + * @extends {BlobClient} + */ +var PageBlobClient = /** @class */ (function (_super) { + __extends(PageBlobClient, _super); + function PageBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.pageBlobContext = new PageBlob(_this.storageClientContext); + return _this; + } + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.withSnapshot = function (snapshot) { + return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation. + * @returns {Promise} Response data for the Page Blob Create operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.create = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_33; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-create", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_33 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_33.message + }); + throw e_33; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof PageBlobClient + */ + PageBlobClient.prototype.createIfNotExists = function (size, options) { + var _a, _b; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, conditions, res, e_34; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("PageBlobClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + conditions = { ifNoneMatch: ETagAny }; + return [4 /*yield*/, this.create(size, __assign(__assign({}, options), { conditions: conditions, tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, __assign(__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_34 = _d.sent(); + if (((_a = e_34.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { + span.setStatus({ + code: CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a blob only if it does not already exist." + }); + return [2 /*return*/, __assign(__assign({ succeeded: false }, (_b = e_34.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_34.response })]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_34.message + }); + throw e_34; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {HttpRequestBody} body Data to upload + * @param {number} offset Offset of destination page blob + * @param {number} count Content length of the body, also number of bytes to be uploaded + * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation. + * @returns {Promise} Response data for the Page Blob Upload Pages operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.uploadPages = function (body, offset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_35; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-uploadPages", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.uploadPages(body, count, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + range: rangeToString({ offset: offset, count: count }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_35 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_35.message + }); + throw e_35; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * + * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param {number} destOffset Offset of destination page blob + * @param {number} count Number of bytes to be uploaded from source page blob + * @param {PageBlobUploadPagesFromURLOptions} [options={}] + * @returns {Promise} + * @memberof PageBlobClient + */ + PageBlobClient.prototype.uploadPagesFromURL = function (sourceURL, sourceOffset, destOffset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_36; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _b = createSpan("PageBlobClient-uploadPagesFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count: count }), 0, rangeToString({ offset: destOffset, count: count }), { + abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_36 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_36.message + }); + throw e_36; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Frees the specified pages from the page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {number} [offset] Starting byte position of the pages to clear. + * @param {number} [count] Number of bytes to clear. + * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation. + * @returns {Promise} Response data for the Page Blob Clear Pages operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.clearPages = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_37; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-clearPages", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.clearPages(0, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + range: rangeToString({ offset: offset, count: count }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_37 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_37.message + }); + throw e_37; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} [offset] Starting byte position of the page ranges. + * @param {number} [count] Number of bytes to get. + * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation. + * @returns {Promise} Response data for the Page Blob Get Ranges operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRanges = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_38; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-getPageRanges", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_38 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_38.message + }); + throw e_38; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRangesDiff = function (offset, count, prevSnapshot, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_39; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-getPageRangesDiff", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + prevsnapshot: prevSnapshot, + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_39 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_39.message + }); + throw e_39; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRangesDiffForManagedDisks = function (offset, count, prevSnapshotUrl, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_40; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + prevSnapshotUrl: prevSnapshotUrl, + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_40 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_40.message + }); + throw e_40; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param {number} size Target size + * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation. + * @returns {Promise} Response data for the Page Blob Resize operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.resize = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_41; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-resize", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_41 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_41.message + }); + throw e_41; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets a page blob's sequence number. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number. + * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update + * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation. + * @returns {Promise} Response data for the Page Blob Update Sequence Number operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.updateSequenceNumber = function (sequenceNumberAction, sequenceNumber, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_42; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-updateSequenceNumber", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_42 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_42.message + }); + throw e_42; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * + * @param {string} copySource Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation. + * @returns {Promise} Response data for the Page Blob Copy Incremental operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.startCopyIncremental = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_43; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("PageBlobClient-startCopyIncremental", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.copyIncremental(copySource, { + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_43 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_43.message + }); + throw e_43; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return PageBlobClient; +}(BlobClient)); +export { PageBlobClient }; +/** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + * + * @export + * @class BlobLeaseClient + */ +var BlobLeaseClient = /** @class */ (function () { + /** + * Creates an instance of BlobLeaseClient. + * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests. + * @param {string} leaseId Initial proposed lease id. + * @memberof BlobLeaseClient + */ + function BlobLeaseClient(client, leaseId) { + var clientContext = new StorageClientContext(client.url, client.pipeline.toServiceClientOptions()); + this._url = client.url; + if (client instanceof ContainerClient) { + this._isContainer = true; + this._containerOrBlobOperation = new Container(clientContext); + } + else { + this._isContainer = false; + this._containerOrBlobOperation = new StorageBlob(clientContext); + } + if (!leaseId) { + leaseId = generateUuid(); + } + this._leaseId = leaseId; + } + Object.defineProperty(BlobLeaseClient.prototype, "leaseId", { + /** + * Gets the lease Id. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get: function () { + return this._leaseId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobLeaseClient.prototype, "url", { + /** + * Gets the url. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get: function () { + return this._url; + }, + enumerable: false, + configurable: true + }); + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1) + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for acquire lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.acquireLease = function (duration, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_44; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-acquireLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration: duration, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + proposedLeaseId: this._leaseId, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_44 = _h.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_44.message + }); + throw e_44; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To change the ID of the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {string} proposedLeaseId the proposed new lease Id. + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for change lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.changeLease = function (proposedLeaseId, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, response, e_45; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-changeLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _h.sent(); + this._leaseId = proposedLeaseId; + return [2 /*return*/, response]; + case 3: + e_45 = _h.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_45.message + }); + throw e_45; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for release lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.releaseLease = function (options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_46; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-releaseLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_46 = _h.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_46.message + }); + throw e_46; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To renew the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations. + * @returns {Promise} Response data for renew lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.renewLease = function (options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_47; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-renewLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_47 = _h.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_47.message + }); + throw e_47; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @static + * @param {number} breakPeriod Break period + * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations. + * @returns {Promise} Response data for break lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.breakLease = function (breakPeriod, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, operationOptions, e_48; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-breakLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + operationOptions = { + abortSignal: options.abortSignal, + breakPeriod: breakPeriod, + modifiedAccessConditions: __assign(__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + }; + return [4 /*yield*/, this._containerOrBlobOperation.breakLease(operationOptions)]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_48 = _h.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_48.message + }); + throw e_48; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobLeaseClient; +}()); +export { BlobLeaseClient }; +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + * + * @export + * @class ContainerClient + */ +var ContainerClient = /** @class */ (function (_super) { + __extends(ContainerClient, _super); + function ContainerClient(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { + var _this = this; + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (isNode) { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName parameter"); + } + _this = _super.call(this, url, pipeline) || this; + _this._containerName = _this.getContainerNameFromUrl(); + _this.containerContext = new Container(_this.storageClientContext); + return _this; + } + Object.defineProperty(ContainerClient.prototype, "containerName", { + /** + * The name of the container. + */ + get: function () { + return this._containerName; + }, + enumerable: false, + configurable: true + }); + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] Options to Container Create operation. + * @returns {Promise} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + ContainerClient.prototype.create = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_49; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-create", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.create(__assign(__assign({}, options), { spanOptions: spanOptions }))]; + case 2: + // Spread operator in destructuring assignments, + // this will filter out unwanted properties from the response object into result object + return [2 /*return*/, _b.sent()]; + case 3: + e_49 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_49.message + }); + throw e_49; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.createIfNotExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_50; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("ContainerClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.create(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, __assign(__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_50 = _d.sent(); + if (((_a = e_50.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { + span.setStatus({ + code: CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a container only if it does not already exist." + }); + return [2 /*return*/, __assign(__assign({ succeeded: false }, (_b = e_50.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_50.response })]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_50.message + }); + throw e_50; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param {ContainerExistsOptions} [options={}] + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.exists = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_51; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-exists", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 2: + _b.sent(); + return [2 /*return*/, true]; + case 3: + e_51 = _b.sent(); + if (e_51.statusCode === 404) { + span.setStatus({ + code: CanonicalCode.NOT_FOUND, + message: "Expected exception when checking container existence" + }); + return [2 /*return*/, false]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_51.message + }); + throw e_51; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a {@link BlobClient} + * + * @param {string} blobName A blob name + * @returns {BlobClient} A new BlobClient object for the given blob name. + * @memberof ContainerClient + */ + ContainerClient.prototype.getBlobClient = function (blobName) { + return new BlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates an {@link AppendBlobClient} + * + * @param {string} blobName An append blob name + * @returns {AppendBlobClient} + * @memberof ContainerClient + */ + ContainerClient.prototype.getAppendBlobClient = function (blobName) { + return new AppendBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates a {@link BlockBlobClient} + * + * @param {string} blobName A block blob name + * @returns {BlockBlobClient} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * + * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + ContainerClient.prototype.getBlockBlobClient = function (blobName) { + return new BlockBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates a {@link PageBlobClient} + * + * @param {string} blobName A page blob name + * @returns {PageBlobClient} + * @memberof ContainerClient + */ + ContainerClient.prototype.getPageBlobClient = function (blobName) { + return new PageBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.getProperties = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_52; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-getProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.getProperties(__assign(__assign({ abortSignal: options.abortSignal }, options.conditions), { spanOptions: spanOptions }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_52 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_52.message + }); + throw e_52; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.delete = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_53; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-delete", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.deleteMethod({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_53 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_53.message + }); + throw e_53; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.deleteIfExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_54; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("ContainerClient-deleteIfExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.delete(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, __assign(__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_54 = _d.sent(); + if (((_a = e_54.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { + span.setStatus({ + code: CanonicalCode.NOT_FOUND, + message: "Expected exception when deleting a container only if it exists." + }); + return [2 /*return*/, __assign(__assign({ succeeded: false }, (_b = e_54.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_54.response })]; + } + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_54.message + }); + throw e_54; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.setMetadata = function (metadata, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_55; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + if (options.conditions.ifUnmodifiedSince) { + throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + } + _a = createSpan("ContainerClient-setMetadata", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_55 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_55.message + }); + throw e_55; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * + * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.getAccessPolicy = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, res, _i, response_1, identifier, accessPolicy, e_56; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-getAccessPolicy", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: + response = _b.sent(); + res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version + }; + for (_i = 0, response_1 = response; _i < response_1.length; _i++) { + identifier = response_1[_i]; + accessPolicy = undefined; + if (identifier.accessPolicy) { + accessPolicy = { + permissions: identifier.accessPolicy.permissions + }; + if (identifier.accessPolicy.expiresOn) { + accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + } + if (identifier.accessPolicy.startsOn) { + accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + } + res.signedIdentifiers.push({ + accessPolicy: accessPolicy, + id: identifier.id + }); + } + return [2 /*return*/, res]; + case 3: + e_56 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_56.message + }); + throw e_56; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * + * @param {PublicAccessType} [access] The level of public access to data in the container. + * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy. + * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.setAccessPolicy = function (access, containerAcl, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, acl, _i, _b, identifier, e_57; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _a = createSpan("ContainerClient-setAccessPolicy", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + acl = []; + for (_i = 0, _b = containerAcl || []; _i < _b.length; _i++) { + identifier = _b[_i]; + acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn + ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) + : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn + ? truncatedISO8061Date(identifier.accessPolicy.startsOn) + : "" + }, + id: identifier.id + }); + } + return [4 /*yield*/, this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access: access, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_57 = _c.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_57.message + }); + throw e_57; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container. + * @memberof ContainerClient + */ + ContainerClient.prototype.getBlobLeaseClient = function (proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + }; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {string} blobName Name of the block blob to create or update. + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation. + * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance. + * @memberof ContainerClient + */ + ContainerClient.prototype.uploadBlockBlob = function (blobName, body, contentLength, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blockBlobClient, response, e_58; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-uploadBlockBlob", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + blockBlobClient = this.getBlockBlobClient(blobName); + return [4 /*yield*/, blockBlobClient.upload(body, contentLength, __assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + return [2 /*return*/, { + blockBlobClient: blockBlobClient, + response: response + }]; + case 3: + e_58 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_58.message + }); + throw e_58; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {string} blobName + * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation. + * @returns {Promise} Block blob deletion response data. + * @memberof ContainerClient + */ + ContainerClient.prototype.deleteBlob = function (blobName, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blobClient, e_59; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-deleteBlob", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + blobClient = this.getBlobClient(blobName); + if (options.versionId) { + blobClient = blobClient.withVersion(options.versionId); + } + return [4 /*yield*/, blobClient.delete(__assign(__assign({}, options), { tracingOptions: __assign(__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_59 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_59.message + }); + throw e_59; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobFlatSegment = function (marker, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, wrappedResponse, e_60; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-listBlobFlatSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.listBlobFlatSegment(__assign(__assign({ marker: marker }, options), { spanOptions: spanOptions }))]; + case 2: + response = _b.sent(); + wrappedResponse = __assign(__assign({}, response), { _response: response._response, segment: __assign(__assign({}, response.segment), { blobItems: response.segment.blobItems.map(function (blobItemInteral) { + var blobItem = __assign(__assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); + return blobItem; + }) }) }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_60 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_60.message + }); + throw e_60; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobHierarchySegment = function (delimiter, marker, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, wrappedResponse, e_61; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-listBlobHierarchySegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.listBlobHierarchySegment(delimiter, __assign(__assign({ marker: marker }, options), { spanOptions: spanOptions }))]; + case 2: + response = _b.sent(); + wrappedResponse = __assign(__assign({}, response), { _response: response._response, segment: __assign(__assign({}, response.segment), { blobItems: response.segment.blobItems.map(function (blobItemInteral) { + var blobItem = __assign(__assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); + return blobItem; + }) }) }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_61 = _b.sent(); + span.setStatus({ + code: CanonicalCode.UNKNOWN, + message: e_61.message + }); + throw e_61; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listSegments = function (marker, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listSegments_1() { + var listBlobsFlatSegmentResponse; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, __await(this.listBlobFlatSegment(marker, options))]; + case 2: + listBlobsFlatSegmentResponse = _a.sent(); + marker = listBlobsFlatSegmentResponse.continuationToken; + return [4 /*yield*/, __await(listBlobsFlatSegmentResponse)]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @private + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listItems = function (options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listItems_1() { + var marker, _a, _b, listBlobsFlatSegmentResponse, e_62_1; + var e_62, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = __asyncValues(this.listSegments(marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, __await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + listBlobsFlatSegmentResponse = _b.value; + return [5 /*yield**/, __values(__asyncDelegator(__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)))]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_62_1 = _d.sent(); + e_62 = { error: e_62_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, __await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_62) throw e_62.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * // Get the containerClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("");` + * let i = 1; + * for await (const blob of containerClient.listBlobsFlat()) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = containerClient.listBlobsFlat(); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobsFlat = function (options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + var include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + var updatedOptions = __assign(__assign({}, options), (include.length > 0 ? { include: include } : {})); + // AsyncIterableIterator to iterate over blobs + var iter = this.listItems(updatedOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listSegments(settings.continuationToken, __assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + }, + _a; + }; + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listHierarchySegments = function (delimiter, marker, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listHierarchySegments_1() { + var listBlobsHierarchySegmentResponse; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, __await(this.listBlobHierarchySegment(delimiter, marker, options))]; + case 2: + listBlobsHierarchySegmentResponse = _a.sent(); + marker = listBlobsHierarchySegmentResponse.continuationToken; + return [4 /*yield*/, __await(listBlobsHierarchySegmentResponse)]; + case 3: return [4 /*yield*/, __await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator<{ kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem>} + * @memberof ContainerClient + */ + ContainerClient.prototype.listItemsByHierarchy = function (delimiter, options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function listItemsByHierarchy_1() { + var marker, _a, _b, listBlobsHierarchySegmentResponse, segment, _i, _c, prefix, _d, _e, blob, e_63_1; + var e_63, _f; + return __generator(this, function (_g) { + switch (_g.label) { + case 0: + _g.trys.push([0, 14, 15, 20]); + _a = __asyncValues(this.listHierarchySegments(delimiter, marker, options)); + _g.label = 1; + case 1: return [4 /*yield*/, __await(_a.next())]; + case 2: + if (!(_b = _g.sent(), !_b.done)) return [3 /*break*/, 13]; + listBlobsHierarchySegmentResponse = _b.value; + segment = listBlobsHierarchySegmentResponse.segment; + if (!segment.blobPrefixes) return [3 /*break*/, 7]; + _i = 0, _c = segment.blobPrefixes; + _g.label = 3; + case 3: + if (!(_i < _c.length)) return [3 /*break*/, 7]; + prefix = _c[_i]; + return [4 /*yield*/, __await(__assign({ kind: "prefix" }, prefix))]; + case 4: return [4 /*yield*/, _g.sent()]; + case 5: + _g.sent(); + _g.label = 6; + case 6: + _i++; + return [3 /*break*/, 3]; + case 7: + _d = 0, _e = segment.blobItems; + _g.label = 8; + case 8: + if (!(_d < _e.length)) return [3 /*break*/, 12]; + blob = _e[_d]; + return [4 /*yield*/, __await(__assign({ kind: "blob" }, blob))]; + case 9: return [4 /*yield*/, _g.sent()]; + case 10: + _g.sent(); + _g.label = 11; + case 11: + _d++; + return [3 /*break*/, 8]; + case 12: return [3 /*break*/, 1]; + case 13: return [3 /*break*/, 20]; + case 14: + e_63_1 = _g.sent(); + e_63 = { error: e_63_1 }; + return [3 /*break*/, 20]; + case 15: + _g.trys.push([15, , 18, 19]); + if (!(_b && !_b.done && (_f = _a.return))) return [3 /*break*/, 17]; + return [4 /*yield*/, __await(_f.call(_a))]; + case 16: + _g.sent(); + _g.label = 17; + case 17: return [3 /*break*/, 19]; + case 18: + if (e_63) throw e_63.error; + return [7 /*endfinally*/]; + case 19: return [7 /*endfinally*/]; + case 20: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * Example using `for await` syntax: + * + * ```js + * for await (const item of containerClient.listBlobsByHierarchy("/")) { + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); + * let entity = await iter.next(); + * while (!entity.done) { + * let item = entity.value; + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * entity = await iter.next(); + * } + * ```js + * + * Example using `byPage()`: + * + * ```js + * console.log("Listing blobs by hierarchy by page"); + * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { + * const segment = response.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * Example using paging with a max page size: + * + * ```js + * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * + * let i = 1; + * for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { + * console.log(`Page ${i++}`); + * const segment = response.segment; + * + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation. + * @returns {(PagedAsyncIterableIterator< + * { kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem, + * ContainerListBlobHierarchySegmentResponse + * >)} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobsByHierarchy = function (delimiter, options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + if (delimiter === "") { + throw new RangeError("delimiter should contain one or more characters"); + } + var include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + var updatedOptions = __assign(__assign({}, options), (include.length > 0 ? { include: include } : {})); + // AsyncIterableIterator to iterate over blob prefixes and blobs + var iter = this.listItemsByHierarchy(delimiter, updatedOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, iter.next()]; + }); + }); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listHierarchySegments(delimiter, settings.continuationToken, __assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + }, + _a; + }; + ContainerClient.prototype.getContainerNameFromUrl = function () { + var containerName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` + // http://localhost:10001/devstoreaccount1/containername + var parsedUrl = URLBuilder.parse(this.url); + if (parsedUrl.getHost().split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername". + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.getPath().split("/")[1]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername + // .getPath() -> /devstoreaccount1/containername + containerName = parsedUrl.getPath().split("/")[2]; + } + else { + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.getPath().split("/")[1]; + } + // decode the encoded containerName - to get all the special characters that might be present in it + containerName = decodeURIComponent(containerName); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return containerName; + } + catch (error) { + throw new Error("Unable to extract containerName with provided information."); + } + }; + return ContainerClient; +}(StorageClient)); +export { ContainerClient }; +//# sourceMappingURL=Clients.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js.map new file mode 100644 index 000000000..242a180af --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Clients.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Clients.js","sourceRoot":"","sources":["../../../src/Clients.ts"],"names":[],"mappings":";AAGA,OAAO,EACL,YAAY,EACZ,uBAAuB,EAGvB,MAAM,EACN,iBAAiB,EAGjB,UAAU,EACX,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;A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/E;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAlxCD,CAAqC,aAAa,GAkxCjD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n generateUuid,\n getDefaultProxySettings,\n HttpRequestBody,\n HttpResponse,\n isNode,\n isTokenCredential,\n TokenCredential,\n TransferProgressEvent,\n URLBuilder\n} from \"@azure/core-http\";\nimport { PollerLike, PollOperationState } from \"@azure/core-lro\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { Readable } from \"stream\";\n\nimport { BlobDownloadResponse } from \"./BlobDownloadResponse\";\nimport { BlobQueryResponse } from \"./BlobQueryResponse\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport {\n AppendBlob,\n Blob as StorageBlob,\n BlockBlob,\n Container,\n PageBlob\n} from \"./generated/src/operations\";\nimport { StorageClientContext } from \"./generated/src/storageClient\";\nimport {\n AppendBlobAppendBlockFromUrlResponse,\n AppendBlobAppendBlockResponse,\n AppendBlobCreateResponse,\n BlobAbortCopyFromURLResponse,\n BlobCopyFromURLResponse,\n BlobCreateSnapshotResponse,\n BlobDeleteResponse,\n BlobDownloadOptionalParams,\n BlobDownloadResponseModel,\n BlobGetPropertiesResponseModel,\n BlobGetTagsHeaders,\n BlobHTTPHeaders,\n BlobPrefix,\n BlobProperties,\n BlobSetHTTPHeadersResponse,\n BlobSetMetadataResponse,\n BlobSetTagsResponse,\n BlobSetTierResponse,\n BlobStartCopyFromURLResponse,\n BlobTags,\n BlobUndeleteResponse,\n BlockBlobCommitBlockListResponse,\n BlockBlobGetBlockListResponse,\n BlockBlobStageBlockFromURLResponse,\n BlockBlobStageBlockResponse,\n BlockBlobUploadHeaders,\n BlockBlobUploadResponse,\n BlockListType,\n ContainerBreakLeaseOptionalParams,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ContainerEncryptionScope,\n ContainerGetAccessPolicyHeaders,\n ContainerGetPropertiesResponse,\n ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobHierarchySegmentHeaders,\n ContainerSetAccessPolicyResponse,\n ContainerSetMetadataResponse,\n CpkInfo,\n DeleteSnapshotsOptionType,\n LeaseAccessConditions,\n ListBlobsFlatSegmentResponseModel,\n ListBlobsHierarchySegmentResponseModel,\n ListBlobsIncludeItem,\n PageBlobClearPagesResponse,\n PageBlobCopyIncrementalResponse,\n PageBlobCreateResponse,\n PageBlobResizeResponse,\n PageBlobUpdateSequenceNumberResponse,\n PageBlobUploadPagesFromURLResponse,\n PageBlobUploadPagesResponse,\n PublicAccessType,\n RehydratePriority,\n SequenceNumberActionType,\n SignedIdentifierModel\n} from \"./generatedModels\";\nimport {\n AppendBlobRequestConditions,\n BlobDownloadResponseParsed,\n BlobRequestConditions,\n BlockBlobTier,\n ensureCpkIfSpecified,\n Metadata,\n ObjectReplicationPolicy,\n PageBlobRequestConditions,\n PremiumPageBlobTier,\n Tags,\n toAccessTier,\n ContainerRequestConditions,\n TagConditions,\n MatchConditions,\n ModificationConditions,\n ModifiedAccessConditions,\n BlobQueryArrowField\n} from \"./models\";\nimport {\n PageBlobGetPageRangesDiffResponse,\n PageBlobGetPageRangesResponse,\n rangeResponseFromModel\n} from \"./PageBlobRangeResponse\";\nimport { newPipeline, Pipeline, StoragePipelineOptions } from \"./Pipeline\";\nimport {\n BlobBeginCopyFromUrlPoller,\n BlobBeginCopyFromUrlPollState,\n CopyPollerBlobClient\n} from \"./pollers/BlobStartCopyFromUrlPoller\";\nimport { Range, rangeToString } from \"./Range\";\nimport { CommonOptions, StorageClient } from \"./StorageClient\";\nimport { Batch } from \"./utils/Batch\";\nimport { BufferScheduler } from \"../../storage-common/src\";\nimport {\n BLOCK_BLOB_MAX_BLOCKS,\n BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES,\n BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES,\n DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES,\n DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS,\n ETagAny,\n ETagNone,\n URLConstants\n} from \"./utils/constants\";\nimport { createSpan } from \"./utils/tracing\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n generateBlockID,\n isIpEndpointStyle,\n parseObjectReplicationRecord,\n setURLParameter,\n toBlobTags,\n toBlobTagsString,\n toQuerySerialization,\n toTags,\n truncatedISO8061Date\n} from \"./utils/utils.common\";\nimport {\n fsCreateReadStream,\n fsStat,\n readStreamToLocalFile,\n streamToBuffer\n} from \"./utils/utils.node\";\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobBeginCopyFromURLOptions\n */\nexport interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions {\n /**\n * The amount of time in milliseconds the poller should wait between\n * calls to the service to determine the status of the Blob copy.\n * Defaults to 15 seconds.\n *\n * @type {number}\n * @memberof BlobBeginCopyFromURLOptions\n */\n intervalInMs?: number;\n /**\n * Callback to receive the state of the copy progress.\n *\n * @memberof BlobBeginCopyFromURLOptions\n */\n onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;\n /**\n * Serialized poller state that can be used to resume polling from.\n * This may be useful when starting a copy on one process or thread\n * and you wish to continue polling on another process or thread.\n *\n * To get serialized poller state, call `poller.toString()` on an existing\n * poller.\n *\n * @memberof BlobBeginCopyFromURLOptions\n */\n resumeFrom?: string;\n}\n\n/**\n * Contains response data for the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobBeginCopyFromURLResponse\n */\nexport interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse {}\n\n/**\n * Options to configure the {@link BlobClient.download} operation.\n *\n * @export\n * @interface BlobDownloadOptions\n */\nexport interface BlobDownloadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDownloadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve.\n *\n * @type {string}\n * @memberof BlobDownloadOptions\n */\n snapshot?: string;\n /**\n * When this is set to true and download range of blob, the service returns the MD5 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n *\n * @type {boolean}\n * @memberof BlobDownloadOptions\n */\n rangeGetContentMD5?: boolean;\n /**\n * When this is set to true and download range of blob, the service returns the CRC64 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n *\n * @type {boolean}\n * @memberof BlobDownloadOptions\n */\n rangeGetContentCrc64?: boolean;\n /**\n * Conditions to meet when downloading blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDownloadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Call back to receive events on the progress of download operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlobDownloadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original body download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional `FileClient.download()` request will be made\n * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached.\n *\n * Default value is 5, please set a larger value when loading large files in poor network.\n *\n * @type {number}\n * @memberof BlobDownloadOptions\n */\n maxRetryRequests?: number;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDownloadOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.exists} operation.\n *\n * @export\n * @interface BlobExistsOptions\n */\nexport interface BlobExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Conditions to meet.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobExistsOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getProperties} operation.\n *\n * @export\n * @interface BlobGetPropertiesOptions\n */\nexport interface BlobGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting blob properties.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobGetPropertiesOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobGetPropertiesOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.delete} operation.\n *\n * @export\n * @interface BlobDeleteOptions\n */\nexport interface BlobDeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDeleteOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when deleting blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDeleteOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Specifies options to delete blobs that have associated snapshots.\n * - `include`: Delete the base blob and all of its snapshots.\n * - `only`: Delete only the blob's snapshots and not the blob itself.\n *\n * @type {DeleteSnapshotsOptionType}\n * @memberof BlobDeleteOptions\n */\n deleteSnapshots?: DeleteSnapshotsOptionType;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDeleteOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.undelete} operation.\n *\n * @export\n * @interface BlobUndeleteOptions\n */\nexport interface BlobUndeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobUndeleteOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobUndeleteOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setHTTPHeaders} operation.\n *\n * @export\n * @interface BlobSetHTTPHeadersOptions\n */\nexport interface BlobSetHTTPHeadersOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetHTTPHeadersOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob HTTP headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSetHTTPHeadersOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobSetHTTPHeadersOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setMetadata} operation.\n *\n * @export\n * @interface BlobSetMetadataOptions\n */\nexport interface BlobSetMetadataOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetMetadataOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob metadata.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSetMetadataOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobSetMetadataOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlobSetMetadataOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.setTags} operation.\n *\n * @export\n * @interface BlobSetTagsOptions\n */\nexport interface BlobSetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetTagsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n *\n * @type {TagConditions}\n * @memberof BlobSetTagsOptions\n */\n conditions?: TagConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getTags} operation.\n *\n * @export\n * @interface BlobGetTagsOptions\n */\nexport interface BlobGetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobGetTagsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n *\n * @type {TagConditions}\n * @memberof BlobGetTagsOptions\n */\n conditions?: TagConditions;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.getTags} operation.\n */\nexport type BlobGetTagsResponse = { tags: Tags } & BlobGetTagsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetTagsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobTags;\n };\n };\n\n/**\n * Options to configure Blob - Acquire Lease operation.\n *\n * @export\n * @interface BlobAcquireLeaseOptions\n */\nexport interface BlobAcquireLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobAcquireLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when acquiring the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobAcquireLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Release Lease operation.\n *\n * @export\n * @interface BlobReleaseLeaseOptions\n */\nexport interface BlobReleaseLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobReleaseLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when releasing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobReleaseLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Renew Lease operation.\n *\n * @export\n * @interface BlobRenewLeaseOptions\n */\nexport interface BlobRenewLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobRenewLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when renewing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobRenewLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Change Lease operation.\n *\n * @export\n * @interface BlobChangeLeaseOptions\n */\nexport interface BlobChangeLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobChangeLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobChangeLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Break Lease operation.\n *\n * @export\n * @interface BlobBreakLeaseOptions\n */\nexport interface BlobBreakLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobBreakLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when breaking the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobBreakLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.createSnapshot} operation.\n *\n * @export\n * @interface BlobCreateSnapshotOptions\n */\nexport interface BlobCreateSnapshotOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobCreateSnapshotOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n *\n * @type {Metadata}\n * @memberof BlobCreateSnapshotOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet when creating blob snapshots.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobCreateSnapshotOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobCreateSnapshotOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlobCreateSnapshotOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobStartCopyFromURLOptions\n */\nexport interface BlobStartCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobStartCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the blob that are being copied.\n *\n * @type {Metadata}\n * @memberof BlobStartCopyFromURLOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobStartCopyFromURLOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobStartCopyFromURLOptions\n */\n sourceConditions?: ModifiedAccessConditions;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | PremiumPageBlobTier | string}\n * @memberof BlobStartCopyFromURLOptions\n */\n tier?: BlockBlobTier | PremiumPageBlobTier | string;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n *\n * @type {RehydratePriority}\n * @memberof BlobStartCopyFromURLOptions\n */\n rehydratePriority?: RehydratePriority;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlobStartCopyFromURLOptions\n */\n tags?: Tags;\n /**\n * Overrides the sealed state of the destination blob. Default true.\n *\n * @type {boolean}\n * @memberof BlobStartCopyFromURLOptions\n */\n sealBlob?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobClient.abortCopyFromURL} operation.\n *\n * @export\n * @interface BlobAbortCopyFromURLOptions\n */\nexport interface BlobAbortCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobAbortCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlobAbortCopyFromURLOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.syncCopyFromURL} operation.\n *\n * @export\n * @interface BlobSyncCopyFromURLOptions\n */\nexport interface BlobSyncCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSyncCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n *\n * @type {Metadata}\n * @memberof BlobSyncCopyFromURLOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSyncCopyFromURLOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof BlobSyncCopyFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n *\n * @type {Uint8Array}\n * @memberof BlobSyncCopyFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlobSyncCopyFromURLOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure the {@link BlobClient.setAccessTier} operation.\n *\n * @export\n * @interface BlobSetTierOptions\n */\nexport interface BlobSetTierOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetTierOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions & TagConditions}\n * @memberof BlobSetTierOptions\n */\n conditions?: LeaseAccessConditions & TagConditions;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n *\n * @type {RehydratePriority}\n * @memberof BlobSetTierOptions\n */\n rehydratePriority?: RehydratePriority;\n}\n\n/**\n * Option interface for the {@link BlobClient.downloadToBuffer} operation.\n *\n * @export\n * @interface BlobDownloadToBufferOptions\n */\nexport interface BlobDownloadToBufferOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDownloadToBufferOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * blockSize is the data every request trying to download.\n * Must be >= 0, if set to 0 or undefined, blockSize will automatically calculated according\n * to the blob size.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n blockSize?: number;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original block download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional FileClient.download() request will be made\n * from the broken point, until the requested block has been successfully downloaded or\n * maxRetryRequestsPerBlock is reached.\n *\n * Default value is 5, please set a larger value when in poor network.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n maxRetryRequestsPerBlock?: number;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlobDownloadToBufferOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDownloadToBufferOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel download.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n concurrency?: number;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDownloadToBufferOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Contains response data for the {@link BlobClient.deleteIfExists} operation.\n *\n * @export\n * @interface BlobDeleteIfExistsResponse\n */\nexport interface BlobDeleteIfExistsResponse extends BlobDeleteResponse {\n /**\n * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place.\n *\n * @type {boolean}\n * @memberof BlobDeleteIfExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link BlobClient.getProperties} operation.\n *\n * @export\n * @interface BlobGetPropertiesResponse\n */\nexport interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel {\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @type {ObjectReplicationPolicy[]}\n * @memberof BlobGetPropertiesResponse\n */\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @type {string}\n * @memberof BlobGetPropertiesResponse\n */\n objectReplicationDestinationPolicyId?: string;\n}\n\n/**\n * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,\n * append blob, or page blob.\n *\n * @export\n * @class BlobClient\n */\nexport class BlobClient extends StorageClient {\n /**\n * blobContext provided by protocol layer.\n *\n * @private\n * @type {Blobs}\n * @memberof BlobClient\n */\n private blobContext: StorageBlob;\n\n private _name: string;\n private _containerName: string;\n\n /**\n * The name of the blob.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * The name of the storage container the blob is associated with.\n */\n public get containerName(): string {\n return this._containerName;\n }\n\n /**\n *\n * Creates an instance of BlobClient from connection string.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n options = options || {};\n let pipeline: Pipeline;\n let url: string;\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n\n super(url, pipeline);\n ({\n blobName: this._name,\n containerName: this._containerName\n } = this.getBlobAndContainerNamesFromUrl());\n this.blobContext = new StorageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp\n * @memberof BlobClient\n */\n public withSnapshot(snapshot: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a new BlobClient object pointing to a version of this blob.\n * Provide \"\" will remove the versionId and return a Client to the base blob.\n *\n * @param {string} versionId The versionId.\n * @returns {BlobClient} A new BlobClient object pointing to the version of this blob.\n * @memberof BlobClient\n */\n public withVersion(versionId: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.VERSIONID,\n versionId.length === 0 ? undefined : versionId\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a AppendBlobClient object.\n *\n * @returns {AppendBlobClient}\n * @memberof BlobClient\n */\n public getAppendBlobClient(): AppendBlobClient {\n return new AppendBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a BlockBlobClient object.\n *\n * @returns {BlockBlobClient}\n * @memberof BlobClient\n */\n public getBlockBlobClient(): BlockBlobClient {\n return new BlockBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a PageBlobClient object.\n *\n * @returns {PageBlobClient}\n * @memberof BlobClient\n */\n public getPageBlobClient(): PageBlobClient {\n return new PageBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Reads or downloads a blob from the system, including its metadata and properties.\n * You can also call Get Blob to read a snapshot.\n *\n * * In Node.js, data returns in a Readable stream readableStreamBody\n * * In browsers, data returns in a promise blobBody\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob\n *\n * @param {number} [offset] From which position of the blob to download, >= 0\n * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined\n * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation.\n * @returns {Promise}\n * @memberof BlobClient\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);\n * console.log(\"Downloaded blob content:\", downloaded.toString());\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * Example usage (browser):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);\n * console.log(\n * \"Downloaded blob content\",\n * downloaded\n * );\n *\n * async function blobToString(blob: Blob): Promise {\n * const fileReader = new FileReader();\n * return new Promise((resolve, reject) => {\n * fileReader.onloadend = (ev: any) => {\n * resolve(ev.target!.result);\n * };\n * fileReader.onerror = reject;\n * fileReader.readAsText(blob);\n * });\n * }\n * ```\n */\n public async download(\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, spanOptions } = createSpan(\"BlobClient-download\", options.tracingOptions);\n\n try {\n const res = await this.blobContext.download({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onDownloadProgress: isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream\n range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n\n const wrappedRes = {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules)\n };\n // Return browser response immediately\n if (!isNode) {\n return wrappedRes;\n }\n\n // We support retrying when download stream unexpected ends in Node.js runtime\n // Following code shouldn't be bundled into browser build, however some\n // bundlers may try to bundle following code and \"FileReadResponse.ts\".\n // In this case, \"FileDownloadResponse.browser.ts\" will be used as a shim of \"FileDownloadResponse.ts\"\n // The config is in package.json \"browser\" field\n if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {\n // TODO: Default value or make it a required parameter?\n options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;\n }\n\n if (res.contentLength === undefined) {\n throw new RangeError(`File download response doesn't contain valid content length header`);\n }\n\n if (!res.etag) {\n throw new RangeError(`File download response doesn't contain valid etag header`);\n }\n\n return new BlobDownloadResponse(\n wrappedRes,\n async (start: number): Promise => {\n const updatedOptions: BlobDownloadOptionalParams = {\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ifMatch: options.conditions!.ifMatch || res.etag,\n ifModifiedSince: options.conditions!.ifModifiedSince,\n ifNoneMatch: options.conditions!.ifNoneMatch,\n ifUnmodifiedSince: options.conditions!.ifUnmodifiedSince,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({\n count: offset + res.contentLength! - start,\n offset: start\n }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey\n };\n\n // Debug purpose only\n // console.log(\n // `Read from internal stream, range: ${\n // updatedOptions.range\n // }, options: ${JSON.stringify(updatedOptions)}`\n // );\n\n return (\n await this.blobContext.download({\n abortSignal: options.abortSignal,\n ...updatedOptions\n })\n ).readableStreamBody!;\n },\n offset,\n res.contentLength!,\n {\n abortSignal: options.abortSignal,\n maxRetryRequests: options.maxRetryRequests,\n onProgress: options.onProgress\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the Azure blob resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing blob might be deleted by other clients or\n * applications. Vice versa new blobs might be added by other clients or applications after this\n * function completes.\n *\n * @param {BlobExistsOptions} [options] options to Exists operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async exists(options: BlobExistsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-exists\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n await this.getProperties({\n abortSignal: options.abortSignal,\n customerProvidedKey: options.customerProvidedKey,\n conditions: options.conditions,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n return true;\n } catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when checking blob existence\"\n });\n return false;\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns all user-defined metadata, standard HTTP properties, and system properties\n * for the blob. It does not return the content of the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async getProperties(\n options: BlobGetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-getProperties\", options.tracingOptions);\n try {\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const res = await this.blobContext.getProperties({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n\n return {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules)\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async delete(options: BlobDeleteOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-delete\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n return await this.blobContext.deleteMethod({\n abortSignal: options.abortSignal,\n deleteSnapshots: options.deleteSnapshots,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async deleteIfExists(\n options: BlobDeleteOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-deleteIfExists\", options.tracingOptions);\n try {\n const res = await this.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobNotFound\") {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when deleting a blob or snapshot only if it exists.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Restores the contents and metadata of soft deleted blob and any associated\n * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29\n * or later.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async undelete(options: BlobUndeleteOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-undelete\", options.tracingOptions);\n try {\n return await this.blobContext.undelete({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets system properties on the blob.\n *\n * If no value provided, or no value provided for the specified blob HTTP headers,\n * these blob HTTP headers without a value will be cleared.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for\n * the specified blob HTTP headers, these blob HTTP\n * headers without a value will be cleared.\n * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setHTTPHeaders(\n blobHTTPHeaders?: BlobHTTPHeaders,\n options: BlobSetHTTPHeadersOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setHTTPHeaders\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setHTTPHeaders({\n abortSignal: options.abortSignal,\n blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n *\n * If no option provided, or no metadata defined in the parameter, the blob\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata\n *\n * @param {Metadata} [metadata] Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setMetadata(\n metadata?: Metadata,\n options: BlobSetMetadataOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setMetadata\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setMetadata({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets tags on the underlying blob.\n * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.\n * Valid tag key and value characters include lower and upper case letters, digits (0-9),\n * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').\n *\n * @param {Tags} tags\n * @param {BlobSetTagsOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setTags(tags: Tags, options: BlobSetTagsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setTags\", options.tracingOptions);\n try {\n return await this.blobContext.setTags({\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions,\n tags: toBlobTags(tags)\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the tags associated with the underlying blob.\n *\n * @param {BlobGetTagsOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async getTags(options: BlobGetTagsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-getTags\", options.tracingOptions);\n try {\n const response = await this.blobContext.getTags({\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n const wrappedResponse: BlobGetTagsResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n tags: toTags({ blobTagSet: response.blobTagSet }) || {}\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the blob.\n *\n * @param {string} [proposeLeaseId] Initial proposed lease Id.\n * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob.\n * @memberof BlobClient\n */\n public getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n\n /**\n * Creates a read-only snapshot of a blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob\n *\n * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async createSnapshot(\n options: BlobCreateSnapshotOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-createSnapshot\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.createSnapshot({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * This method returns a long running operation poller that allows you to wait\n * indefinitely until the copy is completed.\n * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.\n * Note that the onProgress callback will not be invoked if the operation completes in the first\n * request, and attempting to cancel a completed copy will result in an error being thrown.\n *\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * Example using automatic polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using manual polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * while (!poller.isDone()) {\n * await poller.poll();\n * }\n * const result = copyPoller.getResult();\n * ```\n *\n * Example using progress updates:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * onProgress(state) {\n * console.log(`Progress: ${state.copyProgress}`);\n * }\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using a changing polling interval (default 15 seconds):\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * intervalInMs: 1000 // poll blob every 1 second for copy progress\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using copy cancellation:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * // cancel operation after starting it.\n * try {\n * await copyPoller.cancelOperation();\n * // calls to get the result now throw PollerCancelledError\n * await copyPoller.getResult();\n * } catch (err) {\n * if (err.name === 'PollerCancelledError') {\n * console.log('The copy was cancelled.');\n * }\n * }\n * ```\n *\n * @param {string} copySource url to the source Azure Blob/File.\n * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation.\n */\n public async beginCopyFromURL(\n copySource: string,\n options: BlobBeginCopyFromURLOptions = {}\n ): Promise<\n PollerLike, BlobBeginCopyFromURLResponse>\n > {\n const client: CopyPollerBlobClient = {\n abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),\n getProperties: (...args) => this.getProperties(...args),\n startCopyFromURL: (...args) => this.startCopyFromURL(...args)\n };\n const poller = new BlobBeginCopyFromUrlPoller({\n blobClient: client,\n copySource,\n intervalInMs: options.intervalInMs,\n onProgress: options.onProgress,\n resumeFrom: options.resumeFrom,\n startCopyFromURLOptions: options\n });\n\n // Trigger the startCopyFromURL call by calling poll.\n // Any errors from this method should be surfaced to the user.\n await poller.poll();\n\n return poller;\n }\n\n /**\n * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero\n * length and full metadata. Version 2012-02-12 and newer.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob\n *\n * @param {string} copyId Id of the Copy From URL operation.\n * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async abortCopyFromURL(\n copyId: string,\n options: BlobAbortCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-abortCopyFromURL\", options.tracingOptions);\n try {\n return await this.blobContext.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url\n *\n * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication\n * @param {BlobSyncCopyFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async syncCopyFromURL(\n copySource: string,\n options: BlobSyncCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-syncCopyFromURL\", options.tracingOptions);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.copyFromURL(copySource, {\n abortSignal: options.abortSignal,\n metadata: options.metadata,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n sourceContentMD5: options.sourceContentMD5,\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier\n *\n * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive.\n * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setAccessTier(\n tier: BlockBlobTier | PremiumPageBlobTier | string,\n options: BlobSetTierOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setAccessTier\", options.tracingOptions);\n try {\n return await this.blobContext.setTier(toAccessTier(tier)!, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n rehydratePriority: options.rehydratePriority,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level function\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @export\n * @param {number} offset From which position of the block blob to download(in bytes)\n * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions\n * @returns {Promise}\n */\n public async downloadToBuffer(\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise;\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @export\n * @param {Buffer} buffer Buffer to be fill, must have length larger than count\n * @param {number} offset From which position of the block blob to download(in bytes)\n * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions\n * @returns {Promise}\n */\n public async downloadToBuffer(\n buffer: Buffer,\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise;\n\n public async downloadToBuffer(\n param1?: Buffer | number,\n param2?: number,\n param3?: BlobDownloadToBufferOptions | number,\n param4: BlobDownloadToBufferOptions = {}\n ) {\n let buffer: Buffer | undefined;\n let offset = 0;\n let count = 0;\n let options = param4;\n if (param1 instanceof Buffer) {\n buffer = param1;\n offset = param2 || 0;\n count = typeof param3 === \"number\" ? param3 : 0;\n } else {\n offset = typeof param1 === \"number\" ? param1 : 0;\n count = typeof param2 === \"number\" ? param2 : 0;\n options = (param3 as BlobDownloadToBufferOptions) || {};\n }\n const { span, spanOptions } = createSpan(\"BlobClient-downloadToBuffer\", options.tracingOptions);\n\n try {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0) {\n throw new RangeError(\"blockSize option must be >= 0\");\n }\n if (options.blockSize === 0) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n\n if (offset < 0) {\n throw new RangeError(\"offset option must be >= 0\");\n }\n\n if (count && count <= 0) {\n throw new RangeError(\"count option must be > 0\");\n }\n\n if (!options.conditions) {\n options.conditions = {};\n }\n\n // Customer doesn't specify length, get it\n if (!count) {\n const response = await this.getProperties({\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n count = response.contentLength! - offset;\n if (count < 0) {\n throw new RangeError(\n `offset ${offset} shouldn't be larger than blob size ${response.contentLength!}`\n );\n }\n }\n\n // Allocate the buffer of size = count if the buffer is not provided\n if (!buffer) {\n try {\n buffer = Buffer.alloc(count);\n } catch (error) {\n throw new Error(\n `Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\\t ${error.message}`\n );\n }\n }\n\n if (buffer.length < count) {\n throw new RangeError(\n `The buffer's size should be equal to or larger than the request count of bytes: ${count}`\n );\n }\n\n let transferProgress: number = 0;\n const batch = new Batch(options.concurrency);\n for (let off = offset; off < offset + count; off = off + options.blockSize) {\n batch.addOperation(async () => {\n // Exclusive chunk end position\n let chunkEnd = offset + count!;\n if (off + options.blockSize! < chunkEnd) {\n chunkEnd = off + options.blockSize!;\n }\n const response = await this.download(off, chunkEnd - off, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n maxRetryRequests: options.maxRetryRequestsPerBlock,\n customerProvidedKey: options.customerProvidedKey,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n const stream = response.readableStreamBody!;\n await streamToBuffer(stream, buffer!, off - offset, chunkEnd - offset);\n // Update progress after block is downloaded, in case of block trying\n // Could provide finer grained progress updating inside HTTP requests,\n // only if convenience layer download try is enabled\n transferProgress += chunkEnd - off;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n });\n }\n await batch.do();\n return buffer;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob to a local file.\n * Fails if the the given file path already exits.\n * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.\n *\n * @param {string} filePath\n * @param {number} [offset] From which position of the block blob to download.\n * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined.\n * @param {BlobDownloadOptions} [options] Options to Blob download options.\n * @returns {Promise} The response data for blob download operation,\n * but with readableStreamBody set to undefined since its\n * content is already read and written into a local file\n * at the specified path.\n * @memberof BlobClient\n */\n public async downloadToFile(\n filePath: string,\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-downloadToFile\", options.tracingOptions);\n try {\n const response = await this.download(offset, count, {\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n if (response.readableStreamBody) {\n await readStreamToLocalFile(response.readableStreamBody, filePath);\n }\n\n // The stream is no longer accessible so setting it to undefined.\n (response as any).blobDownloadStream = undefined;\n return response;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private getBlobAndContainerNamesFromUrl(): { blobName: string; containerName: string } {\n let containerName;\n let blobName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`\n // http://localhost:10001/devstoreaccount1/containername/blob\n\n const parsedUrl = URLBuilder.parse(this.url);\n\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob\n // .getPath() -> /devstoreaccount1/containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)/([^/]*)(/(.*))?\");\n containerName = pathComponents![2];\n blobName = pathComponents![4];\n } else {\n // \"https://customdomain.com/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n }\n\n // decode the encoded blobName, containerName - to get all the special characters that might be present in them\n containerName = decodeURIComponent(containerName);\n blobName = decodeURIComponent(blobName);\n\n // Azure Storage Server will replace \"\\\" with \"/\" in the blob names\n // doing the same in the SDK side so that the user doesn't have to replace \"\\\" instances in the blobName\n blobName = blobName.replace(/\\\\/g, \"/\");\n\n if (!blobName) {\n throw new Error(\"Provided blobName is invalid.\");\n } else if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n\n return { blobName, containerName };\n } catch (error) {\n throw new Error(\"Unable to extract blobName and containerName with provided information.\");\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * @param {string} copySource url to the source Azure Blob/File.\n * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n private async startCopyFromURL(\n copySource: string,\n options: BlobStartCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-startCopyFromURL\", options.tracingOptions);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.startCopyFromURL(copySource, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions.tagConditions\n },\n rehydratePriority: options.rehydratePriority,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n sealBlob: options.sealBlob,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link AppendBlobClient.create} operation.\n *\n * @export\n * @interface AppendBlobCreateOptions\n */\nexport interface AppendBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobCreateOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Conditions to meet when creating append blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof AppendBlobCreateOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when creating append blobs.\n *\n * @type {BlobHTTPHeaders}\n * @memberof AppendBlobCreateOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof AppendBlobCreateOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobCreateOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobCreateOptions\n */\n encryptionScope?: string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof AppendBlobCreateOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface AppendBlobCreateIfNotExistsOptions\n */\nexport interface AppendBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * HTTP headers to set when creating append blobs.\n *\n * @type {BlobHTTPHeaders}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.seal} operation.\n *\n * @export\n * @interface AppendBlobSealOptions\n * @extends {CommonOptions}\n */\nexport interface AppendBlobSealOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockOptions\n */\n conditions?: AppendBlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlock} operation.\n *\n * @export\n * @interface AppendBlobAppendBlockOptions\n */\nexport interface AppendBlobAppendBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockOptions\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Callback to receive events on the progress of append block operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof AppendBlobAppendBlockOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockOptions\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobAppendBlockOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobAppendBlockOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation.\n *\n * @export\n * @interface AppendBlobAppendBlockFromURLOptions\n */\nexport interface AppendBlobAppendBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Contains response data for the {@link appendBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface AppendBlobCreateIfNotExistsResponse\n */\nexport interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof AppendBlobCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * AppendBlobClient defines a set of operations applicable to append blobs.\n *\n * @export\n * @class AppendBlobClient\n * @extends {BlobClient}\n */\nexport class AppendBlobClient extends BlobClient {\n /**\n * appendBlobsContext provided by protocol layer.\n *\n * @private\n * @type {AppendBlob}\n * @memberof AppendBlobClient\n */\n private appendBlobContext: AppendBlob;\n\n /**\n *\n * Creates an instance of AppendBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof AppendBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof AppendBlobClient\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof AppendBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.appendBlobContext = new AppendBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new AppendBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof AppendBlobClient\n */\n public withSnapshot(snapshot: string): AppendBlobClient {\n return new AppendBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation.\n * @returns {Promise}\n * @memberof AppendBlobClient\n *\n * Example usage:\n *\n * ```js\n * const appendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await appendBlobClient.create();\n * ```\n */\n public async create(options: AppendBlobCreateOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"AppendBlobClient-create\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.create(0, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * If the blob with the same name already exists, the content of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {AppendBlobCreateIfNotExistsOptions} [options]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async createIfNotExists(\n options: AppendBlobCreateIfNotExistsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-createIfNotExists\",\n options.tracingOptions\n );\n const conditions = { ifNoneMatch: ETagAny };\n try {\n const res = await this.create({\n ...options,\n conditions,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a blob only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Seals the append blob, making it read only.\n *\n * @param {AppendBlobSealOptions} [options={}]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async seal(options: AppendBlobSealOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"AppendBlobClient-seal\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n return await this.appendBlobContext.seal({\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Commits a new block of data to the end of the existing append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/append-block\n *\n * @param {HttpRequestBody} body Data to be appended.\n * @param {number} contentLength Length of the body in bytes.\n * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation.\n * @returns {Promise}\n * @memberof AppendBlobClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello World!\";\n *\n * // Create a new append blob and append data to the blob.\n * const newAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await newAppendBlobClient.create();\n * await newAppendBlobClient.appendBlock(content, content.length);\n *\n * // Append data to an existing append blob.\n * const existingAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await existingAppendBlobClient.appendBlock(content, content.length);\n * ```\n */\n public async appendBlock(\n body: HttpRequestBody,\n contentLength: number,\n options: AppendBlobAppendBlockOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-appendBlock\",\n options.tracingOptions\n );\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlock(body, contentLength, {\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url\n *\n * @param {string} sourceURL\n * The url to the blob that will be the source of the copy. A source blob in the same storage account can\n * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob\n * must either be public or must be authenticated via a shared access signature. If the source blob is\n * public, no authentication is required to perform the operation.\n * @param {number} sourceOffset Offset in source to be appended\n * @param {number} count Number of bytes to be appended as a block\n * @param {AppendBlobAppendBlockFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async appendBlockFromURL(\n sourceURL: string,\n sourceOffset: number,\n count: number,\n options: AppendBlobAppendBlockFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-appendBlockFromURL\",\n options.tracingOptions\n );\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {\n abortSignal: options.abortSignal,\n sourceRange: rangeToString({ offset: sourceOffset, count }),\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n appendPositionAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link BlockBlobClient.upload} operation.\n *\n * @export\n * @interface BlockBlobUploadOptions\n */\nexport interface BlockBlobUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading to the block blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when uploading to a block blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobUploadOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when uploading to a block blob.\n *\n * @type {Metadata}\n * @memberof BlockBlobUploadOptions\n */\n metadata?: Metadata;\n /**\n * Callback to receive events on the progress of upload operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobUploadOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobUploadOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobUploadOptions\n */\n tier?: BlockBlobTier | string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobUploadOptions\n */\n tags?: Tags;\n}\n\n/**\n * Blob query error type.\n *\n * @export\n * @interface BlobQueryError\n */\nexport interface BlobQueryError {\n /**\n * Whether error is fatal. Fatal error will stop query.\n *\n * @type {boolean}\n * @memberof BlobQueryError\n */\n isFatal: boolean;\n /**\n * Error name.\n *\n * @type {string}\n * @memberof BlobQueryError\n */\n name: string;\n /**\n * Position in bytes of the query.\n *\n * @type {number}\n * @memberof BlobQueryError\n */\n position: number;\n /**\n * Error description.\n *\n * @type {string}\n * @memberof BlobQueryError\n */\n description: string;\n}\n\n/**\n * Options to query blob with JSON format.\n *\n * @export\n * @interface BlobQueryJsonTextConfiguration\n */\nexport interface BlobQueryJsonTextConfiguration {\n /**\n * Record separator.\n *\n * @type {string}\n * @memberof BlobQueryJsonTextConfiguration\n */\n recordSeparator: string;\n /**\n * Query for a JSON format blob.\n *\n * @type {\"json\"}\n * @memberof BlobQueryJsonTextConfiguration\n */\n kind: \"json\";\n}\n\n/**\n * Options to query blob with CSV format.\n *\n * @export\n * @interface BlobQueryCsvTextConfiguration\n */\nexport interface BlobQueryCsvTextConfiguration {\n /**\n * Record separator.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n recordSeparator: string;\n /**\n * Query for a CSV format blob.\n *\n * @type {\"csv\"}\n * @memberof BlobQueryCsvTextConfiguration\n */\n kind: \"csv\";\n /**\n * Column separator. Default is \",\".\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n columnSeparator?: string;\n /**\n * Field quote.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n fieldQuote?: string;\n /**\n * Escape character.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n escapeCharacter?: string;\n /**\n * Has headers. Default is false.\n *\n * @type {boolean}\n * @memberof BlobQueryCsvTextConfiguration\n */\n hasHeaders?: boolean;\n}\n\n/**\n * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}.\n *\n * @export\n * @interface BlobQueryArrowConfiguration\n */\nexport interface BlobQueryArrowConfiguration {\n /**\n * Kind.\n *\n * @type {\"arrow\"}\n * @memberof BlobQueryArrowConfiguration\n */\n kind: \"arrow\";\n\n /**\n * List of {@link BlobQueryArrowField} describing the schema of the data.\n *\n * @type {BlobQueryArrowField[]}\n * @memberof BlobQueryArrowConfiguration\n */\n schema: BlobQueryArrowField[];\n}\n\n/**\n * Options to configure {@link BlockBlobClient.query} operation.\n *\n * @export\n * @interface BlockBlobQueryOptions\n */\nexport interface BlockBlobQueryOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Configurations for the query input.\n *\n * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration}\n * @memberof BlockBlobQueryOptions\n */\n inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration;\n /**\n * Configurations for the query output.\n *\n * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration| BlobQueryArrowConfiguration}\n * @memberof BlockBlobQueryOptions\n */\n outputTextConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryArrowConfiguration;\n /**\n * Callback to receive events on the progress of query operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Callback to receive error events during the query operaiton.\n *\n * @memberof BlockBlobQueryOptions\n */\n onError?: (error: BlobQueryError) => void;\n /**\n * Conditions to meet when uploading to the block blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobUploadOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlock} operation.\n *\n * @export\n * @interface BlockBlobStageBlockOptions\n */\nexport interface BlockBlobStageBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobStageBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlockBlobStageBlockOptions\n */\n conditions?: LeaseAccessConditions;\n /**\n * Callback to receive events on the progress of stage block operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobStageBlockOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockOptions\n */\n transactionalContentMD5?: Uint8Array;\n\n /**\n * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobStageBlockOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobStageBlockOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation.\n *\n * @export\n * @interface BlockBlobStageBlockFromURLOptions\n */\nexport interface BlockBlobStageBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Specifies the bytes of the source Blob/File to upload.\n * If not specified, the entire content is uploaded as a single block.\n *\n * @type {Range}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n range?: Range;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n conditions?: LeaseAccessConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.commitBlockList} operation.\n *\n * @export\n * @interface BlockBlobCommitBlockListOptions\n */\nexport interface BlockBlobCommitBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobCommitBlockListOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when committing the block list.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobCommitBlockListOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when committing block list.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobCommitBlockListOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when committing block list.\n *\n * @type {Metadata}\n * @memberof BlockBlobCommitBlockListOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobCommitBlockListOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobCommitBlockListOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobCommitBlockListOptions\n */\n tier?: BlockBlobTier | string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobCommitBlockListOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.getBlockList} operation.\n *\n * @export\n * @interface BlockBlobGetBlockListOptions\n */\nexport interface BlockBlobGetBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobGetBlockListOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions & TagConditions}\n * @memberof BlockBlobGetBlockListOptions\n */\n conditions?: LeaseAccessConditions & TagConditions;\n}\n\n/**\n * Option interface for the {@link BlockBlobClient.uploadStream} operation.\n *\n * @export\n * @interface BlockBlobUploadStreamOptions\n */\nexport interface BlockBlobUploadStreamOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Blob HTTP Headers.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobUploadStreamOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n *\n * @type {{ [propertyName: string]: string }}\n * @memberof BlockBlobUploadStreamOptions\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadStreamOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobUploadStreamOptions\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobUploadStreamOptions\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobUploadStreamOptions\n */\n tier?: BlockBlobTier | string;\n}\n/**\n * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}.\n *\n * @export\n * @interface BlockBlobParallelUploadOptions\n */\nexport interface BlockBlobParallelUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobParallelUploadOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Destination block blob size in bytes.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n blockSize?: number;\n\n /**\n * Blob size threshold in bytes to start concurrency uploading.\n * Default value is 256MB, blob size less than this option will\n * be uploaded via one I/O operation without concurrency.\n * You can customize a value less equal than the default value.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n maxSingleShotSize?: number;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobParallelUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Blob HTTP Headers.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobParallelUploadOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n *\n * @type {{ [propertyName: string]: string }}\n * @memberof BlockBlobParallelUploadOptions\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobParallelUploadOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel uploading. Must be >= 0.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n concurrency?: number;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobParallelUploadOptions\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobParallelUploadOptions\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobParallelUploadOptions\n */\n tier?: BlockBlobTier | string;\n}\n\n/**\n * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and\n * {@link BlockBlobClient.uploadBrowserDate}.\n *\n * @export\n */\nexport type BlobUploadCommonResponse = BlockBlobUploadHeaders & {\n /**\n * The underlying HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobUploadCommonResponse\n */\n _response: HttpResponse;\n};\n\n/**\n * BlockBlobClient defines a set of operations applicable to block blobs.\n *\n * @export\n * @class BlockBlobClient\n * @extends {BlobClient}\n */\nexport class BlockBlobClient extends BlobClient {\n /**\n * blobContext provided by protocol layer.\n *\n * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API\n * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient.\n *\n * @private\n * @type {Blobs}\n * @memberof BlobClient\n */\n private _blobContext: StorageBlob;\n\n /**\n * blockBlobContext provided by protocol layer.\n *\n * @private\n * @type {BlockBlobs}\n * @memberof BlockBlobClient\n */\n private blockBlobContext: BlockBlob;\n\n /**\n *\n * Creates an instance of BlockBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlockBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlockBlobClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlockBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.blockBlobContext = new BlockBlob(this.storageClientContext);\n this._blobContext = new StorageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new BlockBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a URL to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof BlockBlobClient\n */\n public withSnapshot(snapshot: string): BlockBlobClient {\n return new BlockBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Quick query for a JSON or CSV formatted blob.\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Query and convert a blob to a string\n * const queryBlockBlobResponse = await blockBlobClient.query(\"select * from BlobStorage\");\n * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();\n * console.log(\"Query blob content:\", downloaded);\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * @param {string} query\n * @param {BlockBlobQueryOptions} [options={}]\n * @returns {Promise}\n * @memberof BlockBlobClient\n */\n public async query(\n query: string,\n options: BlockBlobQueryOptions = {}\n ): Promise {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, spanOptions } = createSpan(\"BlockBlobClient-query\", options.tracingOptions);\n\n try {\n if (!isNode) {\n throw new Error(\"This operation currently is only supported in Node.js.\");\n }\n\n const response = await this._blobContext.query({\n abortSignal: options.abortSignal,\n queryRequest: {\n expression: query,\n inputSerialization: toQuerySerialization(options.inputTextConfiguration),\n outputSerialization: toQuerySerialization(options.outputTextConfiguration)\n },\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n return new BlobQueryResponse(response, {\n abortSignal: options.abortSignal,\n onProgress: options.onProgress,\n onError: options.onError\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link stageBlock} and {@link commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link uploadFile},\n * {@link uploadStream} or {@link uploadBrowserData} for better performance\n * with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation.\n * @returns {Promise} Response data for the Block Blob Upload operation.\n * @memberof BlockBlobClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n public async upload(\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobUploadOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"BlockBlobClient-upload\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.upload(body, contentLength, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Uploads the specified block to the block blob's \"staging area\" to be later\n * committed by a call to commitBlockList.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block\n *\n * @param {string} blockId A 64-byte value that is base64-encoded\n * @param {HttpRequestBody} body Data to upload to the staging area.\n * @param {number} contentLength Number of bytes to upload.\n * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation.\n * @returns {Promise} Response data for the Block Blob Stage Block operation.\n * @memberof BlockBlobClient\n */\n public async stageBlock(\n blockId: string,\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobStageBlockOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-stageBlock\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlock(blockId, contentLength, body, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n onUploadProgress: options.onProgress,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Stage Block From URL operation creates a new block to be committed as part\n * of a blob where the contents are read from a URL.\n * This API is available starting in version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url\n *\n * @param {string} blockId A 64-byte value that is base64-encoded\n * @param {string} sourceURL Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param {number} [offset] From which position of the blob to download, >= 0\n * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined\n * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation.\n * @returns {Promise} Response data for the Block Blob Stage Block From URL operation.\n * @memberof BlockBlobClient\n */\n public async stageBlockFromURL(\n blockId: string,\n sourceURL: string,\n offset: number = 0,\n count?: number,\n options: BlockBlobStageBlockFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-stageBlockFromURL\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes a blob by specifying the list of block IDs that make up the blob.\n * In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to\n * update a blob by uploading only those blocks that have changed, then committing the new and existing\n * blocks together. Any blocks not specified in the block list and permanently deleted.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list\n *\n * @param {string[]} blocks Array of 64-byte value that is base64-encoded\n * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation.\n * @returns {Promise} Response data for the Block Blob Commit Block List operation.\n * @memberof BlockBlobClient\n */\n public async commitBlockList(\n blocks: string[],\n options: BlockBlobCommitBlockListOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-commitBlockList\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.commitBlockList(\n { latest: blocks },\n {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of blocks that have been uploaded as part of a block blob\n * using the specified block list filter.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list\n *\n * @param {BlockListType} listType Specifies whether to return the list of committed blocks,\n * the list of uncommitted blocks, or both lists together.\n * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation.\n * @returns {Promise} Response data for the Block Blob Get Block List operation.\n * @memberof BlockBlobClient\n */\n public async getBlockList(\n listType: BlockListType,\n options: BlockBlobGetBlockListOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-getBlockList\",\n options.tracingOptions\n );\n try {\n const res = await this.blockBlobContext.getBlockList(listType, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n\n if (!res.committedBlocks) {\n res.committedBlocks = [];\n }\n\n if (!res.uncommittedBlocks) {\n res.uncommittedBlocks = [];\n }\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level functions\n\n /**\n * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @export\n * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView\n * @param {BlockBlobParallelUploadOptions} [options]\n * @returns {Promise}\n * @memberof BlockBlobClient\n */\n public async uploadData(\n data: Buffer | Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-uploadData\", options.tracingOptions);\n try {\n if (isNode) {\n let buffer: Buffer;\n if (data instanceof Buffer) {\n buffer = data;\n } else if (data instanceof ArrayBuffer) {\n buffer = Buffer.from(data);\n } else {\n data = data as ArrayBufferView;\n buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n\n return this.uploadSeekableInternal(\n (offset: number, size: number): Buffer => buffer.slice(offset, offset + size),\n buffer.byteLength,\n {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n }\n );\n } else {\n const browserBlob = new Blob([data]);\n return this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n }\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN BROWSERS.\n *\n * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.\n *\n * When buffer length <= 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call\n * {@link commitBlockList} to commit the block list.\n *\n * @deprecated Use {@link uploadData} instead.\n *\n * @export\n * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView\n * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadBrowserData(\n browserData: Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadBrowserData\",\n options.tracingOptions\n );\n try {\n const browserBlob = new Blob([browserData]);\n return await this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n *\n * Uploads data to block blob. Requires a bodyFactory as the data source,\n * which need to return a {@link HttpRequestBody} object with the offset and size provided.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory\n * @param {number} size size of the data to upload.\n * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n private async uploadSeekableInternal(\n bodyFactory: (offset: number, size: number) => HttpRequestBody,\n size: number,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {\n throw new RangeError(\n `blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`\n );\n }\n\n if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) {\n options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;\n }\n if (\n options.maxSingleShotSize < 0 ||\n options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES\n ) {\n throw new RangeError(\n `maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`\n );\n }\n\n if (options.blockSize === 0) {\n if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`${size} is too larger to upload to a block blob.`);\n }\n if (size > options.maxSingleShotSize) {\n options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);\n if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n }\n }\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadSeekableInternal\",\n options.tracingOptions\n );\n\n try {\n if (size <= options.maxSingleShotSize) {\n return await this.upload(bodyFactory(0, size), size, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n }\n\n const numBlocks: number = Math.floor((size - 1) / options.blockSize) + 1;\n if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(\n `The buffer's size is too big or the BlockSize is too small;` +\n `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`\n );\n }\n\n const blockList: string[] = [];\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n\n const batch = new Batch(options.concurrency);\n for (let i = 0; i < numBlocks; i++) {\n batch.addOperation(\n async (): Promise => {\n const blockID = generateBlockID(blockIDPrefix, i);\n const start = options.blockSize! * i;\n const end = i === numBlocks - 1 ? size : start + options.blockSize!;\n const contentLength = end - start;\n blockList.push(blockID);\n await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n // TODO: Hook with convenience layer progress event in finer level\n transferProgress += contentLength;\n if (options.onProgress) {\n options.onProgress!({\n loadedBytes: transferProgress\n });\n }\n }\n );\n }\n await batch.do();\n\n return this.commitBlockList(blockList, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a local file in blocks to a block blob.\n *\n * When file size <= 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList\n * to commit the block list.\n *\n * @param {string} filePath Full path of local file\n * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation.\n * @returns {(Promise)} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadFile(\n filePath: string,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-uploadFile\", options.tracingOptions);\n try {\n const size = (await fsStat(filePath)).size;\n return await this.uploadSeekableInternal(\n (offset, count) => {\n return () =>\n fsCreateReadStream(filePath, {\n autoClose: true,\n end: count ? offset + count - 1 : Infinity,\n start: offset\n });\n },\n size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a Node.js Readable stream into block blob.\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * * Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n *\n * @param {Readable} stream Node.js Readable stream\n * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB\n * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated,\n * positive correlation with max uploading concurrency. Default value is 5\n * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadStream(\n stream: Readable,\n bufferSize: number = DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n maxConcurrency: number = 5,\n options: BlockBlobUploadStreamOptions = {}\n ): Promise {\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadStream\",\n options.tracingOptions\n );\n\n try {\n let blockNum = 0;\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n const blockList: string[] = [];\n\n const scheduler = new BufferScheduler(\n stream,\n bufferSize,\n maxConcurrency,\n async (body, length) => {\n const blockID = generateBlockID(blockIDPrefix, blockNum);\n blockList.push(blockID);\n blockNum++;\n\n await this.stageBlock(blockID, body, length, {\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n\n // Update progress after block is successfully uploaded to server, in case of block trying\n transferProgress += length;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n },\n // concurrency should set a smaller value than maxConcurrency, which is helpful to\n // reduce the possibility when a outgoing handler waits for stream data, in\n // this situation, outgoing handlers are blocked.\n // Outgoing queue shouldn't be empty.\n Math.ceil((maxConcurrency / 4) * 3)\n );\n await scheduler.do();\n\n return await this.commitBlockList(blockList, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure the {@link PageBlobClient.create} operation.\n *\n * @export\n * @interface PageBlobCreateOptions\n */\nexport interface PageBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobCreateOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when creating a page blob.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobCreateOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n *\n * @type {number}\n * @memberof PageBlobCreateOptions\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof PageBlobCreateOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof PageBlobCreateOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobCreateOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobCreateOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {PremiumPageBlobTier | string}\n * @memberof PageBlobCreateOptions\n */\n tier?: PremiumPageBlobTier | string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof PageBlobCreateOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface PageBlobCreateIfNotExistsOptions\n */\nexport interface PageBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n *\n * @type {number}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {PremiumPageBlobTier | string}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n tier?: PremiumPageBlobTier | string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.uploadPages} operation.\n *\n * @export\n * @interface PageBlobUploadPagesOptions\n */\nexport interface PageBlobUploadPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUploadPagesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading pages.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobUploadPagesOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Callback to receive events on the progress of upload pages operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof PageBlobUploadPagesOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesOptions\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobUploadPagesOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobUploadPagesOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.clearPages} operation.\n *\n * @export\n * @interface PageBlobClearPagesOptions\n */\nexport interface PageBlobClearPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobClearPagesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when clearing pages.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobClearPagesOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobClearPagesOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobClearPagesOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getPageRanges} operation.\n *\n * @export\n * @interface PageBlobGetPageRangesOptions\n */\nexport interface PageBlobGetPageRangesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobGetPageRangesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobGetPageRangesOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getRangesDiff} operation.\n *\n * @export\n * @interface PageBlobGetPageRangesDiffOptions\n */\nexport interface PageBlobGetPageRangesDiffOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges diff.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * (unused)\n *\n * @type {string}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n range?: string;\n}\n\n/**\n * Options to configure {@link PageBlobClient.resize} operation.\n *\n * @export\n * @interface PageBlobResizeOptions\n */\nexport interface PageBlobResizeOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobResizeOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when resizing a page blob.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobResizeOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobResizeOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link PageBlobClient.updateSequenceNumber} operation.\n *\n * @export\n * @interface PageBlobUpdateSequenceNumberOptions\n */\nexport interface PageBlobUpdateSequenceNumberOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUpdateSequenceNumberOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobUpdateSequenceNumberOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.startCopyIncremental} operation.\n *\n * @export\n * @interface PageBlobStartCopyIncrementalOptions\n */\nexport interface PageBlobStartCopyIncrementalOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobStartCopyIncrementalOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when starting a copy incremental operation.\n *\n * @type {ModifiedAccessConditions}\n * @memberof PageBlobStartCopyIncrementalOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation.\n *\n * @export\n * @interface PageBlobUploadPagesFromURLOptions\n */\nexport interface PageBlobUploadPagesFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Contains response data for the {@link PageBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface PageBlobCreateIfNotExistsResponse\n */\nexport interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof PageBlobCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * PageBlobClient defines a set of operations applicable to page blobs.\n *\n * @export\n * @class PageBlobClient\n * @extends {BlobClient}\n */\nexport class PageBlobClient extends BlobClient {\n /**\n * pageBlobsContext provided by protocol layer.\n *\n * @private\n * @type {PageBlobs}\n * @memberof PageBlobClient\n */\n private pageBlobContext: PageBlob;\n\n /**\n *\n * Creates an instance of PageBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof PageBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof PageBlobClient\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n *\n * @param {string} url A URL string pointing to Azure Storage blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof PageBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.pageBlobContext = new PageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new PageBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof PageBlobClient\n */\n public withSnapshot(snapshot: string): PageBlobClient {\n return new PageBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {number} size size of the page blob.\n * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation.\n * @returns {Promise} Response data for the Page Blob Create operation.\n * @memberof PageBlobClient\n */\n public async create(\n size: number,\n options: PageBlobCreateOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-create\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.create(0, size, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n blobSequenceNumber: options.blobSequenceNumber,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob. If the blob with the same name already exists, the content\n * of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {number} size size of the page blob.\n * @param {PageBlobCreateIfNotExistsOptions} [options]\n * @returns {Promise}\n * @memberof PageBlobClient\n */\n public async createIfNotExists(\n size: number,\n options: PageBlobCreateIfNotExistsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-createIfNotExists\",\n options.tracingOptions\n );\n try {\n const conditions = { ifNoneMatch: ETagAny };\n const res = await this.create(size, {\n ...options,\n conditions,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a blob only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param {HttpRequestBody} body Data to upload\n * @param {number} offset Offset of destination page blob\n * @param {number} count Content length of the body, also number of bytes to be uploaded\n * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation.\n * @returns {Promise} Response data for the Page Blob Upload Pages operation.\n * @memberof PageBlobClient\n */\n public async uploadPages(\n body: HttpRequestBody,\n offset: number,\n count: number,\n options: PageBlobUploadPagesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-uploadPages\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPages(body, count, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the\n * contents are read from a URL.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url\n *\n * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication\n * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob\n * @param {number} destOffset Offset of destination page blob\n * @param {number} count Number of bytes to be uploaded from source page blob\n * @param {PageBlobUploadPagesFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof PageBlobClient\n */\n public async uploadPagesFromURL(\n sourceURL: string,\n sourceOffset: number,\n destOffset: number,\n count: number,\n options: PageBlobUploadPagesFromURLOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-uploadPagesFromURL\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPagesFromURL(\n sourceURL,\n rangeToString({ offset: sourceOffset, count }),\n 0,\n rangeToString({ offset: destOffset, count }),\n {\n abortSignal: options.abortSignal,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n sequenceNumberAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Frees the specified pages from the page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param {number} [offset] Starting byte position of the pages to clear.\n * @param {number} [count] Number of bytes to clear.\n * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation.\n * @returns {Promise} Response data for the Page Blob Clear Pages operation.\n * @memberof PageBlobClient\n */\n public async clearPages(\n offset: number = 0,\n count?: number,\n options: PageBlobClearPagesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-clearPages\", options.tracingOptions);\n try {\n return await this.pageBlobContext.clearPages(0, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of valid page ranges for a page blob or snapshot of a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} [offset] Starting byte position of the page ranges.\n * @param {number} [count] Number of bytes to get.\n * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation.\n * @returns {Promise} Response data for the Page Blob Get Ranges operation.\n * @memberof PageBlobClient\n */\n public async getPageRanges(\n offset: number = 0,\n count?: number,\n options: PageBlobGetPageRangesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-getPageRanges\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext\n .getPageRanges({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} offset Starting byte position of the page blob\n * @param {number} count Number of bytes to get ranges diff.\n * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference.\n * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation.\n * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation.\n * @memberof PageBlobClient\n */\n public async getPageRangesDiff(\n offset: number,\n count: number,\n prevSnapshot: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-getPageRangesDiff\",\n options.tracingOptions\n );\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n prevsnapshot: prevSnapshot,\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} offset Starting byte position of the page blob\n * @param {number} count Number of bytes to get ranges diff.\n * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference.\n * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation.\n * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation.\n * @memberof PageBlobClient\n */\n public async getPageRangesDiffForManagedDisks(\n offset: number,\n count: number,\n prevSnapshotUrl: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-GetPageRangesDiffForManagedDisks\",\n options.tracingOptions\n );\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n prevSnapshotUrl,\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resizes the page blob to the specified size (which must be a multiple of 512).\n * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties\n *\n * @param {number} size Target size\n * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation.\n * @returns {Promise} Response data for the Page Blob Resize operation.\n * @memberof PageBlobClient\n */\n public async resize(\n size: number,\n options: PageBlobResizeOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-resize\", options.tracingOptions);\n try {\n return await this.pageBlobContext.resize(size, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets a page blob's sequence number.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number.\n * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update\n * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation.\n * @returns {Promise} Response data for the Page Blob Update Sequence Number operation.\n * @memberof PageBlobClient\n */\n public async updateSequenceNumber(\n sequenceNumberAction: SequenceNumberActionType,\n sequenceNumber?: number,\n options: PageBlobUpdateSequenceNumberOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-updateSequenceNumber\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {\n abortSignal: options.abortSignal,\n blobSequenceNumber: sequenceNumber,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.\n * The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination.\n * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.\n * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob\n * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots\n *\n * @param {string} copySource Specifies the name of the source page blob snapshot. For example,\n * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation.\n * @returns {Promise} Response data for the Page Blob Copy Incremental operation.\n * @memberof PageBlobClient\n */\n public async startCopyIncremental(\n copySource: string,\n options: PageBlobStartCopyIncrementalOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-startCopyIncremental\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext.copyIncremental(copySource, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * The details for a specific lease.\n */\nexport interface Lease {\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally. If the request version is 2011-08-18 or\n * newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was\n * last modified. Any operation that modifies the blob, including an update\n * of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * Approximate time remaining in the lease\n * period, in seconds.\n */\n leaseTime?: number;\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used\n * to execute the request. This header is returned for requests made against\n * version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that\n * indicates the time at which the response was initiated\n */\n date?: Date;\n /**\n * Error code if any associated with the response that returned\n * the Lease information.\n */\n errorCode?: string;\n}\n\n/**\n * Contains the response data for operations that create, modify, or delete a lease.\n *\n * See {@link BlobLeaseClient}.\n */\nexport type LeaseOperationResponse = Lease & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Lease;\n };\n};\n\n/**\n * Configures lease operations.\n *\n * @export\n * @interface LeaseOperationOptions\n */\nexport interface LeaseOperationOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof LeaseOperationOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof LeaseOperationOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n *\n * @export\n * @class BlobLeaseClient\n */\nexport class BlobLeaseClient {\n private _leaseId: string;\n private _url: string;\n private _containerOrBlobOperation: Container | StorageBlob;\n private _isContainer: boolean;\n\n /**\n * Gets the lease Id.\n *\n * @readonly\n * @memberof BlobLeaseClient\n * @type {string}\n */\n public get leaseId(): string {\n return this._leaseId;\n }\n\n /**\n * Gets the url.\n *\n * @readonly\n * @memberof BlobLeaseClient\n * @type {string}\n */\n public get url(): string {\n return this._url;\n }\n\n /**\n * Creates an instance of BlobLeaseClient.\n * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests.\n * @param {string} leaseId Initial proposed lease id.\n * @memberof BlobLeaseClient\n */\n constructor(client: ContainerClient | BlobClient, leaseId?: string) {\n const clientContext = new StorageClientContext(\n client.url,\n (client as any).pipeline.toServiceClientOptions()\n );\n this._url = client.url;\n\n if (client instanceof ContainerClient) {\n this._isContainer = true;\n this._containerOrBlobOperation = new Container(clientContext);\n } else {\n this._isContainer = false;\n this._containerOrBlobOperation = new StorageBlob(clientContext);\n }\n\n if (!leaseId) {\n leaseId = generateUuid();\n }\n this._leaseId = leaseId;\n }\n\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1)\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for acquire lease operation.\n * @memberof BlobLeaseClient\n */\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobLeaseClient-acquireLease\",\n options.tracingOptions\n );\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.acquireLease({\n abortSignal: options.abortSignal,\n duration,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n proposedLeaseId: this._leaseId,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To change the ID of the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {string} proposedLeaseId the proposed new lease Id.\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for change lease operation.\n * @memberof BlobLeaseClient\n */\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-changeLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n const response = await this._containerOrBlobOperation.changeLease(\n this._leaseId,\n proposedLeaseId,\n {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n }\n );\n this._leaseId = proposedLeaseId;\n return response;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for release lease operation.\n * @memberof BlobLeaseClient\n */\n public async releaseLease(options: LeaseOperationOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobLeaseClient-releaseLease\",\n options.tracingOptions\n );\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.releaseLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To renew the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations.\n * @returns {Promise} Response data for renew lease operation.\n * @memberof BlobLeaseClient\n */\n public async renewLease(options: LeaseOperationOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-renewLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.renewLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @static\n * @param {number} breakPeriod Break period\n * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations.\n * @returns {Promise} Response data for break lease operation.\n * @memberof BlobLeaseClient\n */\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-breakLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n const operationOptions: ContainerBreakLeaseOptionalParams = {\n abortSignal: options.abortSignal,\n breakPeriod,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n };\n return await this._containerOrBlobOperation.breakLease(operationOptions);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link ContainerClient.create} operation.\n *\n * @export\n * @interface ContainerCreateOptions\n */\nexport interface ContainerCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerCreateOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the container.\n *\n * @type {Metadata}\n * @memberof ContainerCreateOptions\n */\n metadata?: Metadata;\n /**\n * Specifies whether data in the container may be accessed publicly and the level of access. Possible values include:\n * - `container`: Specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account.\n * - `blob`: Specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request.\n *\n * @type {PublicAccessType}\n * @memberof ContainerCreateOptions\n */\n access?: PublicAccessType;\n /**\n * Container encryption scope info.\n *\n * @type {ContainerEncryptionScope}\n * @memberof ContainerCreateOptions\n */\n containerEncryptionScope?: ContainerEncryptionScope;\n}\n\n/**\n * Options to configure {@link ContainerClient.getProperties} operation.\n *\n * @export\n * @interface ContainerGetPropertiesOptions\n */\nexport interface ContainerGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof ContainerGetPropertiesOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.delete} operation.\n *\n * @export\n * @interface ContainerDeleteMethodOptions\n */\nexport interface ContainerDeleteMethodOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerDeleteMethodOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when deleting the container.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerDeleteMethodOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.exists} operation.\n *\n * @export\n * @interface ContainerExistsOptions\n */\nexport interface ContainerExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerDeleteMethodOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link ContainerClient.setMetadata} operation.\n *\n * @export\n * @interface ContainerSetMetadataOptions\n */\nexport interface ContainerSetMetadataOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerSetMetadataOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerSetMetadataOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.getAccessPolicy} operation.\n *\n * @export\n * @interface ContainerGetAccessPolicyOptions\n */\nexport interface ContainerGetAccessPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerGetAccessPolicyOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof ContainerGetAccessPolicyOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Signed identifier.\n *\n * @export\n * @interface SignedIdentifier\n */\nexport interface SignedIdentifier {\n /**\n * @member {string} id a unique id\n */\n id: string;\n /**\n * @member {AccessPolicy} accessPolicy\n */\n accessPolicy: {\n /**\n * @member {Date} startsOn Optional. The date-time the policy is active\n */\n startsOn?: Date;\n /**\n * @member {Date} expiresOn Optional. The date-time the policy expires\n */\n expiresOn?: Date;\n /**\n * @member {string} permissions The permissions for the acl policy\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n */\n permissions?: string;\n };\n}\n\n/**\n * Contains response data for the {@link ContainerClient.getAccessPolicy} operation.\n */\nexport declare type ContainerGetAccessPolicyResponse = {\n signedIdentifiers: SignedIdentifier[];\n} & ContainerGetAccessPolicyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerGetAccessPolicyHeaders;\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: SignedIdentifierModel[];\n };\n };\n\n/**\n * Options to configure {@link ContainerClient.setAccessPolicy} operation.\n *\n * @export\n * @interface ContainerSetAccessPolicyOptions\n */\nexport interface ContainerSetAccessPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerSetAccessPolicyOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting the access policy.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerSetAccessPolicyOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure Container - Acquire Lease operation.\n *\n * @export\n * @interface ContainerAcquireLeaseOptions\n */\nexport interface ContainerAcquireLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerAcquireLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when acquiring the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerAcquireLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Release Lease operation.\n *\n * @export\n * @interface ContainerReleaseLeaseOptions\n */\nexport interface ContainerReleaseLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerReleaseLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when releasing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerReleaseLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Renew Lease operation.\n *\n * @export\n * @interface ContainerRenewLeaseOptions\n */\nexport interface ContainerRenewLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerRenewLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when renewing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerRenewLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Break Lease operation.\n *\n * @export\n * @interface ContainerBreakLeaseOptions\n */\nexport interface ContainerBreakLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerBreakLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when breaking the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerBreakLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Change Lease operation.\n *\n * @export\n * @interface ContainerChangeLeaseOptions\n */\nexport interface ContainerChangeLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerChangeLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerChangeLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure the {@link ContainerClient.deleteBlob} operation.\n *\n * @export\n * @interface ContainerDeleteBlobOptions\n */\nexport interface ContainerDeleteBlobOptions extends BlobDeleteOptions {\n /**\n * An opaque DateTime value that, when present, specifies the version\n * of the blob to delete. It's for service version 2019-10-10 and newer.\n *\n * @type {string}\n * @memberof ContainerDeleteBlobOptions\n */\n versionId?: string;\n}\n\n/**\n * Options to configure Container - List Segment operations.\n *\n * See:\n * - {@link ContainerClient.listSegments}\n * - {@link ContainerClient.listBlobFlatSegment}\n * - {@link ContainerClient.listBlobHierarchySegment}\n * - {@link ContainerClient.listHierarchySegments}\n * - {@link ContainerClient.listItemsByHierarchy}\n *\n * @interface ContainerListBlobsSegmentOptions\n */\ninterface ContainerListBlobsSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerListBlobsSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListBlobsIncludeItem[];\n}\n\n/**\n * An interface representing BlobHierarchyListSegment.\n */\nexport interface BlobHierarchyListSegment {\n blobPrefixes?: BlobPrefix[];\n blobItems: BlobItem[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsHierarchySegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n delimiter?: string;\n segment: BlobHierarchyListSegment;\n continuationToken?: string;\n}\n\n/**\n * Contains response data for the listBlobHierarchySegment operation.\n */\nexport type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse &\n ContainerListBlobHierarchySegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobHierarchySegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsHierarchySegmentResponseModel;\n };\n };\n\n/**\n * An Azure Storage blob\n */\nexport interface BlobItem {\n name: string;\n deleted: boolean;\n snapshot: string;\n versionId?: string;\n isCurrentVersion?: boolean;\n properties: BlobProperties;\n metadata?: { [propertyName: string]: string };\n tags?: Tags;\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n}\n\n/**\n * An interface representing BlobFlatListSegment.\n */\nexport interface BlobFlatListSegment {\n blobItems: BlobItem[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsFlatSegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n segment: BlobFlatListSegment;\n continuationToken?: string;\n}\n\n/**\n * Contains response data for the listBlobFlatSegment operation.\n */\nexport type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse &\n ContainerListBlobFlatSegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobFlatSegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsFlatSegmentResponseModel;\n };\n };\n\n/**\n * Options to configure Container - List Blobs operations.\n *\n * See:\n * - {@link ContainerClient.listBlobsFlat}\n * - {@link ContainerClient.listBlobsByHierarchy}\n *\n * @export\n * @interface ContainerListBlobsOptions\n */\nexport interface ContainerListBlobsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerListBlobsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies whether metadata related to any current or previous Copy Blob operation should be included in the response.\n */\n includeCopy?: boolean;\n /**\n * Specifies whether soft deleted blobs should be included in the response.\n */\n includeDeleted?: boolean;\n /**\n * Specifies whether blob metadata be returned in the response.\n */\n includeMetadata?: boolean;\n /**\n * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response.\n */\n includeSnapshots?: boolean;\n /**\n * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response.\n */\n includeVersions?: boolean;\n /**\n * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response.\n */\n includeUncommitedBlobs?: boolean;\n /**\n * Specifies whether blob tags be returned in the response.\n */\n includeTags?: boolean;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.createIfNotExists} operation.\n *\n * @export\n * @interface ContainerCreateIfNotExistsResponse\n */\nexport interface ContainerCreateIfNotExistsResponse extends ContainerCreateResponse {\n /**\n * Indicate whether the container is successfully created. Is false when the container is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof ContainerCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.deleteIfExists} operation.\n *\n * @export\n * @interface ContainerDeleteIfExistsResponse\n */\nexport interface ContainerDeleteIfExistsResponse extends ContainerDeleteResponse {\n /**\n * Indicate whether the container is successfully deleted. Is false if the container does not exist in the first place.\n *\n * @type {boolean}\n * @memberof ContainerDeleteIfExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.\n *\n * @export\n * @class ContainerClient\n */\nexport class ContainerClient extends StorageClient {\n /**\n * containerContext provided by protocol layer.\n *\n * @private\n * @type {Containers}\n * @memberof ContainerClient\n */\n private containerContext: Container;\n\n private _containerName: string;\n\n /**\n * The name of the container.\n */\n public get containerName(): string {\n return this._containerName;\n }\n /**\n *\n * Creates an instance of ContainerClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof ContainerClient\n */\n constructor(connectionString: string, containerName: string, options?: StoragePipelineOptions);\n /**\n * Creates an instance of ContainerClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a page blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof ContainerClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of ContainerClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a page blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof ContainerClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName parameter\");\n }\n super(url, pipeline);\n this._containerName = this.getContainerNameFromUrl();\n this.containerContext = new Container(this.storageClientContext);\n }\n\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, the operation fails.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param {ContainerCreateOptions} [options] Options to Container Create operation.\n * @returns {Promise}\n * @memberof ContainerClient\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * const createContainerResponse = await containerClient.create();\n * console.log(\"Container was created successfully\", createContainerResponse.requestId);\n * ```\n */\n public async create(options: ContainerCreateOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-create\", options.tracingOptions);\n try {\n // Spread operator in destructuring assignments,\n // this will filter out unwanted properties from the response object into result object\n return await this.containerContext.create({\n ...options,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, it is not changed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param {ContainerCreateOptions} [options]\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async createIfNotExists(\n options: ContainerCreateOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-createIfNotExists\",\n options.tracingOptions\n );\n try {\n const res = await this.create({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"ContainerAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a container only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the Azure container resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing container might be deleted by other clients or\n * applications. Vice versa new containers with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param {ContainerExistsOptions} [options={}]\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async exists(options: ContainerExistsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-exists\", options.tracingOptions);\n try {\n await this.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return true;\n } catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when checking container existence\"\n });\n return false;\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a {@link BlobClient}\n *\n * @param {string} blobName A blob name\n * @returns {BlobClient} A new BlobClient object for the given blob name.\n * @memberof ContainerClient\n */\n public getBlobClient(blobName: string): BlobClient {\n return new BlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline);\n }\n\n /**\n * Creates an {@link AppendBlobClient}\n *\n * @param {string} blobName An append blob name\n * @returns {AppendBlobClient}\n * @memberof ContainerClient\n */\n public getAppendBlobClient(blobName: string): AppendBlobClient {\n return new AppendBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Creates a {@link BlockBlobClient}\n *\n * @param {string} blobName A block blob name\n * @returns {BlockBlobClient}\n * @memberof ContainerClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n *\n * const blockBlobClient = containerClient.getBlockBlobClient(\"\");\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n public getBlockBlobClient(blobName: string): BlockBlobClient {\n return new BlockBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Creates a {@link PageBlobClient}\n *\n * @param {string} blobName A page blob name\n * @returns {PageBlobClient}\n * @memberof ContainerClient\n */\n public getPageBlobClient(blobName: string): PageBlobClient {\n return new PageBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * container. The data returned does not include the container's list of blobs.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async getProperties(\n options: ContainerGetPropertiesOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"ContainerClient-getProperties\",\n options.tracingOptions\n );\n try {\n return await this.containerContext.getProperties({\n abortSignal: options.abortSignal,\n ...options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified container for deletion. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async delete(\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\"ContainerClient-delete\", options.tracingOptions);\n try {\n return await this.containerContext.deleteMethod({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified container for deletion if it exists. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async deleteIfExists(\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-deleteIfExists\",\n options.tracingOptions\n );\n\n try {\n const res = await this.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"ContainerNotFound\") {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when deleting a container only if it exists.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified container.\n *\n * If no option provided, or no metadata defined in the parameter, the container\n * metadata will be removed.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata\n *\n * @param {Metadata} [metadata] Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async setMetadata(\n metadata?: Metadata,\n options: ContainerSetMetadataOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n if (options.conditions.ifUnmodifiedSince) {\n throw new RangeError(\n \"the IfUnmodifiedSince must have their default values because they are ignored by the blob service\"\n );\n }\n\n const { span, spanOptions } = createSpan(\"ContainerClient-setMetadata\", options.tracingOptions);\n\n try {\n return await this.containerContext.setMetadata({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the permissions for the specified container. The permissions indicate\n * whether container data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl\n *\n * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async getAccessPolicy(\n options: ContainerGetAccessPolicyOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"ContainerClient-getAccessPolicy\",\n options.tracingOptions\n );\n\n try {\n const response = await this.containerContext.getAccessPolicy({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n spanOptions\n });\n\n const res: ContainerGetAccessPolicyResponse = {\n _response: response._response,\n blobPublicAccess: response.blobPublicAccess,\n date: response.date,\n etag: response.etag,\n errorCode: response.errorCode,\n lastModified: response.lastModified,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n signedIdentifiers: [],\n version: response.version\n };\n\n for (const identifier of response) {\n let accessPolicy: any = undefined;\n if (identifier.accessPolicy) {\n accessPolicy = {\n permissions: identifier.accessPolicy.permissions\n };\n\n if (identifier.accessPolicy.expiresOn) {\n accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);\n }\n\n if (identifier.accessPolicy.startsOn) {\n accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);\n }\n }\n\n res.signedIdentifiers.push({\n accessPolicy,\n id: identifier.id\n });\n }\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets the permissions for the specified container. The permissions indicate\n * whether blobs in a container may be accessed publicly.\n *\n * When you set permissions for a container, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing container ACL will be\n * removed.\n *\n * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.\n * During this interval, a shared access signature that is associated with the stored access policy will\n * fail with status code 403 (Forbidden), until the access policy becomes active.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n *\n * @param {PublicAccessType} [access] The level of public access to data in the container.\n * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy.\n * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n containerAcl?: SignedIdentifier[],\n options: ContainerSetAccessPolicyOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"ContainerClient-setAccessPolicy\",\n options.tracingOptions\n );\n try {\n const acl: SignedIdentifierModel[] = [];\n for (const identifier of containerAcl || []) {\n acl.push({\n accessPolicy: {\n expiresOn: identifier.accessPolicy.expiresOn\n ? truncatedISO8061Date(identifier.accessPolicy.expiresOn)\n : \"\",\n permissions: identifier.accessPolicy.permissions,\n startsOn: identifier.accessPolicy.startsOn\n ? truncatedISO8061Date(identifier.accessPolicy.startsOn)\n : \"\"\n },\n id: identifier.id\n });\n }\n\n return await this.containerContext.setAccessPolicy({\n abortSignal: options.abortSignal,\n access,\n containerAcl: acl,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the container.\n *\n * @param {string} [proposeLeaseId] Initial proposed lease Id.\n * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container.\n * @memberof ContainerClient\n */\n public getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n *\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},\n * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better\n * performance with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {string} blobName Name of the block blob to create or update.\n * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation.\n * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance.\n * @memberof ContainerClient\n */\n public async uploadBlockBlob(\n blobName: string,\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobUploadOptions = {}\n ): Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }> {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-uploadBlockBlob\",\n options.tracingOptions\n );\n try {\n const blockBlobClient = this.getBlockBlobClient(blobName);\n const response = await blockBlobClient.upload(body, contentLength, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n blockBlobClient,\n response\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {string} blobName\n * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation.\n * @returns {Promise} Block blob deletion response data.\n * @memberof ContainerClient\n */\n public async deleteBlob(\n blobName: string,\n options: ContainerDeleteBlobOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-deleteBlob\", options.tracingOptions);\n try {\n let blobClient = this.getBlobClient(blobName);\n if (options.versionId) {\n blobClient = blobClient.withVersion(options.versionId);\n }\n return await blobClient.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * listBlobFlatSegment returns a single segment of blobs starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call listBlobsFlatSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n private async listBlobFlatSegment(\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-listBlobFlatSegment\",\n options.tracingOptions\n );\n try {\n const response = await this.containerContext.listBlobFlatSegment({\n marker,\n ...options,\n spanOptions\n });\n const wrappedResponse: ContainerListBlobFlatSegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n segment: {\n ...response.segment,\n blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem: BlobItem = {\n ...blobItemInteral,\n tags: toTags(blobItemInteral.blobTags),\n objectReplicationSourceProperties: parseObjectReplicationRecord(\n blobItemInteral.objectReplicationMetadata\n )\n };\n return blobItem;\n })\n }\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * listBlobHierarchySegment returns a single segment of blobs starting from\n * the specified Marker. Use an empty Marker to start enumeration from the\n * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment\n * again (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n private async listBlobHierarchySegment(\n delimiter: string,\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-listBlobHierarchySegment\",\n options.tracingOptions\n );\n try {\n const response = await this.containerContext.listBlobHierarchySegment(delimiter, {\n marker,\n ...options,\n spanOptions\n });\n const wrappedResponse: ContainerListBlobHierarchySegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n segment: {\n ...response.segment,\n blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem: BlobItem = {\n ...blobItemInteral,\n tags: toTags(blobItemInteral.blobTags),\n objectReplicationSourceProperties: parseObjectReplicationRecord(\n blobItemInteral.objectReplicationMetadata\n )\n };\n return blobItem;\n })\n }\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse\n *\n * @private\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listSegments(\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options);\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield await listBlobsFlatSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator of {@link BlobItem} objects\n *\n * @private\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listItems(\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) {\n yield* listBlobsFlatSegmentResponse.segment.blobItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the blobs\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the containerClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\");`\n * let i = 1;\n * for await (const blob of containerClient.listBlobsFlat()) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = containerClient.listBlobsFlat();\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * @param {ContainerListBlobsOptions} [options={}] Options to list blobs.\n * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging.\n * @memberof ContainerClient\n */\n public listBlobsFlat(\n options: ContainerListBlobsOptions = {}\n ): PagedAsyncIterableIterator {\n const include: ListBlobsIncludeItem[] = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ContainerListBlobsSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {})\n };\n\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions\n });\n }\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse\n *\n * @private\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listHierarchySegments(\n delimiter: string,\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let listBlobsHierarchySegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(\n delimiter,\n marker,\n options\n );\n marker = listBlobsHierarchySegmentResponse.continuationToken;\n yield await listBlobsHierarchySegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.\n *\n * @private\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator<{ kind: \"prefix\" } & BlobPrefix | { kind: \"blob\" } & BlobItem>}\n * @memberof ContainerClient\n */\n private async *listItemsByHierarchy(\n delimiter: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator<({ kind: \"prefix\" } & BlobPrefix) | ({ kind: \"blob\" } & BlobItem)> {\n let marker: string | undefined;\n for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(\n delimiter,\n marker,\n options\n )) {\n const segment = listBlobsHierarchySegmentResponse.segment;\n if (segment.blobPrefixes) {\n for (const prefix of segment.blobPrefixes) {\n yield { kind: \"prefix\", ...prefix };\n }\n }\n for (const blob of segment.blobItems) {\n yield { kind: \"blob\", ...blob };\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the blobs by hierarchy.\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * for await (const item of containerClient.listBlobsByHierarchy(\"/\")) {\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let iter = containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix1/\" });\n * let entity = await iter.next();\n * while (!entity.done) {\n * let item = entity.value;\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);\n * }\n * entity = await iter.next();\n * }\n * ```js\n *\n * Example using `byPage()`:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page\");\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\").byPage()) {\n * const segment = response.segment;\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * Example using paging with a max page size:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page, specifying a prefix and a max page size\");\n *\n * let i = 1;\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix2/sub1/\"}).byPage({ maxPageSize: 2 })) {\n * console.log(`Page ${i++}`);\n * const segment = response.segment;\n *\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n *\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation.\n * @returns {(PagedAsyncIterableIterator<\n * { kind: \"prefix\" } & BlobPrefix | { kind: \"blob\" } & BlobItem,\n * ContainerListBlobHierarchySegmentResponse\n * >)}\n * @memberof ContainerClient\n */\n public listBlobsByHierarchy(\n delimiter: string,\n options: ContainerListBlobsOptions = {}\n ): PagedAsyncIterableIterator<\n ({ kind: \"prefix\" } & BlobPrefix) | ({ kind: \"blob\" } & BlobItem),\n ContainerListBlobHierarchySegmentResponse\n > {\n if (delimiter === \"\") {\n throw new RangeError(\"delimiter should contain one or more characters\");\n }\n\n const include: ListBlobsIncludeItem[] = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ContainerListBlobsSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {})\n };\n // AsyncIterableIterator to iterate over blob prefixes and blobs\n const iter = this.listItemsByHierarchy(delimiter, updatedOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n async next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listHierarchySegments(delimiter, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions\n });\n }\n };\n }\n\n private getContainerNameFromUrl(): string {\n let containerName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername`\n // http://localhost:10001/devstoreaccount1/containername\n\n const parsedUrl = URLBuilder.parse(this.url);\n\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername\".\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath()!.split(\"/\")[1];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername\n // .getPath() -> /devstoreaccount1/containername\n containerName = parsedUrl.getPath()!.split(\"/\")[2];\n } else {\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath()!.split(\"/\")[1];\n }\n\n // decode the encoded containerName - to get all the special characters that might be present in it\n containerName = decodeURIComponent(containerName);\n\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n\n return containerName;\n } catch (error) {\n throw new Error(\"Unable to extract containerName with provided information.\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js new file mode 100644 index 000000000..f3737176e --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js @@ -0,0 +1,23 @@ +import { __assign } from "tslib"; +/** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response Model PageBlob Range response + */ +export function rangeResponseFromModel(response) { + var pageRange = (response._response.parsedBody.pageRange || []).map(function (x) { return ({ + offset: x.start, + count: x.end - x.start + }); }); + var clearRange = (response._response.parsedBody.clearRange || []).map(function (x) { return ({ + offset: x.start, + count: x.end - x.start + }); }); + return __assign(__assign({}, response), { pageRange: pageRange, + clearRange: clearRange, _response: __assign(__assign({}, response._response), { parsedBody: { + pageRange: pageRange, + clearRange: clearRange + } }) }); +} +//# sourceMappingURL=PageBlobRangeResponse.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map new file mode 100644 index 000000000..2a192ada1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PageBlobRangeResponse.js","sourceRoot":"","sources":["../../../src/PageBlobRangeResponse.ts"],"names":[],"mappings":";AA4EA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAqF;IAErF,IAAM,SAAS,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC;QAC5E,MAAM,EAAE,CAAC,CAAC,KAAK;QACf,KAAK,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK;KACvB,CAAC,EAH2E,CAG3E,CAAC,CAAC;IAEJ,IAAM,UAAU,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC;QAC9E,MAAM,EAAE,CAAC,CAAC,KAAK;QACf,KAAK,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK;KACvB,CAAC,EAH6E,CAG7E,CAAC,CAAC;IAEJ,6BACK,QAAQ,KACX,SAAS,WAAA;QACT,UAAU,YAAA,EACV,SAAS,wBACJ,QAAQ,CAAC,SAAS,KACrB,UAAU,EAAE;gBACV,SAAS,WAAA;gBACT,UAAU,YAAA;aACX,OAEH;AACJ,CAAC","sourcesContent":["import { HttpResponse } from \"@azure/core-http\";\nimport {\n PageBlobGetPageRangesHeaders,\n PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesResponse as PageBlobGetPageRangesResponseModel,\n PageBlobGetPageRangesDiffResponse as PageBlobGetPageRangesDiffResponseModel\n} from \"./generatedModels\";\nimport { Range } from \"./Range\";\n\n/**\n * List of page ranges for a blob.\n */\nexport interface PageList {\n /**\n * Valid non-overlapping page ranges.\n */\n pageRange?: Range[];\n /**\n * Present if the prevSnapshot parameter was specified and there were cleared\n * pages between the previous snapshot and the target snapshot.\n */\n clearRange?: Range[];\n}\n\n/**\n * Contains response data for the {@link BlobClient.getPageRanges} operation.\n */\nexport interface PageBlobGetPageRangesResponse extends PageList, PageBlobGetPageRangesHeaders {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n}\n\n/**\n * Contains response data for the {@link BlobClient.getPageRangesDiff} operation.\n */\nexport interface PageBlobGetPageRangesDiffResponse\n extends PageList,\n PageBlobGetPageRangesDiffHeaders {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesDiffHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n}\n\n/**\n * Function that converts PageRange and ClearRange to a common Range object.\n * PageRange and ClearRange have start and end while Range offset and count\n * this function normalizes to Range.\n * @param response Model PageBlob Range response\n */\nexport function rangeResponseFromModel(\n response: PageBlobGetPageRangesResponseModel | PageBlobGetPageRangesDiffResponseModel\n): PageBlobGetPageRangesResponse | PageBlobGetPageRangesDiffResponse {\n const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start\n }));\n\n const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start\n }));\n\n return {\n ...response,\n pageRange,\n clearRange,\n _response: {\n ...response._response,\n parsedBody: {\n pageRange,\n clearRange\n }\n }\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js new file mode 100644 index 000000000..8c9593b4a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __assign } from "tslib"; +import { BaseRequestPolicy, deserializationPolicy, disableResponseDecompressionPolicy, HttpHeaders, RequestPolicyOptions, WebResource, proxyPolicy, isNode, isTokenCredential, bearerTokenAuthenticationPolicy, tracingPolicy, logPolicy, keepAlivePolicy, generateClientRequestIdPolicy } from "@azure/core-http"; +import { logger } from "./log"; +import { StorageBrowserPolicyFactory } from "./StorageBrowserPolicyFactory"; +import { StorageRetryPolicyFactory } from "./StorageRetryPolicyFactory"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { StorageOAuthScopes, StorageBlobLoggingAllowedHeaderNames, StorageBlobLoggingAllowedQueryParameters } from "./utils/constants"; +import { TelemetryPolicyFactory } from "./TelemetryPolicyFactory"; +import { getCachedDefaultHttpClient } from "./utils/cache"; +// Export following interfaces and types for customers who want to implement their +// own RequestPolicy or HTTPClient +export { BaseRequestPolicy, StorageOAuthScopes, deserializationPolicy, HttpHeaders, WebResource, RequestPolicyOptions }; +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + * + * @export + * @class Pipeline + */ +var Pipeline = /** @class */ (function () { + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param {RequestPolicyFactory[]} factories + * @param {PipelineOptions} [options={}] + * @memberof Pipeline + */ + function Pipeline(factories, options) { + if (options === void 0) { options = {}; } + this.factories = factories; + // when options.httpClient is not specified, passing in a DefaultHttpClient instance to + // avoid each client creating its own http client. + this.options = __assign(__assign({}, options), { httpClient: options.httpClient || getCachedDefaultHttpClient() }); + } + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline. + * @memberof Pipeline + */ + Pipeline.prototype.toServiceClientOptions = function () { + return { + httpClient: this.options.httpClient, + requestPolicyFactories: this.factories + }; + }; + return Pipeline; +}()); +export { Pipeline }; +/** + * Creates a new Pipeline object with Credential provided. + * + * @export + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options. + * @returns {Pipeline} A new Pipeline object. + */ +export function newPipeline(credential, pipelineOptions) { + if (pipelineOptions === void 0) { pipelineOptions = {}; } + if (credential === undefined) { + credential = new AnonymousCredential(); + } + // Order is important. Closer to the API at the top & closer to the network at the bottom. + // The credential's policy factory must appear close to the wire so it can sign any + // changes made by other factories (like UniqueRequestIDPolicyFactory) + var telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions); + var factories = [ + tracingPolicy({ userAgent: telemetryPolicy.telemetryString }), + keepAlivePolicy(pipelineOptions.keepAliveOptions), + telemetryPolicy, + generateClientRequestIdPolicy(), + new StorageBrowserPolicyFactory(), + deserializationPolicy(), + new StorageRetryPolicyFactory(pipelineOptions.retryOptions), + logPolicy({ + logger: logger.info, + allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, + allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters + }) + ]; + if (isNode) { + // policies only available in Node.js runtime, not in browsers + factories.push(proxyPolicy(pipelineOptions.proxyOptions)); + factories.push(disableResponseDecompressionPolicy()); + } + factories.push(isTokenCredential(credential) + ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes) + : credential); + return new Pipeline(factories, pipelineOptions); +} +//# sourceMappingURL=Pipeline.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js.map new file mode 100644 index 000000000..60a861c21 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Pipeline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kCAAkC,EAElC,WAAW,EAKX,oBAAoB,EAEpB,WAAW,EACX,WAAW,EACX,MAAM,EAEN,iBAAiB,E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AAU,KAAK,SAAS,EAAE;QAC5B,UAAU,GAAG,IAAI,mBAAmB,EAAE,CAAC;KACxC;IAED,0FAA0F;IAC1F,mFAAmF;IACnF,sEAAsE;IAEtE,IAAM,eAAe,GAAG,IAAI,sBAAsB,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;IACrF,IAAM,SAAS,GAA2B;QACxC,aAAa,CAAC,EAAE,SAAS,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC;QAC7D,eAAe,CAAC,eAAe,CAAC,gBAAgB,CAAC;QACjD,eAAe;QACf,6BAA6B,EAAE;QAC/B,IAAI,2BAA2B,EAAE;QACjC,qBAAqB,EAAE;QACvB,IAAI,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC;QAC3D,SAAS,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,kBAAkB,EAAE,oCAAoC;YACxD,sBAAsB,EAAE,wCAAwC;SACjE,CAAC;KACH,CAAC;IAEF,IAAI,MAAM,EAAE;QACV,8DAA8D;QAC9D,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;QAC1D,SAAS,CAAC,IAAI,CAAC,kCAAkC,EAAE,CAAC,CAAC;KACtD;IACD,SAAS,CAAC,IAAI,CACZ,iBAAiB,CAAC,UAAU,CAAC;QAC3B,CAAC,CAAC,+BAA+B,CAAC,UAAU,EAAE,kBAAkB,CAAC;QACjE,CAAC,CAAC,UAAU,CACf,CAAC;IAEF,OAAO,IAAI,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAClD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n deserializationPolicy,\n disableResponseDecompressionPolicy,\n HttpClient as IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n ServiceClientOptions,\n WebResource,\n proxyPolicy,\n isNode,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n tracingPolicy,\n logPolicy,\n ProxyOptions,\n keepAlivePolicy,\n KeepAliveOptions,\n generateClientRequestIdPolicy,\n UserAgentOptions\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory\";\nimport { StorageRetryOptions, StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters\n} from \"./utils/constants\";\nimport { TelemetryPolicyFactory } from \"./TelemetryPolicyFactory\";\nimport { getCachedDefaultHttpClient } from \"./utils/cache\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n BaseRequestPolicy,\n StorageOAuthScopes,\n deserializationPolicy,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions\n};\n\n/**\n * Option interface for Pipeline constructor.\n *\n * @export\n * @interface PipelineOptions\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n *\n * @type {IHttpClient}\n * @memberof PipelineOptions\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n *\n * @export\n * @class Pipeline\n */\nexport class Pipeline {\n /**\n * A list of chained request policy factories.\n *\n * @type {RequestPolicyFactory[]}\n * @memberof Pipeline\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n *\n * @type {PipelineOptions}\n * @memberof Pipeline\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param {RequestPolicyFactory[]} factories\n * @param {PipelineOptions} [options={}]\n * @memberof Pipeline\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = {\n ...options,\n httpClient: options.httpClient || getCachedDefaultHttpClient()\n };\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline.\n * @memberof Pipeline\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n *\n * @export\n * @interface StoragePipelineOptions\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n *\n * @type {UserAgentOptions}\n * @memberof StoragePipelineOptions\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n *\n * @type {StorageRetryOptions}\n * @memberof StoragePipelineOptions\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n *\n * @type {KeepAliveOptions}\n * @memberof StoragePipelineOptions\n */\n keepAliveOptions?: KeepAliveOptions;\n\n /**\n * Configures the HTTP client to send requests and receive responses.\n *\n * @type {IHttpClient}\n * @memberof StoragePipelineOptions\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @export\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options.\n * @returns {Pipeline} A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {}\n): Pipeline {\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories: RequestPolicyFactory[] = [\n tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n deserializationPolicy(), // Default deserializationPolicy is provided by protocol layer\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions),\n logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters\n })\n ];\n\n if (isNode) {\n // policies only available in Node.js runtime, not in browsers\n factories.push(proxyPolicy(pipelineOptions.proxyOptions));\n factories.push(disableResponseDecompressionPolicy());\n }\n factories.push(\n isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential\n );\n\n return new Pipeline(factories, pipelineOptions);\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js new file mode 100644 index 000000000..fe9a82dbd --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @export + * @param {Range} iRange + * @returns {string} + */ +export function rangeToString(iRange) { + if (iRange.offset < 0) { + throw new RangeError("Range.offset cannot be smaller than 0."); + } + if (iRange.count && iRange.count <= 0) { + throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end."); + } + return iRange.count + ? "bytes=" + iRange.offset + "-" + (iRange.offset + iRange.count - 1) + : "bytes=" + iRange.offset + "-"; +} +//# sourceMappingURL=Range.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js.map new file mode 100644 index 000000000..34d655427 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/Range.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../src/Range.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AA4BlC;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,MAAa;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;KAChE;IACD,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE;QACrC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;KACH;IACD,OAAO,MAAM,CAAC,KAAK;QACjB,CAAC,CAAC,WAAS,MAAM,CAAC,MAAM,UAAI,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAE;QAC9D,CAAC,CAAC,WAAS,MAAM,CAAC,MAAM,MAAG,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// tslint:disable:max-line-length\n/**\n * Range for Blob Service Operations.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations\n *\n * @export\n * @interface Range\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n *\n * @type {string}\n * @memberof Range\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n *\n * @type {string}\n * @memberof Range\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @export\n * @param {Range} iRange\n * @returns {string}\n */\nexport function rangeToString(iRange: Range): string {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`\n );\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js new file mode 100644 index 000000000..8c6358d26 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { StorageBrowserPolicy } from "./policies/StorageBrowserPolicy"; +export { StorageBrowserPolicy }; +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + * + * @export + * @class StorageBrowserPolicyFactory + * @implements {RequestPolicyFactory} + */ +var StorageBrowserPolicyFactory = /** @class */ (function () { + function StorageBrowserPolicyFactory() { + } + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageBrowserPolicy} + * @memberof StorageBrowserPolicyFactory + */ + StorageBrowserPolicyFactory.prototype.create = function (nextPolicy, options) { + return new StorageBrowserPolicy(nextPolicy, options); + }; + return StorageBrowserPolicyFactory; +}()); +export { StorageBrowserPolicyFactory }; +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map new file mode 100644 index 000000000..9dcd28239 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageBrowserPolicyFactory.js","sourceRoot":"","sources":["../../../src/StorageBrowserPolicyFactory.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;GAMG;AACH;IAAA;IAYA,CAAC;IAXC;;;;;;;OAOG;IACI,4CAAM,GAAb,UAAc,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IACH,kCAAC;AAAD,CAAC,AAZD,IAYC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { StorageBrowserPolicy } from \"./policies/StorageBrowserPolicy\";\nexport { StorageBrowserPolicy };\n\n/**\n * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.\n *\n * @export\n * @class StorageBrowserPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class StorageBrowserPolicyFactory implements RequestPolicyFactory {\n /**\n * Creates a StorageBrowserPolicyFactory object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageBrowserPolicy}\n * @memberof StorageBrowserPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy {\n return new StorageBrowserPolicy(nextPolicy, options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js new file mode 100644 index 000000000..7c536f72c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { StorageClientContext } from "./generated/src/storageClientContext"; +import { escapeURLPath, getURLScheme, iEqual, getAccountNameFromUrl } from "./utils/utils.common"; +import { AnonymousCredential } from "./credentials/AnonymousCredential"; +import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential"; +import { isTokenCredential, isNode } from "@azure/core-http"; +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + * + * @export + * @class StorageClient + */ +var StorageClient = /** @class */ (function () { + /** + * Creates an instance of StorageClient. + * @param {string} url url to resource + * @param {Pipeline} pipeline request policy pipeline. + * @memberof StorageClient + */ + function StorageClient(url, pipeline) { + // URL should be encoded and only once, protocol layer shouldn't encode URL again + this.url = escapeURLPath(url); + this.accountName = getAccountNameFromUrl(url); + this.pipeline = pipeline; + this.storageClientContext = new StorageClientContext(this.url, pipeline.toServiceClientOptions()); + this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); + this.credential = new AnonymousCredential(); + for (var _i = 0, _a = this.pipeline.factories; _i < _a.length; _i++) { + var factory = _a[_i]; + if ((isNode && factory instanceof StorageSharedKeyCredential) || + factory instanceof AnonymousCredential || + isTokenCredential(factory)) { + this.credential = factory; + } + } + // Override protocol layer's default content-type + var storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = undefined; + } + return StorageClient; +}()); +export { StorageClient }; +//# sourceMappingURL=StorageClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js.map new file mode 100644 index 000000000..fab6d3ea1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../../src/StorageClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAmB,iBAAiB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAa9E;;;;;;GAMG;AACH;IAyCE;;;;;OAKG;IACH,uBAAsB,GAAW,EAAE,QAAkB;QACnD,iFAAiF;QACjF,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAClD,IAAI,CAAC,GAAG,EACR,QAAQ,CAAC,sBAAsB,EAAE,CAClC,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAE7D,IAAI,CAAC,UAAU,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAC5C,KAAsB,UAAuB,EAAvB,KAAA,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAvB,cAAuB,EAAvB,IAAuB,EAAE;YAA1C,IAAM,OAAO,SAAA;YAChB,IACE,CAAC,MAAM,IAAI,OAAO,YAAY,0BAA0B,CAAC;gBACzD,OAAO,YAAY,mBAAmB;gBACtC,iBAAiB,CAAC,OAAO,CAAC,EAC1B;gBACA,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;aAC3B;SACF;QAED,iDAAiD;QACjD,IAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACtD,CAAC;IACH,oBAAC;AAAD,CAAC,AA1ED,IA0EC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { StorageClientContext } from \"./generated/src/storageClientContext\";\nimport { Pipeline } from \"./Pipeline\";\nimport { escapeURLPath, getURLScheme, iEqual, getAccountNameFromUrl } from \"./utils/utils.common\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { TokenCredential, isTokenCredential, isNode } from \"@azure/core-http\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n *\n * @export\n * @class StorageClient\n */\nexport abstract class StorageClient {\n /**\n * Encoded URL string value.\n *\n * @type {string}\n * @memberof StorageClient\n */\n public readonly url: string;\n public readonly accountName: string;\n /**\n * Request policy pipeline.\n *\n * @internal\n * @ignore\n * @type {Pipeline}\n * @memberof StorageClient\n */\n protected readonly pipeline: Pipeline;\n /**\n * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n *\n * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential}\n * @memberof StorageClient\n */\n public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n *\n * @protected\n * @type {StorageClientContext}\n * @memberof StorageClient\n */\n protected readonly storageClientContext: StorageClientContext;\n /**\n * @protected\n * @type {boolean}\n * @memberof StorageClient\n */\n protected readonly isHttps: boolean;\n\n /**\n * Creates an instance of StorageClient.\n * @param {string} url url to resource\n * @param {Pipeline} pipeline request policy pipeline.\n * @memberof StorageClient\n */\n protected constructor(url: string, pipeline: Pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageClientContext(\n this.url,\n pipeline.toServiceClientOptions()\n );\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = new AnonymousCredential();\n for (const factory of this.pipeline.factories) {\n if (\n (isNode && factory instanceof StorageSharedKeyCredential) ||\n factory instanceof AnonymousCredential ||\n isTokenCredential(factory)\n ) {\n this.credential = factory;\n }\n }\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js new file mode 100644 index 000000000..282d84197 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { StorageRetryPolicy, StorageRetryPolicyType } from "./policies/StorageRetryPolicy"; +export { StorageRetryPolicyType, StorageRetryPolicy }; +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + * + * @export + * @class StorageRetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +var StorageRetryPolicyFactory = /** @class */ (function () { + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param {StorageRetryOptions} [retryOptions] + * @memberof StorageRetryPolicyFactory + */ + function StorageRetryPolicyFactory(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageRetryPolicy} + * @memberof StorageRetryPolicyFactory + */ + StorageRetryPolicyFactory.prototype.create = function (nextPolicy, options) { + return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + }; + return StorageRetryPolicyFactory; +}()); +export { StorageRetryPolicyFactory }; +//# sourceMappingURL=StorageRetryPolicyFactory.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map new file mode 100644 index 000000000..a515f396a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAwEtD;;;;;;GAMG;AACH;IAGE;;;;OAIG;IACH,mCAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;;;OAOG;IACI,0CAAM,GAAb,UAAc,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IACH,gCAAC;AAAD,CAAC,AAvBD,IAuBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { StorageRetryPolicy, StorageRetryPolicyType } from \"./policies/StorageRetryPolicy\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n *\n * @export\n * @interface StorageRetryOptions\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n *\n * @type {StorageRetryPolicyType}\n * @memberof StorageRetryOptions\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly maxRetryDelayInMs?: number;\n\n /**\n * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined\n * (the default) then operations are not retried against another host.\n *\n * NOTE: Before setting this field, make sure you understand the issues around\n * reading stale and potentially-inconsistent data at\n * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}\n *\n * @type {string}\n * @memberof StorageRetryOptions\n */\n readonly secondaryHost?: string;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n *\n * @export\n * @class StorageRetryPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param {StorageRetryOptions} [retryOptions]\n * @memberof StorageRetryPolicyFactory\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageRetryPolicy}\n * @memberof StorageRetryPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicyFactory.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicyFactory.js new file mode 100644 index 000000000..353208580 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicyFactory.js @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { isNode } from "@azure/core-http"; +import * as os from "os"; +import { TelemetryPolicy } from "./policies/TelemetryPolicy"; +import { SDK_VERSION } from "./utils/constants"; +/** + * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects. + * + * @export + * @class TelemetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +var TelemetryPolicyFactory = /** @class */ (function () { + /** + * Creates an instance of TelemetryPolicyFactory. + * @param {UserAgentOptions} [telemetry] + * @memberof TelemetryPolicyFactory + */ + function TelemetryPolicyFactory(telemetry) { + var userAgentInfo = []; + if (isNode) { + if (telemetry) { + // FIXME: replace() only replaces the first space. And we have no idea why we need to replace spaces in the first place. + // But fixing this would be a breaking change. Logged an issue here: https://github.com/Azure/azure-sdk-for-js/issues/10793 + var telemetryString = (telemetry.userAgentPrefix || "").replace(" ", ""); + if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) { + userAgentInfo.push(telemetryString); + } + } + // e.g. azsdk-js-storageblob/10.0.0 + var libInfo = "azsdk-js-storageblob/" + SDK_VERSION; + if (userAgentInfo.indexOf(libInfo) === -1) { + userAgentInfo.push(libInfo); + } + // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299) + var runtimeInfo = "(NODE-VERSION " + process.version + "; " + os.type() + " " + os.release() + ")"; + if (userAgentInfo.indexOf(runtimeInfo) === -1) { + userAgentInfo.push(runtimeInfo); + } + } + this.telemetryString = userAgentInfo.join(" "); + } + /** + * Creates a TelemetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {TelemetryPolicy} + * @memberof TelemetryPolicyFactory + */ + TelemetryPolicyFactory.prototype.create = function (nextPolicy, options) { + return new TelemetryPolicy(nextPolicy, options, this.telemetryString); + }; + return TelemetryPolicyFactory; +}()); +export { TelemetryPolicyFactory }; +//# sourceMappingURL=TelemetryPolicyFactory.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map new file mode 100644 index 000000000..1896ff8e1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/TelemetryPolicy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W,CAAC,CAAC;aACjC;SACF;QAED,IAAI,CAAC,eAAe,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACI,uCAAM,GAAb,UAAc,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACxE,CAAC;IACH,6BAAC;AAAD,CAAC,AApDD,IAoDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n isNode,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n UserAgentOptions\n} from \"@azure/core-http\";\nimport * as os from \"os\";\n\nimport { TelemetryPolicy } from \"./policies/TelemetryPolicy\";\nimport { SDK_VERSION } from \"./utils/constants\";\n\n/**\n * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects.\n *\n * @export\n * @class TelemetryPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class TelemetryPolicyFactory implements RequestPolicyFactory {\n /**\n * @internal\n * @ignore\n */\n public readonly telemetryString: string;\n\n /**\n * Creates an instance of TelemetryPolicyFactory.\n * @param {UserAgentOptions} [telemetry]\n * @memberof TelemetryPolicyFactory\n */\n constructor(telemetry?: UserAgentOptions) {\n const userAgentInfo: string[] = [];\n\n if (isNode) {\n if (telemetry) {\n // FIXME: replace() only replaces the first space. And we have no idea why we need to replace spaces in the first place.\n // But fixing this would be a breaking change. Logged an issue here: https://github.com/Azure/azure-sdk-for-js/issues/10793\n const telemetryString = (telemetry.userAgentPrefix || \"\").replace(\" \", \"\");\n if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {\n userAgentInfo.push(telemetryString);\n }\n }\n\n // e.g. azsdk-js-storageblob/10.0.0\n const libInfo = `azsdk-js-storageblob/${SDK_VERSION}`;\n if (userAgentInfo.indexOf(libInfo) === -1) {\n userAgentInfo.push(libInfo);\n }\n\n // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)\n const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;\n if (userAgentInfo.indexOf(runtimeInfo) === -1) {\n userAgentInfo.push(runtimeInfo);\n }\n }\n\n this.telemetryString = userAgentInfo.join(\" \");\n }\n\n /**\n * Creates a TelemetryPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {TelemetryPolicy}\n * @memberof TelemetryPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): TelemetryPolicy {\n return new TelemetryPolicy(nextPolicy, options, this.telemetryString);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js new file mode 100644 index 000000000..a6820d166 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy"; +import { Credential } from "./Credential"; +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + * + * @export + * @class AnonymousCredential + * @extends {Credential} + */ +var AnonymousCredential = /** @class */ (function (_super) { + __extends(AnonymousCredential, _super); + function AnonymousCredential() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {AnonymousCredentialPolicy} + * @memberof AnonymousCredential + */ + AnonymousCredential.prototype.create = function (nextPolicy, options) { + return new AnonymousCredentialPolicy(nextPolicy, options); + }; + return AnonymousCredential; +}(Credential)); +export { AnonymousCredential }; +//# sourceMappingURL=AnonymousCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map new file mode 100644 index 000000000..21f376720 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnonymousCredential.js","sourceRoot":"","sources":["../../../../src/credentials/AnonymousCredential.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAIlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;GASG;AACH;IAAyC,uCAAU;IAAnD;;IAeA,CAAC;IAdC;;;;;;;OAOG;IACI,oCAAM,GAAb,UACE,UAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,yBAAyB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IACH,0BAAC;AAAD,CAAC,AAfD,CAAyC,UAAU,GAelD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { AnonymousCredentialPolicy } from \"../policies/AnonymousCredentialPolicy\";\nimport { Credential } from \"./Credential\";\n\n/**\n * AnonymousCredential provides a credentialPolicyCreator member used to create\n * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with\n * HTTP(S) requests that read public resources or for use with Shared Access\n * Signatures (SAS).\n *\n * @export\n * @class AnonymousCredential\n * @extends {Credential}\n */\nexport class AnonymousCredential extends Credential {\n /**\n * Creates an {@link AnonymousCredentialPolicy} object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {AnonymousCredentialPolicy}\n * @memberof AnonymousCredential\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): AnonymousCredentialPolicy {\n return new AnonymousCredentialPolicy(nextPolicy, options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js new file mode 100644 index 000000000..4b30f04e1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + * + * @export + * @abstract + * @class Credential + */ +var Credential = /** @class */ (function () { + function Credential() { + } + /** + * Creates a RequestPolicy object. + * + * @param {RequestPolicy} _nextPolicy + * @param {RequestPolicyOptions} _options + * @returns {RequestPolicy} + * @memberof Credential + */ + Credential.prototype.create = function ( + // tslint:disable-next-line:variable-name + _nextPolicy, + // tslint:disable-next-line:variable-name + _options) { + throw new Error("Method should be implemented in children classes."); + }; + return Credential; +}()); +export { Credential }; +//# sourceMappingURL=Credential.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js.map new file mode 100644 index 000000000..434dbd59c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/Credential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Credential.js","sourceRoot":"","sources":["../../../../src/credentials/Credential.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAKlC;;;;;;;GAOG;AACH;IAAA;IAiBA,CAAC;IAhBC;;;;;;;OAOG;IACI,2BAAM,GAAb;IACE,yCAAyC;IACzC,WAA0B;IAC1B,yCAAyC;IACzC,QAA8B;QAE9B,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACH,iBAAC;AAAD,CAAC,AAjBD,IAiBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { CredentialPolicy } from \"../policies/CredentialPolicy\";\n\n/**\n * Credential is an abstract class for Azure Storage HTTP requests signing. This\n * class will host an credentialPolicyCreator factory which generates CredentialPolicy.\n *\n * @export\n * @abstract\n * @class Credential\n */\nexport abstract class Credential implements RequestPolicyFactory {\n /**\n * Creates a RequestPolicy object.\n *\n * @param {RequestPolicy} _nextPolicy\n * @param {RequestPolicyOptions} _options\n * @returns {RequestPolicy}\n * @memberof Credential\n */\n public create(\n // tslint:disable-next-line:variable-name\n _nextPolicy: RequestPolicy,\n // tslint:disable-next-line:variable-name\n _options: RequestPolicyOptions\n ): RequestPolicy {\n throw new Error(\"Method should be implemented in children classes.\");\n }\n}\n\n/**\n * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.\n */\nexport type CredentialPolicyCreator = (\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n) => CredentialPolicy;\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js new file mode 100644 index 000000000..0b558f8b6 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +var StorageSharedKeyCredential = /** @class */ (function () { + function StorageSharedKeyCredential() { + } + return StorageSharedKeyCredential; +}()); +export { StorageSharedKeyCredential }; +//# sourceMappingURL=StorageSharedKeyCredential.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map new file mode 100644 index 000000000..102a03b98 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageSharedKeyCredential.browser.js","sourceRoot":"","sources":["../../../../src/credentials/StorageSharedKeyCredential.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;IAAA;IAAyC,CAAC;IAAD,iCAAC;AAAD,CAAC,AAA1C,IAA0C","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport class StorageSharedKeyCredential {}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js new file mode 100644 index 000000000..f4017ab42 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { createHmac } from "crypto"; +import { StorageSharedKeyCredentialPolicy } from "../policies/StorageSharedKeyCredentialPolicy"; +import { Credential } from "./Credential"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + * + * @export + * @class StorageSharedKeyCredential + * @extends {Credential} + */ +var StorageSharedKeyCredential = /** @class */ (function (_super) { + __extends(StorageSharedKeyCredential, _super); + /** + * Creates an instance of StorageSharedKeyCredential. + * @param {string} accountName + * @param {string} accountKey + * @memberof StorageSharedKeyCredential + */ + function StorageSharedKeyCredential(accountName, accountKey) { + var _this = _super.call(this) || this; + _this.accountName = accountName; + _this.accountKey = Buffer.from(accountKey, "base64"); + return _this; + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageSharedKeyCredentialPolicy} + * @memberof StorageSharedKeyCredential + */ + StorageSharedKeyCredential.prototype.create = function (nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + }; + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof StorageSharedKeyCredential + */ + StorageSharedKeyCredential.prototype.computeHMACSHA256 = function (stringToSign) { + return createHmac("sha256", this.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + }; + return StorageSharedKeyCredential; +}(Credential)); +export { StorageSharedKeyCredential }; +//# sourceMappingURL=StorageSharedKeyCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map new file mode 100644 index 000000000..da135161f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageSharedKeyCredential.js","sourceRoot":"","sources":["../../../../src/credentials/StorageSharedKeyCredential.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;GAQG;AACH;IAAgD,8CAAU;IAiBxD;;;;;OAKG;IACH,oCAAY,WAAmB,EAAE,UAAkB;QAAnD,YACE,iBAAO,SAGR;QAFC,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,KAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;;IACtD,CAAC;IAED;;;;;;;OAOG;IACI,2CAAM,GAAb,UACE,UAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,gCAAgC,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACI,sDAAiB,GAAxB,UAAyB,YAAoB;QAC3C,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;aACzC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC;aAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtB,CAAC;IACH,iCAAC;AAAD,CAAC,AAxDD,CAAgD,UAAU,GAwDzD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"crypto\";\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { StorageSharedKeyCredentialPolicy } from \"../policies/StorageSharedKeyCredentialPolicy\";\nimport { Credential } from \"./Credential\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n *\n * @export\n * @class StorageSharedKeyCredential\n * @extends {Credential}\n */\nexport class StorageSharedKeyCredential extends Credential {\n /**\n * Azure Storage account name; readonly.\n *\n * @type {string}\n * @memberof StorageSharedKeyCredential\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage account key; readonly.\n *\n * @type {Buffer}\n * @memberof StorageSharedKeyCredential\n */\n private readonly accountKey: Buffer;\n\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param {string} accountName\n * @param {string} accountKey\n * @memberof StorageSharedKeyCredential\n */\n constructor(accountName: string, accountKey: string) {\n super();\n this.accountName = accountName;\n this.accountKey = Buffer.from(accountKey, \"base64\");\n }\n\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageSharedKeyCredentialPolicy}\n * @memberof StorageSharedKeyCredential\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): StorageSharedKeyCredentialPolicy {\n return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param {string} stringToSign\n * @returns {string}\n * @memberof StorageSharedKeyCredential\n */\n public computeHMACSHA256(stringToSign: string): string {\n return createHmac(\"sha256\", this.accountKey)\n .update(stringToSign, \"utf8\")\n .digest(\"base64\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js new file mode 100644 index 000000000..1d45f1169 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js @@ -0,0 +1,39 @@ +import { createHmac } from "crypto"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas + * + * @export + * @class UserDelegationKeyCredential + */ +var UserDelegationKeyCredential = /** @class */ (function () { + /** + * Creates an instance of UserDelegationKeyCredential. + * @param {string} accountName + * @param {UserDelegationKey} userDelegationKey + * @memberof UserDelegationKeyCredential + */ + function UserDelegationKeyCredential(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof UserDelegationKeyCredential + */ + UserDelegationKeyCredential.prototype.computeHMACSHA256 = function (stringToSign) { + // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); + return createHmac("sha256", this.key) + .update(stringToSign, "utf8") + .digest("base64"); + }; + return UserDelegationKeyCredential; +}()); +export { UserDelegationKeyCredential }; +//# sourceMappingURL=UserDelegationKeyCredential.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map new file mode 100644 index 000000000..6cdc8db4c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UserDelegationKeyCredential.js","sourceRoot":"","sources":["../../../../src/credentials/UserDelegationKeyCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC;;;;;;;;GAQG;AACH;IA0BE;;;;;OAKG;IACH,qCAAY,WAAmB,EAAE,iBAAoC;QACnE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;OAMG;IACI,uDAAiB,GAAxB,UAAyB,YAAoB;QAC3C,gEAAgE;QAEhE,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC;aAClC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC;aAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtB,CAAC;IACH,kCAAC;AAAD,CAAC,AApDD,IAoDC","sourcesContent":["import { createHmac } from \"crypto\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas\n *\n * @export\n * @class UserDelegationKeyCredential\n */\nexport class UserDelegationKeyCredential {\n /**\n * Azure Storage account name; readonly.\n *\n * @type {string}\n * @memberof UserDelegationKeyCredential\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage user delegation key; readonly.\n *\n * @type {UserDelegationKey}\n * @memberof UserDelegationKeyCredential\n */\n public readonly userDelegationKey: UserDelegationKey;\n\n /**\n * Key value in Buffer type.\n *\n * @private\n * @type {Buffer}\n * @memberof UserDelegationKeyCredential\n */\n private readonly key: Buffer;\n\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param {string} accountName\n * @param {UserDelegationKey} userDelegationKey\n * @memberof UserDelegationKeyCredential\n */\n constructor(accountName: string, userDelegationKey: UserDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param {string} stringToSign\n * @returns {string}\n * @memberof UserDelegationKeyCredential\n */\n public computeHMACSHA256(stringToSign: string): string {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n\n return createHmac(\"sha256\", this.key)\n .update(stringToSign, \"utf8\")\n .digest(\"base64\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js new file mode 100644 index 000000000..880807d7d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { AppendBlobAppendBlockFromUrlHeaders, AppendBlobAppendBlockHeaders, AppendBlobCreateHeaders, AppendBlobSealHeaders, StorageError } from "../models/mappers"; +//# sourceMappingURL=appendBlobMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js.map new file mode 100644 index 000000000..f5e87c894 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/appendBlobMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"appendBlobMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/appendBlobMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACb,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n AppendBlobAppendBlockFromUrlHeaders,\n AppendBlobAppendBlockHeaders,\n AppendBlobCreateHeaders,\n AppendBlobSealHeaders,\n StorageError\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js new file mode 100644 index 000000000..1a70557ac --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { ArrowConfiguration, ArrowField, BlobAbortCopyFromURLHeaders, BlobAcquireLeaseHeaders, BlobBreakLeaseHeaders, BlobChangeLeaseHeaders, BlobCopyFromURLHeaders, BlobCreateSnapshotHeaders, BlobDeleteHeaders, BlobDownloadHeaders, BlobGetAccessControlHeaders, BlobGetAccountInfoHeaders, BlobGetPropertiesHeaders, BlobGetTagsHeaders, BlobQueryHeaders, BlobReleaseLeaseHeaders, BlobRenameHeaders, BlobRenewLeaseHeaders, BlobSetAccessControlHeaders, BlobSetExpiryHeaders, BlobSetHTTPHeadersHeaders, BlobSetMetadataHeaders, BlobSetTagsHeaders, BlobSetTierHeaders, BlobStartCopyFromURLHeaders, BlobTag, BlobTags, BlobUndeleteHeaders, DataLakeStorageError, DataLakeStorageErrorError, DelimitedTextConfiguration, JsonTextConfiguration, QueryFormat, QueryRequest, QuerySerialization, StorageError } from "../models/mappers"; +//# sourceMappingURL=blobMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js.map new file mode 100644 index 000000000..f0dcd3d9f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blobMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blobMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/blobMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,OAAO,EACP,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACb,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n ArrowConfiguration,\n ArrowField,\n BlobAbortCopyFromURLHeaders,\n BlobAcquireLeaseHeaders,\n BlobBreakLeaseHeaders,\n BlobChangeLeaseHeaders,\n BlobCopyFromURLHeaders,\n BlobCreateSnapshotHeaders,\n BlobDeleteHeaders,\n BlobDownloadHeaders,\n BlobGetAccessControlHeaders,\n BlobGetAccountInfoHeaders,\n BlobGetPropertiesHeaders,\n BlobGetTagsHeaders,\n BlobQueryHeaders,\n BlobReleaseLeaseHeaders,\n BlobRenameHeaders,\n BlobRenewLeaseHeaders,\n BlobSetAccessControlHeaders,\n BlobSetExpiryHeaders,\n BlobSetHTTPHeadersHeaders,\n BlobSetMetadataHeaders,\n BlobSetTagsHeaders,\n BlobSetTierHeaders,\n BlobStartCopyFromURLHeaders,\n BlobTag,\n BlobTags,\n BlobUndeleteHeaders,\n DataLakeStorageError,\n DataLakeStorageErrorError,\n DelimitedTextConfiguration,\n JsonTextConfiguration,\n QueryFormat,\n QueryRequest,\n QuerySerialization,\n StorageError\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js new file mode 100644 index 000000000..19fd7ebf2 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { Block, BlockBlobCommitBlockListHeaders, BlockBlobGetBlockListHeaders, BlockBlobStageBlockFromURLHeaders, BlockBlobStageBlockHeaders, BlockBlobUploadHeaders, BlockList, BlockLookupList, StorageError } from "../models/mappers"; +//# sourceMappingURL=blockBlobMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js.map new file mode 100644 index 000000000..4de98d9a0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/blockBlobMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blockBlobMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/blockBlobMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,sBAAsB,EACtB,SAAS,EACT,eAAe,EACf,YAAY,EACb,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n Block,\n BlockBlobCommitBlockListHeaders,\n BlockBlobGetBlockListHeaders,\n BlockBlobStageBlockFromURLHeaders,\n BlockBlobStageBlockHeaders,\n BlockBlobUploadHeaders,\n BlockList,\n BlockLookupList,\n StorageError\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js new file mode 100644 index 000000000..47769a5a4 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { AccessPolicy, BlobFlatListSegment, BlobHierarchyListSegment, BlobItemInternal, BlobPrefix, BlobPropertiesInternal, BlobTag, BlobTags, ContainerAcquireLeaseHeaders, ContainerBreakLeaseHeaders, ContainerChangeLeaseHeaders, ContainerCreateHeaders, ContainerDeleteHeaders, ContainerGetAccessPolicyHeaders, ContainerGetAccountInfoHeaders, ContainerGetPropertiesHeaders, ContainerListBlobFlatSegmentHeaders, ContainerListBlobHierarchySegmentHeaders, ContainerReleaseLeaseHeaders, ContainerRenewLeaseHeaders, ContainerRestoreHeaders, ContainerSetAccessPolicyHeaders, ContainerSetMetadataHeaders, ListBlobsFlatSegmentResponse, ListBlobsHierarchySegmentResponse, SignedIdentifier, StorageError } from "../models/mappers"; +//# sourceMappingURL=containerMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js.map new file mode 100644 index 000000000..eb09c2a84 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/containerMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"containerMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/containerMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,mCAAmC,EACnC,wCAAwC,EACxC,4BAA4B,EAC5B,0BAA0B,EAC1B,uBAAuB,EACvB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,gBAAgB,EAChB,YAAY,EACb,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n AccessPolicy,\n BlobFlatListSegment,\n BlobHierarchyListSegment,\n BlobItemInternal,\n BlobPrefix,\n BlobPropertiesInternal,\n BlobTag,\n BlobTags,\n ContainerAcquireLeaseHeaders,\n ContainerBreakLeaseHeaders,\n ContainerChangeLeaseHeaders,\n ContainerCreateHeaders,\n ContainerDeleteHeaders,\n ContainerGetAccessPolicyHeaders,\n ContainerGetAccountInfoHeaders,\n ContainerGetPropertiesHeaders,\n ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobHierarchySegmentHeaders,\n ContainerReleaseLeaseHeaders,\n ContainerRenewLeaseHeaders,\n ContainerRestoreHeaders,\n ContainerSetAccessPolicyHeaders,\n ContainerSetMetadataHeaders,\n ListBlobsFlatSegmentResponse,\n ListBlobsHierarchySegmentResponse,\n SignedIdentifier,\n StorageError\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js new file mode 100644 index 000000000..f20679049 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { DataLakeStorageError, DataLakeStorageErrorError, DirectoryCreateHeaders, DirectoryDeleteHeaders, DirectoryGetAccessControlHeaders, DirectoryRenameHeaders, DirectorySetAccessControlHeaders } from "../models/mappers"; +//# sourceMappingURL=directoryMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js.map new file mode 100644 index 000000000..33c647543 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/directoryMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"directoryMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/directoryMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,gCAAgC,EAChC,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n DataLakeStorageError,\n DataLakeStorageErrorError,\n DirectoryCreateHeaders,\n DirectoryDeleteHeaders,\n DirectoryGetAccessControlHeaders,\n DirectoryRenameHeaders,\n DirectorySetAccessControlHeaders\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js new file mode 100644 index 000000000..33f3718c8 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js @@ -0,0 +1,8 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js.map new file mode 100644 index 000000000..33107a954 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n\nimport * as coreHttp from \"@azure/core-http\";\n\n/**\n * Key information\n */\nexport interface KeyInfo {\n /**\n * The date-time the key is active in ISO 8601 UTC time\n */\n startsOn: string;\n /**\n * The date-time the key expires in ISO 8601 UTC time\n */\n expiresOn: string;\n}\n\n/**\n * A user delegation key\n */\nexport interface UserDelegationKey {\n /**\n * The Azure Active Directory object ID in GUID format.\n */\n signedObjectId: string;\n /**\n * The Azure Active Directory tenant ID in GUID format\n */\n signedTenantId: string;\n /**\n * The date-time the key is active\n * **NOTE: This entity will be treated as a string instead of a Date because the API can\n * potentially deal with a higher precision value than what is supported by JavaScript.**\n */\n signedStartsOn: string;\n /**\n * The date-time the key expires\n * **NOTE: This entity will be treated as a string instead of a Date because the API can\n * potentially deal with a higher precision value than what is supported by JavaScript.**\n */\n signedExpiresOn: string;\n /**\n * Abbreviation of the Azure Storage service that accepts the key\n */\n signedService: string;\n /**\n * The service version that created the key\n */\n signedVersion: string;\n /**\n * The key as a base64 string\n */\n value: string;\n}\n\n/**\n * An interface representing StorageError.\n */\nexport interface StorageError {\n message?: string;\n code?: string;\n}\n\n/**\n * The service error response object.\n */\nexport interface DataLakeStorageErrorError {\n /**\n * The service error code.\n */\n code?: string;\n /**\n * The service error message.\n */\n message?: string;\n}\n\n/**\n * An interface representing DataLakeStorageError.\n */\nexport interface DataLakeStorageError {\n /**\n * The service error response object.\n */\n dataLakeStorageErrorDetails?: DataLakeStorageErrorError;\n}\n\n/**\n * An Access policy\n */\nexport interface AccessPolicy {\n /**\n * the date-time the policy is active\n * **NOTE: This entity will be treated as a string instead of a Date because the API can\n * potentially deal with a higher precision value than what is supported by JavaScript.**\n */\n startsOn?: string;\n /**\n * the date-time the policy expires\n * **NOTE: This entity will be treated as a string instead of a Date because the API can\n * potentially deal with a higher precision value than what is supported by JavaScript.**\n */\n expiresOn?: string;\n /**\n * the permissions for the acl policy\n */\n permissions?: string;\n}\n\n/**\n * Properties of a blob\n */\nexport interface BlobPropertiesInternal {\n createdOn?: Date;\n lastModified: Date;\n etag: string;\n /**\n * Size in bytes\n */\n contentLength?: number;\n contentType?: string;\n contentEncoding?: string;\n contentLanguage?: string;\n contentMD5?: Uint8Array;\n contentDisposition?: string;\n cacheControl?: string;\n blobSequenceNumber?: number;\n /**\n * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob'\n */\n blobType?: BlobType;\n /**\n * Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * Possible values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n copyId?: string;\n /**\n * Possible values include: 'pending', 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n copySource?: string;\n copyProgress?: string;\n copyCompletedOn?: Date;\n copyStatusDescription?: string;\n serverEncrypted?: boolean;\n incrementalCopy?: boolean;\n destinationSnapshot?: string;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n /**\n * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70',\n * 'P80', 'Hot', 'Cool', 'Archive'\n */\n accessTier?: AccessTier;\n accessTierInferred?: boolean;\n /**\n * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool'\n */\n archiveStatus?: ArchiveStatus;\n customerProvidedKeySha256?: string;\n /**\n * The name of the encryption scope under which the blob is encrypted.\n */\n encryptionScope?: string;\n accessTierChangedOn?: Date;\n tagCount?: number;\n expiresOn?: Date;\n isSealed?: boolean;\n /**\n * Possible values include: 'High', 'Standard'\n */\n rehydratePriority?: RehydratePriority;\n lastAccessedOn?: Date;\n}\n\n/**\n * An interface representing BlobTag.\n */\nexport interface BlobTag {\n key: string;\n value: string;\n}\n\n/**\n * Blob tags\n */\nexport interface BlobTags {\n blobTagSet: BlobTag[];\n}\n\n/**\n * An Azure Storage blob\n */\nexport interface BlobItemInternal {\n name: string;\n deleted: boolean;\n snapshot: string;\n versionId?: string;\n isCurrentVersion?: boolean;\n properties: BlobPropertiesInternal;\n metadata?: { [propertyName: string]: string };\n blobTags?: BlobTags;\n objectReplicationMetadata?: { [propertyName: string]: string };\n}\n\n/**\n * An interface representing BlobFlatListSegment.\n */\nexport interface BlobFlatListSegment {\n blobItems: BlobItemInternal[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsFlatSegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n segment: BlobFlatListSegment;\n continuationToken?: string;\n}\n\n/**\n * An interface representing BlobPrefix.\n */\nexport interface BlobPrefix {\n name: string;\n}\n\n/**\n * An interface representing BlobHierarchyListSegment.\n */\nexport interface BlobHierarchyListSegment {\n blobPrefixes?: BlobPrefix[];\n blobItems: BlobItemInternal[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsHierarchySegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n delimiter?: string;\n segment: BlobHierarchyListSegment;\n continuationToken?: string;\n}\n\n/**\n * Represents a single block in a block blob. It describes the block's ID and size.\n */\nexport interface Block {\n /**\n * The base64 encoded block ID.\n */\n name: string;\n /**\n * The block size in bytes.\n */\n size: number;\n}\n\n/**\n * An interface representing BlockList.\n */\nexport interface BlockList {\n committedBlocks?: Block[];\n uncommittedBlocks?: Block[];\n}\n\n/**\n * An interface representing BlockLookupList.\n */\nexport interface BlockLookupList {\n committed?: string[];\n uncommitted?: string[];\n latest?: string[];\n}\n\n/**\n * Properties of a container\n */\nexport interface ContainerProperties {\n lastModified: Date;\n etag: string;\n /**\n * Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * Possible values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n /**\n * Possible values include: 'container', 'blob'\n */\n publicAccess?: PublicAccessType;\n hasImmutabilityPolicy?: boolean;\n hasLegalHold?: boolean;\n defaultEncryptionScope?: string;\n preventEncryptionScopeOverride?: boolean;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n}\n\n/**\n * An Azure Storage container\n */\nexport interface ContainerItem {\n name: string;\n deleted?: boolean;\n version?: string;\n properties: ContainerProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * delimited text configuration\n */\nexport interface DelimitedTextConfiguration {\n /**\n * column separator\n */\n columnSeparator: string;\n /**\n * field quote\n */\n fieldQuote: string;\n /**\n * record separator\n */\n recordSeparator: string;\n /**\n * escape char\n */\n escapeChar: string;\n /**\n * has headers\n */\n headersPresent: boolean;\n}\n\n/**\n * json text configuration\n */\nexport interface JsonTextConfiguration {\n /**\n * record separator\n */\n recordSeparator: string;\n}\n\n/**\n * field of an arrow schema\n */\nexport interface ArrowField {\n type: string;\n name?: string;\n precision?: number;\n scale?: number;\n}\n\n/**\n * arrow configuration\n */\nexport interface ArrowConfiguration {\n schema: ArrowField[];\n}\n\n/**\n * An enumeration of containers\n */\nexport interface ListContainersSegmentResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n containerItems: ContainerItem[];\n continuationToken?: string;\n}\n\n/**\n * CORS is an HTTP feature that enables a web application running under one domain to access\n * resources in another domain. Web browsers implement a security restriction known as same-origin\n * policy that prevents a web page from calling APIs in a different domain; CORS provides a secure\n * way to allow one domain (the origin domain) to call APIs in another domain\n */\nexport interface CorsRule {\n /**\n * The origin domains that are permitted to make a request against the storage service via CORS.\n * The origin domain is the domain from which the request originates. Note that the origin must\n * be an exact case-sensitive match with the origin that the user age sends to the service. You\n * can also use the wildcard character '*' to allow all origin domains to make requests via CORS.\n */\n allowedOrigins: string;\n /**\n * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma\n * separated)\n */\n allowedMethods: string;\n /**\n * the request headers that the origin domain may specify on the CORS request.\n */\n allowedHeaders: string;\n /**\n * The response headers that may be sent in the response to the CORS request and exposed by the\n * browser to the request issuer\n */\n exposedHeaders: string;\n /**\n * The maximum amount time that a browser should cache the preflight OPTIONS request.\n */\n maxAgeInSeconds: number;\n}\n\n/**\n * Blob info from a Filter Blobs API call\n */\nexport interface FilterBlobItem {\n name: string;\n containerName: string;\n tagValue: string;\n}\n\n/**\n * The result of a Filter Blobs API call\n */\nexport interface FilterBlobSegment {\n serviceEndpoint: string;\n where: string;\n blobs: FilterBlobItem[];\n continuationToken?: string;\n}\n\n/**\n * Geo-Replication information for the Secondary Storage Service\n */\nexport interface GeoReplication {\n /**\n * The status of the secondary location. Possible values include: 'live', 'bootstrap',\n * 'unavailable'\n */\n status: GeoReplicationStatusType;\n /**\n * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed\n * to be available for read operations at the secondary. Primary writes after this point in time\n * may or may not be available for reads.\n */\n lastSyncOn: Date;\n}\n\n/**\n * the retention policy which determines how long the associated data should persist\n */\nexport interface RetentionPolicy {\n /**\n * Indicates whether a retention policy is enabled for the storage service\n */\n enabled: boolean;\n /**\n * Indicates the number of days that metrics or logging or soft-deleted data should be retained.\n * All data older than this value will be deleted\n */\n days?: number;\n}\n\n/**\n * Azure Analytics Logging settings.\n */\nexport interface Logging {\n /**\n * The version of Storage Analytics to configure.\n */\n version: string;\n /**\n * Indicates whether all delete requests should be logged.\n */\n deleteProperty: boolean;\n /**\n * Indicates whether all read requests should be logged.\n */\n read: boolean;\n /**\n * Indicates whether all write requests should be logged.\n */\n write: boolean;\n retentionPolicy: RetentionPolicy;\n}\n\n/**\n * a summary of request statistics grouped by API in hour or minute aggregates for blobs\n */\nexport interface Metrics {\n /**\n * The version of Storage Analytics to configure.\n */\n version?: string;\n /**\n * Indicates whether metrics are enabled for the Blob service.\n */\n enabled: boolean;\n /**\n * Indicates whether metrics should generate summary statistics for called API operations.\n */\n includeAPIs?: boolean;\n retentionPolicy?: RetentionPolicy;\n}\n\n/**\n * An interface representing PageRange.\n */\nexport interface PageRange {\n start: number;\n end: number;\n}\n\n/**\n * An interface representing ClearRange.\n */\nexport interface ClearRange {\n start: number;\n end: number;\n}\n\n/**\n * the list of pages\n */\nexport interface PageList {\n pageRange?: PageRange[];\n clearRange?: ClearRange[];\n}\n\n/**\n * An interface representing QueryFormat.\n */\nexport interface QueryFormat {\n /**\n * Possible values include: 'delimited', 'json', 'arrow'\n */\n type?: QueryFormatType;\n delimitedTextConfiguration?: DelimitedTextConfiguration;\n jsonTextConfiguration?: JsonTextConfiguration;\n arrowConfiguration?: ArrowConfiguration;\n}\n\n/**\n * An interface representing QuerySerialization.\n */\nexport interface QuerySerialization {\n format: QueryFormat;\n}\n\n/**\n * the quick query body\n */\nexport interface QueryRequest {\n /**\n * a query statement\n */\n expression: string;\n inputSerialization?: QuerySerialization;\n outputSerialization?: QuerySerialization;\n}\n\n/**\n * signed identifier\n */\nexport interface SignedIdentifier {\n /**\n * a unique id\n */\n id: string;\n accessPolicy: AccessPolicy;\n}\n\n/**\n * The properties that enable an account to host a static website\n */\nexport interface StaticWebsite {\n /**\n * Indicates whether this account is hosting a static website\n */\n enabled: boolean;\n /**\n * The default name of the index page under each directory\n */\n indexDocument?: string;\n /**\n * The absolute path of the custom 404 page\n */\n errorDocument404Path?: string;\n /**\n * Absolute path of the default index page\n */\n defaultIndexDocumentPath?: string;\n}\n\n/**\n * Storage Service Properties.\n */\nexport interface BlobServiceProperties {\n blobAnalyticsLogging?: Logging;\n hourMetrics?: Metrics;\n minuteMetrics?: Metrics;\n /**\n * The set of CORS rules.\n */\n cors?: CorsRule[];\n /**\n * The default version to use for requests to the Blob service if an incoming request's version\n * is not specified. Possible values include version 2008-10-27 and all more recent versions\n */\n defaultServiceVersion?: string;\n deleteRetentionPolicy?: RetentionPolicy;\n staticWebsite?: StaticWebsite;\n}\n\n/**\n * Stats for the storage service.\n */\nexport interface BlobServiceStatistics {\n geoReplication?: GeoReplication;\n}\n\n/**\n * Additional parameters for create operation.\n */\nexport interface ContainerEncryptionScope {\n /**\n * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the\n * container and use for all future writes.\n */\n defaultEncryptionScope?: string;\n /**\n * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a\n * different encryption scope than the scope set on the container.\n */\n preventEncryptionScopeOverride?: boolean;\n}\n\n/**\n * Additional parameters for a set of operations.\n */\nexport interface LeaseAccessConditions {\n /**\n * If specified, the operation only succeeds if the resource's lease is active and matches this\n * ID.\n */\n leaseId?: string;\n}\n\n/**\n * Additional parameters for a set of operations.\n */\nexport interface ModifiedAccessConditions {\n /**\n * Specify this header value to operate only on a blob if it has been modified since the\n * specified date/time.\n */\n ifModifiedSince?: Date;\n /**\n * Specify this header value to operate only on a blob if it has not been modified since the\n * specified date/time.\n */\n ifUnmodifiedSince?: Date;\n /**\n * Specify an ETag value to operate only on blobs with a matching value.\n */\n ifMatch?: string;\n /**\n * Specify an ETag value to operate only on blobs without a matching value.\n */\n ifNoneMatch?: string;\n /**\n * Specify a SQL where clause on blob tags to operate only on blobs with a matching value.\n */\n ifTags?: string;\n}\n\n/**\n * Additional parameters for a set of operations, such as: Directory_create, Directory_rename,\n * Blob_rename.\n */\nexport interface DirectoryHttpHeaders {\n /**\n * Cache control for given resource\n */\n cacheControl?: string;\n /**\n * Content type for given resource\n */\n contentType?: string;\n /**\n * Content encoding for given resource\n */\n contentEncoding?: string;\n /**\n * Content language for given resource\n */\n contentLanguage?: string;\n /**\n * Content disposition for given resource\n */\n contentDisposition?: string;\n}\n\n/**\n * Additional parameters for a set of operations.\n */\nexport interface SourceModifiedAccessConditions {\n /**\n * Specify this header value to operate only on a blob if it has been modified since the\n * specified date/time.\n */\n sourceIfModifiedSince?: Date;\n /**\n * Specify this header value to operate only on a blob if it has not been modified since the\n * specified date/time.\n */\n sourceIfUnmodifiedSince?: Date;\n /**\n * Specify an ETag value to operate only on blobs with a matching value.\n */\n sourceIfMatch?: string;\n /**\n * Specify an ETag value to operate only on blobs without a matching value.\n */\n sourceIfNoneMatch?: string;\n /**\n * Specify a SQL where clause on blob tags to operate only on blobs with a matching value.\n */\n sourceIfTags?: string;\n}\n\n/**\n * Additional parameters for a set of operations.\n */\nexport interface CpkInfo {\n /**\n * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If\n * not specified, encryption is performed with the root account encryption key. For more\n * information, see Encryption at Rest for Azure Storage Services.\n */\n encryptionKey?: string;\n /**\n * The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key\n * header is provided.\n */\n encryptionKeySha256?: string;\n /**\n * The algorithm used to produce the encryption key hash. Currently, the only accepted value is\n * \"AES256\". Must be provided if the x-ms-encryption-key header is provided. Possible values\n * include: 'AES256'\n */\n encryptionAlgorithm?: EncryptionAlgorithmType;\n}\n\n/**\n * Additional parameters for a set of operations.\n */\nexport interface BlobHTTPHeaders {\n /**\n * Optional. Sets the blob's cache control. If specified, this property is stored with the blob\n * and returned with a read request.\n */\n blobCacheControl?: string;\n /**\n * Optional. Sets the blob's content type. If specified, this property is stored with the blob\n * and returned with a read request.\n */\n blobContentType?: string;\n /**\n * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes\n * for the individual blocks were validated when each was uploaded.\n */\n blobContentMD5?: Uint8Array;\n /**\n * Optional. Sets the blob's content encoding. If specified, this property is stored with the\n * blob and returned with a read request.\n */\n blobContentEncoding?: string;\n /**\n * Optional. Set the blob's content language. If specified, this property is stored with the blob\n * and returned with a read request.\n */\n blobContentLanguage?: string;\n /**\n * Optional. Sets the blob's Content-Disposition header.\n */\n blobContentDisposition?: string;\n}\n\n/**\n * Additional parameters for a set of operations, such as: PageBlob_uploadPages,\n * PageBlob_clearPages, PageBlob_uploadPagesFromURL.\n */\nexport interface SequenceNumberAccessConditions {\n /**\n * Specify this header value to operate only on a blob if it has a sequence number less than or\n * equal to the specified.\n */\n ifSequenceNumberLessThanOrEqualTo?: number;\n /**\n * Specify this header value to operate only on a blob if it has a sequence number less than the\n * specified.\n */\n ifSequenceNumberLessThan?: number;\n /**\n * Specify this header value to operate only on a blob if it has the specified sequence number.\n */\n ifSequenceNumberEqualTo?: number;\n}\n\n/**\n * Additional parameters for a set of operations, such as: AppendBlob_appendBlock,\n * AppendBlob_appendBlockFromUrl, AppendBlob_seal.\n */\nexport interface AppendPositionAccessConditions {\n /**\n * Optional conditional header. The max length in bytes permitted for the append blob. If the\n * Append Block operation would cause the blob to exceed that limit or if the blob size is\n * already greater than the value specified in this header, the request will fail with\n * MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).\n */\n maxSize?: number;\n /**\n * Optional conditional header, used only for the Append Block operation. A number indicating the\n * byte offset to compare. Append Block will succeed only if the append position is equal to this\n * number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP\n * status code 412 - Precondition Failed).\n */\n appendPosition?: number;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceSetPropertiesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceGetStatisticsOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceListContainersSegmentOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Filters the results to return only containers whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * A string value that identifies the portion of the list of containers to be returned with the\n * next listing operation. The operation returns the ContinuationToken value within the response\n * body if the listing operation did not return all containers remaining to be listed with the\n * current page. The ContinuationToken value can be used as the value for the marker parameter in\n * a subsequent call to request the next page of list items. The marker value is opaque to the\n * client.\n */\n marker?: string;\n /**\n * Specifies the maximum number of containers to return. If the request does not specify\n * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items.\n * Note that if the listing operation crosses a partition boundary, then the service will return\n * a continuation token for retrieving the remainder of the results. For this reason, it is\n * possible that the service will return fewer results than specified by maxresults, or than the\n * default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to specify that the container's metadata be returned as part of the\n * response body.\n */\n include?: ListContainersIncludeType[];\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceGetUserDelegationKeyOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceSubmitBatchOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ServiceFilterBlobsOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Filters the results to return only to return only blobs whose tags match the specified\n * expression.\n */\n where?: string;\n /**\n * A string value that identifies the portion of the list of containers to be returned with the\n * next listing operation. The operation returns the ContinuationToken value within the response\n * body if the listing operation did not return all containers remaining to be listed with the\n * current page. The ContinuationToken value can be used as the value for the marker parameter in\n * a subsequent call to request the next page of list items. The marker value is opaque to the\n * client.\n */\n marker?: string;\n /**\n * Specifies the maximum number of containers to return. If the request does not specify\n * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items.\n * Note that if the listing operation crosses a partition boundary, then the service will return\n * a continuation token for retrieving the remainder of the results. For this reason, it is\n * possible that the service will return fewer results than specified by maxresults, or than the\n * default of 5000.\n */\n maxPageSize?: number;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerCreateOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Specifies whether data in the container may be accessed publicly and the level of access.\n * Possible values include: 'container', 'blob'\n */\n access?: PublicAccessType;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n containerEncryptionScope?: ContainerEncryptionScope;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerSetMetadataOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerGetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerSetAccessPolicyOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * the acls for the container\n */\n containerAcl?: SignedIdentifier[];\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specifies whether data in the container may be accessed publicly and the level of access.\n * Possible values include: 'container', 'blob'\n */\n access?: PublicAccessType;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerRestoreOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Version 2019-12-12 and later. Specifies the name of the deleted container to\n * restore.\n */\n deletedContainerName?: string;\n /**\n * Optional. Version 2019-12-12 and later. Specifies the version of the deleted container to\n * restore.\n */\n deletedContainerVersion?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerAcquireLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never\n * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be\n * changed using renew or change.\n */\n duration?: number;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if\n * the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list\n * of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerReleaseLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerRenewLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * For a break operation, proposed duration the lease should continue before it is broken, in\n * seconds, between 0 and 60. This break period is only used if it is shorter than the time\n * remaining on the lease. If longer, the time remaining on the lease is used. A new lease will\n * not be available before the break period has expired, but the lease may be held for longer\n * than the break period. If this header does not appear with a break operation, a fixed-duration\n * lease breaks after the remaining lease period elapses, and an infinite lease breaks\n * immediately.\n */\n breakPeriod?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerChangeLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerListBlobFlatSegmentOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Filters the results to return only containers whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * A string value that identifies the portion of the list of containers to be returned with the\n * next listing operation. The operation returns the ContinuationToken value within the response\n * body if the listing operation did not return all containers remaining to be listed with the\n * current page. The ContinuationToken value can be used as the value for the marker parameter in\n * a subsequent call to request the next page of list items. The marker value is opaque to the\n * client.\n */\n marker?: string;\n /**\n * Specifies the maximum number of containers to return. If the request does not specify\n * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items.\n * Note that if the listing operation crosses a partition boundary, then the service will return\n * a continuation token for retrieving the remainder of the results. For this reason, it is\n * possible that the service will return fewer results than specified by maxresults, or than the\n * default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to specify one or more datasets to include in the response.\n */\n include?: ListBlobsIncludeItem[];\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface ContainerListBlobHierarchySegmentOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Filters the results to return only containers whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * A string value that identifies the portion of the list of containers to be returned with the\n * next listing operation. The operation returns the ContinuationToken value within the response\n * body if the listing operation did not return all containers remaining to be listed with the\n * current page. The ContinuationToken value can be used as the value for the marker parameter in\n * a subsequent call to request the next page of list items. The marker value is opaque to the\n * client.\n */\n marker?: string;\n /**\n * Specifies the maximum number of containers to return. If the request does not specify\n * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items.\n * Note that if the listing operation crosses a partition boundary, then the service will return\n * a continuation token for retrieving the remainder of the results. For this reason, it is\n * possible that the service will return fewer results than specified by maxresults, or than the\n * default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to specify one or more datasets to include in the response.\n */\n include?: ListBlobsIncludeItem[];\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface DirectoryCreateOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. User-defined properties to be stored with the file or directory, in the format of a\n * comma-separated list of name and value pairs \"n1=v1, n2=v2, ...\", where each value is base64\n * encoded.\n */\n directoryProperties?: string;\n /**\n * Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX\n * access permissions for the file owner, the file owning group, and others. Each class may be\n * granted read, write, or execute permission. The sticky bit is also supported. Both symbolic\n * (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n posixPermissions?: string;\n /**\n * Only valid if Hierarchical Namespace is enabled for the account. This umask restricts\n * permission settings for file and directory, and will only be applied when default Acl does not\n * exist in parent directory. If the umask bit has set, it means that the corresponding\n * permission will be disabled. Otherwise the corresponding permission will be determined by the\n * permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified,\n * a default umask - 0027 will be used.\n */\n posixUmask?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n directoryHttpHeaders?: DirectoryHttpHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface DirectoryRenameOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * When renaming a directory, the number of paths that are renamed with each invocation is\n * limited. If the number of paths to be renamed exceeds this limit, a continuation token is\n * returned in this response header. When a continuation token is returned in the response, it\n * must be specified in a subsequent invocation of the rename operation to continue renaming the\n * directory.\n */\n marker?: string;\n /**\n * Determines the behavior of the rename operation. Possible values include: 'legacy', 'posix'\n */\n pathRenameMode?: PathRenameMode;\n /**\n * Optional. User-defined properties to be stored with the file or directory, in the format of a\n * comma-separated list of name and value pairs \"n1=v1, n2=v2, ...\", where each value is base64\n * encoded.\n */\n directoryProperties?: string;\n /**\n * Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX\n * access permissions for the file owner, the file owning group, and others. Each class may be\n * granted read, write, or execute permission. The sticky bit is also supported. Both symbolic\n * (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n posixPermissions?: string;\n /**\n * Only valid if Hierarchical Namespace is enabled for the account. This umask restricts\n * permission settings for file and directory, and will only be applied when default Acl does not\n * exist in parent directory. If the umask bit has set, it means that the corresponding\n * permission will be disabled. Otherwise the corresponding permission will be determined by the\n * permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified,\n * a default umask - 0027 will be used.\n */\n posixUmask?: string;\n /**\n * A lease ID for the source path. If specified, the source path must have an active lease and\n * the lease ID must match.\n */\n sourceLeaseId?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n directoryHttpHeaders?: DirectoryHttpHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface DirectoryDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * When renaming a directory, the number of paths that are renamed with each invocation is\n * limited. If the number of paths to be renamed exceeds this limit, a continuation token is\n * returned in this response header. When a continuation token is returned in the response, it\n * must be specified in a subsequent invocation of the rename operation to continue renaming the\n * directory.\n */\n marker?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface DirectorySetAccessControlOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX\n * access permissions for the file owner, the file owning group, and others. Each class may be\n * granted read, write, or execute permission. The sticky bit is also supported. Both symbolic\n * (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n posixPermissions?: string;\n /**\n * Sets POSIX access control rights on files and directories. The value is a comma-separated list\n * of access control entries. Each access control entry (ACE) consists of a scope, a type, a user\n * or group identifier, and permissions in the format \"[scope:][type]:[id]:[permissions]\".\n */\n posixAcl?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface DirectoryGetAccessControlOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Valid only when Hierarchical Namespace is enabled for the account. If \"true\", the\n * identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be\n * transformed from Azure Active Directory Object IDs to User Principal Names. If \"false\", the\n * values will be returned as Azure Active Directory Object IDs. The default value is false.\n */\n upn?: boolean;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Return only the bytes of the blob in the specified range.\n */\n range?: string;\n /**\n * When set to true and specified together with the Range, the service returns the MD5 hash for\n * the range, as long as the range is less than or equal to 4 MB in size.\n */\n rangeGetContentMD5?: boolean;\n /**\n * When set to true and specified together with the Range, the service returns the CRC64 hash for\n * the range, as long as the range is less than or equal to 4 MB in size.\n */\n rangeGetContentCRC64?: boolean;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobGetPropertiesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobDeleteMethodOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Required if the blob has associated snapshots. Specify one of the following two options:\n * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots\n * and not the blob itself. Possible values include: 'include', 'only'\n */\n deleteSnapshots?: DeleteSnapshotsOptionType;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetAccessControlOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX\n * access permissions for the file owner, the file owning group, and others. Each class may be\n * granted read, write, or execute permission. The sticky bit is also supported. Both symbolic\n * (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n posixPermissions?: string;\n /**\n * Sets POSIX access control rights on files and directories. The value is a comma-separated list\n * of access control entries. Each access control entry (ACE) consists of a scope, a type, a user\n * or group identifier, and permissions in the format \"[scope:][type]:[id]:[permissions]\".\n */\n posixAcl?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobGetAccessControlOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Valid only when Hierarchical Namespace is enabled for the account. If \"true\", the\n * identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be\n * transformed from Azure Active Directory Object IDs to User Principal Names. If \"false\", the\n * values will be returned as Azure Active Directory Object IDs. The default value is false.\n */\n upn?: boolean;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobRenameOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Determines the behavior of the rename operation. Possible values include: 'legacy', 'posix'\n */\n pathRenameMode?: PathRenameMode;\n /**\n * Optional. User-defined properties to be stored with the file or directory, in the format of a\n * comma-separated list of name and value pairs \"n1=v1, n2=v2, ...\", where each value is base64\n * encoded.\n */\n directoryProperties?: string;\n /**\n * Optional and only valid if Hierarchical Namespace is enabled for the account. Sets POSIX\n * access permissions for the file owner, the file owning group, and others. Each class may be\n * granted read, write, or execute permission. The sticky bit is also supported. Both symbolic\n * (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n posixPermissions?: string;\n /**\n * Only valid if Hierarchical Namespace is enabled for the account. This umask restricts\n * permission settings for file and directory, and will only be applied when default Acl does not\n * exist in parent directory. If the umask bit has set, it means that the corresponding\n * permission will be disabled. Otherwise the corresponding permission will be determined by the\n * permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified,\n * a default umask - 0027 will be used.\n */\n posixUmask?: string;\n /**\n * A lease ID for the source path. If specified, the source path must have an active lease and\n * the lease ID must match.\n */\n sourceLeaseId?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n directoryHttpHeaders?: DirectoryHttpHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobUndeleteOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetExpiryOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * The time to set the blob to expiry\n */\n expiresOn?: string;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetHTTPHeadersOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetMetadataOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobAcquireLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never\n * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be\n * changed using renew or change.\n */\n duration?: number;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if\n * the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list\n * of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobReleaseLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobRenewLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobChangeLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * For a break operation, proposed duration the lease should continue before it is broken, in\n * seconds, between 0 and 60. This break period is only used if it is shorter than the time\n * remaining on the lease. If longer, the time remaining on the lease is used. A new lease will\n * not be available before the break period has expired, but the lease may be held for longer\n * than the break period. If this header does not appear with a break operation, a fixed-duration\n * lease breaks after the remaining lease period elapses, and an infinite lease breaks\n * immediately.\n */\n breakPeriod?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobCreateSnapshotOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobStartCopyFromURLOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n */\n tier?: AccessTier;\n /**\n * Optional: Indicates the priority with which to rehydrate an archived blob. Possible values\n * include: 'High', 'Standard'\n */\n rehydratePriority?: RehydratePriority;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.\n */\n sealBlob?: boolean;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobCopyFromURLOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n */\n tier?: AccessTier;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobAbortCopyFromURLOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetTierOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional: Indicates the priority with which to rehydrate an archived blob. Possible values\n * include: 'High', 'Standard'\n */\n rehydratePriority?: RehydratePriority;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobQueryOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * the query request\n */\n queryRequest?: QueryRequest;\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobGetTagsOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlobSetTagsOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * The version id parameter is an opaque DateTime value that, when present, specifies the version\n * of the blob to operate on. It's for service version 2019-10-10 and newer.\n */\n versionId?: string;\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Specify the transactional crc64 for the body, to be validated by the service.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Blob tags\n */\n tags?: BlobTags;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobCreateOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n */\n tier?: AccessTier;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Set for page blobs only. The sequence number is a user-controlled value that you can use to\n * track requests. The value of the sequence number must be between 0 and 2^63 - 1. Default\n * value: 0.\n */\n blobSequenceNumber?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Additional parameters for the operation\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobUploadPagesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Specify the transactional crc64 for the body, to be validated by the service.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Return only the bytes of the blob in the specified range.\n */\n range?: string;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n sequenceNumberAccessConditions?: SequenceNumberAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobClearPagesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Return only the bytes of the blob in the specified range.\n */\n range?: string;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n sequenceNumberAccessConditions?: SequenceNumberAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobUploadPagesFromURLOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Specify the crc64 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sequenceNumberAccessConditions?: SequenceNumberAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobGetPageRangesOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Return only the bytes of the blob in the specified range.\n */\n range?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobGetPageRangesDiffOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that\n * specifies that the response will contain only pages that were changed between target blob and\n * previous snapshot. Changed pages include both updated and cleared pages. The target blob may\n * be a snapshot, as long as the snapshot specified by prevsnapshot is the older of the two. Note\n * that incremental snapshots are currently supported only for blobs created on or after January\n * 1, 2016.\n */\n prevsnapshot?: string;\n /**\n * Optional. This header is only supported in service versions 2019-04-19 and after and specifies\n * the URL of a previous snapshot of the target blob. The response will only contain pages that\n * were changed between the target blob and its previous snapshot.\n */\n prevSnapshotUrl?: string;\n /**\n * Return only the bytes of the blob in the specified range.\n */\n range?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobResizeOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobUpdateSequenceNumberOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Set for page blobs only. The sequence number is a user-controlled value that you can use to\n * track requests. The value of the sequence number must be between 0 and 2^63 - 1. Default\n * value: 0.\n */\n blobSequenceNumber?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface PageBlobCopyIncrementalOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface AppendBlobCreateOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Additional parameters for the operation\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface AppendBlobAppendBlockOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Specify the transactional crc64 for the body, to be validated by the service.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n appendPositionAccessConditions?: AppendPositionAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface AppendBlobAppendBlockFromUrlOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Bytes of source data in the specified range.\n */\n sourceRange?: string;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Specify the crc64 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n appendPositionAccessConditions?: AppendPositionAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface AppendBlobSealOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n /**\n * Additional parameters for the operation\n */\n appendPositionAccessConditions?: AppendPositionAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlockBlobUploadOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n */\n tier?: AccessTier;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Additional parameters for the operation\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlockBlobStageBlockOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Specify the transactional crc64 for the body, to be validated by the service.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlockBlobStageBlockFromURLOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * Bytes of source data in the specified range.\n */\n sourceRange?: string;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Specify the crc64 calculated for the range of bytes that must be read from the copy source.\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n sourceModifiedAccessConditions?: SourceModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlockBlobCommitBlockListOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Specify the transactional md5 for the body, to be validated by the service.\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * Specify the transactional crc64 for the body, to be validated by the service.\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value\n * pairs are specified, the operation will copy the metadata from the source blob or file to the\n * destination blob. If one or more name-value pairs are specified, the destination blob is\n * created with the specified metadata, and metadata is not copied from the source blob or file.\n * Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules\n * for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more\n * information.\n */\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n */\n encryptionScope?: string;\n /**\n * Optional. Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n */\n tier?: AccessTier;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Optional. Used to set blob tags in various blob operations.\n */\n blobTagsString?: string;\n /**\n * Additional parameters for the operation\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n cpkInfo?: CpkInfo;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Optional Parameters.\n */\nexport interface BlockBlobGetBlockListOptionalParams extends coreHttp.RequestOptionsBase {\n /**\n * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob\n * snapshot to retrieve. For more information on working with blob snapshots, see Creating\n * a Snapshot of a Blob.\n */\n snapshot?: string;\n /**\n * The timeout parameter is expressed in seconds. For more information, see Setting\n * Timeouts for Blob Service Operations.\n */\n timeoutInSeconds?: number;\n /**\n * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the\n * analytics logs when storage analytics logging is enabled.\n */\n requestId?: string;\n /**\n * Additional parameters for the operation\n */\n leaseAccessConditions?: LeaseAccessConditions;\n /**\n * Additional parameters for the operation\n */\n modifiedAccessConditions?: ModifiedAccessConditions;\n}\n\n/**\n * Defines headers for SetProperties operation.\n */\nexport interface ServiceSetPropertiesHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetProperties operation.\n */\nexport interface ServiceGetPropertiesHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetStatistics operation.\n */\nexport interface ServiceGetStatisticsHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ListContainersSegment operation.\n */\nexport interface ServiceListContainersSegmentHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetUserDelegationKey operation.\n */\nexport interface ServiceGetUserDelegationKeyHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetAccountInfo operation.\n */\nexport interface ServiceGetAccountInfoHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * Identifies the sku name of the account. Possible values include: 'Standard_LRS',\n * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'\n */\n skuName?: SkuName;\n /**\n * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2',\n * 'FileStorage', 'BlockBlobStorage'\n */\n accountKind?: AccountKind;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SubmitBatch operation.\n */\nexport interface ServiceSubmitBatchHeaders {\n /**\n * The media type of the body of the response. For batch requests, this is multipart/mixed;\n * boundary=batchresponse_GUID\n */\n contentType?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for FilterBlobs operation.\n */\nexport interface ServiceFilterBlobsHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Create operation.\n */\nexport interface ContainerCreateHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetProperties operation.\n */\nexport interface ContainerGetPropertiesHeaders {\n metadata?: { [propertyName: string]: string };\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n /**\n * Lease state of the blob. Possible values include: 'available', 'leased', 'expired',\n * 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * The current lease status of the blob. Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * Indicated whether data in the container may be accessed publicly and the level of access.\n * Possible values include: 'container', 'blob'\n */\n blobPublicAccess?: PublicAccessType;\n /**\n * Indicates whether the container has an immutability policy set on it.\n */\n hasImmutabilityPolicy?: boolean;\n /**\n * Indicates whether the container has a legal hold.\n */\n hasLegalHold?: boolean;\n /**\n * The default encryption scope for the container.\n */\n defaultEncryptionScope?: string;\n /**\n * Indicates whether the container's default encryption scope can be overriden.\n */\n denyEncryptionScopeOverride?: boolean;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Delete operation.\n */\nexport interface ContainerDeleteHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetMetadata operation.\n */\nexport interface ContainerSetMetadataHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetAccessPolicy operation.\n */\nexport interface ContainerGetAccessPolicyHeaders {\n /**\n * Indicated whether data in the container may be accessed publicly and the level of access.\n * Possible values include: 'container', 'blob'\n */\n blobPublicAccess?: PublicAccessType;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetAccessPolicy operation.\n */\nexport interface ContainerSetAccessPolicyHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Restore operation.\n */\nexport interface ContainerRestoreHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for AcquireLease operation.\n */\nexport interface ContainerAcquireLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ReleaseLease operation.\n */\nexport interface ContainerReleaseLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for RenewLease operation.\n */\nexport interface ContainerRenewLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for BreakLease operation.\n */\nexport interface ContainerBreakLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * Approximate time remaining in the lease period, in seconds.\n */\n leaseTime?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ChangeLease operation.\n */\nexport interface ContainerChangeLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ListBlobFlatSegment operation.\n */\nexport interface ContainerListBlobFlatSegmentHeaders {\n /**\n * The media type of the body of the response. For List Blobs this is 'application/xml'\n */\n contentType?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ListBlobHierarchySegment operation.\n */\nexport interface ContainerListBlobHierarchySegmentHeaders {\n /**\n * The media type of the body of the response. For List Blobs this is 'application/xml'\n */\n contentType?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetAccountInfo operation.\n */\nexport interface ContainerGetAccountInfoHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * Identifies the sku name of the account. Possible values include: 'Standard_LRS',\n * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'\n */\n skuName?: SkuName;\n /**\n * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2',\n * 'FileStorage', 'BlockBlobStorage'\n */\n accountKind?: AccountKind;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Create operation.\n */\nexport interface DirectoryCreateHeaders {\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * The size of the resource in bytes.\n */\n contentLength?: number;\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n}\n\n/**\n * Defines headers for Rename operation.\n */\nexport interface DirectoryRenameHeaders {\n /**\n * When renaming a directory, the number of paths that are renamed with each invocation is\n * limited. If the number of paths to be renamed exceeds this limit, a continuation token is\n * returned in this response header. When a continuation token is returned in the response, it\n * must be specified in a subsequent invocation of the rename operation to continue renaming the\n * directory.\n */\n marker?: string;\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * The size of the resource in bytes.\n */\n contentLength?: number;\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n}\n\n/**\n * Defines headers for Delete operation.\n */\nexport interface DirectoryDeleteHeaders {\n /**\n * When renaming a directory, the number of paths that are renamed with each invocation is\n * limited. If the number of paths to be renamed exceeds this limit, a continuation token is\n * returned in this response header. When a continuation token is returned in the response, it\n * must be specified in a subsequent invocation of the rename operation to continue renaming the\n * directory.\n */\n marker?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n}\n\n/**\n * Defines headers for SetAccessControl operation.\n */\nexport interface DirectorySetAccessControlHeaders {\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n}\n\n/**\n * Defines headers for GetAccessControl operation.\n */\nexport interface DirectoryGetAccessControlHeaders {\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * The owner of the file or directory. Included in the response if Hierarchical Namespace is\n * enabled for the account.\n */\n xMsOwner?: string;\n /**\n * The owning group of the file or directory. Included in the response if Hierarchical Namespace\n * is enabled for the account.\n */\n xMsGroup?: string;\n /**\n * The POSIX access permissions for the file owner, the file owning group, and others. Included\n * in the response if Hierarchical Namespace is enabled for the account.\n */\n xMsPermissions?: string;\n /**\n * The POSIX access control list for the file or directory. Included in the response only if the\n * action is \"getAccessControl\" and Hierarchical Namespace is enabled for the account.\n */\n xMsAcl?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n}\n\n/**\n * Defines headers for Download operation.\n */\nexport interface BlobDownloadHeaders {\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Only valid when Object Replication is enabled for the storage container and on the\n * destination blob of the replication.\n */\n objectReplicationPolicyId?: string;\n objectReplicationRules?: { [propertyName: string]: string };\n /**\n * The number of bytes present in the response body.\n */\n contentLength?: number;\n /**\n * The media type of the body of the response. For Download Blob this is\n * 'application/octet-stream'\n */\n contentType?: string;\n /**\n * Indicates the range of bytes returned in the event that the client requested a subset of the\n * blob by setting the 'Range' request header.\n */\n contentRange?: string;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header returns the value that was specified for the Content-Encoding request header\n */\n contentEncoding?: string;\n /**\n * This header is returned if it was previously specified for the blob.\n */\n cacheControl?: string;\n /**\n * This header returns the value that was specified for the 'x-ms-blob-content-disposition'\n * header. The Content-Disposition response header field conveys additional information about how\n * to process the response payload, and also can be used to attach additional metadata. For\n * example, if set to attachment, it indicates that the user-agent should not display the\n * response, but instead show a Save As dialog with a filename other than the blob name\n * specified.\n */\n contentDisposition?: string;\n /**\n * This header returns the value that was specified for the Content-Language request header.\n */\n contentLanguage?: string;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob'\n */\n blobType?: BlobType;\n /**\n * Conclusion time of the last attempted Copy Blob operation where this blob was the destination\n * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This\n * header does not appear if a copy is pending, if this blob has never been the destination in a\n * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation\n * using Set Blob Properties, Put Blob, or Put Block List.\n */\n copyCompletedOn?: Date;\n /**\n * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal\n * or non-fatal copy operation failure. This header does not appear if this blob has never been\n * the destination in a Copy Blob operation, or if this blob has been modified after a concluded\n * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyStatusDescription?: string;\n /**\n * String identifier for this copy operation. Use with Get Blob Properties to check the status of\n * this copy operation, or pass to Abort Copy Blob to abort a pending copy.\n */\n copyId?: string;\n /**\n * Contains the number of bytes copied and the total bytes in the source in the last attempted\n * Copy Blob operation where this blob was the destination blob. Can show between 0 and\n * Content-Length bytes copied. This header does not appear if this blob has never been the\n * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy\n * Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyProgress?: string;\n /**\n * URL up to 2 KB in length that specifies the source blob or file used in the last attempted\n * Copy Blob operation where this blob was the destination blob. This header does not appear if\n * this blob has never been the destination in a Copy Blob operation, or if this blob has been\n * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put\n * Block List.\n */\n copySource?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n /**\n * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n /**\n * Lease state of the blob. Possible values include: 'available', 'leased', 'expired',\n * 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * The current lease status of the blob. Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * Indicates that the service supports requests for partial blob content.\n */\n acceptRanges?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The number of committed blocks present in the blob. This header is returned only for append\n * blobs.\n */\n blobCommittedBlockCount?: number;\n /**\n * The value of this header is set to true if the blob data and application metadata are\n * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when\n * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted).\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n /**\n * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this\n * response header is returned with the value of the whole blob's MD5 value. This value may or\n * may not be equal to the value returned in Content-MD5 header, with the latter calculated from\n * the requested range\n */\n blobContentMD5?: Uint8Array;\n /**\n * The number of tags associated with the blob\n */\n tagCount?: number;\n /**\n * If this blob has been sealed\n */\n isSealed?: boolean;\n /**\n * UTC date/time value generated by the service that indicates the time at which the blob was\n * last read or written to\n */\n lastAccessed?: Date;\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n contentCrc64?: Uint8Array;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetProperties operation.\n */\nexport interface BlobGetPropertiesHeaders {\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Returns the date and time the blob was created.\n */\n createdOn?: Date;\n metadata?: { [propertyName: string]: string };\n /**\n * Optional. Only valid when Object Replication is enabled for the storage container and on the\n * destination blob of the replication.\n */\n objectReplicationPolicyId?: string;\n objectReplicationRules?: { [propertyName: string]: string };\n /**\n * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob'\n */\n blobType?: BlobType;\n /**\n * Conclusion time of the last attempted Copy Blob operation where this blob was the destination\n * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This\n * header does not appear if a copy is pending, if this blob has never been the destination in a\n * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation\n * using Set Blob Properties, Put Blob, or Put Block List.\n */\n copyCompletedOn?: Date;\n /**\n * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal\n * or non-fatal copy operation failure. This header does not appear if this blob has never been\n * the destination in a Copy Blob operation, or if this blob has been modified after a concluded\n * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyStatusDescription?: string;\n /**\n * String identifier for this copy operation. Use with Get Blob Properties to check the status of\n * this copy operation, or pass to Abort Copy Blob to abort a pending copy.\n */\n copyId?: string;\n /**\n * Contains the number of bytes copied and the total bytes in the source in the last attempted\n * Copy Blob operation where this blob was the destination blob. Can show between 0 and\n * Content-Length bytes copied. This header does not appear if this blob has never been the\n * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy\n * Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyProgress?: string;\n /**\n * URL up to 2 KB in length that specifies the source blob or file used in the last attempted\n * Copy Blob operation where this blob was the destination blob. This header does not appear if\n * this blob has never been the destination in a Copy Blob operation, or if this blob has been\n * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put\n * Block List.\n */\n copySource?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n /**\n * Included if the blob is incremental copy blob.\n */\n isIncrementalCopy?: boolean;\n /**\n * Included if the blob is incremental copy blob or incremental copy snapshot, if\n * x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot\n * for this blob.\n */\n destinationSnapshot?: string;\n /**\n * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n /**\n * Lease state of the blob. Possible values include: 'available', 'leased', 'expired',\n * 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * The current lease status of the blob. Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * The size of the blob in bytes. For a page blob, this header returns the value of the\n * x-ms-blob-content-length header that is stored with the blob.\n */\n contentLength?: number;\n /**\n * The content type specified for the blob. The default content type is\n * 'application/octet-stream'\n */\n contentType?: string;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header returns the value that was specified for the Content-Encoding request header\n */\n contentEncoding?: string;\n /**\n * This header returns the value that was specified for the 'x-ms-blob-content-disposition'\n * header. The Content-Disposition response header field conveys additional information about how\n * to process the response payload, and also can be used to attach additional metadata. For\n * example, if set to attachment, it indicates that the user-agent should not display the\n * response, but instead show a Save As dialog with a filename other than the blob name\n * specified.\n */\n contentDisposition?: string;\n /**\n * This header returns the value that was specified for the Content-Language request header.\n */\n contentLanguage?: string;\n /**\n * This header is returned if it was previously specified for the blob.\n */\n cacheControl?: string;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * Indicates that the service supports requests for partial blob content.\n */\n acceptRanges?: string;\n /**\n * The number of committed blocks present in the blob. This header is returned only for append\n * blobs.\n */\n blobCommittedBlockCount?: number;\n /**\n * The value of this header is set to true if the blob data and application metadata are\n * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when\n * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted).\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only\n * returned when the metadata was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n /**\n * The tier of page blob on a premium storage account or tier of block blob on blob storage LRS\n * accounts. For a list of allowed premium page blob tiers, see\n * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For\n * blob storage LRS accounts, valid values are Hot/Cool/Archive.\n */\n accessTier?: string;\n /**\n * For page blobs on a premium storage account only. If the access tier is not explicitly set on\n * the blob, the tier is inferred based on its content length and this header will be returned\n * with true value.\n */\n accessTierInferred?: boolean;\n /**\n * For blob storage LRS accounts, valid values are\n * rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not\n * complete then this header is returned indicating that rehydrate is pending and also tells the\n * destination tier.\n */\n archiveStatus?: string;\n /**\n * The time the tier was changed on the object. This is only returned if the tier on the block\n * blob was ever set.\n */\n accessTierChangedOn?: Date;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * The value of this header indicates whether version of this blob is a current version, see also\n * x-ms-version-id header.\n */\n isCurrentVersion?: boolean;\n /**\n * The number of tags associated with the blob\n */\n tagCount?: number;\n /**\n * The time this blob will expire.\n */\n expiresOn?: Date;\n /**\n * If this blob has been sealed\n */\n isSealed?: boolean;\n /**\n * If an object is in rehydrate pending state then this header is returned with priority of\n * rehydrate. Possible values include: 'High', 'Standard'\n */\n rehydratePriority?: RehydratePriority;\n /**\n * UTC date/time value generated by the service that indicates the time at which the blob was\n * last read or written to\n */\n lastAccessed?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Delete operation.\n */\nexport interface BlobDeleteHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetAccessControl operation.\n */\nexport interface BlobSetAccessControlHeaders {\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n}\n\n/**\n * Defines headers for GetAccessControl operation.\n */\nexport interface BlobGetAccessControlHeaders {\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * The owner of the file or directory. Included in the response if Hierarchical Namespace is\n * enabled for the account.\n */\n xMsOwner?: string;\n /**\n * The owning group of the file or directory. Included in the response if Hierarchical Namespace\n * is enabled for the account.\n */\n xMsGroup?: string;\n /**\n * The POSIX access permissions for the file owner, the file owning group, and others. Included\n * in the response if Hierarchical Namespace is enabled for the account.\n */\n xMsPermissions?: string;\n /**\n * The POSIX access control list for the file or directory. Included in the response only if the\n * action is \"getAccessControl\" and Hierarchical Namespace is enabled for the account.\n */\n xMsAcl?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n}\n\n/**\n * Defines headers for Rename operation.\n */\nexport interface BlobRenameHeaders {\n /**\n * An HTTP entity tag associated with the file or directory.\n */\n etag?: string;\n /**\n * The data and time the file or directory was last modified. Write operations on the file or\n * directory update the last modified time.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * A server-generated UUID recorded in the analytics logs for troubleshooting and correlation.\n */\n requestId?: string;\n /**\n * The version of the REST protocol used to process the request.\n */\n version?: string;\n /**\n * The size of the resource in bytes.\n */\n contentLength?: number;\n /**\n * A UTC date/time value generated by the service that indicates the time at which the response\n * was initiated.\n */\n date?: Date;\n}\n\n/**\n * Defines headers for Create operation.\n */\nexport interface PageBlobCreateHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Create operation.\n */\nexport interface AppendBlobCreateHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Upload operation.\n */\nexport interface BlockBlobUploadHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Undelete operation.\n */\nexport interface BlobUndeleteHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated.\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetExpiry operation.\n */\nexport interface BlobSetExpiryHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated.\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetHTTPHeaders operation.\n */\nexport interface BlobSetHTTPHeadersHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetMetadata operation.\n */\nexport interface BlobSetMetadataHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only\n * returned when the metadata was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for AcquireLease operation.\n */\nexport interface BlobAcquireLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a blobs's lease\n */\n leaseId?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ReleaseLease operation.\n */\nexport interface BlobReleaseLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for RenewLease operation.\n */\nexport interface BlobRenewLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a blobs's lease\n */\n leaseId?: string;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ChangeLease operation.\n */\nexport interface BlobChangeLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Uniquely identifies a blobs's lease\n */\n leaseId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for BreakLease operation.\n */\nexport interface BlobBreakLeaseHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the blob was last modified. Any operation that modifies the blob,\n * including an update of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Approximate time remaining in the lease period, in seconds.\n */\n leaseTime?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for CreateSnapshot operation.\n */\nexport interface BlobCreateSnapshotHeaders {\n /**\n * Uniquely identifies the snapshot and indicates the snapshot version. It may be used in\n * subsequent requests to access the snapshot\n */\n snapshot?: string;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * True if the contents of the request are successfully encrypted using the specified algorithm,\n * and false otherwise. For a snapshot request, this header is set to true when metadata was\n * provided in the request and encrypted with a customer-provided key.\n */\n isServerEncrypted?: boolean;\n errorCode?: string;\n}\n\n/**\n * Defines headers for StartCopyFromURL operation.\n */\nexport interface BlobStartCopyFromURLHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * String identifier for this copy operation. Use with Get Blob Properties to check the status of\n * this copy operation, or pass to Abort Copy Blob to abort a pending copy.\n */\n copyId?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n errorCode?: string;\n}\n\n/**\n * Defines headers for CopyFromURL operation.\n */\nexport interface BlobCopyFromURLHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * String identifier for this copy operation.\n */\n copyId?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'success'\n */\n copyStatus?: SyncCopyStatusType;\n /**\n * This response header is returned so that the client can check for the integrity of the copied\n * content. This header is only returned if the source content MD5 was specified.\n */\n contentMD5?: Uint8Array;\n /**\n * This response header is returned so that the client can check for the integrity of the copied\n * content.\n */\n xMsContentCrc64?: Uint8Array;\n errorCode?: string;\n}\n\n/**\n * Defines headers for AbortCopyFromURL operation.\n */\nexport interface BlobAbortCopyFromURLHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetTier operation.\n */\nexport interface BlobSetTierHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and newer.\n */\n version?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetAccountInfo operation.\n */\nexport interface BlobGetAccountInfoHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * Identifies the sku name of the account. Possible values include: 'Standard_LRS',\n * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'\n */\n skuName?: SkuName;\n /**\n * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2',\n * 'FileStorage', 'BlockBlobStorage'\n */\n accountKind?: AccountKind;\n errorCode?: string;\n}\n\n/**\n * Defines headers for StageBlock operation.\n */\nexport interface BlockBlobStageBlockHeaders {\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n contentMD5?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned\n * when the block was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for StageBlockFromURL operation.\n */\nexport interface BlockBlobStageBlockFromURLHeaders {\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned\n * when the block was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for CommitBlockList operation.\n */\nexport interface BlockBlobCommitBlockListHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * This header is returned so that the client can check for message content integrity. This\n * header refers to the content of the request, meaning, in this case, the list of blocks, and\n * not the content of the blob itself.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. This\n * header refers to the content of the request, meaning, in this case, the list of blocks, and\n * not the content of the blob itself.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * A DateTime value returned by the service that uniquely identifies the blob. The value of this\n * header indicates the blob version, and may be used in subsequent requests to access this\n * version of the blob.\n */\n versionId?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetBlockList operation.\n */\nexport interface BlockBlobGetBlockListHeaders {\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * The media type of the body of the response. For Get Block List this is 'application/xml'\n */\n contentType?: string;\n /**\n * The size of the blob in bytes.\n */\n blobContentLength?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for UploadPages operation.\n */\nexport interface PageBlobUploadPagesHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * The current sequence number for the page blob.\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned\n * when the pages were encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for ClearPages operation.\n */\nexport interface PageBlobClearPagesHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * The current sequence number for the page blob.\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for UploadPagesFromURL operation.\n */\nexport interface PageBlobUploadPagesFromURLHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * The current sequence number for the page blob.\n */\n blobSequenceNumber?: number;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetPageRanges operation.\n */\nexport interface PageBlobGetPageRangesHeaders {\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * The size of the blob in bytes.\n */\n blobContentLength?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetPageRangesDiff operation.\n */\nexport interface PageBlobGetPageRangesDiffHeaders {\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * The size of the blob in bytes.\n */\n blobContentLength?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Resize operation.\n */\nexport interface PageBlobResizeHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for UpdateSequenceNumber operation.\n */\nexport interface PageBlobUpdateSequenceNumberHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for CopyIncremental operation.\n */\nexport interface PageBlobCopyIncrementalHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * String identifier for this copy operation. Use with Get Blob Properties to check the status of\n * this copy operation, or pass to Abort Copy Blob to abort a pending copy.\n */\n copyId?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n errorCode?: string;\n}\n\n/**\n * Defines headers for AppendBlock operation.\n */\nexport interface AppendBlobAppendBlockHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * This response header is returned only for append operations. It returns the offset at which\n * the block was committed, in bytes.\n */\n blobAppendOffset?: string;\n /**\n * The number of committed blocks present in the blob. This header is returned only for append\n * blobs.\n */\n blobCommittedBlockCount?: number;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned\n * when the block was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n errorCode?: string;\n}\n\n/**\n * Defines headers for AppendBlockFromUrl operation.\n */\nexport interface AppendBlobAppendBlockFromUrlHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header is returned so that the client can check for message content integrity. The value\n * of this header is computed by the Blob service; it is not necessarily the same value specified\n * in the request headers.\n */\n xMsContentCrc64?: Uint8Array;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * This response header is returned only for append operations. It returns the offset at which\n * the block was committed, in bytes.\n */\n blobAppendOffset?: string;\n /**\n * The number of committed blocks present in the blob. This header is returned only for append\n * blobs.\n */\n blobCommittedBlockCount?: number;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned\n * when the block was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n /**\n * The value of this header is set to true if the contents of the request are successfully\n * encrypted using the specified algorithm, and false otherwise.\n */\n isServerEncrypted?: boolean;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Seal operation.\n */\nexport interface AppendBlobSealHeaders {\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * If this blob has been sealed\n */\n isSealed?: boolean;\n errorCode?: string;\n}\n\n/**\n * Defines headers for Query operation.\n */\nexport interface BlobQueryHeaders {\n /**\n * Returns the date and time the container was last modified. Any operation that modifies the\n * blob, including an update of the blob's metadata or properties, changes the last-modified time\n * of the blob.\n */\n lastModified?: Date;\n metadata?: { [propertyName: string]: string };\n /**\n * The number of bytes present in the response body.\n */\n contentLength?: number;\n /**\n * The media type of the body of the response. For Download Blob this is\n * 'application/octet-stream'\n */\n contentType?: string;\n /**\n * Indicates the range of bytes returned in the event that the client requested a subset of the\n * blob by setting the 'Range' request header.\n */\n contentRange?: string;\n /**\n * The ETag contains a value that you can use to perform operations conditionally. If the request\n * version is 2011-08-18 or newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * If the blob has an MD5 hash and this operation is to read the full blob, this response header\n * is returned so that the client can check for message content integrity.\n */\n contentMD5?: Uint8Array;\n /**\n * This header returns the value that was specified for the Content-Encoding request header\n */\n contentEncoding?: string;\n /**\n * This header is returned if it was previously specified for the blob.\n */\n cacheControl?: string;\n /**\n * This header returns the value that was specified for the 'x-ms-blob-content-disposition'\n * header. The Content-Disposition response header field conveys additional information about how\n * to process the response payload, and also can be used to attach additional metadata. For\n * example, if set to attachment, it indicates that the user-agent should not display the\n * response, but instead show a Save As dialog with a filename other than the blob name\n * specified.\n */\n contentDisposition?: string;\n /**\n * This header returns the value that was specified for the Content-Language request header.\n */\n contentLanguage?: string;\n /**\n * The current sequence number for a page blob. This header is not returned for block blobs or\n * append blobs\n */\n blobSequenceNumber?: number;\n /**\n * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob'\n */\n blobType?: BlobType;\n /**\n * Conclusion time of the last attempted Copy Blob operation where this blob was the destination\n * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This\n * header does not appear if a copy is pending, if this blob has never been the destination in a\n * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation\n * using Set Blob Properties, Put Blob, or Put Block List.\n */\n copyCompletionTime?: Date;\n /**\n * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal\n * or non-fatal copy operation failure. This header does not appear if this blob has never been\n * the destination in a Copy Blob operation, or if this blob has been modified after a concluded\n * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyStatusDescription?: string;\n /**\n * String identifier for this copy operation. Use with Get Blob Properties to check the status of\n * this copy operation, or pass to Abort Copy Blob to abort a pending copy.\n */\n copyId?: string;\n /**\n * Contains the number of bytes copied and the total bytes in the source in the last attempted\n * Copy Blob operation where this blob was the destination blob. Can show between 0 and\n * Content-Length bytes copied. This header does not appear if this blob has never been the\n * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy\n * Blob operation using Set Blob Properties, Put Blob, or Put Block List\n */\n copyProgress?: string;\n /**\n * URL up to 2 KB in length that specifies the source blob or file used in the last attempted\n * Copy Blob operation where this blob was the destination blob. This header does not appear if\n * this blob has never been the destination in a Copy Blob operation, or if this blob has been\n * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put\n * Block List.\n */\n copySource?: string;\n /**\n * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n */\n copyStatus?: CopyStatusType;\n /**\n * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'\n */\n leaseDuration?: LeaseDurationType;\n /**\n * Lease state of the blob. Possible values include: 'available', 'leased', 'expired',\n * 'breaking', 'broken'\n */\n leaseState?: LeaseStateType;\n /**\n * The current lease status of the blob. Possible values include: 'locked', 'unlocked'\n */\n leaseStatus?: LeaseStatusType;\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * Indicates that the service supports requests for partial blob content.\n */\n acceptRanges?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n /**\n * The number of committed blocks present in the blob. This header is returned only for append\n * blobs.\n */\n blobCommittedBlockCount?: number;\n /**\n * The value of this header is set to true if the blob data and application metadata are\n * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when\n * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted).\n */\n isServerEncrypted?: boolean;\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned\n * when the blob was encrypted with a customer-provided key.\n */\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the blob contents and application\n * metadata. Note that the absence of this header implies use of the default account encryption\n * scope.\n */\n encryptionScope?: string;\n /**\n * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this\n * response header is returned with the value of the whole blob's MD5 value. This value may or\n * may not be equal to the value returned in Content-MD5 header, with the latter calculated from\n * the requested range\n */\n blobContentMD5?: Uint8Array;\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n contentCrc64?: Uint8Array;\n errorCode?: string;\n}\n\n/**\n * Defines headers for GetTags operation.\n */\nexport interface BlobGetTagsHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines headers for SetTags operation.\n */\nexport interface BlobSetTagsHeaders {\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n */\n clientRequestId?: string;\n /**\n * This header uniquely identifies the request that was made and can be used for troubleshooting\n * the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used to execute the request. This header is returned\n * for requests made against version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that indicates the time at which the response was\n * initiated\n */\n date?: Date;\n errorCode?: string;\n}\n\n/**\n * Defines values for PublicAccessType.\n * Possible values include: 'container', 'blob'\n * @readonly\n * @enum {string}\n */\nexport type PublicAccessType = 'container' | 'blob';\n\n/**\n * Defines values for CopyStatusType.\n * Possible values include: 'pending', 'success', 'aborted', 'failed'\n * @readonly\n * @enum {string}\n */\nexport type CopyStatusType = 'pending' | 'success' | 'aborted' | 'failed';\n\n/**\n * Defines values for LeaseDurationType.\n * Possible values include: 'infinite', 'fixed'\n * @readonly\n * @enum {string}\n */\nexport type LeaseDurationType = 'infinite' | 'fixed';\n\n/**\n * Defines values for LeaseStateType.\n * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken'\n * @readonly\n * @enum {string}\n */\nexport type LeaseStateType = 'available' | 'leased' | 'expired' | 'breaking' | 'broken';\n\n/**\n * Defines values for LeaseStatusType.\n * Possible values include: 'locked', 'unlocked'\n * @readonly\n * @enum {string}\n */\nexport type LeaseStatusType = 'locked' | 'unlocked';\n\n/**\n * Defines values for AccessTier.\n * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70',\n * 'P80', 'Hot', 'Cool', 'Archive'\n * @readonly\n * @enum {string}\n */\nexport type AccessTier = 'P4' | 'P6' | 'P10' | 'P15' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'Hot' | 'Cool' | 'Archive';\n\n/**\n * Defines values for ArchiveStatus.\n * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool'\n * @readonly\n * @enum {string}\n */\nexport type ArchiveStatus = 'rehydrate-pending-to-hot' | 'rehydrate-pending-to-cool';\n\n/**\n * Defines values for BlobType.\n * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob'\n * @readonly\n * @enum {string}\n */\nexport type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob';\n\n/**\n * Defines values for RehydratePriority.\n * Possible values include: 'High', 'Standard'\n * @readonly\n * @enum {string}\n */\nexport type RehydratePriority = 'High' | 'Standard';\n\n/**\n * Defines values for StorageErrorCode.\n * Possible values include: 'AccountAlreadyExists', 'AccountBeingCreated', 'AccountIsDisabled',\n * 'AuthenticationFailed', 'AuthorizationFailure', 'ConditionHeadersNotSupported',\n * 'ConditionNotMet', 'EmptyMetadataKey', 'InsufficientAccountPermissions', 'InternalError',\n * 'InvalidAuthenticationInfo', 'InvalidHeaderValue', 'InvalidHttpVerb', 'InvalidInput',\n * 'InvalidMd5', 'InvalidMetadata', 'InvalidQueryParameterValue', 'InvalidRange',\n * 'InvalidResourceName', 'InvalidUri', 'InvalidXmlDocument', 'InvalidXmlNodeValue', 'Md5Mismatch',\n * 'MetadataTooLarge', 'MissingContentLengthHeader', 'MissingRequiredQueryParameter',\n * 'MissingRequiredHeader', 'MissingRequiredXmlNode', 'MultipleConditionHeadersNotSupported',\n * 'OperationTimedOut', 'OutOfRangeInput', 'OutOfRangeQueryParameterValue', 'RequestBodyTooLarge',\n * 'ResourceTypeMismatch', 'RequestUrlFailedToParse', 'ResourceAlreadyExists', 'ResourceNotFound',\n * 'ServerBusy', 'UnsupportedHeader', 'UnsupportedXmlNode', 'UnsupportedQueryParameter',\n * 'UnsupportedHttpVerb', 'AppendPositionConditionNotMet', 'BlobAlreadyExists',\n * 'BlobImmutableDueToPolicy', 'BlobNotFound', 'BlobOverwritten',\n * 'BlobTierInadequateForContentLength', 'BlockCountExceedsLimit', 'BlockListTooLong',\n * 'CannotChangeToLowerTier', 'CannotVerifyCopySource', 'ContainerAlreadyExists',\n * 'ContainerBeingDeleted', 'ContainerDisabled', 'ContainerNotFound',\n * 'ContentLengthLargerThanTierLimit', 'CopyAcrossAccountsNotSupported', 'CopyIdMismatch',\n * 'FeatureVersionMismatch', 'IncrementalCopyBlobMismatch',\n * 'IncrementalCopyOfEralierVersionSnapshotNotAllowed', 'IncrementalCopySourceMustBeSnapshot',\n * 'InfiniteLeaseDurationRequired', 'InvalidBlobOrBlock', 'InvalidBlobTier', 'InvalidBlobType',\n * 'InvalidBlockId', 'InvalidBlockList', 'InvalidOperation', 'InvalidPageRange',\n * 'InvalidSourceBlobType', 'InvalidSourceBlobUrl', 'InvalidVersionForPageBlobOperation',\n * 'LeaseAlreadyPresent', 'LeaseAlreadyBroken', 'LeaseIdMismatchWithBlobOperation',\n * 'LeaseIdMismatchWithContainerOperation', 'LeaseIdMismatchWithLeaseOperation', 'LeaseIdMissing',\n * 'LeaseIsBreakingAndCannotBeAcquired', 'LeaseIsBreakingAndCannotBeChanged',\n * 'LeaseIsBrokenAndCannotBeRenewed', 'LeaseLost', 'LeaseNotPresentWithBlobOperation',\n * 'LeaseNotPresentWithContainerOperation', 'LeaseNotPresentWithLeaseOperation',\n * 'MaxBlobSizeConditionNotMet', 'NoAuthenticationInformation', 'NoPendingCopyOperation',\n * 'OperationNotAllowedOnIncrementalCopyBlob', 'PendingCopyOperation',\n * 'PreviousSnapshotCannotBeNewer', 'PreviousSnapshotNotFound',\n * 'PreviousSnapshotOperationNotSupported', 'SequenceNumberConditionNotMet',\n * 'SequenceNumberIncrementTooLarge', 'SnapshotCountExceeded', 'SnaphotOperationRateExceeded',\n * 'SnapshotsPresent', 'SourceConditionNotMet', 'SystemInUse', 'TargetConditionNotMet',\n * 'UnauthorizedBlobOverwrite', 'BlobBeingRehydrated', 'BlobArchived', 'BlobNotArchived',\n * 'AuthorizationSourceIPMismatch', 'AuthorizationProtocolMismatch',\n * 'AuthorizationPermissionMismatch', 'AuthorizationServiceMismatch',\n * 'AuthorizationResourceTypeMismatch'\n * @readonly\n * @enum {string}\n */\nexport type StorageErrorCode = 'AccountAlreadyExists' | 'AccountBeingCreated' | 'AccountIsDisabled' | 'AuthenticationFailed' | 'AuthorizationFailure' | 'ConditionHeadersNotSupported' | 'ConditionNotMet' | 'EmptyMetadataKey' | 'InsufficientAccountPermissions' | 'InternalError' | 'InvalidAuthenticationInfo' | 'InvalidHeaderValue' | 'InvalidHttpVerb' | 'InvalidInput' | 'InvalidMd5' | 'InvalidMetadata' | 'InvalidQueryParameterValue' | 'InvalidRange' | 'InvalidResourceName' | 'InvalidUri' | 'InvalidXmlDocument' | 'InvalidXmlNodeValue' | 'Md5Mismatch' | 'MetadataTooLarge' | 'MissingContentLengthHeader' | 'MissingRequiredQueryParameter' | 'MissingRequiredHeader' | 'MissingRequiredXmlNode' | 'MultipleConditionHeadersNotSupported' | 'OperationTimedOut' | 'OutOfRangeInput' | 'OutOfRangeQueryParameterValue' | 'RequestBodyTooLarge' | 'ResourceTypeMismatch' | 'RequestUrlFailedToParse' | 'ResourceAlreadyExists' | 'ResourceNotFound' | 'ServerBusy' | 'UnsupportedHeader' | 'UnsupportedXmlNode' | 'UnsupportedQueryParameter' | 'UnsupportedHttpVerb' | 'AppendPositionConditionNotMet' | 'BlobAlreadyExists' | 'BlobImmutableDueToPolicy' | 'BlobNotFound' | 'BlobOverwritten' | 'BlobTierInadequateForContentLength' | 'BlockCountExceedsLimit' | 'BlockListTooLong' | 'CannotChangeToLowerTier' | 'CannotVerifyCopySource' | 'ContainerAlreadyExists' | 'ContainerBeingDeleted' | 'ContainerDisabled' | 'ContainerNotFound' | 'ContentLengthLargerThanTierLimit' | 'CopyAcrossAccountsNotSupported' | 'CopyIdMismatch' | 'FeatureVersionMismatch' | 'IncrementalCopyBlobMismatch' | 'IncrementalCopyOfEralierVersionSnapshotNotAllowed' | 'IncrementalCopySourceMustBeSnapshot' | 'InfiniteLeaseDurationRequired' | 'InvalidBlobOrBlock' | 'InvalidBlobTier' | 'InvalidBlobType' | 'InvalidBlockId' | 'InvalidBlockList' | 'InvalidOperation' | 'InvalidPageRange' | 'InvalidSourceBlobType' | 'InvalidSourceBlobUrl' | 'InvalidVersionForPageBlobOperation' | 'LeaseAlreadyPresent' | 'LeaseAlreadyBroken' | 'LeaseIdMismatchWithBlobOperation' | 'LeaseIdMismatchWithContainerOperation' | 'LeaseIdMismatchWithLeaseOperation' | 'LeaseIdMissing' | 'LeaseIsBreakingAndCannotBeAcquired' | 'LeaseIsBreakingAndCannotBeChanged' | 'LeaseIsBrokenAndCannotBeRenewed' | 'LeaseLost' | 'LeaseNotPresentWithBlobOperation' | 'LeaseNotPresentWithContainerOperation' | 'LeaseNotPresentWithLeaseOperation' | 'MaxBlobSizeConditionNotMet' | 'NoAuthenticationInformation' | 'NoPendingCopyOperation' | 'OperationNotAllowedOnIncrementalCopyBlob' | 'PendingCopyOperation' | 'PreviousSnapshotCannotBeNewer' | 'PreviousSnapshotNotFound' | 'PreviousSnapshotOperationNotSupported' | 'SequenceNumberConditionNotMet' | 'SequenceNumberIncrementTooLarge' | 'SnapshotCountExceeded' | 'SnaphotOperationRateExceeded' | 'SnapshotsPresent' | 'SourceConditionNotMet' | 'SystemInUse' | 'TargetConditionNotMet' | 'UnauthorizedBlobOverwrite' | 'BlobBeingRehydrated' | 'BlobArchived' | 'BlobNotArchived' | 'AuthorizationSourceIPMismatch' | 'AuthorizationProtocolMismatch' | 'AuthorizationPermissionMismatch' | 'AuthorizationServiceMismatch' | 'AuthorizationResourceTypeMismatch';\n\n/**\n * Defines values for GeoReplicationStatusType.\n * Possible values include: 'live', 'bootstrap', 'unavailable'\n * @readonly\n * @enum {string}\n */\nexport type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable';\n\n/**\n * Defines values for QueryFormatType.\n * Possible values include: 'delimited', 'json', 'arrow'\n * @readonly\n * @enum {string}\n */\nexport type QueryFormatType = 'delimited' | 'json' | 'arrow';\n\n/**\n * Defines values for BlobExpiryOptions.\n * Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @readonly\n * @enum {string}\n */\nexport type BlobExpiryOptions = 'NeverExpire' | 'RelativeToCreation' | 'RelativeToNow' | 'Absolute';\n\n/**\n * Defines values for BlockListType.\n * Possible values include: 'committed', 'uncommitted', 'all'\n * @readonly\n * @enum {string}\n */\nexport type BlockListType = 'committed' | 'uncommitted' | 'all';\n\n/**\n * Defines values for DeleteSnapshotsOptionType.\n * Possible values include: 'include', 'only'\n * @readonly\n * @enum {string}\n */\nexport type DeleteSnapshotsOptionType = 'include' | 'only';\n\n/**\n * Defines values for EncryptionAlgorithmType.\n * Possible values include: 'AES256'\n * @readonly\n * @enum {string}\n */\nexport type EncryptionAlgorithmType = 'AES256';\n\n/**\n * Defines values for ListBlobsIncludeItem.\n * Possible values include: 'copy', 'deleted', 'metadata', 'snapshots', 'uncommittedblobs',\n * 'versions', 'tags'\n * @readonly\n * @enum {string}\n */\nexport type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags';\n\n/**\n * Defines values for ListContainersIncludeType.\n * Possible values include: 'metadata', 'deleted'\n * @readonly\n * @enum {string}\n */\nexport type ListContainersIncludeType = 'metadata' | 'deleted';\n\n/**\n * Defines values for PathRenameMode.\n * Possible values include: 'legacy', 'posix'\n * @readonly\n * @enum {string}\n */\nexport type PathRenameMode = 'legacy' | 'posix';\n\n/**\n * Defines values for SequenceNumberActionType.\n * Possible values include: 'max', 'update', 'increment'\n * @readonly\n * @enum {string}\n */\nexport type SequenceNumberActionType = 'max' | 'update' | 'increment';\n\n/**\n * Defines values for SkuName.\n * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS',\n * 'Premium_LRS'\n * @readonly\n * @enum {string}\n */\nexport type SkuName = 'Standard_LRS' | 'Standard_GRS' | 'Standard_RAGRS' | 'Standard_ZRS' | 'Premium_LRS';\n\n/**\n * Defines values for AccountKind.\n * Possible values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage',\n * 'BlockBlobStorage'\n * @readonly\n * @enum {string}\n */\nexport type AccountKind = 'Storage' | 'BlobStorage' | 'StorageV2' | 'FileStorage' | 'BlockBlobStorage';\n\n/**\n * Defines values for SyncCopyStatusType.\n * Possible values include: 'success'\n * @readonly\n * @enum {string}\n */\nexport type SyncCopyStatusType = 'success';\n\n/**\n * Contains response data for the setProperties operation.\n */\nexport type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceSetPropertiesHeaders;\n };\n};\n\n/**\n * Contains response data for the getProperties operation.\n */\nexport type ServiceGetPropertiesResponse = BlobServiceProperties & ServiceGetPropertiesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetPropertiesHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobServiceProperties;\n };\n};\n\n/**\n * Contains response data for the getStatistics operation.\n */\nexport type ServiceGetStatisticsResponse = BlobServiceStatistics & ServiceGetStatisticsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetStatisticsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobServiceStatistics;\n };\n};\n\n/**\n * Contains response data for the listContainersSegment operation.\n */\nexport type ServiceListContainersSegmentResponse = ListContainersSegmentResponse & ServiceListContainersSegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceListContainersSegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListContainersSegmentResponse;\n };\n};\n\n/**\n * Contains response data for the getUserDelegationKey operation.\n */\nexport type ServiceGetUserDelegationKeyResponse = UserDelegationKey & ServiceGetUserDelegationKeyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetUserDelegationKeyHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: UserDelegationKey;\n };\n};\n\n/**\n * Contains response data for the getAccountInfo operation.\n */\nexport type ServiceGetAccountInfoResponse = ServiceGetAccountInfoHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetAccountInfoHeaders;\n };\n};\n\n/**\n * Contains response data for the submitBatch operation.\n */\nexport type ServiceSubmitBatchResponse = ServiceSubmitBatchHeaders & {\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceSubmitBatchHeaders;\n };\n};\n\n/**\n * Contains response data for the filterBlobs operation.\n */\nexport type ServiceFilterBlobsResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceFilterBlobsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: FilterBlobSegment;\n };\n};\n\n/**\n * Contains response data for the create operation.\n */\nexport type ContainerCreateResponse = ContainerCreateHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerCreateHeaders;\n };\n};\n\n/**\n * Contains response data for the getProperties operation.\n */\nexport type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerGetPropertiesHeaders;\n };\n};\n\n/**\n * Contains response data for the deleteMethod operation.\n */\nexport type ContainerDeleteResponse = ContainerDeleteHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerDeleteHeaders;\n };\n};\n\n/**\n * Contains response data for the setMetadata operation.\n */\nexport type ContainerSetMetadataResponse = ContainerSetMetadataHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerSetMetadataHeaders;\n };\n};\n\n/**\n * Contains response data for the getAccessPolicy operation.\n */\nexport type ContainerGetAccessPolicyResponse = Array & ContainerGetAccessPolicyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerGetAccessPolicyHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: SignedIdentifier[];\n };\n};\n\n/**\n * Contains response data for the setAccessPolicy operation.\n */\nexport type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerSetAccessPolicyHeaders;\n };\n};\n\n/**\n * Contains response data for the restore operation.\n */\nexport type ContainerRestoreResponse = ContainerRestoreHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerRestoreHeaders;\n };\n};\n\n/**\n * Contains response data for the acquireLease operation.\n */\nexport type ContainerAcquireLeaseResponse = ContainerAcquireLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerAcquireLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the releaseLease operation.\n */\nexport type ContainerReleaseLeaseResponse = ContainerReleaseLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerReleaseLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the renewLease operation.\n */\nexport type ContainerRenewLeaseResponse = ContainerRenewLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerRenewLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the breakLease operation.\n */\nexport type ContainerBreakLeaseResponse = ContainerBreakLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerBreakLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the changeLease operation.\n */\nexport type ContainerChangeLeaseResponse = ContainerChangeLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerChangeLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the listBlobFlatSegment operation.\n */\nexport type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobFlatSegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsFlatSegmentResponse;\n };\n};\n\n/**\n * Contains response data for the listBlobHierarchySegment operation.\n */\nexport type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobHierarchySegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsHierarchySegmentResponse;\n };\n};\n\n/**\n * Contains response data for the getAccountInfo operation.\n */\nexport type ContainerGetAccountInfoResponse = ContainerGetAccountInfoHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerGetAccountInfoHeaders;\n };\n};\n\n/**\n * Contains response data for the create operation.\n */\nexport type DirectoryCreateResponse = DirectoryCreateHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: DirectoryCreateHeaders;\n };\n};\n\n/**\n * Contains response data for the rename operation.\n */\nexport type DirectoryRenameResponse = DirectoryRenameHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: DirectoryRenameHeaders;\n };\n};\n\n/**\n * Contains response data for the deleteMethod operation.\n */\nexport type DirectoryDeleteResponse = DirectoryDeleteHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: DirectoryDeleteHeaders;\n };\n};\n\n/**\n * Contains response data for the setAccessControl operation.\n */\nexport type DirectorySetAccessControlResponse = DirectorySetAccessControlHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: DirectorySetAccessControlHeaders;\n };\n};\n\n/**\n * Contains response data for the getAccessControl operation.\n */\nexport type DirectoryGetAccessControlResponse = DirectoryGetAccessControlHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: DirectoryGetAccessControlHeaders;\n };\n};\n\n/**\n * Contains response data for the download operation.\n */\nexport type BlobDownloadResponse = BlobDownloadHeaders & {\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobDownloadHeaders;\n };\n};\n\n/**\n * Contains response data for the getProperties operation.\n */\nexport type BlobGetPropertiesResponse = BlobGetPropertiesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetPropertiesHeaders;\n };\n};\n\n/**\n * Contains response data for the deleteMethod operation.\n */\nexport type BlobDeleteResponse = BlobDeleteHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobDeleteHeaders;\n };\n};\n\n/**\n * Contains response data for the setAccessControl operation.\n */\nexport type BlobSetAccessControlResponse = BlobSetAccessControlHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetAccessControlHeaders;\n };\n};\n\n/**\n * Contains response data for the getAccessControl operation.\n */\nexport type BlobGetAccessControlResponse = BlobGetAccessControlHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetAccessControlHeaders;\n };\n};\n\n/**\n * Contains response data for the rename operation.\n */\nexport type BlobRenameResponse = BlobRenameHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobRenameHeaders;\n };\n};\n\n/**\n * Contains response data for the undelete operation.\n */\nexport type BlobUndeleteResponse = BlobUndeleteHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobUndeleteHeaders;\n };\n};\n\n/**\n * Contains response data for the setExpiry operation.\n */\nexport type BlobSetExpiryResponse = BlobSetExpiryHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetExpiryHeaders;\n };\n};\n\n/**\n * Contains response data for the setHTTPHeaders operation.\n */\nexport type BlobSetHTTPHeadersResponse = BlobSetHTTPHeadersHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetHTTPHeadersHeaders;\n };\n};\n\n/**\n * Contains response data for the setMetadata operation.\n */\nexport type BlobSetMetadataResponse = BlobSetMetadataHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetMetadataHeaders;\n };\n};\n\n/**\n * Contains response data for the acquireLease operation.\n */\nexport type BlobAcquireLeaseResponse = BlobAcquireLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobAcquireLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the releaseLease operation.\n */\nexport type BlobReleaseLeaseResponse = BlobReleaseLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobReleaseLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the renewLease operation.\n */\nexport type BlobRenewLeaseResponse = BlobRenewLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobRenewLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the changeLease operation.\n */\nexport type BlobChangeLeaseResponse = BlobChangeLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobChangeLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the breakLease operation.\n */\nexport type BlobBreakLeaseResponse = BlobBreakLeaseHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobBreakLeaseHeaders;\n };\n};\n\n/**\n * Contains response data for the createSnapshot operation.\n */\nexport type BlobCreateSnapshotResponse = BlobCreateSnapshotHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobCreateSnapshotHeaders;\n };\n};\n\n/**\n * Contains response data for the startCopyFromURL operation.\n */\nexport type BlobStartCopyFromURLResponse = BlobStartCopyFromURLHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobStartCopyFromURLHeaders;\n };\n};\n\n/**\n * Contains response data for the copyFromURL operation.\n */\nexport type BlobCopyFromURLResponse = BlobCopyFromURLHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobCopyFromURLHeaders;\n };\n};\n\n/**\n * Contains response data for the abortCopyFromURL operation.\n */\nexport type BlobAbortCopyFromURLResponse = BlobAbortCopyFromURLHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobAbortCopyFromURLHeaders;\n };\n};\n\n/**\n * Contains response data for the setTier operation.\n */\nexport type BlobSetTierResponse = BlobSetTierHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetTierHeaders;\n };\n};\n\n/**\n * Contains response data for the getAccountInfo operation.\n */\nexport type BlobGetAccountInfoResponse = BlobGetAccountInfoHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetAccountInfoHeaders;\n };\n};\n\n/**\n * Contains response data for the query operation.\n */\nexport type BlobQueryResponse = BlobQueryHeaders & {\n /**\n * BROWSER ONLY\n *\n * The response body as a browser Blob.\n * Always undefined in node.js.\n */\n blobBody?: Promise;\n\n /**\n * NODEJS ONLY\n *\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n */\n readableStreamBody?: NodeJS.ReadableStream;\n\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobQueryHeaders;\n };\n};\n\n/**\n * Contains response data for the getTags operation.\n */\nexport type BlobGetTagsResponse = BlobTags & BlobGetTagsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetTagsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobTags;\n };\n};\n\n/**\n * Contains response data for the setTags operation.\n */\nexport type BlobSetTagsResponse = BlobSetTagsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobSetTagsHeaders;\n };\n};\n\n/**\n * Contains response data for the create operation.\n */\nexport type PageBlobCreateResponse = PageBlobCreateHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobCreateHeaders;\n };\n};\n\n/**\n * Contains response data for the uploadPages operation.\n */\nexport type PageBlobUploadPagesResponse = PageBlobUploadPagesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobUploadPagesHeaders;\n };\n};\n\n/**\n * Contains response data for the clearPages operation.\n */\nexport type PageBlobClearPagesResponse = PageBlobClearPagesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobClearPagesHeaders;\n };\n};\n\n/**\n * Contains response data for the uploadPagesFromURL operation.\n */\nexport type PageBlobUploadPagesFromURLResponse = PageBlobUploadPagesFromURLHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobUploadPagesFromURLHeaders;\n };\n};\n\n/**\n * Contains response data for the getPageRanges operation.\n */\nexport type PageBlobGetPageRangesResponse = PageList & PageBlobGetPageRangesHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n};\n\n/**\n * Contains response data for the getPageRangesDiff operation.\n */\nexport type PageBlobGetPageRangesDiffResponse = PageList & PageBlobGetPageRangesDiffHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesDiffHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n};\n\n/**\n * Contains response data for the resize operation.\n */\nexport type PageBlobResizeResponse = PageBlobResizeHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobResizeHeaders;\n };\n};\n\n/**\n * Contains response data for the updateSequenceNumber operation.\n */\nexport type PageBlobUpdateSequenceNumberResponse = PageBlobUpdateSequenceNumberHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobUpdateSequenceNumberHeaders;\n };\n};\n\n/**\n * Contains response data for the copyIncremental operation.\n */\nexport type PageBlobCopyIncrementalResponse = PageBlobCopyIncrementalHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobCopyIncrementalHeaders;\n };\n};\n\n/**\n * Contains response data for the create operation.\n */\nexport type AppendBlobCreateResponse = AppendBlobCreateHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: AppendBlobCreateHeaders;\n };\n};\n\n/**\n * Contains response data for the appendBlock operation.\n */\nexport type AppendBlobAppendBlockResponse = AppendBlobAppendBlockHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: AppendBlobAppendBlockHeaders;\n };\n};\n\n/**\n * Contains response data for the appendBlockFromUrl operation.\n */\nexport type AppendBlobAppendBlockFromUrlResponse = AppendBlobAppendBlockFromUrlHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: AppendBlobAppendBlockFromUrlHeaders;\n };\n};\n\n/**\n * Contains response data for the seal operation.\n */\nexport type AppendBlobSealResponse = AppendBlobSealHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: AppendBlobSealHeaders;\n };\n};\n\n/**\n * Contains response data for the upload operation.\n */\nexport type BlockBlobUploadResponse = BlockBlobUploadHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlockBlobUploadHeaders;\n };\n};\n\n/**\n * Contains response data for the stageBlock operation.\n */\nexport type BlockBlobStageBlockResponse = BlockBlobStageBlockHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlockBlobStageBlockHeaders;\n };\n};\n\n/**\n * Contains response data for the stageBlockFromURL operation.\n */\nexport type BlockBlobStageBlockFromURLResponse = BlockBlobStageBlockFromURLHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlockBlobStageBlockFromURLHeaders;\n };\n};\n\n/**\n * Contains response data for the commitBlockList operation.\n */\nexport type BlockBlobCommitBlockListResponse = BlockBlobCommitBlockListHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlockBlobCommitBlockListHeaders;\n };\n};\n\n/**\n * Contains response data for the getBlockList operation.\n */\nexport type BlockBlobGetBlockListResponse = BlockList & BlockBlobGetBlockListHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: coreHttp.HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlockBlobGetBlockListHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlockList;\n };\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js new file mode 100644 index 000000000..d22218ff0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js @@ -0,0 +1,6956 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export var KeyInfo = { + serializedName: "KeyInfo", + type: { + name: "Composite", + className: "KeyInfo", + modelProperties: { + startsOn: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "String" + } + }, + expiresOn: { + xmlName: "Expiry", + required: true, + serializedName: "Expiry", + type: { + name: "String" + } + } + } + } +}; +export var UserDelegationKey = { + serializedName: "UserDelegationKey", + type: { + name: "Composite", + className: "UserDelegationKey", + modelProperties: { + signedObjectId: { + xmlName: "SignedOid", + required: true, + serializedName: "SignedOid", + type: { + name: "String" + } + }, + signedTenantId: { + xmlName: "SignedTid", + required: true, + serializedName: "SignedTid", + type: { + name: "String" + } + }, + signedStartsOn: { + xmlName: "SignedStart", + required: true, + serializedName: "SignedStart", + type: { + name: "String" + } + }, + signedExpiresOn: { + xmlName: "SignedExpiry", + required: true, + serializedName: "SignedExpiry", + type: { + name: "String" + } + }, + signedService: { + xmlName: "SignedService", + required: true, + serializedName: "SignedService", + type: { + name: "String" + } + }, + signedVersion: { + xmlName: "SignedVersion", + required: true, + serializedName: "SignedVersion", + type: { + name: "String" + } + }, + value: { + xmlName: "Value", + required: true, + serializedName: "Value", + type: { + name: "String" + } + } + } + } +}; +export var StorageError = { + serializedName: "StorageError", + type: { + name: "Composite", + className: "StorageError", + modelProperties: { + message: { + xmlName: "Message", + serializedName: "Message", + type: { + name: "String" + } + }, + code: { + xmlName: "Code", + serializedName: "Code", + type: { + name: "String" + } + } + } + } +}; +export var DataLakeStorageErrorError = { + serializedName: "DataLakeStorageError_error", + type: { + name: "Composite", + className: "DataLakeStorageErrorError", + modelProperties: { + code: { + xmlName: "Code", + serializedName: "Code", + type: { + name: "String" + } + }, + message: { + xmlName: "Message", + serializedName: "Message", + type: { + name: "String" + } + } + } + } +}; +export var DataLakeStorageError = { + serializedName: "DataLakeStorageError", + type: { + name: "Composite", + className: "DataLakeStorageError", + modelProperties: { + dataLakeStorageErrorDetails: { + xmlName: "error", + serializedName: "error", + type: { + name: "Composite", + className: "DataLakeStorageErrorError" + } + } + } + } +}; +export var AccessPolicy = { + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + modelProperties: { + startsOn: { + xmlName: "Start", + serializedName: "Start", + type: { + name: "String" + } + }, + expiresOn: { + xmlName: "Expiry", + serializedName: "Expiry", + type: { + name: "String" + } + }, + permissions: { + xmlName: "Permission", + serializedName: "Permission", + type: { + name: "String" + } + } + } + } +}; +export var BlobPropertiesInternal = { + xmlName: "Properties", + serializedName: "BlobPropertiesInternal", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + modelProperties: { + createdOn: { + xmlName: "Creation-Time", + serializedName: "Creation-Time", + type: { + name: "DateTimeRfc1123" + } + }, + lastModified: { + xmlName: "Last-Modified", + required: true, + serializedName: "Last-Modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + xmlName: "Etag", + required: true, + serializedName: "Etag", + type: { + name: "String" + } + }, + contentLength: { + xmlName: "Content-Length", + serializedName: "Content-Length", + type: { + name: "Number" + } + }, + contentType: { + xmlName: "Content-Type", + serializedName: "Content-Type", + type: { + name: "String" + } + }, + contentEncoding: { + xmlName: "Content-Encoding", + serializedName: "Content-Encoding", + type: { + name: "String" + } + }, + contentLanguage: { + xmlName: "Content-Language", + serializedName: "Content-Language", + type: { + name: "String" + } + }, + contentMD5: { + xmlName: "Content-MD5", + serializedName: "Content-MD5", + type: { + name: "ByteArray" + } + }, + contentDisposition: { + xmlName: "Content-Disposition", + serializedName: "Content-Disposition", + type: { + name: "String" + } + }, + cacheControl: { + xmlName: "Cache-Control", + serializedName: "Cache-Control", + type: { + name: "String" + } + }, + blobSequenceNumber: { + xmlName: "x-ms-blob-sequence-number", + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + xmlName: "BlobType", + serializedName: "BlobType", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + leaseStatus: { + xmlName: "LeaseStatus", + serializedName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + leaseState: { + xmlName: "LeaseState", + serializedName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + xmlName: "LeaseDuration", + serializedName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + copyId: { + xmlName: "CopyId", + serializedName: "CopyId", + type: { + name: "String" + } + }, + copyStatus: { + xmlName: "CopyStatus", + serializedName: "CopyStatus", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + copySource: { + xmlName: "CopySource", + serializedName: "CopySource", + type: { + name: "String" + } + }, + copyProgress: { + xmlName: "CopyProgress", + serializedName: "CopyProgress", + type: { + name: "String" + } + }, + copyCompletedOn: { + xmlName: "CopyCompletionTime", + serializedName: "CopyCompletionTime", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + xmlName: "CopyStatusDescription", + serializedName: "CopyStatusDescription", + type: { + name: "String" + } + }, + serverEncrypted: { + xmlName: "ServerEncrypted", + serializedName: "ServerEncrypted", + type: { + name: "Boolean" + } + }, + incrementalCopy: { + xmlName: "IncrementalCopy", + serializedName: "IncrementalCopy", + type: { + name: "Boolean" + } + }, + destinationSnapshot: { + xmlName: "DestinationSnapshot", + serializedName: "DestinationSnapshot", + type: { + name: "String" + } + }, + deletedOn: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } + }, + accessTier: { + xmlName: "AccessTier", + serializedName: "AccessTier", + type: { + name: "String" + } + }, + accessTierInferred: { + xmlName: "AccessTierInferred", + serializedName: "AccessTierInferred", + type: { + name: "Boolean" + } + }, + archiveStatus: { + xmlName: "ArchiveStatus", + serializedName: "ArchiveStatus", + type: { + name: "String" + } + }, + customerProvidedKeySha256: { + xmlName: "CustomerProvidedKeySha256", + serializedName: "CustomerProvidedKeySha256", + type: { + name: "String" + } + }, + encryptionScope: { + xmlName: "EncryptionScope", + serializedName: "EncryptionScope", + type: { + name: "String" + } + }, + accessTierChangedOn: { + xmlName: "AccessTierChangeTime", + serializedName: "AccessTierChangeTime", + type: { + name: "DateTimeRfc1123" + } + }, + tagCount: { + xmlName: "TagCount", + serializedName: "TagCount", + type: { + name: "Number" + } + }, + expiresOn: { + xmlName: "Expiry-Time", + serializedName: "Expiry-Time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + xmlName: "Sealed", + serializedName: "Sealed", + type: { + name: "Boolean" + } + }, + rehydratePriority: { + xmlName: "RehydratePriority", + serializedName: "RehydratePriority", + type: { + name: "String" + } + }, + lastAccessedOn: { + xmlName: "LastAccessTime", + serializedName: "LastAccessTime", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var BlobTag = { + xmlName: "Tag", + serializedName: "BlobTag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + xmlName: "Key", + required: true, + serializedName: "Key", + type: { + name: "String" + } + }, + value: { + xmlName: "Value", + required: true, + serializedName: "Value", + type: { + name: "String" + } + } + } + } +}; +export var BlobTags = { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { + blobTagSet: { + xmlIsWrapped: true, + xmlName: "TagSet", + xmlElementName: "Tag", + required: true, + serializedName: "BlobTagSet", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobTag" + } + } + } + } + } + } +}; +export var BlobItemInternal = { + xmlName: "Blob", + serializedName: "BlobItemInternal", + type: { + name: "Composite", + className: "BlobItemInternal", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + deleted: { + xmlName: "Deleted", + required: true, + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + snapshot: { + xmlName: "Snapshot", + required: true, + serializedName: "Snapshot", + type: { + name: "String" + } + }, + versionId: { + xmlName: "VersionId", + serializedName: "VersionId", + type: { + name: "String" + } + }, + isCurrentVersion: { + xmlName: "IsCurrentVersion", + serializedName: "IsCurrentVersion", + type: { + name: "Boolean" + } + }, + properties: { + xmlName: "Properties", + required: true, + serializedName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal" + } + }, + metadata: { + xmlName: "Metadata", + serializedName: "Metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + blobTags: { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags" + } + }, + objectReplicationMetadata: { + xmlName: "OrMetadata", + serializedName: "ObjectReplicationMetadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; +export var BlobFlatListSegment = { + xmlName: "Blobs", + serializedName: "BlobFlatListSegment", + type: { + name: "Composite", + className: "BlobFlatListSegment", + modelProperties: { + blobItems: { + xmlName: "BlobItems", + xmlElementName: "Blob", + required: true, + serializedName: "BlobItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal" + } + } + } + } + } + } +}; +export var ListBlobsFlatSegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListBlobsFlatSegmentResponse", + type: { + name: "Composite", + className: "ListBlobsFlatSegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + containerName: { + xmlIsAttribute: true, + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + segment: { + xmlName: "Blobs", + required: true, + serializedName: "Segment", + type: { + name: "Composite", + className: "BlobFlatListSegment" + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +export var BlobPrefix = { + serializedName: "BlobPrefix", + type: { + name: "Composite", + className: "BlobPrefix", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + } + } + } +}; +export var BlobHierarchyListSegment = { + xmlName: "Blobs", + serializedName: "BlobHierarchyListSegment", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + modelProperties: { + blobPrefixes: { + xmlName: "BlobPrefixes", + xmlElementName: "BlobPrefix", + serializedName: "BlobPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobPrefix" + } + } + } + }, + blobItems: { + xmlName: "BlobItems", + xmlElementName: "Blob", + required: true, + serializedName: "BlobItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal" + } + } + } + } + } + } +}; +export var ListBlobsHierarchySegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListBlobsHierarchySegmentResponse", + type: { + name: "Composite", + className: "ListBlobsHierarchySegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + containerName: { + xmlIsAttribute: true, + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + delimiter: { + xmlName: "Delimiter", + serializedName: "Delimiter", + type: { + name: "String" + } + }, + segment: { + xmlName: "Blobs", + required: true, + serializedName: "Segment", + type: { + name: "Composite", + className: "BlobHierarchyListSegment" + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +export var Block = { + serializedName: "Block", + type: { + name: "Composite", + className: "Block", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + size: { + xmlName: "Size", + required: true, + serializedName: "Size", + type: { + name: "Number" + } + } + } + } +}; +export var BlockList = { + serializedName: "BlockList", + type: { + name: "Composite", + className: "BlockList", + modelProperties: { + committedBlocks: { + xmlIsWrapped: true, + xmlName: "CommittedBlocks", + xmlElementName: "Block", + serializedName: "CommittedBlocks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block" + } + } + } + }, + uncommittedBlocks: { + xmlIsWrapped: true, + xmlName: "UncommittedBlocks", + xmlElementName: "Block", + serializedName: "UncommittedBlocks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block" + } + } + } + } + } + } +}; +export var BlockLookupList = { + xmlName: "BlockList", + serializedName: "BlockLookupList", + type: { + name: "Composite", + className: "BlockLookupList", + modelProperties: { + committed: { + xmlName: "Committed", + xmlElementName: "Committed", + serializedName: "Committed", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + uncommitted: { + xmlName: "Uncommitted", + xmlElementName: "Uncommitted", + serializedName: "Uncommitted", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + latest: { + xmlName: "Latest", + xmlElementName: "Latest", + serializedName: "Latest", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; +export var ContainerProperties = { + serializedName: "ContainerProperties", + type: { + name: "Composite", + className: "ContainerProperties", + modelProperties: { + lastModified: { + xmlName: "Last-Modified", + required: true, + serializedName: "Last-Modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + xmlName: "Etag", + required: true, + serializedName: "Etag", + type: { + name: "String" + } + }, + leaseStatus: { + xmlName: "LeaseStatus", + serializedName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + leaseState: { + xmlName: "LeaseState", + serializedName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + xmlName: "LeaseDuration", + serializedName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + publicAccess: { + xmlName: "PublicAccess", + serializedName: "PublicAccess", + type: { + name: "String" + } + }, + hasImmutabilityPolicy: { + xmlName: "HasImmutabilityPolicy", + serializedName: "HasImmutabilityPolicy", + type: { + name: "Boolean" + } + }, + hasLegalHold: { + xmlName: "HasLegalHold", + serializedName: "HasLegalHold", + type: { + name: "Boolean" + } + }, + defaultEncryptionScope: { + xmlName: "DefaultEncryptionScope", + serializedName: "DefaultEncryptionScope", + type: { + name: "String" + } + }, + preventEncryptionScopeOverride: { + xmlName: "DenyEncryptionScopeOverride", + serializedName: "DenyEncryptionScopeOverride", + type: { + name: "Boolean" + } + }, + deletedOn: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } + } + } + } +}; +export var ContainerItem = { + xmlName: "Container", + serializedName: "ContainerItem", + type: { + name: "Composite", + className: "ContainerItem", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + deleted: { + xmlName: "Deleted", + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, + properties: { + xmlName: "Properties", + required: true, + serializedName: "Properties", + type: { + name: "Composite", + className: "ContainerProperties" + } + }, + metadata: { + xmlName: "Metadata", + serializedName: "Metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; +export var DelimitedTextConfiguration = { + serializedName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + xmlName: "ColumnSeparator", + required: true, + serializedName: "ColumnSeparator", + type: { + name: "String" + } + }, + fieldQuote: { + xmlName: "FieldQuote", + required: true, + serializedName: "FieldQuote", + type: { + name: "String" + } + }, + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + }, + escapeChar: { + xmlName: "EscapeChar", + required: true, + serializedName: "EscapeChar", + type: { + name: "String" + } + }, + headersPresent: { + xmlName: "HasHeaders", + required: true, + serializedName: "HeadersPresent", + type: { + name: "Boolean" + } + } + } + } +}; +export var JsonTextConfiguration = { + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + } + } + } +}; +export var ArrowField = { + xmlName: "Field", + serializedName: "ArrowField", + type: { + name: "Composite", + className: "ArrowField", + modelProperties: { + type: { + xmlName: "Type", + required: true, + serializedName: "Type", + type: { + name: "String" + } + }, + name: { + xmlName: "Name", + serializedName: "Name", + type: { + name: "String" + } + }, + precision: { + xmlName: "Precision", + serializedName: "Precision", + type: { + name: "Number" + } + }, + scale: { + xmlName: "Scale", + serializedName: "Scale", + type: { + name: "Number" + } + } + } + } +}; +export var ArrowConfiguration = { + serializedName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + modelProperties: { + schema: { + xmlIsWrapped: true, + xmlName: "Schema", + xmlElementName: "Field", + required: true, + serializedName: "Schema", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArrowField" + } + } + } + } + } + } +}; +export var ListContainersSegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListContainersSegmentResponse", + type: { + name: "Composite", + className: "ListContainersSegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + containerItems: { + xmlIsWrapped: true, + xmlName: "Containers", + xmlElementName: "Container", + required: true, + serializedName: "ContainerItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerItem" + } + } + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +export var CorsRule = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + xmlName: "AllowedOrigins", + required: true, + serializedName: "AllowedOrigins", + type: { + name: "String" + } + }, + allowedMethods: { + xmlName: "AllowedMethods", + required: true, + serializedName: "AllowedMethods", + type: { + name: "String" + } + }, + allowedHeaders: { + xmlName: "AllowedHeaders", + required: true, + serializedName: "AllowedHeaders", + type: { + name: "String" + } + }, + exposedHeaders: { + xmlName: "ExposedHeaders", + required: true, + serializedName: "ExposedHeaders", + type: { + name: "String" + } + }, + maxAgeInSeconds: { + xmlName: "MaxAgeInSeconds", + required: true, + serializedName: "MaxAgeInSeconds", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; +export var FilterBlobItem = { + xmlName: "Blob", + serializedName: "FilterBlobItem", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + containerName: { + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + tagValue: { + xmlName: "TagValue", + required: true, + serializedName: "TagValue", + type: { + name: "String" + } + } + } + } +}; +export var FilterBlobSegment = { + xmlName: "EnumerationResults", + serializedName: "FilterBlobSegment", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + where: { + xmlName: "Where", + required: true, + serializedName: "Where", + type: { + name: "String" + } + }, + blobs: { + xmlIsWrapped: true, + xmlName: "Blobs", + xmlElementName: "Blob", + required: true, + serializedName: "Blobs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterBlobItem" + } + } + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +export var GeoReplication = { + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + modelProperties: { + status: { + xmlName: "Status", + required: true, + serializedName: "Status", + type: { + name: "String" + } + }, + lastSyncOn: { + xmlName: "LastSyncTime", + required: true, + serializedName: "LastSyncTime", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var RetentionPolicy = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + days: { + xmlName: "Days", + serializedName: "Days", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; +export var Logging = { + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging", + modelProperties: { + version: { + xmlName: "Version", + required: true, + serializedName: "Version", + type: { + name: "String" + } + }, + deleteProperty: { + xmlName: "Delete", + required: true, + serializedName: "Delete", + type: { + name: "Boolean" + } + }, + read: { + xmlName: "Read", + required: true, + serializedName: "Read", + type: { + name: "Boolean" + } + }, + write: { + xmlName: "Write", + required: true, + serializedName: "Write", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + xmlName: "RetentionPolicy", + required: true, + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; +export var Metrics = { + serializedName: "Metrics", + type: { + name: "Composite", + className: "Metrics", + modelProperties: { + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + includeAPIs: { + xmlName: "IncludeAPIs", + serializedName: "IncludeAPIs", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + xmlName: "RetentionPolicy", + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; +export var PageRange = { + serializedName: "PageRange", + type: { + name: "Composite", + className: "PageRange", + modelProperties: { + start: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "Number" + } + }, + end: { + xmlName: "End", + required: true, + serializedName: "End", + type: { + name: "Number" + } + } + } + } +}; +export var ClearRange = { + serializedName: "ClearRange", + type: { + name: "Composite", + className: "ClearRange", + modelProperties: { + start: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "Number" + } + }, + end: { + xmlName: "End", + required: true, + serializedName: "End", + type: { + name: "Number" + } + } + } + } +}; +export var PageList = { + serializedName: "PageList", + type: { + name: "Composite", + className: "PageList", + modelProperties: { + pageRange: { + xmlName: "PageRange", + xmlElementName: "PageRange", + serializedName: "PageRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PageRange" + } + } + } + }, + clearRange: { + xmlName: "ClearRange", + xmlElementName: "ClearRange", + serializedName: "ClearRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClearRange" + } + } + } + } + } + } +}; +export var QueryFormat = { + serializedName: "QueryFormat", + type: { + name: "Composite", + className: "QueryFormat", + modelProperties: { + type: { + xmlName: "Type", + serializedName: "Type", + type: { + name: "Enum", + allowedValues: [ + "delimited", + "json", + "arrow" + ] + } + }, + delimitedTextConfiguration: { + xmlName: "DelimitedTextConfiguration", + serializedName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration" + } + }, + jsonTextConfiguration: { + xmlName: "JsonTextConfiguration", + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration" + } + }, + arrowConfiguration: { + xmlName: "ArrowConfiguration", + serializedName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration" + } + } + } + } +}; +export var QuerySerialization = { + serializedName: "QuerySerialization", + type: { + name: "Composite", + className: "QuerySerialization", + modelProperties: { + format: { + xmlName: "Format", + required: true, + serializedName: "Format", + type: { + name: "Composite", + className: "QueryFormat" + } + } + } + } +}; +export var QueryRequest = { + serializedName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + xmlName: "QueryType", + required: true, + isConstant: true, + serializedName: "QueryType", + defaultValue: 'SQL', + type: { + name: "String" + } + }, + expression: { + xmlName: "Expression", + required: true, + serializedName: "Expression", + type: { + name: "String" + } + }, + inputSerialization: { + xmlName: "InputSerialization", + serializedName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + }, + outputSerialization: { + xmlName: "OutputSerialization", + serializedName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + } + } + } +}; +export var SignedIdentifier = { + serializedName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + xmlName: "Id", + required: true, + serializedName: "Id", + type: { + name: "String" + } + }, + accessPolicy: { + xmlName: "AccessPolicy", + required: true, + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy" + } + } + } + } +}; +export var StaticWebsite = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + indexDocument: { + xmlName: "IndexDocument", + serializedName: "IndexDocument", + type: { + name: "String" + } + }, + errorDocument404Path: { + xmlName: "ErrorDocument404Path", + serializedName: "ErrorDocument404Path", + type: { + name: "String" + } + }, + defaultIndexDocumentPath: { + xmlName: "DefaultIndexDocumentPath", + serializedName: "DefaultIndexDocumentPath", + type: { + name: "String" + } + } + } + } +}; +export var BlobServiceProperties = { + xmlName: "StorageServiceProperties", + serializedName: "BlobServiceProperties", + type: { + name: "Composite", + className: "BlobServiceProperties", + modelProperties: { + blobAnalyticsLogging: { + xmlName: "Logging", + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging" + } + }, + hourMetrics: { + xmlName: "HourMetrics", + serializedName: "HourMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + minuteMetrics: { + xmlName: "MinuteMetrics", + serializedName: "MinuteMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + cors: { + xmlIsWrapped: true, + xmlName: "Cors", + xmlElementName: "CorsRule", + serializedName: "Cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsRule" + } + } + } + }, + defaultServiceVersion: { + xmlName: "DefaultServiceVersion", + serializedName: "DefaultServiceVersion", + type: { + name: "String" + } + }, + deleteRetentionPolicy: { + xmlName: "DeleteRetentionPolicy", + serializedName: "DeleteRetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + }, + staticWebsite: { + xmlName: "StaticWebsite", + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite" + } + } + } + } +}; +export var BlobServiceStatistics = { + xmlName: "StorageServiceStats", + serializedName: "BlobServiceStatistics", + type: { + name: "Composite", + className: "BlobServiceStatistics", + modelProperties: { + geoReplication: { + xmlName: "GeoReplication", + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication" + } + } + } + } +}; +export var ContainerEncryptionScope = { + xmlName: "container-encryption-scope", + type: { + name: "Composite", + className: "ContainerEncryptionScope", + modelProperties: { + defaultEncryptionScope: { + xmlName: "defaultEncryptionScope", + type: { + name: "String" + } + }, + preventEncryptionScopeOverride: { + xmlName: "preventEncryptionScopeOverride", + type: { + name: "Boolean" + } + } + } + } +}; +export var LeaseAccessConditions = { + xmlName: "lease-access-conditions", + type: { + name: "Composite", + className: "LeaseAccessConditions", + modelProperties: { + leaseId: { + xmlName: "leaseId", + type: { + name: "String" + } + } + } + } +}; +export var ModifiedAccessConditions = { + xmlName: "modified-access-conditions", + type: { + name: "Composite", + className: "ModifiedAccessConditions", + modelProperties: { + ifModifiedSince: { + xmlName: "ifModifiedSince", + type: { + name: "DateTimeRfc1123" + } + }, + ifUnmodifiedSince: { + xmlName: "ifUnmodifiedSince", + type: { + name: "DateTimeRfc1123" + } + }, + ifMatch: { + xmlName: "ifMatch", + type: { + name: "String" + } + }, + ifNoneMatch: { + xmlName: "ifNoneMatch", + type: { + name: "String" + } + }, + ifTags: { + xmlName: "ifTags", + type: { + name: "String" + } + } + } + } +}; +export var DirectoryHttpHeaders = { + xmlName: "directory-http-headers", + type: { + name: "Composite", + className: "DirectoryHttpHeaders", + modelProperties: { + cacheControl: { + xmlName: "cacheControl", + type: { + name: "String" + } + }, + contentType: { + xmlName: "contentType", + type: { + name: "String" + } + }, + contentEncoding: { + xmlName: "contentEncoding", + type: { + name: "String" + } + }, + contentLanguage: { + xmlName: "contentLanguage", + type: { + name: "String" + } + }, + contentDisposition: { + xmlName: "contentDisposition", + type: { + name: "String" + } + } + } + } +}; +export var SourceModifiedAccessConditions = { + xmlName: "source-modified-access-conditions", + type: { + name: "Composite", + className: "SourceModifiedAccessConditions", + modelProperties: { + sourceIfModifiedSince: { + xmlName: "sourceIfModifiedSince", + type: { + name: "DateTimeRfc1123" + } + }, + sourceIfUnmodifiedSince: { + xmlName: "sourceIfUnmodifiedSince", + type: { + name: "DateTimeRfc1123" + } + }, + sourceIfMatch: { + xmlName: "sourceIfMatch", + type: { + name: "String" + } + }, + sourceIfNoneMatch: { + xmlName: "sourceIfNoneMatch", + type: { + name: "String" + } + }, + sourceIfTags: { + xmlName: "sourceIfTags", + type: { + name: "String" + } + } + } + } +}; +export var CpkInfo = { + xmlName: "cpk-info", + type: { + name: "Composite", + className: "CpkInfo", + modelProperties: { + encryptionKey: { + xmlName: "encryptionKey", + type: { + name: "String" + } + }, + encryptionKeySha256: { + xmlName: "encryptionKeySha256", + type: { + name: "String" + } + }, + encryptionAlgorithm: { + xmlName: "encryptionAlgorithm", + type: { + name: "Enum", + allowedValues: [ + "AES256" + ] + } + } + } + } +}; +export var BlobHTTPHeaders = { + xmlName: "blob-HTTP-headers", + type: { + name: "Composite", + className: "BlobHTTPHeaders", + modelProperties: { + blobCacheControl: { + xmlName: "blobCacheControl", + type: { + name: "String" + } + }, + blobContentType: { + xmlName: "blobContentType", + type: { + name: "String" + } + }, + blobContentMD5: { + xmlName: "blobContentMD5", + type: { + name: "ByteArray" + } + }, + blobContentEncoding: { + xmlName: "blobContentEncoding", + type: { + name: "String" + } + }, + blobContentLanguage: { + xmlName: "blobContentLanguage", + type: { + name: "String" + } + }, + blobContentDisposition: { + xmlName: "blobContentDisposition", + type: { + name: "String" + } + } + } + } +}; +export var SequenceNumberAccessConditions = { + xmlName: "sequence-number-access-conditions", + type: { + name: "Composite", + className: "SequenceNumberAccessConditions", + modelProperties: { + ifSequenceNumberLessThanOrEqualTo: { + xmlName: "ifSequenceNumberLessThanOrEqualTo", + type: { + name: "Number" + } + }, + ifSequenceNumberLessThan: { + xmlName: "ifSequenceNumberLessThan", + type: { + name: "Number" + } + }, + ifSequenceNumberEqualTo: { + xmlName: "ifSequenceNumberEqualTo", + type: { + name: "Number" + } + } + } + } +}; +export var AppendPositionAccessConditions = { + xmlName: "append-position-access-conditions", + type: { + name: "Composite", + className: "AppendPositionAccessConditions", + modelProperties: { + maxSize: { + xmlName: "maxSize", + type: { + name: "Number" + } + }, + appendPosition: { + xmlName: "appendPosition", + type: { + name: "Number" + } + } + } + } +}; +export var ServiceSetPropertiesHeaders = { + serializedName: "service-setproperties-headers", + type: { + name: "Composite", + className: "ServiceSetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceGetPropertiesHeaders = { + serializedName: "service-getproperties-headers", + type: { + name: "Composite", + className: "ServiceGetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceGetStatisticsHeaders = { + serializedName: "service-getstatistics-headers", + type: { + name: "Composite", + className: "ServiceGetStatisticsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceListContainersSegmentHeaders = { + serializedName: "service-listcontainerssegment-headers", + type: { + name: "Composite", + className: "ServiceListContainersSegmentHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceGetUserDelegationKeyHeaders = { + serializedName: "service-getuserdelegationkey-headers", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceGetAccountInfoHeaders = { + serializedName: "service-getaccountinfo-headers", + type: { + name: "Composite", + className: "ServiceGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceSubmitBatchHeaders = { + serializedName: "service-submitbatch-headers", + type: { + name: "Composite", + className: "ServiceSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ServiceFilterBlobsHeaders = { + serializedName: "service-filterblobs-headers", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerCreateHeaders = { + serializedName: "container-create-headers", + type: { + name: "Composite", + className: "ContainerCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerGetPropertiesHeaders = { + serializedName: "container-getproperties-headers", + type: { + name: "Composite", + className: "ContainerGetPropertiesHeaders", + modelProperties: { + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + }, + hasImmutabilityPolicy: { + serializedName: "x-ms-has-immutability-policy", + type: { + name: "Boolean" + } + }, + hasLegalHold: { + serializedName: "x-ms-has-legal-hold", + type: { + name: "Boolean" + } + }, + defaultEncryptionScope: { + serializedName: "x-ms-default-encryption-scope", + type: { + name: "String" + } + }, + denyEncryptionScopeOverride: { + serializedName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerDeleteHeaders = { + serializedName: "container-delete-headers", + type: { + name: "Composite", + className: "ContainerDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerSetMetadataHeaders = { + serializedName: "container-setmetadata-headers", + type: { + name: "Composite", + className: "ContainerSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerGetAccessPolicyHeaders = { + serializedName: "container-getaccesspolicy-headers", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyHeaders", + modelProperties: { + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerSetAccessPolicyHeaders = { + serializedName: "container-setaccesspolicy-headers", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerRestoreHeaders = { + serializedName: "container-restore-headers", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerAcquireLeaseHeaders = { + serializedName: "container-acquirelease-headers", + type: { + name: "Composite", + className: "ContainerAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerReleaseLeaseHeaders = { + serializedName: "container-releaselease-headers", + type: { + name: "Composite", + className: "ContainerReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerRenewLeaseHeaders = { + serializedName: "container-renewlease-headers", + type: { + name: "Composite", + className: "ContainerRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerBreakLeaseHeaders = { + serializedName: "container-breaklease-headers", + type: { + name: "Composite", + className: "ContainerBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerChangeLeaseHeaders = { + serializedName: "container-changelease-headers", + type: { + name: "Composite", + className: "ContainerChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerListBlobFlatSegmentHeaders = { + serializedName: "container-listblobflatsegment-headers", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerListBlobHierarchySegmentHeaders = { + serializedName: "container-listblobhierarchysegment-headers", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var ContainerGetAccountInfoHeaders = { + serializedName: "container-getaccountinfo-headers", + type: { + name: "Composite", + className: "ContainerGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var DirectoryCreateHeaders = { + serializedName: "directory-create-headers", + type: { + name: "Composite", + className: "DirectoryCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var DirectoryRenameHeaders = { + serializedName: "directory-rename-headers", + type: { + name: "Composite", + className: "DirectoryRenameHeaders", + modelProperties: { + marker: { + serializedName: "x-ms-continuation", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var DirectoryDeleteHeaders = { + serializedName: "directory-delete-headers", + type: { + name: "Composite", + className: "DirectoryDeleteHeaders", + modelProperties: { + marker: { + serializedName: "x-ms-continuation", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var DirectorySetAccessControlHeaders = { + serializedName: "directory-setaccesscontrol-headers", + type: { + name: "Composite", + className: "DirectorySetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +export var DirectoryGetAccessControlHeaders = { + serializedName: "directory-getaccesscontrol-headers", + type: { + name: "Composite", + className: "DirectoryGetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + xMsOwner: { + serializedName: "x-ms-owner", + type: { + name: "String" + } + }, + xMsGroup: { + serializedName: "x-ms-group", + type: { + name: "String" + } + }, + xMsPermissions: { + serializedName: "x-ms-permissions", + type: { + name: "String" + } + }, + xMsAcl: { + serializedName: "x-ms-acl", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +export var BlobDownloadHeaders = { + serializedName: "blob-download-headers", + type: { + name: "Composite", + className: "BlobDownloadHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + contentRange: { + serializedName: "content-range", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123" + } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobGetPropertiesHeaders = { + serializedName: "blob-getproperties-headers", + type: { + name: "Composite", + className: "BlobGetPropertiesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + createdOn: { + serializedName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + isIncrementalCopy: { + serializedName: "x-ms-incremental-copy", + type: { + name: "Boolean" + } + }, + destinationSnapshot: { + serializedName: "x-ms-copy-destination-snapshot", + type: { + name: "String" + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + accessTier: { + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + }, + accessTierInferred: { + serializedName: "x-ms-access-tier-inferred", + type: { + name: "Boolean" + } + }, + archiveStatus: { + serializedName: "x-ms-archive-status", + type: { + name: "String" + } + }, + accessTierChangedOn: { + serializedName: "x-ms-access-tier-change-time", + type: { + name: "DateTimeRfc1123" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + type: { + name: "Boolean" + } + }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + rehydratePriority: { + serializedName: "x-ms-rehydrate-priority", + type: { + name: "String" + } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobDeleteHeaders = { + serializedName: "blob-delete-headers", + type: { + name: "Composite", + className: "BlobDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetAccessControlHeaders = { + serializedName: "blob-setaccesscontrol-headers", + type: { + name: "Composite", + className: "BlobSetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +export var BlobGetAccessControlHeaders = { + serializedName: "blob-getaccesscontrol-headers", + type: { + name: "Composite", + className: "BlobGetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + xMsOwner: { + serializedName: "x-ms-owner", + type: { + name: "String" + } + }, + xMsGroup: { + serializedName: "x-ms-group", + type: { + name: "String" + } + }, + xMsPermissions: { + serializedName: "x-ms-permissions", + type: { + name: "String" + } + }, + xMsAcl: { + serializedName: "x-ms-acl", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +export var BlobRenameHeaders = { + serializedName: "blob-rename-headers", + type: { + name: "Composite", + className: "BlobRenameHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +export var PageBlobCreateHeaders = { + serializedName: "pageblob-create-headers", + type: { + name: "Composite", + className: "PageBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var AppendBlobCreateHeaders = { + serializedName: "appendblob-create-headers", + type: { + name: "Composite", + className: "AppendBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlockBlobUploadHeaders = { + serializedName: "blockblob-upload-headers", + type: { + name: "Composite", + className: "BlockBlobUploadHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobUndeleteHeaders = { + serializedName: "blob-undelete-headers", + type: { + name: "Composite", + className: "BlobUndeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetExpiryHeaders = { + serializedName: "blob-setexpiry-headers", + type: { + name: "Composite", + className: "BlobSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetHTTPHeadersHeaders = { + serializedName: "blob-sethttpheaders-headers", + type: { + name: "Composite", + className: "BlobSetHTTPHeadersHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetMetadataHeaders = { + serializedName: "blob-setmetadata-headers", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobAcquireLeaseHeaders = { + serializedName: "blob-acquirelease-headers", + type: { + name: "Composite", + className: "BlobAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobReleaseLeaseHeaders = { + serializedName: "blob-releaselease-headers", + type: { + name: "Composite", + className: "BlobReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobRenewLeaseHeaders = { + serializedName: "blob-renewlease-headers", + type: { + name: "Composite", + className: "BlobRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobChangeLeaseHeaders = { + serializedName: "blob-changelease-headers", + type: { + name: "Composite", + className: "BlobChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobBreakLeaseHeaders = { + serializedName: "blob-breaklease-headers", + type: { + name: "Composite", + className: "BlobBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobCreateSnapshotHeaders = { + serializedName: "blob-createsnapshot-headers", + type: { + name: "Composite", + className: "BlobCreateSnapshotHeaders", + modelProperties: { + snapshot: { + serializedName: "x-ms-snapshot", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobStartCopyFromURLHeaders = { + serializedName: "blob-startcopyfromurl-headers", + type: { + name: "Composite", + className: "BlobStartCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobCopyFromURLHeaders = { + serializedName: "blob-copyfromurl-headers", + type: { + name: "Composite", + className: "BlobCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "success" + ] + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobAbortCopyFromURLHeaders = { + serializedName: "blob-abortcopyfromurl-headers", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetTierHeaders = { + serializedName: "blob-settier-headers", + type: { + name: "Composite", + className: "BlobSetTierHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobGetAccountInfoHeaders = { + serializedName: "blob-getaccountinfo-headers", + type: { + name: "Composite", + className: "BlobGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlockBlobStageBlockHeaders = { + serializedName: "blockblob-stageblock-headers", + type: { + name: "Composite", + className: "BlockBlobStageBlockHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlockBlobStageBlockFromURLHeaders = { + serializedName: "blockblob-stageblockfromurl-headers", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlockBlobCommitBlockListHeaders = { + serializedName: "blockblob-commitblocklist-headers", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlockBlobGetBlockListHeaders = { + serializedName: "blockblob-getblocklist-headers", + type: { + name: "Composite", + className: "BlockBlobGetBlockListHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobUploadPagesHeaders = { + serializedName: "pageblob-uploadpages-headers", + type: { + name: "Composite", + className: "PageBlobUploadPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobClearPagesHeaders = { + serializedName: "pageblob-clearpages-headers", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobUploadPagesFromURLHeaders = { + serializedName: "pageblob-uploadpagesfromurl-headers", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobGetPageRangesHeaders = { + serializedName: "pageblob-getpageranges-headers", + type: { + name: "Composite", + className: "PageBlobGetPageRangesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobGetPageRangesDiffHeaders = { + serializedName: "pageblob-getpagerangesdiff-headers", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobResizeHeaders = { + serializedName: "pageblob-resize-headers", + type: { + name: "Composite", + className: "PageBlobResizeHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobUpdateSequenceNumberHeaders = { + serializedName: "pageblob-updatesequencenumber-headers", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var PageBlobCopyIncrementalHeaders = { + serializedName: "pageblob-copyincremental-headers", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var AppendBlobAppendBlockHeaders = { + serializedName: "appendblob-appendblock-headers", + type: { + name: "Composite", + className: "AppendBlobAppendBlockHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var AppendBlobAppendBlockFromUrlHeaders = { + serializedName: "appendblob-appendblockfromurl-headers", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var AppendBlobSealHeaders = { + serializedName: "appendblob-seal-headers", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobQueryHeaders = { + serializedName: "blob-query-headers", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + contentRange: { + serializedName: "content-range", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobGetTagsHeaders = { + serializedName: "blob-gettags-headers", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +export var BlobSetTagsHeaders = { + serializedName: "blob-settags-headers", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +//# sourceMappingURL=mappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js.map new file mode 100644 index 000000000..5dc76c285 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/mappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mappers.js","sourceRoot":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9B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,iBAAiB;iBACxB;aACF;YACD,SAAS,EAAE;gBACT,cAAc,EAAE,iBAAiB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\n\nexport const KeyInfo: coreHttp.CompositeMapper = {\n serializedName: \"KeyInfo\",\n type: {\n name: \"Composite\",\n className: \"KeyInfo\",\n modelProperties: {\n startsOn: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry\",\n required: true,\n serializedName: \"Expiry\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const UserDelegationKey: coreHttp.CompositeMapper = {\n serializedName: \"UserDelegationKey\",\n type: {\n name: \"Composite\",\n className: \"UserDelegationKey\",\n modelProperties: {\n signedObjectId: {\n xmlName: \"SignedOid\",\n required: true,\n serializedName: \"SignedOid\",\n type: {\n name: \"String\"\n }\n },\n signedTenantId: {\n xmlName: \"SignedTid\",\n required: true,\n serializedName: \"SignedTid\",\n type: {\n name: \"String\"\n }\n },\n signedStartsOn: {\n xmlName: \"SignedStart\",\n required: true,\n serializedName: \"SignedStart\",\n type: {\n name: \"String\"\n }\n },\n signedExpiresOn: {\n xmlName: \"SignedExpiry\",\n required: true,\n serializedName: \"SignedExpiry\",\n type: {\n name: \"String\"\n }\n },\n signedService: {\n xmlName: \"SignedService\",\n required: true,\n serializedName: \"SignedService\",\n type: {\n name: \"String\"\n }\n },\n signedVersion: {\n xmlName: \"SignedVersion\",\n required: true,\n serializedName: \"SignedVersion\",\n type: {\n name: \"String\"\n }\n },\n value: {\n xmlName: \"Value\",\n required: true,\n serializedName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const StorageError: coreHttp.CompositeMapper = {\n serializedName: \"StorageError\",\n type: {\n name: \"Composite\",\n className: \"StorageError\",\n modelProperties: {\n message: {\n xmlName: \"Message\",\n serializedName: \"Message\",\n type: {\n name: \"String\"\n }\n },\n code: {\n xmlName: \"Code\",\n serializedName: \"Code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DataLakeStorageErrorError: coreHttp.CompositeMapper = {\n serializedName: \"DataLakeStorageError_error\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageErrorError\",\n modelProperties: {\n code: {\n xmlName: \"Code\",\n serializedName: \"Code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n xmlName: \"Message\",\n serializedName: \"Message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DataLakeStorageError: coreHttp.CompositeMapper = {\n serializedName: \"DataLakeStorageError\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageError\",\n modelProperties: {\n dataLakeStorageErrorDetails: {\n xmlName: \"error\",\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageErrorError\"\n }\n }\n }\n }\n};\n\nexport const AccessPolicy: coreHttp.CompositeMapper = {\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\",\n modelProperties: {\n startsOn: {\n xmlName: \"Start\",\n serializedName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry\",\n serializedName: \"Expiry\",\n type: {\n name: \"String\"\n }\n },\n permissions: {\n xmlName: \"Permission\",\n serializedName: \"Permission\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobPropertiesInternal: coreHttp.CompositeMapper = {\n xmlName: \"Properties\",\n serializedName: \"BlobPropertiesInternal\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\",\n modelProperties: {\n createdOn: {\n xmlName: \"Creation-Time\",\n serializedName: \"Creation-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n lastModified: {\n xmlName: \"Last-Modified\",\n required: true,\n serializedName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n xmlName: \"Etag\",\n required: true,\n serializedName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n xmlName: \"Content-Length\",\n serializedName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n xmlName: \"Content-Type\",\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n xmlName: \"Content-Encoding\",\n serializedName: \"Content-Encoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n xmlName: \"Content-Language\",\n serializedName: \"Content-Language\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n xmlName: \"Content-MD5\",\n serializedName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentDisposition: {\n xmlName: \"Content-Disposition\",\n serializedName: \"Content-Disposition\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n xmlName: \"Cache-Control\",\n serializedName: \"Cache-Control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n xmlName: \"x-ms-blob-sequence-number\",\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n xmlName: \"BlobType\",\n serializedName: \"BlobType\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n leaseStatus: {\n xmlName: \"LeaseStatus\",\n serializedName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n leaseState: {\n xmlName: \"LeaseState\",\n serializedName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n xmlName: \"LeaseDuration\",\n serializedName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n copyId: {\n xmlName: \"CopyId\",\n serializedName: \"CopyId\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n xmlName: \"CopyStatus\",\n serializedName: \"CopyStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n copySource: {\n xmlName: \"CopySource\",\n serializedName: \"CopySource\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n xmlName: \"CopyProgress\",\n serializedName: \"CopyProgress\",\n type: {\n name: \"String\"\n }\n },\n copyCompletedOn: {\n xmlName: \"CopyCompletionTime\",\n serializedName: \"CopyCompletionTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n xmlName: \"CopyStatusDescription\",\n serializedName: \"CopyStatusDescription\",\n type: {\n name: \"String\"\n }\n },\n serverEncrypted: {\n xmlName: \"ServerEncrypted\",\n serializedName: \"ServerEncrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n incrementalCopy: {\n xmlName: \"IncrementalCopy\",\n serializedName: \"IncrementalCopy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n xmlName: \"DestinationSnapshot\",\n serializedName: \"DestinationSnapshot\",\n type: {\n name: \"String\"\n }\n },\n deletedOn: {\n xmlName: \"DeletedTime\",\n serializedName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n xmlName: \"RemainingRetentionDays\",\n serializedName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n accessTier: {\n xmlName: \"AccessTier\",\n serializedName: \"AccessTier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n xmlName: \"AccessTierInferred\",\n serializedName: \"AccessTierInferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n xmlName: \"ArchiveStatus\",\n serializedName: \"ArchiveStatus\",\n type: {\n name: \"String\"\n }\n },\n customerProvidedKeySha256: {\n xmlName: \"CustomerProvidedKeySha256\",\n serializedName: \"CustomerProvidedKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n xmlName: \"EncryptionScope\",\n serializedName: \"EncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n xmlName: \"AccessTierChangeTime\",\n serializedName: \"AccessTierChangeTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n tagCount: {\n xmlName: \"TagCount\",\n serializedName: \"TagCount\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry-Time\",\n serializedName: \"Expiry-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n xmlName: \"Sealed\",\n serializedName: \"Sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n xmlName: \"RehydratePriority\",\n serializedName: \"RehydratePriority\",\n type: {\n name: \"String\"\n }\n },\n lastAccessedOn: {\n xmlName: \"LastAccessTime\",\n serializedName: \"LastAccessTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const BlobTag: coreHttp.CompositeMapper = {\n xmlName: \"Tag\",\n serializedName: \"BlobTag\",\n type: {\n name: \"Composite\",\n className: \"BlobTag\",\n modelProperties: {\n key: {\n xmlName: \"Key\",\n required: true,\n serializedName: \"Key\",\n type: {\n name: \"String\"\n }\n },\n value: {\n xmlName: \"Value\",\n required: true,\n serializedName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobTags: coreHttp.CompositeMapper = {\n xmlName: \"Tags\",\n serializedName: \"BlobTags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\",\n modelProperties: {\n blobTagSet: {\n xmlIsWrapped: true,\n xmlName: \"TagSet\",\n xmlElementName: \"Tag\",\n required: true,\n serializedName: \"BlobTagSet\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobTag\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlobItemInternal: coreHttp.CompositeMapper = {\n xmlName: \"Blob\",\n serializedName: \"BlobItemInternal\",\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n xmlName: \"Deleted\",\n required: true,\n serializedName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n snapshot: {\n xmlName: \"Snapshot\",\n required: true,\n serializedName: \"Snapshot\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n xmlName: \"VersionId\",\n serializedName: \"VersionId\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n xmlName: \"IsCurrentVersion\",\n serializedName: \"IsCurrentVersion\",\n type: {\n name: \"Boolean\"\n }\n },\n properties: {\n xmlName: \"Properties\",\n required: true,\n serializedName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\"\n }\n },\n metadata: {\n xmlName: \"Metadata\",\n serializedName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n blobTags: {\n xmlName: \"Tags\",\n serializedName: \"BlobTags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n },\n objectReplicationMetadata: {\n xmlName: \"OrMetadata\",\n serializedName: \"ObjectReplicationMetadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlobFlatListSegment: coreHttp.CompositeMapper = {\n xmlName: \"Blobs\",\n serializedName: \"BlobFlatListSegment\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\",\n modelProperties: {\n blobItems: {\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"BlobItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListBlobsFlatSegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListBlobsFlatSegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsFlatSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlIsAttribute: true,\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n segment: {\n xmlName: \"Blobs\",\n required: true,\n serializedName: \"Segment\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\"\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobPrefix: coreHttp.CompositeMapper = {\n serializedName: \"BlobPrefix\",\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobHierarchyListSegment: coreHttp.CompositeMapper = {\n xmlName: \"Blobs\",\n serializedName: \"BlobHierarchyListSegment\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\",\n modelProperties: {\n blobPrefixes: {\n xmlName: \"BlobPrefixes\",\n xmlElementName: \"BlobPrefix\",\n serializedName: \"BlobPrefixes\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\"\n }\n }\n }\n },\n blobItems: {\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"BlobItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListBlobsHierarchySegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListBlobsHierarchySegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsHierarchySegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlIsAttribute: true,\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n delimiter: {\n xmlName: \"Delimiter\",\n serializedName: \"Delimiter\",\n type: {\n name: \"String\"\n }\n },\n segment: {\n xmlName: \"Blobs\",\n required: true,\n serializedName: \"Segment\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\"\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const Block: coreHttp.CompositeMapper = {\n serializedName: \"Block\",\n type: {\n name: \"Composite\",\n className: \"Block\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n size: {\n xmlName: \"Size\",\n required: true,\n serializedName: \"Size\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const BlockList: coreHttp.CompositeMapper = {\n serializedName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockList\",\n modelProperties: {\n committedBlocks: {\n xmlIsWrapped: true,\n xmlName: \"CommittedBlocks\",\n xmlElementName: \"Block\",\n serializedName: \"CommittedBlocks\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n },\n uncommittedBlocks: {\n xmlIsWrapped: true,\n xmlName: \"UncommittedBlocks\",\n xmlElementName: \"Block\",\n serializedName: \"UncommittedBlocks\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlockLookupList: coreHttp.CompositeMapper = {\n xmlName: \"BlockList\",\n serializedName: \"BlockLookupList\",\n type: {\n name: \"Composite\",\n className: \"BlockLookupList\",\n modelProperties: {\n committed: {\n xmlName: \"Committed\",\n xmlElementName: \"Committed\",\n serializedName: \"Committed\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n uncommitted: {\n xmlName: \"Uncommitted\",\n xmlElementName: \"Uncommitted\",\n serializedName: \"Uncommitted\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n latest: {\n xmlName: \"Latest\",\n xmlElementName: \"Latest\",\n serializedName: \"Latest\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ContainerProperties: coreHttp.CompositeMapper = {\n serializedName: \"ContainerProperties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\",\n modelProperties: {\n lastModified: {\n xmlName: \"Last-Modified\",\n required: true,\n serializedName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n xmlName: \"Etag\",\n required: true,\n serializedName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n leaseStatus: {\n xmlName: \"LeaseStatus\",\n serializedName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n leaseState: {\n xmlName: \"LeaseState\",\n serializedName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n xmlName: \"LeaseDuration\",\n serializedName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n publicAccess: {\n xmlName: \"PublicAccess\",\n serializedName: \"PublicAccess\",\n type: {\n name: \"String\"\n }\n },\n hasImmutabilityPolicy: {\n xmlName: \"HasImmutabilityPolicy\",\n serializedName: \"HasImmutabilityPolicy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n xmlName: \"HasLegalHold\",\n serializedName: \"HasLegalHold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n xmlName: \"DefaultEncryptionScope\",\n serializedName: \"DefaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n xmlName: \"DenyEncryptionScopeOverride\",\n serializedName: \"DenyEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n },\n deletedOn: {\n xmlName: \"DeletedTime\",\n serializedName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n xmlName: \"RemainingRetentionDays\",\n serializedName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ContainerItem: coreHttp.CompositeMapper = {\n xmlName: \"Container\",\n serializedName: \"ContainerItem\",\n type: {\n name: \"Composite\",\n className: \"ContainerItem\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n xmlName: \"Deleted\",\n serializedName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n version: {\n xmlName: \"Version\",\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n properties: {\n xmlName: \"Properties\",\n required: true,\n serializedName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\"\n }\n },\n metadata: {\n xmlName: \"Metadata\",\n serializedName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const DelimitedTextConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\",\n modelProperties: {\n columnSeparator: {\n xmlName: \"ColumnSeparator\",\n required: true,\n serializedName: \"ColumnSeparator\",\n type: {\n name: \"String\"\n }\n },\n fieldQuote: {\n xmlName: \"FieldQuote\",\n required: true,\n serializedName: \"FieldQuote\",\n type: {\n name: \"String\"\n }\n },\n recordSeparator: {\n xmlName: \"RecordSeparator\",\n required: true,\n serializedName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n },\n escapeChar: {\n xmlName: \"EscapeChar\",\n required: true,\n serializedName: \"EscapeChar\",\n type: {\n name: \"String\"\n }\n },\n headersPresent: {\n xmlName: \"HasHeaders\",\n required: true,\n serializedName: \"HeadersPresent\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const JsonTextConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\",\n modelProperties: {\n recordSeparator: {\n xmlName: \"RecordSeparator\",\n required: true,\n serializedName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ArrowField: coreHttp.CompositeMapper = {\n xmlName: \"Field\",\n serializedName: \"ArrowField\",\n type: {\n name: \"Composite\",\n className: \"ArrowField\",\n modelProperties: {\n type: {\n xmlName: \"Type\",\n required: true,\n serializedName: \"Type\",\n type: {\n name: \"String\"\n }\n },\n name: {\n xmlName: \"Name\",\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n precision: {\n xmlName: \"Precision\",\n serializedName: \"Precision\",\n type: {\n name: \"Number\"\n }\n },\n scale: {\n xmlName: \"Scale\",\n serializedName: \"Scale\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ArrowConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\",\n modelProperties: {\n schema: {\n xmlIsWrapped: true,\n xmlName: \"Schema\",\n xmlElementName: \"Field\",\n required: true,\n serializedName: \"Schema\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ArrowField\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListContainersSegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListContainersSegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListContainersSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n containerItems: {\n xmlIsWrapped: true,\n xmlName: \"Containers\",\n xmlElementName: \"Container\",\n required: true,\n serializedName: \"ContainerItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ContainerItem\"\n }\n }\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CorsRule: coreHttp.CompositeMapper = {\n serializedName: \"CorsRule\",\n type: {\n name: \"Composite\",\n className: \"CorsRule\",\n modelProperties: {\n allowedOrigins: {\n xmlName: \"AllowedOrigins\",\n required: true,\n serializedName: \"AllowedOrigins\",\n type: {\n name: \"String\"\n }\n },\n allowedMethods: {\n xmlName: \"AllowedMethods\",\n required: true,\n serializedName: \"AllowedMethods\",\n type: {\n name: \"String\"\n }\n },\n allowedHeaders: {\n xmlName: \"AllowedHeaders\",\n required: true,\n serializedName: \"AllowedHeaders\",\n type: {\n name: \"String\"\n }\n },\n exposedHeaders: {\n xmlName: \"ExposedHeaders\",\n required: true,\n serializedName: \"ExposedHeaders\",\n type: {\n name: \"String\"\n }\n },\n maxAgeInSeconds: {\n xmlName: \"MaxAgeInSeconds\",\n required: true,\n serializedName: \"MaxAgeInSeconds\",\n constraints: {\n InclusiveMinimum: 0\n },\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const FilterBlobItem: coreHttp.CompositeMapper = {\n xmlName: \"Blob\",\n serializedName: \"FilterBlobItem\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n tagValue: {\n xmlName: \"TagValue\",\n required: true,\n serializedName: \"TagValue\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const FilterBlobSegment: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"FilterBlobSegment\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobSegment\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n where: {\n xmlName: \"Where\",\n required: true,\n serializedName: \"Where\",\n type: {\n name: \"String\"\n }\n },\n blobs: {\n xmlIsWrapped: true,\n xmlName: \"Blobs\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"Blobs\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\"\n }\n }\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const GeoReplication: coreHttp.CompositeMapper = {\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\",\n modelProperties: {\n status: {\n xmlName: \"Status\",\n required: true,\n serializedName: \"Status\",\n type: {\n name: \"String\"\n }\n },\n lastSyncOn: {\n xmlName: \"LastSyncTime\",\n required: true,\n serializedName: \"LastSyncTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const RetentionPolicy: coreHttp.CompositeMapper = {\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\",\n modelProperties: {\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n days: {\n xmlName: \"Days\",\n serializedName: \"Days\",\n constraints: {\n InclusiveMinimum: 1\n },\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const Logging: coreHttp.CompositeMapper = {\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\",\n modelProperties: {\n version: {\n xmlName: \"Version\",\n required: true,\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n deleteProperty: {\n xmlName: \"Delete\",\n required: true,\n serializedName: \"Delete\",\n type: {\n name: \"Boolean\"\n }\n },\n read: {\n xmlName: \"Read\",\n required: true,\n serializedName: \"Read\",\n type: {\n name: \"Boolean\"\n }\n },\n write: {\n xmlName: \"Write\",\n required: true,\n serializedName: \"Write\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n xmlName: \"RetentionPolicy\",\n required: true,\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\n\nexport const Metrics: coreHttp.CompositeMapper = {\n serializedName: \"Metrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\",\n modelProperties: {\n version: {\n xmlName: \"Version\",\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n includeAPIs: {\n xmlName: \"IncludeAPIs\",\n serializedName: \"IncludeAPIs\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n xmlName: \"RetentionPolicy\",\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\n\nexport const PageRange: coreHttp.CompositeMapper = {\n serializedName: \"PageRange\",\n type: {\n name: \"Composite\",\n className: \"PageRange\",\n modelProperties: {\n start: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n xmlName: \"End\",\n required: true,\n serializedName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ClearRange: coreHttp.CompositeMapper = {\n serializedName: \"ClearRange\",\n type: {\n name: \"Composite\",\n className: \"ClearRange\",\n modelProperties: {\n start: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n xmlName: \"End\",\n required: true,\n serializedName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const PageList: coreHttp.CompositeMapper = {\n serializedName: \"PageList\",\n type: {\n name: \"Composite\",\n className: \"PageList\",\n modelProperties: {\n pageRange: {\n xmlName: \"PageRange\",\n xmlElementName: \"PageRange\",\n serializedName: \"PageRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"PageRange\"\n }\n }\n }\n },\n clearRange: {\n xmlName: \"ClearRange\",\n xmlElementName: \"ClearRange\",\n serializedName: \"ClearRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ClearRange\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const QueryFormat: coreHttp.CompositeMapper = {\n serializedName: \"QueryFormat\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\",\n modelProperties: {\n type: {\n xmlName: \"Type\",\n serializedName: \"Type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"delimited\",\n \"json\",\n \"arrow\"\n ]\n }\n },\n delimitedTextConfiguration: {\n xmlName: \"DelimitedTextConfiguration\",\n serializedName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\"\n }\n },\n jsonTextConfiguration: {\n xmlName: \"JsonTextConfiguration\",\n serializedName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\"\n }\n },\n arrowConfiguration: {\n xmlName: \"ArrowConfiguration\",\n serializedName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\"\n }\n }\n }\n }\n};\n\nexport const QuerySerialization: coreHttp.CompositeMapper = {\n serializedName: \"QuerySerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\",\n modelProperties: {\n format: {\n xmlName: \"Format\",\n required: true,\n serializedName: \"Format\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\"\n }\n }\n }\n }\n};\n\nexport const QueryRequest: coreHttp.CompositeMapper = {\n serializedName: \"QueryRequest\",\n type: {\n name: \"Composite\",\n className: \"QueryRequest\",\n modelProperties: {\n queryType: {\n xmlName: \"QueryType\",\n required: true,\n isConstant: true,\n serializedName: \"QueryType\",\n defaultValue: 'SQL',\n type: {\n name: \"String\"\n }\n },\n expression: {\n xmlName: \"Expression\",\n required: true,\n serializedName: \"Expression\",\n type: {\n name: \"String\"\n }\n },\n inputSerialization: {\n xmlName: \"InputSerialization\",\n serializedName: \"InputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n },\n outputSerialization: {\n xmlName: \"OutputSerialization\",\n serializedName: \"OutputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n }\n }\n }\n};\n\nexport const SignedIdentifier: coreHttp.CompositeMapper = {\n serializedName: \"SignedIdentifier\",\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\",\n modelProperties: {\n id: {\n xmlName: \"Id\",\n required: true,\n serializedName: \"Id\",\n type: {\n name: \"String\"\n }\n },\n accessPolicy: {\n xmlName: \"AccessPolicy\",\n required: true,\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\"\n }\n }\n }\n }\n};\n\nexport const StaticWebsite: coreHttp.CompositeMapper = {\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\",\n modelProperties: {\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n indexDocument: {\n xmlName: \"IndexDocument\",\n serializedName: \"IndexDocument\",\n type: {\n name: \"String\"\n }\n },\n errorDocument404Path: {\n xmlName: \"ErrorDocument404Path\",\n serializedName: \"ErrorDocument404Path\",\n type: {\n name: \"String\"\n }\n },\n defaultIndexDocumentPath: {\n xmlName: \"DefaultIndexDocumentPath\",\n serializedName: \"DefaultIndexDocumentPath\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobServiceProperties: coreHttp.CompositeMapper = {\n xmlName: \"StorageServiceProperties\",\n serializedName: \"BlobServiceProperties\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceProperties\",\n modelProperties: {\n blobAnalyticsLogging: {\n xmlName: \"Logging\",\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\"\n }\n },\n hourMetrics: {\n xmlName: \"HourMetrics\",\n serializedName: \"HourMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n minuteMetrics: {\n xmlName: \"MinuteMetrics\",\n serializedName: \"MinuteMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n cors: {\n xmlIsWrapped: true,\n xmlName: \"Cors\",\n xmlElementName: \"CorsRule\",\n serializedName: \"Cors\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CorsRule\"\n }\n }\n }\n },\n defaultServiceVersion: {\n xmlName: \"DefaultServiceVersion\",\n serializedName: \"DefaultServiceVersion\",\n type: {\n name: \"String\"\n }\n },\n deleteRetentionPolicy: {\n xmlName: \"DeleteRetentionPolicy\",\n serializedName: \"DeleteRetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n },\n staticWebsite: {\n xmlName: \"StaticWebsite\",\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\"\n }\n }\n }\n }\n};\n\nexport const BlobServiceStatistics: coreHttp.CompositeMapper = {\n xmlName: \"StorageServiceStats\",\n serializedName: \"BlobServiceStatistics\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceStatistics\",\n modelProperties: {\n geoReplication: {\n xmlName: \"GeoReplication\",\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\"\n }\n }\n }\n }\n};\n\nexport const ContainerEncryptionScope: coreHttp.CompositeMapper = {\n xmlName: \"container-encryption-scope\",\n type: {\n name: \"Composite\",\n className: \"ContainerEncryptionScope\",\n modelProperties: {\n defaultEncryptionScope: {\n xmlName: \"defaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n xmlName: \"preventEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const LeaseAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"lease-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"LeaseAccessConditions\",\n modelProperties: {\n leaseId: {\n xmlName: \"leaseId\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ModifiedAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"modified-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"ModifiedAccessConditions\",\n modelProperties: {\n ifModifiedSince: {\n xmlName: \"ifModifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n ifUnmodifiedSince: {\n xmlName: \"ifUnmodifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n ifMatch: {\n xmlName: \"ifMatch\",\n type: {\n name: \"String\"\n }\n },\n ifNoneMatch: {\n xmlName: \"ifNoneMatch\",\n type: {\n name: \"String\"\n }\n },\n ifTags: {\n xmlName: \"ifTags\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryHttpHeaders: coreHttp.CompositeMapper = {\n xmlName: \"directory-http-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryHttpHeaders\",\n modelProperties: {\n cacheControl: {\n xmlName: \"cacheControl\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n xmlName: \"contentType\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n xmlName: \"contentEncoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n xmlName: \"contentLanguage\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n xmlName: \"contentDisposition\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SourceModifiedAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"source-modified-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"SourceModifiedAccessConditions\",\n modelProperties: {\n sourceIfModifiedSince: {\n xmlName: \"sourceIfModifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n sourceIfUnmodifiedSince: {\n xmlName: \"sourceIfUnmodifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n sourceIfMatch: {\n xmlName: \"sourceIfMatch\",\n type: {\n name: \"String\"\n }\n },\n sourceIfNoneMatch: {\n xmlName: \"sourceIfNoneMatch\",\n type: {\n name: \"String\"\n }\n },\n sourceIfTags: {\n xmlName: \"sourceIfTags\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CpkInfo: coreHttp.CompositeMapper = {\n xmlName: \"cpk-info\",\n type: {\n name: \"Composite\",\n className: \"CpkInfo\",\n modelProperties: {\n encryptionKey: {\n xmlName: \"encryptionKey\",\n type: {\n name: \"String\"\n }\n },\n encryptionKeySha256: {\n xmlName: \"encryptionKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionAlgorithm: {\n xmlName: \"encryptionAlgorithm\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"AES256\"\n ]\n }\n }\n }\n }\n};\n\nexport const BlobHTTPHeaders: coreHttp.CompositeMapper = {\n xmlName: \"blob-HTTP-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobHTTPHeaders\",\n modelProperties: {\n blobCacheControl: {\n xmlName: \"blobCacheControl\",\n type: {\n name: \"String\"\n }\n },\n blobContentType: {\n xmlName: \"blobContentType\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n xmlName: \"blobContentMD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobContentEncoding: {\n xmlName: \"blobContentEncoding\",\n type: {\n name: \"String\"\n }\n },\n blobContentLanguage: {\n xmlName: \"blobContentLanguage\",\n type: {\n name: \"String\"\n }\n },\n blobContentDisposition: {\n xmlName: \"blobContentDisposition\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SequenceNumberAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"sequence-number-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"SequenceNumberAccessConditions\",\n modelProperties: {\n ifSequenceNumberLessThanOrEqualTo: {\n xmlName: \"ifSequenceNumberLessThanOrEqualTo\",\n type: {\n name: \"Number\"\n }\n },\n ifSequenceNumberLessThan: {\n xmlName: \"ifSequenceNumberLessThan\",\n type: {\n name: \"Number\"\n }\n },\n ifSequenceNumberEqualTo: {\n xmlName: \"ifSequenceNumberEqualTo\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const AppendPositionAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"append-position-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"AppendPositionAccessConditions\",\n modelProperties: {\n maxSize: {\n xmlName: \"maxSize\",\n type: {\n name: \"Number\"\n }\n },\n appendPosition: {\n xmlName: \"appendPosition\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ServiceSetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-setproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetStatisticsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getstatistics-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceListContainersSegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-listcontainerssegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetUserDelegationKeyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getuserdelegationkey-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceSubmitBatchHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-submitbatch-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceFilterBlobsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-filterblobs-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-create-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesHeaders\",\n modelProperties: {\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"x-ms-has-immutability-policy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"x-ms-has-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n denyEncryptionScopeOverride: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerSetMetadataHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-setmetadata-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetAccessPolicyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getaccesspolicy-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyHeaders\",\n modelProperties: {\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerSetAccessPolicyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-setaccesspolicy-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerRestoreHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-restore-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerAcquireLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-acquirelease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerReleaseLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-releaselease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerRenewLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-renewlease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerBreakLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-breaklease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerChangeLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-changelease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerListBlobFlatSegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-listblobflatsegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerListBlobHierarchySegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-listblobhierarchysegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-create-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectoryRenameHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-rename-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryRenameHeaders\",\n modelProperties: {\n marker: {\n serializedName: \"x-ms-continuation\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectoryDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryDeleteHeaders\",\n modelProperties: {\n marker: {\n serializedName: \"x-ms-continuation\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectorySetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-setaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectorySetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryGetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-getaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryGetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsOwner: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n },\n xMsGroup: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n },\n xMsPermissions: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n },\n xMsAcl: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobDownloadHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-download-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n createdOn: {\n serializedName: \"x-ms-creation-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n isIncrementalCopy: {\n serializedName: \"x-ms-incremental-copy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"x-ms-copy-destination-snapshot\",\n type: {\n name: \"String\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n accessTier: {\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n serializedName: \"x-ms-access-tier-inferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"x-ms-archive-status\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"x-ms-access-tier-change-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"x-ms-expiry-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"String\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsOwner: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n },\n xMsGroup: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n },\n xMsPermissions: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n },\n xMsAcl: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobRenameHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-rename-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobRenameHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const PageBlobCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-create-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-create-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobUploadHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-upload-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobUndeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-undelete-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetExpiryHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setexpiry-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-sethttpheaders-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHTTPHeadersHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetMetadataHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setmetadata-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobAcquireLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-acquirelease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobReleaseLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-releaselease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobRenewLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-renewlease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobChangeLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-changelease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobBreakLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-breaklease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobCreateSnapshotHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-createsnapshot-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotHeaders\",\n modelProperties: {\n snapshot: {\n serializedName: \"x-ms-snapshot\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobStartCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-startcopyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-copyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"success\"\n ]\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobAbortCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-abortcopyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetTierHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-settier-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobStageBlockHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-stageblock-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobStageBlockFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-stageblockfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobCommitBlockListHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-commitblocklist-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobGetBlockListHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-getblocklist-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUploadPagesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-uploadpages-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobClearPagesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-clearpages-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUploadPagesFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-uploadpagesfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobGetPageRangesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-getpageranges-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobGetPageRangesDiffHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-getpagerangesdiff-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobResizeHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-resize-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUpdateSequenceNumberHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-updatesequencenumber-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobCopyIncrementalHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-copyincremental-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobAppendBlockHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-appendblock-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobAppendBlockFromUrlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-appendblockfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobSealHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-seal-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobQueryHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-query-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletionTime: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetTagsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-gettags-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetTagsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-settags-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js new file mode 100644 index 000000000..e03a19238 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { ClearRange, PageBlobClearPagesHeaders, PageBlobCopyIncrementalHeaders, PageBlobCreateHeaders, PageBlobGetPageRangesDiffHeaders, PageBlobGetPageRangesHeaders, PageBlobResizeHeaders, PageBlobUpdateSequenceNumberHeaders, PageBlobUploadPagesFromURLHeaders, PageBlobUploadPagesHeaders, PageList, PageRange, StorageError } from "../models/mappers"; +//# sourceMappingURL=pageBlobMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js.map new file mode 100644 index 000000000..fb56e4a6b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/pageBlobMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pageBlobMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/pageBlobMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,gCAAgC,EAChC,4BAA4B,EAC5B,qBAAqB,EACrB,mCAAmC,EACnC,iCAAiC,EACjC,0BAA0B,EAC1B,QAAQ,EACR,SAAS,EACT,YAAY,EACb,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n ClearRange,\n PageBlobClearPagesHeaders,\n PageBlobCopyIncrementalHeaders,\n PageBlobCreateHeaders,\n PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesHeaders,\n PageBlobResizeHeaders,\n PageBlobUpdateSequenceNumberHeaders,\n PageBlobUploadPagesFromURLHeaders,\n PageBlobUploadPagesHeaders,\n PageList,\n PageRange,\n StorageError\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js new file mode 100644 index 000000000..077d59ff4 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js @@ -0,0 +1,1723 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +export var access = { + parameterPath: [ + "options", + "access" + ], + mapper: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + } +}; +export var action0 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'acquire', + type: { + name: "String" + } + } +}; +export var action1 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'release', + type: { + name: "String" + } + } +}; +export var action2 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'renew', + type: { + name: "String" + } + } +}; +export var action3 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'break', + type: { + name: "String" + } + } +}; +export var action4 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'change', + type: { + name: "String" + } + } +}; +export var action5 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "action", + defaultValue: 'setAccessControl', + type: { + name: "String" + } + } +}; +export var action6 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "action", + defaultValue: 'getAccessControl', + type: { + name: "String" + } + } +}; +export var appendPosition = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "appendPosition" + ], + mapper: { + serializedName: "x-ms-blob-condition-appendpos", + type: { + name: "Number" + } + } +}; +export var blobCacheControl = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobCacheControl" + ], + mapper: { + serializedName: "x-ms-blob-cache-control", + type: { + name: "String" + } + } +}; +export var blobContentDisposition = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentDisposition" + ], + mapper: { + serializedName: "x-ms-blob-content-disposition", + type: { + name: "String" + } + } +}; +export var blobContentEncoding = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentEncoding" + ], + mapper: { + serializedName: "x-ms-blob-content-encoding", + type: { + name: "String" + } + } +}; +export var blobContentLanguage = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentLanguage" + ], + mapper: { + serializedName: "x-ms-blob-content-language", + type: { + name: "String" + } + } +}; +export var blobContentLength = { + parameterPath: "blobContentLength", + mapper: { + required: true, + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + } +}; +export var blobContentMD5 = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentMD5" + ], + mapper: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + } +}; +export var blobContentType = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentType" + ], + mapper: { + serializedName: "x-ms-blob-content-type", + type: { + name: "String" + } + } +}; +export var blobSequenceNumber = { + parameterPath: [ + "options", + "blobSequenceNumber" + ], + mapper: { + serializedName: "x-ms-blob-sequence-number", + defaultValue: 0, + type: { + name: "Number" + } + } +}; +export var blobTagsString = { + parameterPath: [ + "options", + "blobTagsString" + ], + mapper: { + serializedName: "x-ms-tags", + type: { + name: "String" + } + } +}; +export var blobType0 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'PageBlob', + type: { + name: "String" + } + } +}; +export var blobType1 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'AppendBlob', + type: { + name: "String" + } + } +}; +export var blobType2 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'BlockBlob', + type: { + name: "String" + } + } +}; +export var blockId = { + parameterPath: "blockId", + mapper: { + required: true, + serializedName: "blockid", + type: { + name: "String" + } + } +}; +export var breakPeriod = { + parameterPath: [ + "options", + "breakPeriod" + ], + mapper: { + serializedName: "x-ms-lease-break-period", + type: { + name: "Number" + } + } +}; +export var cacheControl = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "cacheControl" + ], + mapper: { + serializedName: "x-ms-cache-control", + type: { + name: "String" + } + } +}; +export var comp0 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'properties', + type: { + name: "String" + } + } +}; +export var comp1 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'stats', + type: { + name: "String" + } + } +}; +export var comp10 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'expiry', + type: { + name: "String" + } + } +}; +export var comp11 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'snapshot', + type: { + name: "String" + } + } +}; +export var comp12 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'copy', + type: { + name: "String" + } + } +}; +export var comp13 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'tier', + type: { + name: "String" + } + } +}; +export var comp14 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'query', + type: { + name: "String" + } + } +}; +export var comp15 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'tags', + type: { + name: "String" + } + } +}; +export var comp16 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'page', + type: { + name: "String" + } + } +}; +export var comp17 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'pagelist', + type: { + name: "String" + } + } +}; +export var comp18 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'incrementalcopy', + type: { + name: "String" + } + } +}; +export var comp19 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'appendblock', + type: { + name: "String" + } + } +}; +export var comp2 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'list', + type: { + name: "String" + } + } +}; +export var comp20 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'seal', + type: { + name: "String" + } + } +}; +export var comp21 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'block', + type: { + name: "String" + } + } +}; +export var comp22 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'blocklist', + type: { + name: "String" + } + } +}; +export var comp3 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'userdelegationkey', + type: { + name: "String" + } + } +}; +export var comp4 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'batch', + type: { + name: "String" + } + } +}; +export var comp5 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'blobs', + type: { + name: "String" + } + } +}; +export var comp6 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'metadata', + type: { + name: "String" + } + } +}; +export var comp7 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'acl', + type: { + name: "String" + } + } +}; +export var comp8 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'undelete', + type: { + name: "String" + } + } +}; +export var comp9 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'lease', + type: { + name: "String" + } + } +}; +export var contentDisposition = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentDisposition" + ], + mapper: { + serializedName: "x-ms-content-disposition", + type: { + name: "String" + } + } +}; +export var contentEncoding = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentEncoding" + ], + mapper: { + serializedName: "x-ms-content-encoding", + type: { + name: "String" + } + } +}; +export var contentLanguage = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentLanguage" + ], + mapper: { + serializedName: "x-ms-content-language", + type: { + name: "String" + } + } +}; +export var contentLength = { + parameterPath: "contentLength", + mapper: { + required: true, + serializedName: "Content-Length", + type: { + name: "Number" + } + } +}; +export var contentType = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentType" + ], + mapper: { + serializedName: "x-ms-content-type", + type: { + name: "String" + } + } +}; +export var copyActionAbortConstant = { + parameterPath: "copyActionAbortConstant", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-copy-action", + defaultValue: 'abort', + type: { + name: "String" + } + } +}; +export var copyId = { + parameterPath: "copyId", + mapper: { + required: true, + serializedName: "copyid", + type: { + name: "String" + } + } +}; +export var copySource = { + parameterPath: "copySource", + mapper: { + required: true, + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + } +}; +export var defaultEncryptionScope = { + parameterPath: [ + "options", + "containerEncryptionScope", + "defaultEncryptionScope" + ], + mapper: { + serializedName: "x-ms-default-encryption-scope", + type: { + name: "String" + } + } +}; +export var deletedContainerName = { + parameterPath: [ + "options", + "deletedContainerName" + ], + mapper: { + serializedName: "x-ms-deleted-container-name", + type: { + name: "String" + } + } +}; +export var deletedContainerVersion = { + parameterPath: [ + "options", + "deletedContainerVersion" + ], + mapper: { + serializedName: "x-ms-deleted-container-version", + type: { + name: "String" + } + } +}; +export var deleteSnapshots = { + parameterPath: [ + "options", + "deleteSnapshots" + ], + mapper: { + serializedName: "x-ms-delete-snapshots", + type: { + name: "Enum", + allowedValues: [ + "include", + "only" + ] + } + } +}; +export var delimiter = { + parameterPath: "delimiter", + mapper: { + required: true, + serializedName: "delimiter", + type: { + name: "String" + } + } +}; +export var directoryProperties = { + parameterPath: [ + "options", + "directoryProperties" + ], + mapper: { + serializedName: "x-ms-properties", + type: { + name: "String" + } + } +}; +export var duration = { + parameterPath: [ + "options", + "duration" + ], + mapper: { + serializedName: "x-ms-lease-duration", + type: { + name: "Number" + } + } +}; +export var encryptionAlgorithm = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionAlgorithm" + ], + mapper: { + serializedName: "x-ms-encryption-algorithm", + type: { + name: "Enum", + allowedValues: [ + "AES256" + ] + } + } +}; +export var encryptionKey = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKey" + ], + mapper: { + serializedName: "x-ms-encryption-key", + type: { + name: "String" + } + } +}; +export var encryptionKeySha256 = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKeySha256" + ], + mapper: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + } +}; +export var encryptionScope = { + parameterPath: [ + "options", + "encryptionScope" + ], + mapper: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + } +}; +export var expiresOn = { + parameterPath: [ + "options", + "expiresOn" + ], + mapper: { + serializedName: "x-ms-expiry-time", + type: { + name: "String" + } + } +}; +export var expiryOptions = { + parameterPath: "expiryOptions", + mapper: { + required: true, + serializedName: "x-ms-expiry-option", + type: { + name: "String" + } + } +}; +export var group = { + parameterPath: [ + "options", + "group" + ], + mapper: { + serializedName: "x-ms-group", + type: { + name: "String" + } + } +}; +export var ifMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifMatch" + ], + mapper: { + serializedName: "If-Match", + type: { + name: "String" + } + } +}; +export var ifModifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifModifiedSince" + ], + mapper: { + serializedName: "If-Modified-Since", + type: { + name: "DateTimeRfc1123" + } + } +}; +export var ifNoneMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifNoneMatch" + ], + mapper: { + serializedName: "If-None-Match", + type: { + name: "String" + } + } +}; +export var ifSequenceNumberEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-eq", + type: { + name: "Number" + } + } +}; +export var ifSequenceNumberLessThan = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThan" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-lt", + type: { + name: "Number" + } + } +}; +export var ifSequenceNumberLessThanOrEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThanOrEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-le", + type: { + name: "Number" + } + } +}; +export var ifTags = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifTags" + ], + mapper: { + serializedName: "x-ms-if-tags", + type: { + name: "String" + } + } +}; +export var ifUnmodifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifUnmodifiedSince" + ], + mapper: { + serializedName: "If-Unmodified-Since", + type: { + name: "DateTimeRfc1123" + } + } +}; +export var include0 = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "include", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "metadata", + "deleted" + ] + } + } + } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv +}; +export var include1 = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "include", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags" + ] + } + } + } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv +}; +export var leaseId0 = { + parameterPath: [ + "options", + "leaseAccessConditions", + "leaseId" + ], + mapper: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + } +}; +export var leaseId1 = { + parameterPath: "leaseId", + mapper: { + required: true, + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + } +}; +export var listType = { + parameterPath: "listType", + mapper: { + required: true, + serializedName: "blocklisttype", + defaultValue: 'committed', + type: { + name: "Enum", + allowedValues: [ + "committed", + "uncommitted", + "all" + ] + } + } +}; +export var marker0 = { + parameterPath: [ + "options", + "marker" + ], + mapper: { + serializedName: "marker", + type: { + name: "String" + } + } +}; +export var marker1 = { + parameterPath: [ + "options", + "marker" + ], + mapper: { + serializedName: "continuation", + type: { + name: "String" + } + } +}; +export var maxPageSize = { + parameterPath: [ + "options", + "maxPageSize" + ], + mapper: { + serializedName: "maxresults", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; +export var maxSize = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "maxSize" + ], + mapper: { + serializedName: "x-ms-blob-condition-maxsize", + type: { + name: "Number" + } + } +}; +export var metadata = { + parameterPath: [ + "options", + "metadata" + ], + mapper: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + } +}; +export var multipartContentType = { + parameterPath: "multipartContentType", + mapper: { + required: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; +export var owner = { + parameterPath: [ + "options", + "owner" + ], + mapper: { + serializedName: "x-ms-owner", + type: { + name: "String" + } + } +}; +export var pageWrite0 = { + parameterPath: "pageWrite", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-page-write", + defaultValue: 'update', + type: { + name: "String" + } + } +}; +export var pageWrite1 = { + parameterPath: "pageWrite", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-page-write", + defaultValue: 'clear', + type: { + name: "String" + } + } +}; +export var pathRenameMode = { + parameterPath: [ + "options", + "pathRenameMode" + ], + mapper: { + serializedName: "mode", + type: { + name: "Enum", + allowedValues: [ + "legacy", + "posix" + ] + } + } +}; +export var posixAcl = { + parameterPath: [ + "options", + "posixAcl" + ], + mapper: { + serializedName: "x-ms-acl", + type: { + name: "String" + } + } +}; +export var posixPermissions = { + parameterPath: [ + "options", + "posixPermissions" + ], + mapper: { + serializedName: "x-ms-permissions", + type: { + name: "String" + } + } +}; +export var posixUmask = { + parameterPath: [ + "options", + "posixUmask" + ], + mapper: { + serializedName: "x-ms-umask", + type: { + name: "String" + } + } +}; +export var prefix = { + parameterPath: [ + "options", + "prefix" + ], + mapper: { + serializedName: "prefix", + type: { + name: "String" + } + } +}; +export var preventEncryptionScopeOverride = { + parameterPath: [ + "options", + "containerEncryptionScope", + "preventEncryptionScopeOverride" + ], + mapper: { + serializedName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean" + } + } +}; +export var prevsnapshot = { + parameterPath: [ + "options", + "prevsnapshot" + ], + mapper: { + serializedName: "prevsnapshot", + type: { + name: "String" + } + } +}; +export var prevSnapshotUrl = { + parameterPath: [ + "options", + "prevSnapshotUrl" + ], + mapper: { + serializedName: "x-ms-previous-snapshot-url", + type: { + name: "String" + } + } +}; +export var proposedLeaseId0 = { + parameterPath: [ + "options", + "proposedLeaseId" + ], + mapper: { + serializedName: "x-ms-proposed-lease-id", + type: { + name: "String" + } + } +}; +export var proposedLeaseId1 = { + parameterPath: "proposedLeaseId", + mapper: { + required: true, + serializedName: "x-ms-proposed-lease-id", + type: { + name: "String" + } + } +}; +export var range0 = { + parameterPath: [ + "options", + "range" + ], + mapper: { + serializedName: "x-ms-range", + type: { + name: "String" + } + } +}; +export var range1 = { + parameterPath: "range", + mapper: { + required: true, + serializedName: "x-ms-range", + type: { + name: "String" + } + } +}; +export var rangeGetContentCRC64 = { + parameterPath: [ + "options", + "rangeGetContentCRC64" + ], + mapper: { + serializedName: "x-ms-range-get-content-crc64", + type: { + name: "Boolean" + } + } +}; +export var rangeGetContentMD5 = { + parameterPath: [ + "options", + "rangeGetContentMD5" + ], + mapper: { + serializedName: "x-ms-range-get-content-md5", + type: { + name: "Boolean" + } + } +}; +export var recursiveDirectoryDelete = { + parameterPath: "recursiveDirectoryDelete", + mapper: { + required: true, + serializedName: "recursive", + type: { + name: "Boolean" + } + } +}; +export var rehydratePriority = { + parameterPath: [ + "options", + "rehydratePriority" + ], + mapper: { + serializedName: "x-ms-rehydrate-priority", + type: { + name: "String" + } + } +}; +export var renameSource = { + parameterPath: "renameSource", + mapper: { + required: true, + serializedName: "x-ms-rename-source", + type: { + name: "String" + } + } +}; +export var requestId = { + parameterPath: [ + "options", + "requestId" + ], + mapper: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } +}; +export var resource = { + parameterPath: "resource", + mapper: { + required: true, + isConstant: true, + serializedName: "resource", + defaultValue: 'directory', + type: { + name: "String" + } + } +}; +export var restype0 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'service', + type: { + name: "String" + } + } +}; +export var restype1 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'account', + type: { + name: "String" + } + } +}; +export var restype2 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'container', + type: { + name: "String" + } + } +}; +export var sealBlob = { + parameterPath: [ + "options", + "sealBlob" + ], + mapper: { + serializedName: "x-ms-seal-blob", + type: { + name: "Boolean" + } + } +}; +export var sequenceNumberAction = { + parameterPath: "sequenceNumberAction", + mapper: { + required: true, + serializedName: "x-ms-sequence-number-action", + type: { + name: "Enum", + allowedValues: [ + "max", + "update", + "increment" + ] + } + } +}; +export var snapshot = { + parameterPath: [ + "options", + "snapshot" + ], + mapper: { + serializedName: "snapshot", + type: { + name: "String" + } + } +}; +export var sourceContentCrc64 = { + parameterPath: [ + "options", + "sourceContentCrc64" + ], + mapper: { + serializedName: "x-ms-source-content-crc64", + type: { + name: "ByteArray" + } + } +}; +export var sourceContentMD5 = { + parameterPath: [ + "options", + "sourceContentMD5" + ], + mapper: { + serializedName: "x-ms-source-content-md5", + type: { + name: "ByteArray" + } + } +}; +export var sourceIfMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfMatch" + ], + mapper: { + serializedName: "x-ms-source-if-match", + type: { + name: "String" + } + } +}; +export var sourceIfModifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfModifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-modified-since", + type: { + name: "DateTimeRfc1123" + } + } +}; +export var sourceIfNoneMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfNoneMatch" + ], + mapper: { + serializedName: "x-ms-source-if-none-match", + type: { + name: "String" + } + } +}; +export var sourceIfTags = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfTags" + ], + mapper: { + serializedName: "x-ms-source-if-tags", + type: { + name: "String" + } + } +}; +export var sourceIfUnmodifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfUnmodifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-unmodified-since", + type: { + name: "DateTimeRfc1123" + } + } +}; +export var sourceLeaseId = { + parameterPath: [ + "options", + "sourceLeaseId" + ], + mapper: { + serializedName: "x-ms-source-lease-id", + type: { + name: "String" + } + } +}; +export var sourceRange0 = { + parameterPath: "sourceRange", + mapper: { + required: true, + serializedName: "x-ms-source-range", + type: { + name: "String" + } + } +}; +export var sourceRange1 = { + parameterPath: [ + "options", + "sourceRange" + ], + mapper: { + serializedName: "x-ms-source-range", + type: { + name: "String" + } + } +}; +export var sourceUrl = { + parameterPath: "sourceUrl", + mapper: { + required: true, + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + } +}; +export var tier0 = { + parameterPath: [ + "options", + "tier" + ], + mapper: { + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + } +}; +export var tier1 = { + parameterPath: "tier", + mapper: { + required: true, + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + } +}; +export var timeoutInSeconds = { + parameterPath: [ + "options", + "timeoutInSeconds" + ], + mapper: { + serializedName: "timeout", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } +}; +export var transactionalContentCrc64 = { + parameterPath: [ + "options", + "transactionalContentCrc64" + ], + mapper: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + } +}; +export var transactionalContentMD5 = { + parameterPath: [ + "options", + "transactionalContentMD5" + ], + mapper: { + serializedName: "Content-MD5", + type: { + name: "ByteArray" + } + } +}; +export var upn = { + parameterPath: [ + "options", + "upn" + ], + mapper: { + serializedName: "upn", + type: { + name: "Boolean" + } + } +}; +export var url = { + parameterPath: "url", + mapper: { + required: true, + serializedName: "url", + defaultValue: '', + type: { + name: "String" + } + }, + skipEncoding: true +}; +export var version = { + parameterPath: "version", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-version", + defaultValue: '2020-02-10', + type: { + name: "String" + } + } +}; +export var versionId = { + parameterPath: [ + "options", + "versionId" + ], + mapper: { + serializedName: "versionid", + type: { + name: "String" + } + } +}; +export var where = { + parameterPath: [ + "options", + "where" + ], + mapper: { + serializedName: "where", + type: { + name: "String" + } + } +}; +export var xMsRequiresSync = { + parameterPath: "xMsRequiresSync", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-requires-sync", + defaultValue: 'true', + type: { + name: "String" + } + } +}; +//# sourceMappingURL=parameters.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js.map new file mode 100644 index 000000000..1d9e5ede9 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/parameters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,IAAM,MAAM,GAAgC;IACjD,aAAa,EAAE;QACb,SAAS;QACT,QAAQ;KACT;IACD,MAAM,EAAE;QACN,cAAc,EAAE,yBAAyB;QACzC,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,OAAO,GAAgC;IAClD,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,mBAAmB;QACnC,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,OAAO,GAAgC;IAClD,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,mBAAmB;QACnC,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,OAAO,GAAgC;IAClD,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,mBAAmB;QACnC,YAAY,EAAE,OAAO;QACrB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,OAAO,GAAgC;IAClD,aAAa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AQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,KAAK,GAAqC;IACrD,aAAa,EAAE;QACb,SAAS;QACT,OAAO;KACR;IACD,MAAM,EAAE;QACN,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AACF,MAAM,CAAC,IAAM,eAAe,GAAgC;IAC1D,aAAa,EAAE,iBAAiB;IAChC,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,oBAAoB;QACpC,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\nexport const access: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"access\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const action0: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'acquire',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action1: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'release',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action2: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'renew',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action3: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'break',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action4: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'change',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action5: coreHttp.OperationQueryParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"action\",\n defaultValue: 'setAccessControl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action6: coreHttp.OperationQueryParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"action\",\n defaultValue: 'getAccessControl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const appendPosition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"appendPosition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-appendpos\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobCacheControl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobCacheControl\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentDisposition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentDisposition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentEncoding: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentEncoding\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentLanguage: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentLanguage\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentLength: coreHttp.OperationParameter = {\n parameterPath: \"blobContentLength\",\n mapper: {\n required: true,\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const blobContentType: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentType\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobSequenceNumber: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobSequenceNumber\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-sequence-number\",\n defaultValue: 0,\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobTagsString: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobTagsString\"\n ],\n mapper: {\n serializedName: \"x-ms-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType0: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'PageBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType1: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'AppendBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType2: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'BlockBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blockId: coreHttp.OperationQueryParameter = {\n parameterPath: \"blockId\",\n mapper: {\n required: true,\n serializedName: \"blockid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const breakPeriod: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"breakPeriod\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-break-period\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const cacheControl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"cacheControl\"\n ],\n mapper: {\n serializedName: \"x-ms-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp0: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'properties',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp1: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'stats',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp10: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'expiry',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp11: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'snapshot',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp12: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'copy',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp13: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'tier',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp14: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'query',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp15: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'tags',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp16: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'page',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp17: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'pagelist',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp18: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'incrementalcopy',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp19: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'appendblock',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp2: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'list',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp20: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'seal',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp21: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'block',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp22: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'blocklist',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp3: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'userdelegationkey',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp4: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'batch',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp5: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'blobs',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp6: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'metadata',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp7: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'acl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp8: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'undelete',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp9: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'lease',\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentDisposition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentDisposition\"\n ],\n mapper: {\n serializedName: \"x-ms-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentEncoding: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentEncoding\"\n ],\n mapper: {\n serializedName: \"x-ms-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentLanguage: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentLanguage\"\n ],\n mapper: {\n serializedName: \"x-ms-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentLength: coreHttp.OperationParameter = {\n parameterPath: \"contentLength\",\n mapper: {\n required: true,\n serializedName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const contentType: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentType\"\n ],\n mapper: {\n serializedName: \"x-ms-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const copyActionAbortConstant: coreHttp.OperationParameter = {\n parameterPath: \"copyActionAbortConstant\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-copy-action\",\n defaultValue: 'abort',\n type: {\n name: \"String\"\n }\n }\n};\nexport const copyId: coreHttp.OperationQueryParameter = {\n parameterPath: \"copyId\",\n mapper: {\n required: true,\n serializedName: \"copyid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const copySource: coreHttp.OperationParameter = {\n parameterPath: \"copySource\",\n mapper: {\n required: true,\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const defaultEncryptionScope: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"defaultEncryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deletedContainerName: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deletedContainerName\"\n ],\n mapper: {\n serializedName: \"x-ms-deleted-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deletedContainerVersion: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deletedContainerVersion\"\n ],\n mapper: {\n serializedName: \"x-ms-deleted-container-version\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deleteSnapshots: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deleteSnapshots\"\n ],\n mapper: {\n serializedName: \"x-ms-delete-snapshots\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"include\",\n \"only\"\n ]\n }\n }\n};\nexport const delimiter: coreHttp.OperationQueryParameter = {\n parameterPath: \"delimiter\",\n mapper: {\n required: true,\n serializedName: \"delimiter\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const directoryProperties: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryProperties\"\n ],\n mapper: {\n serializedName: \"x-ms-properties\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const duration: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"duration\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const encryptionAlgorithm: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionAlgorithm\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-algorithm\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"AES256\"\n ]\n }\n }\n};\nexport const encryptionKey: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionKey\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-key\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const encryptionKeySha256: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionKeySha256\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const encryptionScope: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"encryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const expiresOn: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"expiresOn\"\n ],\n mapper: {\n serializedName: \"x-ms-expiry-time\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const expiryOptions: coreHttp.OperationParameter = {\n parameterPath: \"expiryOptions\",\n mapper: {\n required: true,\n serializedName: \"x-ms-expiry-option\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const group: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"group\"\n ],\n mapper: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifMatch\"\n ],\n mapper: {\n serializedName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifModifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifModifiedSince\"\n ],\n mapper: {\n serializedName: \"If-Modified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const ifNoneMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifNoneMatch\"\n ],\n mapper: {\n serializedName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifSequenceNumberEqualTo: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-eq\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifSequenceNumberLessThan: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThan\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-lt\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifSequenceNumberLessThanOrEqualTo: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThanOrEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-le\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifTags: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifTags\"\n ],\n mapper: {\n serializedName: \"x-ms-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifUnmodifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"If-Unmodified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const include0: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"include\"\n ],\n mapper: {\n serializedName: \"include\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"metadata\",\n \"deleted\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nexport const include1: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"include\"\n ],\n mapper: {\n serializedName: \"include\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"copy\",\n \"deleted\",\n \"metadata\",\n \"snapshots\",\n \"uncommittedblobs\",\n \"versions\",\n \"tags\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nexport const leaseId0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"leaseAccessConditions\",\n \"leaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const leaseId1: coreHttp.OperationParameter = {\n parameterPath: \"leaseId\",\n mapper: {\n required: true,\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const listType: coreHttp.OperationQueryParameter = {\n parameterPath: \"listType\",\n mapper: {\n required: true,\n serializedName: \"blocklisttype\",\n defaultValue: 'committed',\n type: {\n name: \"Enum\",\n allowedValues: [\n \"committed\",\n \"uncommitted\",\n \"all\"\n ]\n }\n }\n};\nexport const marker0: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"marker\"\n ],\n mapper: {\n serializedName: \"marker\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const marker1: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"marker\"\n ],\n mapper: {\n serializedName: \"continuation\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const maxPageSize: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"maxPageSize\"\n ],\n mapper: {\n serializedName: \"maxresults\",\n constraints: {\n InclusiveMinimum: 1\n },\n type: {\n name: \"Number\"\n }\n }\n};\nexport const maxSize: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"maxSize\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-maxsize\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const metadata: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"metadata\"\n ],\n mapper: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n }\n};\nexport const multipartContentType: coreHttp.OperationParameter = {\n parameterPath: \"multipartContentType\",\n mapper: {\n required: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const owner: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"owner\"\n ],\n mapper: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const pageWrite0: coreHttp.OperationParameter = {\n parameterPath: \"pageWrite\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n defaultValue: 'update',\n type: {\n name: \"String\"\n }\n }\n};\nexport const pageWrite1: coreHttp.OperationParameter = {\n parameterPath: \"pageWrite\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n defaultValue: 'clear',\n type: {\n name: \"String\"\n }\n }\n};\nexport const pathRenameMode: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"pathRenameMode\"\n ],\n mapper: {\n serializedName: \"mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"legacy\",\n \"posix\"\n ]\n }\n }\n};\nexport const posixAcl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixAcl\"\n ],\n mapper: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const posixPermissions: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixPermissions\"\n ],\n mapper: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const posixUmask: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixUmask\"\n ],\n mapper: {\n serializedName: \"x-ms-umask\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const prefix: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"prefix\"\n ],\n mapper: {\n serializedName: \"prefix\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const preventEncryptionScopeOverride: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"preventEncryptionScopeOverride\"\n ],\n mapper: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const prevsnapshot: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"prevsnapshot\"\n ],\n mapper: {\n serializedName: \"prevsnapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const prevSnapshotUrl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"prevSnapshotUrl\"\n ],\n mapper: {\n serializedName: \"x-ms-previous-snapshot-url\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const proposedLeaseId0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"proposedLeaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const proposedLeaseId1: coreHttp.OperationParameter = {\n parameterPath: \"proposedLeaseId\",\n mapper: {\n required: true,\n serializedName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const range0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"range\"\n ],\n mapper: {\n serializedName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const range1: coreHttp.OperationParameter = {\n parameterPath: \"range\",\n mapper: {\n required: true,\n serializedName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const rangeGetContentCRC64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rangeGetContentCRC64\"\n ],\n mapper: {\n serializedName: \"x-ms-range-get-content-crc64\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const rangeGetContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rangeGetContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-range-get-content-md5\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const recursiveDirectoryDelete: coreHttp.OperationQueryParameter = {\n parameterPath: \"recursiveDirectoryDelete\",\n mapper: {\n required: true,\n serializedName: \"recursive\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const rehydratePriority: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rehydratePriority\"\n ],\n mapper: {\n serializedName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const renameSource: coreHttp.OperationParameter = {\n parameterPath: \"renameSource\",\n mapper: {\n required: true,\n serializedName: \"x-ms-rename-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const requestId: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"requestId\"\n ],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const resource: coreHttp.OperationQueryParameter = {\n parameterPath: \"resource\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"resource\",\n defaultValue: 'directory',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype0: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'service',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype1: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'account',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype2: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'container',\n type: {\n name: \"String\"\n }\n }\n};\nexport const sealBlob: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sealBlob\"\n ],\n mapper: {\n serializedName: \"x-ms-seal-blob\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const sequenceNumberAction: coreHttp.OperationParameter = {\n parameterPath: \"sequenceNumberAction\",\n mapper: {\n required: true,\n serializedName: \"x-ms-sequence-number-action\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"max\",\n \"update\",\n \"increment\"\n ]\n }\n }\n};\nexport const snapshot: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"snapshot\"\n ],\n mapper: {\n serializedName: \"snapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceContentCrc64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceContentCrc64\"\n ],\n mapper: {\n serializedName: \"x-ms-source-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const sourceContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-source-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const sourceIfMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfModifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfModifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-modified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const sourceIfNoneMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfNoneMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-none-match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfTags: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfTags\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfUnmodifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-unmodified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const sourceLeaseId: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceLeaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-source-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceRange0: coreHttp.OperationParameter = {\n parameterPath: \"sourceRange\",\n mapper: {\n required: true,\n serializedName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceRange1: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceRange\"\n ],\n mapper: {\n serializedName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceUrl: coreHttp.OperationParameter = {\n parameterPath: \"sourceUrl\",\n mapper: {\n required: true,\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const tier0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"tier\"\n ],\n mapper: {\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const tier1: coreHttp.OperationParameter = {\n parameterPath: \"tier\",\n mapper: {\n required: true,\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const timeoutInSeconds: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"timeoutInSeconds\"\n ],\n mapper: {\n serializedName: \"timeout\",\n constraints: {\n InclusiveMinimum: 0\n },\n type: {\n name: \"Number\"\n }\n }\n};\nexport const transactionalContentCrc64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"transactionalContentCrc64\"\n ],\n mapper: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const transactionalContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"transactionalContentMD5\"\n ],\n mapper: {\n serializedName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const upn: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"upn\"\n ],\n mapper: {\n serializedName: \"upn\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const url: coreHttp.OperationURLParameter = {\n parameterPath: \"url\",\n mapper: {\n required: true,\n serializedName: \"url\",\n defaultValue: '',\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nexport const version: coreHttp.OperationParameter = {\n parameterPath: \"version\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-version\",\n defaultValue: '2020-02-10',\n type: {\n name: \"String\"\n }\n }\n};\nexport const versionId: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"versionId\"\n ],\n mapper: {\n serializedName: \"versionid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const where: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"where\"\n ],\n mapper: {\n serializedName: \"where\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const xMsRequiresSync: coreHttp.OperationParameter = {\n parameterPath: \"xMsRequiresSync\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-requires-sync\",\n defaultValue: 'true',\n type: {\n name: \"String\"\n }\n }\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js new file mode 100644 index 000000000..65595858f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +export { BlobServiceProperties, BlobServiceStatistics, ContainerItem, ContainerProperties, CorsRule, FilterBlobItem, FilterBlobSegment, GeoReplication, KeyInfo, ListContainersSegmentResponse, Logging, Metrics, RetentionPolicy, ServiceFilterBlobsHeaders, ServiceGetAccountInfoHeaders, ServiceGetPropertiesHeaders, ServiceGetStatisticsHeaders, ServiceGetUserDelegationKeyHeaders, ServiceListContainersSegmentHeaders, ServiceSetPropertiesHeaders, ServiceSubmitBatchHeaders, StaticWebsite, StorageError, UserDelegationKey } from "../models/mappers"; +//# sourceMappingURL=serviceMappers.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js.map new file mode 100644 index 000000000..72d6c0bec --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/models/serviceMappers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"serviceMappers.js","sourceRoot":"","sources":["../../../../../../src/generated/src/models/serviceMappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,6BAA6B,EAC7B,OAAO,EACP,OAAO,EACP,eAAe,EACf,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n BlobServiceProperties,\n BlobServiceStatistics,\n ContainerItem,\n ContainerProperties,\n CorsRule,\n FilterBlobItem,\n FilterBlobSegment,\n GeoReplication,\n KeyInfo,\n ListContainersSegmentResponse,\n Logging,\n Metrics,\n RetentionPolicy,\n ServiceFilterBlobsHeaders,\n ServiceGetAccountInfoHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n ServiceGetUserDelegationKeyHeaders,\n ServiceListContainersSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ServiceSubmitBatchHeaders,\n StaticWebsite,\n StorageError,\n UserDelegationKey\n} from \"../models/mappers\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js new file mode 100644 index 000000000..a0b706fe5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js @@ -0,0 +1,229 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/appendBlobMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a AppendBlob. */ +var AppendBlob = /** @class */ (function () { + /** + * Create a AppendBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function AppendBlob(client) { + this.client = client; + } + AppendBlob.prototype.create = function (contentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + options: options + }, createOperationSpec, callback); + }; + AppendBlob.prototype.appendBlock = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, appendBlockOperationSpec, callback); + }; + AppendBlob.prototype.appendBlockFromUrl = function (sourceUrl, contentLength, options, callback) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl, + contentLength: contentLength, + options: options + }, appendBlockFromUrlOperationSpec, callback); + }; + AppendBlob.prototype.seal = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, sealOperationSpec, callback); + }; + return AppendBlob; +}()); +export { AppendBlob }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var createOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.contentLength, + Parameters.metadata, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.blobTagsString, + Parameters.blobType1, + Parameters.blobContentType, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentMD5, + Parameters.blobCacheControl, + Parameters.blobContentDisposition, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 201: { + headersMapper: Mappers.AppendBlobCreateHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateHeaders + } + }, + isXML: true, + serializer: serializer +}; +var appendBlockOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp19 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockHeaders + } + }, + isXML: true, + serializer: serializer +}; +var appendBlockFromUrlOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp19 + ], + headerParameters: [ + Parameters.sourceUrl, + Parameters.sourceRange1, + Parameters.sourceContentMD5, + Parameters.sourceContentCrc64, + Parameters.contentLength, + Parameters.transactionalContentMD5, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.leaseId0, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders + } + }, + isXML: true, + serializer: serializer +}; +var sealOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp20 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition + ], + responses: { + 200: { + headersMapper: Mappers.AppendBlobSealHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=appendBlob.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map new file mode 100644 index 000000000..085520eb3 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"appendBlob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/appendBlob.ts"],"names":[],"mappings":"AAAA;;;;;;;;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EAAE,OAAO,CAAC,qBAAqB;SAC7C;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/appendBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a AppendBlob. */\nexport class AppendBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a AppendBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Create Append Blob operation creates a new append blob.\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n create(contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n create(contentLength: number, options: Models.AppendBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob.\n * The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to\n * AppendBlob. Append Block is supported only on version 2015-02-21 version or later.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.AppendBlobAppendBlockOptionalParams, callback: coreHttp.ServiceCallback): void;\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n appendBlockOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url. The Append Block operation is permitted only if\n * the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on\n * version 2015-02-21 version or later.\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options?: Models.AppendBlobAppendBlockFromUrlOptionalParams): Promise;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options: Models.AppendBlobAppendBlockFromUrlOptionalParams, callback: coreHttp.ServiceCallback): void;\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options?: Models.AppendBlobAppendBlockFromUrlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sourceUrl,\n contentLength,\n options\n },\n appendBlockFromUrlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version\n * 2019-12-12 version or later.\n * @param [options] The optional parameters\n * @returns Promise\n */\n seal(options?: Models.AppendBlobSealOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n seal(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n seal(options: Models.AppendBlobSealOptionalParams, callback: coreHttp.ServiceCallback): void;\n seal(options?: Models.AppendBlobSealOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n sealOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType1,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst appendBlockOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp19\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.maxSize,\n Parameters.appendPosition,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobAppendBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobAppendBlockHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp19\n ],\n headerParameters: [\n Parameters.sourceUrl,\n Parameters.sourceRange1,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.maxSize,\n Parameters.appendPosition,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst sealOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp20\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.appendPosition\n ],\n responses: {\n 200: {\n headersMapper: Mappers.AppendBlobSealHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobSealHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js new file mode 100644 index 000000000..98cd8d00b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js @@ -0,0 +1,1025 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/blobMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a Blob. */ +var Blob = /** @class */ (function () { + /** + * Create a Blob. + * @param {StorageClientContext} client Reference to the service client. + */ + function Blob(client) { + this.client = client; + } + Blob.prototype.download = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, downloadOperationSpec, callback); + }; + Blob.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec, callback); + }; + Blob.prototype.deleteMethod = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, deleteMethodOperationSpec, callback); + }; + Blob.prototype.setAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setAccessControlOperationSpec, callback); + }; + Blob.prototype.getAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccessControlOperationSpec, callback); + }; + Blob.prototype.rename = function (renameSource, options, callback) { + return this.client.sendOperationRequest({ + renameSource: renameSource, + options: options + }, renameOperationSpec, callback); + }; + Blob.prototype.undelete = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, undeleteOperationSpec, callback); + }; + Blob.prototype.setExpiry = function (expiryOptions, options, callback) { + return this.client.sendOperationRequest({ + expiryOptions: expiryOptions, + options: options + }, setExpiryOperationSpec, callback); + }; + Blob.prototype.setHTTPHeaders = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setHTTPHeadersOperationSpec, callback); + }; + Blob.prototype.setMetadata = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setMetadataOperationSpec, callback); + }; + Blob.prototype.acquireLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, acquireLeaseOperationSpec, callback); + }; + Blob.prototype.releaseLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, releaseLeaseOperationSpec, callback); + }; + Blob.prototype.renewLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, renewLeaseOperationSpec, callback); + }; + Blob.prototype.changeLease = function (leaseId, proposedLeaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + proposedLeaseId: proposedLeaseId, + options: options + }, changeLeaseOperationSpec, callback); + }; + Blob.prototype.breakLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, breakLeaseOperationSpec, callback); + }; + Blob.prototype.createSnapshot = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, createSnapshotOperationSpec, callback); + }; + Blob.prototype.startCopyFromURL = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, startCopyFromURLOperationSpec, callback); + }; + Blob.prototype.copyFromURL = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, copyFromURLOperationSpec, callback); + }; + Blob.prototype.abortCopyFromURL = function (copyId, options, callback) { + return this.client.sendOperationRequest({ + copyId: copyId, + options: options + }, abortCopyFromURLOperationSpec, callback); + }; + Blob.prototype.setTier = function (tier, options, callback) { + return this.client.sendOperationRequest({ + tier: tier, + options: options + }, setTierOperationSpec, callback); + }; + Blob.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec, callback); + }; + Blob.prototype.query = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, queryOperationSpec, callback); + }; + Blob.prototype.getTags = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getTagsOperationSpec, callback); + }; + Blob.prototype.setTags = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setTagsOperationSpec, callback); + }; + return Blob; +}()); +export { Blob }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var downloadOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.versionId, + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.range0, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobDownloadHeaders + }, + 206: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobDownloadHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPropertiesOperationSpec = { + httpMethod: "HEAD", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.versionId, + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobGetPropertiesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var deleteMethodOperationSpec = { + httpMethod: "DELETE", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.versionId, + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.deleteSnapshots, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 202: { + headersMapper: Mappers.BlobDeleteHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setAccessControlOperationSpec = { + httpMethod: "PATCH", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.action5 + ], + headerParameters: [ + Parameters.owner, + Parameters.group, + Parameters.posixPermissions, + Parameters.posixAcl, + Parameters.requestId, + Parameters.version, + Parameters.leaseId0, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetAccessControlHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.BlobSetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccessControlOperationSpec = { + httpMethod: "HEAD", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.upn, + Parameters.action6 + ], + headerParameters: [ + Parameters.requestId, + Parameters.version, + Parameters.leaseId0, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.BlobGetAccessControlHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.BlobGetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer +}; +var renameOperationSpec = { + httpMethod: "PUT", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.pathRenameMode + ], + headerParameters: [ + Parameters.renameSource, + Parameters.directoryProperties, + Parameters.posixPermissions, + Parameters.posixUmask, + Parameters.sourceLeaseId, + Parameters.version, + Parameters.requestId, + Parameters.cacheControl, + Parameters.contentType, + Parameters.contentEncoding, + Parameters.contentLanguage, + Parameters.contentDisposition, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.BlobRenameHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.BlobRenameHeaders + } + }, + isXML: true, + serializer: serializer +}; +var undeleteOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp8 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + headersMapper: Mappers.BlobUndeleteHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setExpiryOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp10 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.expiryOptions, + Parameters.expiresOn + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetExpiryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setHTTPHeadersOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetHTTPHeadersHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHTTPHeadersHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setMetadataOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp6 + ], + headerParameters: [ + Parameters.metadata, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetMetadataHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataHeaders + } + }, + isXML: true, + serializer: serializer +}; +var acquireLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9 + ], + headerParameters: [ + Parameters.duration, + Parameters.proposedLeaseId0, + Parameters.version, + Parameters.requestId, + Parameters.action0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 201: { + headersMapper: Mappers.BlobAcquireLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var releaseLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobReleaseLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var renewLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action2, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobRenewLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var changeLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.proposedLeaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action4, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobChangeLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var breakLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9 + ], + headerParameters: [ + Parameters.breakPeriod, + Parameters.version, + Parameters.requestId, + Parameters.action3, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 202: { + headersMapper: Mappers.BlobBreakLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var createSnapshotOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp11 + ], + headerParameters: [ + Parameters.metadata, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.leaseId0 + ], + responses: { + 201: { + headersMapper: Mappers.BlobCreateSnapshotHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotHeaders + } + }, + isXML: true, + serializer: serializer +}; +var startCopyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.metadata, + Parameters.tier0, + Parameters.rehydratePriority, + Parameters.copySource, + Parameters.version, + Parameters.requestId, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.leaseId0 + ], + responses: { + 202: { + headersMapper: Mappers.BlobStartCopyFromURLHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer +}; +var copyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.metadata, + Parameters.tier0, + Parameters.copySource, + Parameters.version, + Parameters.requestId, + Parameters.sourceContentMD5, + Parameters.blobTagsString, + Parameters.xMsRequiresSync, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.leaseId0 + ], + responses: { + 202: { + headersMapper: Mappers.BlobCopyFromURLHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer +}; +var abortCopyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.copyId, + Parameters.timeoutInSeconds, + Parameters.comp12 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.copyActionAbortConstant, + Parameters.leaseId0 + ], + responses: { + 204: { + headersMapper: Mappers.BlobAbortCopyFromURLHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setTierOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.versionId, + Parameters.timeoutInSeconds, + Parameters.comp13 + ], + headerParameters: [ + Parameters.tier1, + Parameters.rehydratePriority, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.BlobSetTierHeaders + }, + 202: { + headersMapper: Mappers.BlobSetTierHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccountInfoOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.restype1, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version + ], + responses: { + 200: { + headersMapper: Mappers.BlobGetAccountInfoHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer +}; +var queryOperationSpec = { + httpMethod: "POST", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.timeoutInSeconds, + Parameters.comp14 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + requestBody: { + parameterPath: [ + "options", + "queryRequest" + ], + mapper: Mappers.QueryRequest + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobQueryHeaders + }, + 206: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.BlobQueryHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getTagsOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp15 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.ifTags + ], + responses: { + 200: { + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setTagsOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp15 + ], + headerParameters: [ + Parameters.version, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.requestId, + Parameters.ifTags + ], + requestBody: { + parameterPath: [ + "options", + "tags" + ], + mapper: Mappers.BlobTags + }, + contentType: "application/xml; charset=utf-8", + responses: { + 204: { + headersMapper: Mappers.BlobSetTagsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=blob.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js.map new file mode 100644 index 000000000..b0348838d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/blob.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,iCAAiC;AACjC;IAGE;;;OAGG;IACH,cAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAkBD,uBAAQ,GAAR,UAAS,OAA4E,EAAE,QAAyC;QAC9H,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,qBAAqB,EACrB,QAAQ,CAAyC,CAAC;IACtD,CAAC;IAkBD,4BAAa,GAAb,UAAc,OAAiF,EAAE,QAAyC;QACxI,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,0BAA0B,EAC1B,QAAQ,CAA8C,CAAC;IAC3D,CAAC;IA4BD,2BAAY,GAAZ,UAAa,OAAgF,EAAE,QAAyC;QACtI,OAAO,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M;KAClB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,MAAM;KAClB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,QAAQ;YAC5B,aAAa,EAAE,OAAO,CAAC,kBAAkB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,kBAAkB;SAC1C;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,oBAAoB,GAA2B;IACnD,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,wBAAwB;IAC9B,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,MAAM;KAClB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,uBAAuB;QAClC,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,MAAM;KAClB;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,SAAS;YACT,MAAM;SACP;QACD,MAAM,EAAE,OAAO,CAAC,QAAQ;KACzB;IACD,WAAW,EAAE,gCAAgC;IAC7C,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,kBAAkB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,kBAAkB;SAC1C;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/blobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Blob. */\nexport class Blob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Blob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Download operation reads or downloads a blob from the system, including its metadata and\n * properties. You can also call Download to read a snapshot.\n * @param [options] The optional parameters\n * @returns Promise\n */\n download(options?: Models.BlobDownloadOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n download(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n download(options: Models.BlobDownloadOptionalParams, callback: coreHttp.ServiceCallback): void;\n download(options?: Models.BlobDownloadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n downloadOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and\n * system properties for the blob. It does not return the content of the blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.BlobGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.BlobGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.BlobGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is\n * permanently removed from the storage account. If the storage account's soft delete feature is\n * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible\n * immediately. However, the blob service retains the blob or snapshot for the number of days\n * specified by the DeleteRetentionPolicy section of [Storage service properties]\n * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data\n * is permanently removed from the storage account. Note that you continue to be charged for the\n * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify\n * the \"include=deleted\" query parameter to discover which blobs and snapshots have been soft\n * deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other\n * operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code\n * of 404 (ResourceNotFound).\n * @param [options] The optional parameters\n * @returns Promise\n */\n deleteMethod(options?: Models.BlobDeleteMethodOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n deleteMethod(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n deleteMethod(options: Models.BlobDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void;\n deleteMethod(options?: Models.BlobDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n deleteMethodOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Set the owner, group, permissions, or access control list for a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setAccessControl(options?: Models.BlobSetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setAccessControl(options: Models.BlobSetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n setAccessControl(options?: Models.BlobSetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setAccessControlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Get the owner, group, permissions, or access control list for a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccessControl(options?: Models.BlobGetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccessControl(options: Models.BlobGetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n getAccessControl(options?: Models.BlobGetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccessControlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Rename a blob/file. By default, the destination is overwritten and if the destination already\n * exists and has a lease the lease is broken. This operation supports conditional HTTP requests.\n * For more information, see [Specifying Conditional Headers for Blob Service\n * Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations).\n * To fail if the destination already exists, use a conditional request with If-None-Match: \"*\".\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param [options] The optional parameters\n * @returns Promise\n */\n rename(renameSource: string, options?: Models.BlobRenameOptionalParams): Promise;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param callback The callback\n */\n rename(renameSource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param options The optional parameters\n * @param callback The callback\n */\n rename(renameSource: string, options: Models.BlobRenameOptionalParams, callback: coreHttp.ServiceCallback): void;\n rename(renameSource: string, options?: Models.BlobRenameOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n renameSource,\n options\n },\n renameOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Undelete a blob that was previously soft deleted\n * @param [options] The optional parameters\n * @returns Promise\n */\n undelete(options?: Models.BlobUndeleteOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n undelete(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n undelete(options: Models.BlobUndeleteOptionalParams, callback: coreHttp.ServiceCallback): void;\n undelete(options?: Models.BlobUndeleteOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n undeleteOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Sets the time a blob will expire and be deleted.\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param [options] The optional parameters\n * @returns Promise\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams): Promise;\n /**\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param callback The callback\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, callback: coreHttp.ServiceCallback): void;\n /**\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param options The optional parameters\n * @param callback The callback\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options: Models.BlobSetExpiryOptionalParams, callback: coreHttp.ServiceCallback): void;\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n expiryOptions,\n options\n },\n setExpiryOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set HTTP Headers operation sets system properties on the blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setHTTPHeaders(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setHTTPHeaders(options: Models.BlobSetHTTPHeadersOptionalParams, callback: coreHttp.ServiceCallback): void;\n setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setHTTPHeadersOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more\n * name-value pairs\n * @param [options] The optional parameters\n * @returns Promise\n */\n setMetadata(options?: Models.BlobSetMetadataOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setMetadata(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setMetadata(options: Models.BlobSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void;\n setMetadata(options?: Models.BlobSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setMetadataOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param [options] The optional parameters\n * @returns Promise\n */\n acquireLease(options?: Models.BlobAcquireLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n acquireLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n acquireLease(options: Models.BlobAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n acquireLease(options?: Models.BlobAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n acquireLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n releaseLease(leaseId: string, options: Models.BlobReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n releaseLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n renewLease(leaseId: string, options: Models.BlobRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n renewLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param [options] The optional parameters\n * @returns Promise\n */\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The optional parameters\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, options: Models.BlobChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n proposedLeaseId,\n options\n },\n changeLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param [options] The optional parameters\n * @returns Promise\n */\n breakLease(options?: Models.BlobBreakLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n breakLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n breakLease(options: Models.BlobBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n breakLease(options?: Models.BlobBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n breakLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Create Snapshot operation creates a read-only snapshot of a blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n createSnapshot(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n createSnapshot(options: Models.BlobCreateSnapshotOptionalParams, callback: coreHttp.ServiceCallback): void;\n createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n createSnapshotOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Start Copy From URL operation copies a blob or an internet resource to a new blob.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n startCopyFromURL(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n startCopyFromURL(copySource: string, options: Models.BlobStartCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n startCopyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n copyFromURL(copySource: string, options?: Models.BlobCopyFromURLOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n copyFromURL(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n copyFromURL(copySource: string, options: Models.BlobCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n copyFromURL(copySource: string, options?: Models.BlobCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n copyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a\n * destination blob with zero length and full metadata.\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param [options] The optional parameters\n * @returns Promise\n */\n abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams): Promise;\n /**\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param callback The callback\n */\n abortCopyFromURL(copyId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param options The optional parameters\n * @param callback The callback\n */\n abortCopyFromURL(copyId: string, options: Models.BlobAbortCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copyId,\n options\n },\n abortCopyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a\n * premium storage account and on a block blob in a blob storage account (locally redundant storage\n * only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob.\n * A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the\n * blob's ETag.\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param [options] The optional parameters\n * @returns Promise\n */\n setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams): Promise;\n /**\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param callback The callback\n */\n setTier(tier: Models.AccessTier, callback: coreHttp.ServiceCallback): void;\n /**\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param options The optional parameters\n * @param callback The callback\n */\n setTier(tier: Models.AccessTier, options: Models.BlobSetTierOptionalParams, callback: coreHttp.ServiceCallback): void;\n setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n tier,\n options\n },\n setTierOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Query operation enables users to select/project on blob data by providing simple query\n * expressions.\n * @param [options] The optional parameters\n * @returns Promise\n */\n query(options?: Models.BlobQueryOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n query(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n query(options: Models.BlobQueryOptionalParams, callback: coreHttp.ServiceCallback): void;\n query(options?: Models.BlobQueryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n queryOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Tags operation enables users to get the tags associated with a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getTags(options?: Models.BlobGetTagsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getTags(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getTags(options: Models.BlobGetTagsOptionalParams, callback: coreHttp.ServiceCallback): void;\n getTags(options?: Models.BlobGetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getTagsOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Tags operation enables users to set tags on a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setTags(options?: Models.BlobSetTagsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setTags(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setTags(options: Models.BlobSetTagsOptionalParams, callback: coreHttp.ServiceCallback): void;\n setTags(options?: Models.BlobSetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setTagsOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst downloadOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.range0,\n Parameters.rangeGetContentMD5,\n Parameters.rangeGetContentCRC64,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobDownloadHeaders\n },\n 206: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobDownloadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobDownloadHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"HEAD\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst deleteMethodOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"DELETE\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.deleteSnapshots,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobDeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PATCH\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.action5\n ],\n headerParameters: [\n Parameters.owner,\n Parameters.group,\n Parameters.posixPermissions,\n Parameters.posixAcl,\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobSetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"HEAD\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.upn,\n Parameters.action6\n ],\n headerParameters: [\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobGetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renameOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.pathRenameMode\n ],\n headerParameters: [\n Parameters.renameSource,\n Parameters.directoryProperties,\n Parameters.posixPermissions,\n Parameters.posixUmask,\n Parameters.sourceLeaseId,\n Parameters.version,\n Parameters.requestId,\n Parameters.cacheControl,\n Parameters.contentType,\n Parameters.contentEncoding,\n Parameters.contentLanguage,\n Parameters.contentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobRenameHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobRenameHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst undeleteOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp8\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobUndeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobUndeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setExpiryOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp10\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.expiryOptions,\n Parameters.expiresOn\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetExpiryHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetExpiryHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setHTTPHeadersOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetHTTPHeadersHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetHTTPHeadersHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setMetadataOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp6\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetMetadataHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetMetadataHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst acquireLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.duration,\n Parameters.proposedLeaseId0,\n Parameters.version,\n Parameters.requestId,\n Parameters.action0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobAcquireLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobAcquireLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst releaseLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action1,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobReleaseLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobReleaseLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renewLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action2,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobRenewLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobRenewLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst changeLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.proposedLeaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action4,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobChangeLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobChangeLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst breakLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.breakPeriod,\n Parameters.version,\n Parameters.requestId,\n Parameters.action3,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobBreakLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobBreakLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst createSnapshotOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp11\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobCreateSnapshotHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobCreateSnapshotHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst startCopyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.tier0,\n Parameters.rehydratePriority,\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.sealBlob,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceIfTags,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobStartCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobStartCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst copyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.tier0,\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.sourceContentMD5,\n Parameters.blobTagsString,\n Parameters.xMsRequiresSync,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst abortCopyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.copyId,\n Parameters.timeoutInSeconds,\n Parameters.comp12\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.copyActionAbortConstant,\n Parameters.leaseId0\n ],\n responses: {\n 204: {\n headersMapper: Mappers.BlobAbortCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobAbortCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setTierOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds,\n Parameters.comp13\n ],\n headerParameters: [\n Parameters.tier1,\n Parameters.rehydratePriority,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetTierHeaders\n },\n 202: {\n headersMapper: Mappers.BlobSetTierHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetTierHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst queryOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.comp14\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"queryRequest\"\n ],\n mapper: Mappers.QueryRequest\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobQueryHeaders\n },\n 206: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobQueryHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobQueryHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getTagsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.comp15\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobTags,\n headersMapper: Mappers.BlobGetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetTagsHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setTagsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.versionId,\n Parameters.comp15\n ],\n headerParameters: [\n Parameters.version,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.requestId,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"tags\"\n ],\n mapper: Mappers.BlobTags\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 204: {\n headersMapper: Mappers.BlobSetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetTagsHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js new file mode 100644 index 000000000..0accf19dc --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js @@ -0,0 +1,291 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import { __assign } from "tslib"; +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/blockBlobMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a BlockBlob. */ +var BlockBlob = /** @class */ (function () { + /** + * Create a BlockBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function BlockBlob(client) { + this.client = client; + } + BlockBlob.prototype.upload = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, uploadOperationSpec, callback); + }; + BlockBlob.prototype.stageBlock = function (blockId, contentLength, body, options, callback) { + return this.client.sendOperationRequest({ + blockId: blockId, + contentLength: contentLength, + body: body, + options: options + }, stageBlockOperationSpec, callback); + }; + BlockBlob.prototype.stageBlockFromURL = function (blockId, contentLength, sourceUrl, options, callback) { + return this.client.sendOperationRequest({ + blockId: blockId, + contentLength: contentLength, + sourceUrl: sourceUrl, + options: options + }, stageBlockFromURLOperationSpec, callback); + }; + BlockBlob.prototype.commitBlockList = function (blocks, options, callback) { + return this.client.sendOperationRequest({ + blocks: blocks, + options: options + }, commitBlockListOperationSpec, callback); + }; + BlockBlob.prototype.getBlockList = function (listType, options, callback) { + return this.client.sendOperationRequest({ + listType: listType, + options: options + }, getBlockListOperationSpec, callback); + }; + return BlockBlob; +}()); +export { BlockBlob }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var uploadOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.transactionalContentMD5, + Parameters.contentLength, + Parameters.metadata, + Parameters.encryptionScope, + Parameters.tier0, + Parameters.version, + Parameters.requestId, + Parameters.blobTagsString, + Parameters.blobType2, + Parameters.blobContentType, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentMD5, + Parameters.blobCacheControl, + Parameters.blobContentDisposition, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: Mappers.BlockBlobUploadHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadHeaders + } + }, + isXML: true, + serializer: serializer +}; +var stageBlockOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.blockId, + Parameters.timeoutInSeconds, + Parameters.comp21 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockHeaders + } + }, + isXML: true, + serializer: serializer +}; +var stageBlockFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.blockId, + Parameters.timeoutInSeconds, + Parameters.comp21 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.sourceUrl, + Parameters.sourceRange1, + Parameters.sourceContentMD5, + Parameters.sourceContentCrc64, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.leaseId0, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders + } + }, + isXML: true, + serializer: serializer +}; +var commitBlockListOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp22 + ], + headerParameters: [ + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.metadata, + Parameters.encryptionScope, + Parameters.tier0, + Parameters.version, + Parameters.requestId, + Parameters.blobTagsString, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentMD5, + Parameters.blobContentDisposition, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + requestBody: { + parameterPath: "blocks", + mapper: __assign(__assign({}, Mappers.BlockLookupList), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 201: { + headersMapper: Mappers.BlockBlobCommitBlockListHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getBlockListOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.listType, + Parameters.timeoutInSeconds, + Parameters.comp22 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifTags + ], + responses: { + 200: { + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=blockBlob.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map new file mode 100644 index 000000000..ab64fb32a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blockBlob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/blockBlob.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,sCAAsC;AACtC;IAGE;;;OAGG;IACH,mBAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IA2BD,0BAAM,GAAN,UAAO,IAA8B,EAAE,aAAqB,EAAE,OAA+E,EAAE,QAAyC;QACtL,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,IAAI,MAAA;YACJ,aAAa,eAAA;YACb,OAAO,SAAA;SACR,EACD,mBAAmB,EACnB,QAAQ,CAA4C,CAAC;IACzD,CAAC;IAgCD,8BAAU,GAAV,UAAW,OAAe,EAAE,aAAqB,EAAE,IAA8B,E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,OAAO,CAAC,eAAe,KAC1B,QAAQ,EAAE,IAAI,GACf;KACF;IACD,WAAW,EAAE,gCAAgC;IAC7C,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,+BAA+B;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,+BAA+B;SACvD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,yBAAyB,GAA2B;IACxD,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,wBAAwB;IAC9B,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,MAAM;KAClB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,MAAM;KAClB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,aAAa,EAAE,OAAO,CAAC,4BAA4B;SACpD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,4BAA4B;SACpD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/blockBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a BlockBlob. */\nexport class BlockBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a BlockBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an\n * existing block blob overwrites any existing metadata on the blob. Partial updates are not\n * supported with Put Blob; the content of the existing blob is overwritten with the content of the\n * new blob. To perform a partial update of the content of a block blob, use the Put Block List\n * operation.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.BlockBlobUploadOptionalParams, callback: coreHttp.ServiceCallback): void;\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n uploadOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param [options] The optional parameters\n * @returns Promise\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams): Promise;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param callback The callback\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The optional parameters\n * @param callback The callback\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options: Models.BlockBlobStageBlockOptionalParams, callback: coreHttp.ServiceCallback): void;\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blockId,\n contentLength,\n body,\n options\n },\n stageBlockOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the\n * contents are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param [options] The optional parameters\n * @returns Promise\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams): Promise;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param callback The callback\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The optional parameters\n * @param callback The callback\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options: Models.BlockBlobStageBlockFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blockId,\n contentLength,\n sourceUrl,\n options\n },\n stageBlockFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up\n * the blob. In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior Put Block operation. You can call Put Block List to update a blob by\n * uploading only those blocks that have changed, then committing the new and existing blocks\n * together. You can do this by specifying whether to commit a block from the committed block list\n * or from the uncommitted block list, or to commit the most recently uploaded version of the\n * block, whichever list it may belong to.\n * @param blocks\n * @param [options] The optional parameters\n * @returns Promise\n */\n commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams): Promise;\n /**\n * @param blocks\n * @param callback The callback\n */\n commitBlockList(blocks: Models.BlockLookupList, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blocks\n * @param options The optional parameters\n * @param callback The callback\n */\n commitBlockList(blocks: Models.BlockLookupList, options: Models.BlockBlobCommitBlockListOptionalParams, callback: coreHttp.ServiceCallback): void;\n commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blocks,\n options\n },\n commitBlockListOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a\n * block blob\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param [options] The optional parameters\n * @returns Promise\n */\n getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams): Promise;\n /**\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param callback The callback\n */\n getBlockList(listType: Models.BlockListType, callback: coreHttp.ServiceCallback): void;\n /**\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param options The optional parameters\n * @param callback The callback\n */\n getBlockList(listType: Models.BlockListType, options: Models.BlockBlobGetBlockListOptionalParams, callback: coreHttp.ServiceCallback): void;\n getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n listType,\n options\n },\n getBlockListOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst uploadOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.transactionalContentMD5,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.tier0,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType2,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobUploadHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst stageBlockOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.blockId,\n Parameters.timeoutInSeconds,\n Parameters.comp21\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst stageBlockFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.blockId,\n Parameters.timeoutInSeconds,\n Parameters.comp21\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.sourceUrl,\n Parameters.sourceRange1,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst commitBlockListOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp22\n ],\n headerParameters: [\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.tier0,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"blocks\",\n mapper: {\n ...Mappers.BlockLookupList,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getBlockListOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.listType,\n Parameters.timeoutInSeconds,\n Parameters.comp22\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlockList,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js new file mode 100644 index 000000000..1ce152f02 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js @@ -0,0 +1,592 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/containerMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a Container. */ +var Container = /** @class */ (function () { + /** + * Create a Container. + * @param {StorageClientContext} client Reference to the service client. + */ + function Container(client) { + this.client = client; + } + Container.prototype.create = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, createOperationSpec, callback); + }; + Container.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec, callback); + }; + Container.prototype.deleteMethod = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, deleteMethodOperationSpec, callback); + }; + Container.prototype.setMetadata = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setMetadataOperationSpec, callback); + }; + Container.prototype.getAccessPolicy = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccessPolicyOperationSpec, callback); + }; + Container.prototype.setAccessPolicy = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setAccessPolicyOperationSpec, callback); + }; + Container.prototype.restore = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, restoreOperationSpec, callback); + }; + Container.prototype.acquireLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, acquireLeaseOperationSpec, callback); + }; + Container.prototype.releaseLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, releaseLeaseOperationSpec, callback); + }; + Container.prototype.renewLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, renewLeaseOperationSpec, callback); + }; + Container.prototype.breakLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, breakLeaseOperationSpec, callback); + }; + Container.prototype.changeLease = function (leaseId, proposedLeaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + proposedLeaseId: proposedLeaseId, + options: options + }, changeLeaseOperationSpec, callback); + }; + Container.prototype.listBlobFlatSegment = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, listBlobFlatSegmentOperationSpec, callback); + }; + Container.prototype.listBlobHierarchySegment = function (delimiter, options, callback) { + return this.client.sendOperationRequest({ + delimiter: delimiter, + options: options + }, listBlobHierarchySegmentOperationSpec, callback); + }; + Container.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec, callback); + }; + return Container; +}()); +export { Container }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var createOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2 + ], + headerParameters: [ + Parameters.metadata, + Parameters.access, + Parameters.version, + Parameters.requestId, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride + ], + responses: { + 201: { + headersMapper: Mappers.ContainerCreateHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPropertiesOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0 + ], + responses: { + 200: { + headersMapper: Mappers.ContainerGetPropertiesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var deleteMethodOperationSpec = { + httpMethod: "DELETE", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 202: { + headersMapper: Mappers.ContainerDeleteHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setMetadataOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 + ], + headerParameters: [ + Parameters.metadata, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.ContainerSetMetadataHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccessPolicyOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0 + ], + responses: { + 200: { + bodyMapper: { + xmlElementName: "SignedIdentifier", + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier" + } + } + } + }, + headersMapper: Mappers.ContainerGetAccessPolicyHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setAccessPolicyOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 + ], + headerParameters: [ + Parameters.access, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + requestBody: { + parameterPath: [ + "options", + "containerAcl" + ], + mapper: { + xmlName: "SignedIdentifiers", + xmlElementName: "SignedIdentifier", + serializedName: "containerAcl", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier" + } + } + } + } + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + headersMapper: Mappers.ContainerSetAccessPolicyHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyHeaders + } + }, + isXML: true, + serializer: serializer +}; +var restoreOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion + ], + responses: { + 201: { + headersMapper: Mappers.ContainerRestoreHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreHeaders + } + }, + isXML: true, + serializer: serializer +}; +var acquireLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9, + Parameters.restype2 + ], + headerParameters: [ + Parameters.duration, + Parameters.proposedLeaseId0, + Parameters.version, + Parameters.requestId, + Parameters.action0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 201: { + headersMapper: Mappers.ContainerAcquireLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var releaseLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9, + Parameters.restype2 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.ContainerReleaseLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var renewLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9, + Parameters.restype2 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action2, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.ContainerRenewLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var breakLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9, + Parameters.restype2 + ], + headerParameters: [ + Parameters.breakPeriod, + Parameters.version, + Parameters.requestId, + Parameters.action3, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 202: { + headersMapper: Mappers.ContainerBreakLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var changeLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp9, + Parameters.restype2 + ], + headerParameters: [ + Parameters.leaseId1, + Parameters.proposedLeaseId1, + Parameters.version, + Parameters.requestId, + Parameters.action4, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.ContainerChangeLeaseHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseHeaders + } + }, + isXML: true, + serializer: serializer +}; +var listBlobFlatSegmentOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.prefix, + Parameters.marker0, + Parameters.maxPageSize, + Parameters.include1, + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp2 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders + } + }, + isXML: true, + serializer: serializer +}; +var listBlobHierarchySegmentOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.prefix, + Parameters.delimiter, + Parameters.marker0, + Parameters.maxPageSize, + Parameters.include1, + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp2 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccountInfoOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.restype1, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version + ], + responses: { + 200: { + headersMapper: Mappers.ContainerGetAccountInfoHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=container.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js.map new file mode 100644 index 000000000..6d5c533ce --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/container.js.map @@ -0,0 +1 @@ +{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,sCAAsC;AACtC;IAGE;;;OAGG;IACH,mBAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAkBD,0BAAM,GAAN,UAAO,OAA+E,EAAE,QAAyC;QAC/H,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,mBAAmB,EACnB,QAAQ,CAA4C,CAAC;IACzD,CAAC;IAkBD,iCAAa,GAAb,UAAc,OAAsF,EAAE,QAAyC;QAC7I,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,0BAA0B,EAC1B,QAAQ,CAAmD,CAAC;IAChE,CAAC;I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AU,EAAE,KAAK;IACjB,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,KAAK;KACjB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;KACrB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iCAAiC;YACrD,aAAa,EAAE,OAAO,CAAC,wCAAwC;SAChE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,wCAAwC;SAChE;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,2BAA2B,GAA2B;IAC1D,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,KAAK;KACjB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;KACnB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,8BAA8B;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,8BAA8B;SACtD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/containerMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Container. */\nexport class Container {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Container.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * creates a new container under the specified account. If the container with the same name already\n * exists, the operation fails\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(options?: Models.ContainerCreateOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n create(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n create(options: Models.ContainerCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(options?: Models.ContainerCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * returns all user-defined metadata and system properties for the specified container. The data\n * returned does not include the container's list of blobs\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.ContainerGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.ContainerGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.ContainerGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * operation marks the specified container for deletion. The container and any blobs contained\n * within it are later deleted during garbage collection\n * @param [options] The optional parameters\n * @returns Promise\n */\n deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n deleteMethod(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n deleteMethod(options: Models.ContainerDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void;\n deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n deleteMethodOperationSpec,\n callback) as Promise;\n }\n\n /**\n * operation sets one or more user-defined name-value pairs for the specified container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setMetadata(options?: Models.ContainerSetMetadataOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setMetadata(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setMetadata(options: Models.ContainerSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void;\n setMetadata(options?: Models.ContainerSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setMetadataOperationSpec,\n callback) as Promise;\n }\n\n /**\n * gets the permissions for the specified container. The permissions indicate whether container\n * data may be accessed publicly.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getAccessPolicy(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccessPolicy(options: Models.ContainerGetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void;\n getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccessPolicyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * sets the permissions for the specified container. The permissions indicate whether blobs in a\n * container may be accessed publicly.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setAccessPolicy(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setAccessPolicy(options: Models.ContainerSetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void;\n setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setAccessPolicyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Restores a previously-deleted container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n restore(options?: Models.ContainerRestoreOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n restore(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n restore(options: Models.ContainerRestoreOptionalParams, callback: coreHttp.ServiceCallback): void;\n restore(options?: Models.ContainerRestoreOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n restoreOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param [options] The optional parameters\n * @returns Promise\n */\n acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n acquireLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n acquireLease(options: Models.ContainerAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n acquireLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n releaseLease(leaseId: string, options: Models.ContainerReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n releaseLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n renewLease(leaseId: string, options: Models.ContainerRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n renewLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param [options] The optional parameters\n * @returns Promise\n */\n breakLease(options?: Models.ContainerBreakLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n breakLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n breakLease(options: Models.ContainerBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n breakLease(options?: Models.ContainerBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n breakLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param [options] The optional parameters\n * @returns Promise\n */\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The optional parameters\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, options: Models.ContainerChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n proposedLeaseId,\n options\n },\n changeLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param [options] The optional parameters\n * @returns Promise\n */\n listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n listBlobFlatSegment(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n listBlobFlatSegment(options: Models.ContainerListBlobFlatSegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n listBlobFlatSegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param [options] The optional parameters\n * @returns Promise\n */\n listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams): Promise;\n /**\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param callback The callback\n */\n listBlobHierarchySegment(delimiter: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param options The optional parameters\n * @param callback The callback\n */\n listBlobHierarchySegment(delimiter: string, options: Models.ContainerListBlobHierarchySegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n delimiter,\n options\n },\n listBlobHierarchySegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.access,\n Parameters.version,\n Parameters.requestId,\n Parameters.defaultEncryptionScope,\n Parameters.preventEncryptionScopeOverride\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst deleteMethodOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"DELETE\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 202: {\n headersMapper: Mappers.ContainerDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerDeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setMetadataOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp6\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerSetMetadataHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerSetMetadataHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccessPolicyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp7\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0\n ],\n responses: {\n 200: {\n bodyMapper: {\n xmlElementName: \"SignedIdentifier\",\n serializedName: \"parsedResponse\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n },\n headersMapper: Mappers.ContainerGetAccessPolicyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetAccessPolicyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setAccessPolicyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp7\n ],\n headerParameters: [\n Parameters.access,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"containerAcl\"\n ],\n mapper: {\n xmlName: \"SignedIdentifiers\",\n xmlElementName: \"SignedIdentifier\",\n serializedName: \"containerAcl\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerSetAccessPolicyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerSetAccessPolicyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst restoreOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp8\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.deletedContainerName,\n Parameters.deletedContainerVersion\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRestoreHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerRestoreHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst acquireLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.duration,\n Parameters.proposedLeaseId0,\n Parameters.version,\n Parameters.requestId,\n Parameters.action0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerAcquireLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerAcquireLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst releaseLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action1,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerReleaseLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerReleaseLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renewLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action2,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRenewLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerRenewLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst breakLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.breakPeriod,\n Parameters.version,\n Parameters.requestId,\n Parameters.action3,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 202: {\n headersMapper: Mappers.ContainerBreakLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerBreakLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst changeLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.proposedLeaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action4,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerChangeLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerChangeLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listBlobFlatSegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include1,\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListBlobsFlatSegmentResponse,\n headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listBlobHierarchySegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.delimiter,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include1,\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListBlobsHierarchySegmentResponse,\n headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js new file mode 100644 index 000000000..267225399 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js @@ -0,0 +1,238 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/directoryMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a Directory. */ +var Directory = /** @class */ (function () { + /** + * Create a Directory. + * @param {StorageClientContext} client Reference to the service client. + */ + function Directory(client) { + this.client = client; + } + Directory.prototype.create = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, createOperationSpec, callback); + }; + Directory.prototype.rename = function (renameSource, options, callback) { + return this.client.sendOperationRequest({ + renameSource: renameSource, + options: options + }, renameOperationSpec, callback); + }; + Directory.prototype.deleteMethod = function (recursiveDirectoryDelete, options, callback) { + return this.client.sendOperationRequest({ + recursiveDirectoryDelete: recursiveDirectoryDelete, + options: options + }, deleteMethodOperationSpec, callback); + }; + Directory.prototype.setAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setAccessControlOperationSpec, callback); + }; + Directory.prototype.getAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccessControlOperationSpec, callback); + }; + return Directory; +}()); +export { Directory }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var createOperationSpec = { + httpMethod: "PUT", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.resource + ], + headerParameters: [ + Parameters.directoryProperties, + Parameters.posixPermissions, + Parameters.posixUmask, + Parameters.version, + Parameters.requestId, + Parameters.cacheControl, + Parameters.contentType, + Parameters.contentEncoding, + Parameters.contentLanguage, + Parameters.contentDisposition, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.DirectoryCreateHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.DirectoryCreateHeaders + } + }, + isXML: true, + serializer: serializer +}; +var renameOperationSpec = { + httpMethod: "PUT", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker1, + Parameters.pathRenameMode + ], + headerParameters: [ + Parameters.renameSource, + Parameters.directoryProperties, + Parameters.posixPermissions, + Parameters.posixUmask, + Parameters.sourceLeaseId, + Parameters.version, + Parameters.requestId, + Parameters.cacheControl, + Parameters.contentType, + Parameters.contentEncoding, + Parameters.contentLanguage, + Parameters.contentDisposition, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.DirectoryRenameHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.DirectoryRenameHeaders + } + }, + isXML: true, + serializer: serializer +}; +var deleteMethodOperationSpec = { + httpMethod: "DELETE", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.recursiveDirectoryDelete, + Parameters.marker1 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], + responses: { + 200: { + headersMapper: Mappers.DirectoryDeleteHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.DirectoryDeleteHeaders + } + }, + isXML: true, + serializer: serializer +}; +var setAccessControlOperationSpec = { + httpMethod: "PATCH", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.action5 + ], + headerParameters: [ + Parameters.owner, + Parameters.group, + Parameters.posixPermissions, + Parameters.posixAcl, + Parameters.requestId, + Parameters.version, + Parameters.leaseId0, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.DirectorySetAccessControlHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.DirectorySetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccessControlOperationSpec = { + httpMethod: "HEAD", + path: "{filesystem}/{path}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.upn, + Parameters.action6 + ], + headerParameters: [ + Parameters.requestId, + Parameters.version, + Parameters.leaseId0, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: Mappers.DirectoryGetAccessControlHeaders + }, + default: { + bodyMapper: Mappers.DataLakeStorageError, + headersMapper: Mappers.DirectoryGetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=directory.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js.map new file mode 100644 index 000000000..f9638b6f5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/directory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,sCAAsC;AACtC;IAGE;;;OAGG;IACH,mBAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAqBD,0BAAM,GAAN,UAAO,OAA+E,EAAE,QAAyC;QAC/H,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,mBAAmB,EACnB,QAAQ,CAA4C,CAAC;IACzD,CAAC;IA8BD,0BAAM,GAAN,UAAO,YAAoB,EAAE,OAA+E,EAAE,QAAyC;QACrJ,OAAO,IAAI,CAAC,MAAM,C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QAClB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,iBAAiB;KAC7B;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,oBAAoB;YACxC,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,6BAA6B,GAA2B;IAC5D,UAAU,EAAE,MAAM;IAClB,IAAI,EAAE,qBAAqB;IAC3B,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,GAAG;QACd,UAAU,CAAC,OAAO;KACnB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,iBAAiB;KAC7B;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,oBAAoB;YACxC,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/directoryMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Directory. */\nexport class Directory {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Directory.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * Create a directory. By default, the destination is overwritten and if the destination already\n * exists and has a lease the lease is broken. This operation supports conditional HTTP requests.\n * For more information, see [Specifying Conditional Headers for Blob Service\n * Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations).\n * To fail if the destination already exists, use a conditional request with If-None-Match: \"*\".\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(options?: Models.DirectoryCreateOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n create(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n create(options: Models.DirectoryCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(options?: Models.DirectoryCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Rename a directory. By default, the destination is overwritten and if the destination already\n * exists and has a lease the lease is broken. This operation supports conditional HTTP requests.\n * For more information, see [Specifying Conditional Headers for Blob Service\n * Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations).\n * To fail if the destination already exists, use a conditional request with If-None-Match: \"*\".\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param [options] The optional parameters\n * @returns Promise\n */\n rename(renameSource: string, options?: Models.DirectoryRenameOptionalParams): Promise;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param callback The callback\n */\n rename(renameSource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param options The optional parameters\n * @param callback The callback\n */\n rename(renameSource: string, options: Models.DirectoryRenameOptionalParams, callback: coreHttp.ServiceCallback): void;\n rename(renameSource: string, options?: Models.DirectoryRenameOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n renameSource,\n options\n },\n renameOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Deletes the directory\n * @param recursiveDirectoryDelete If \"true\", all paths beneath the directory will be deleted. If\n * \"false\" and the directory is non-empty, an error occurs.\n * @param [options] The optional parameters\n * @returns Promise\n */\n deleteMethod(recursiveDirectoryDelete: boolean, options?: Models.DirectoryDeleteMethodOptionalParams): Promise;\n /**\n * @param recursiveDirectoryDelete If \"true\", all paths beneath the directory will be deleted. If\n * \"false\" and the directory is non-empty, an error occurs.\n * @param callback The callback\n */\n deleteMethod(recursiveDirectoryDelete: boolean, callback: coreHttp.ServiceCallback): void;\n /**\n * @param recursiveDirectoryDelete If \"true\", all paths beneath the directory will be deleted. If\n * \"false\" and the directory is non-empty, an error occurs.\n * @param options The optional parameters\n * @param callback The callback\n */\n deleteMethod(recursiveDirectoryDelete: boolean, options: Models.DirectoryDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void;\n deleteMethod(recursiveDirectoryDelete: boolean, options?: Models.DirectoryDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n recursiveDirectoryDelete,\n options\n },\n deleteMethodOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Set the owner, group, permissions, or access control list for a directory.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setAccessControl(options?: Models.DirectorySetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setAccessControl(options: Models.DirectorySetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n setAccessControl(options?: Models.DirectorySetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setAccessControlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Get the owner, group, permissions, or access control list for a directory.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccessControl(options?: Models.DirectoryGetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccessControl(options: Models.DirectoryGetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n getAccessControl(options?: Models.DirectoryGetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccessControlOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.resource\n ],\n headerParameters: [\n Parameters.directoryProperties,\n Parameters.posixPermissions,\n Parameters.posixUmask,\n Parameters.version,\n Parameters.requestId,\n Parameters.cacheControl,\n Parameters.contentType,\n Parameters.contentEncoding,\n Parameters.contentLanguage,\n Parameters.contentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.DirectoryCreateHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.DirectoryCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renameOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.marker1,\n Parameters.pathRenameMode\n ],\n headerParameters: [\n Parameters.renameSource,\n Parameters.directoryProperties,\n Parameters.posixPermissions,\n Parameters.posixUmask,\n Parameters.sourceLeaseId,\n Parameters.version,\n Parameters.requestId,\n Parameters.cacheControl,\n Parameters.contentType,\n Parameters.contentEncoding,\n Parameters.contentLanguage,\n Parameters.contentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.DirectoryRenameHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.DirectoryRenameHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst deleteMethodOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"DELETE\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.recursiveDirectoryDelete,\n Parameters.marker1\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n responses: {\n 200: {\n headersMapper: Mappers.DirectoryDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.DirectoryDeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PATCH\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.action5\n ],\n headerParameters: [\n Parameters.owner,\n Parameters.group,\n Parameters.posixPermissions,\n Parameters.posixAcl,\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.DirectorySetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.DirectorySetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"HEAD\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.upn,\n Parameters.action6\n ],\n headerParameters: [\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.DirectoryGetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.DirectoryGetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js new file mode 100644 index 000000000..6194bd979 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +export * from "./service"; +export * from "./container"; +export * from "./directory"; +export * from "./blob"; +export * from "./pageBlob"; +export * from "./appendBlob"; +export * from "./blockBlob"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js.map new file mode 100644 index 000000000..3f0019fda --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nexport * from \"./service\";\nexport * from \"./container\";\nexport * from \"./directory\";\nexport * from \"./blob\";\nexport * from \"./pageBlob\";\nexport * from \"./appendBlob\";\nexport * from \"./blockBlob\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js new file mode 100644 index 000000000..b3b705841 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js @@ -0,0 +1,454 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/pageBlobMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a PageBlob. */ +var PageBlob = /** @class */ (function () { + /** + * Create a PageBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function PageBlob(client) { + this.client = client; + } + PageBlob.prototype.create = function (contentLength, blobContentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + blobContentLength: blobContentLength, + options: options + }, createOperationSpec, callback); + }; + PageBlob.prototype.uploadPages = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, uploadPagesOperationSpec, callback); + }; + PageBlob.prototype.clearPages = function (contentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + options: options + }, clearPagesOperationSpec, callback); + }; + PageBlob.prototype.uploadPagesFromURL = function (sourceUrl, sourceRange, contentLength, range, options, callback) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl, + sourceRange: sourceRange, + contentLength: contentLength, + range: range, + options: options + }, uploadPagesFromURLOperationSpec, callback); + }; + PageBlob.prototype.getPageRanges = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPageRangesOperationSpec, callback); + }; + PageBlob.prototype.getPageRangesDiff = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPageRangesDiffOperationSpec, callback); + }; + PageBlob.prototype.resize = function (blobContentLength, options, callback) { + return this.client.sendOperationRequest({ + blobContentLength: blobContentLength, + options: options + }, resizeOperationSpec, callback); + }; + PageBlob.prototype.updateSequenceNumber = function (sequenceNumberAction, options, callback) { + return this.client.sendOperationRequest({ + sequenceNumberAction: sequenceNumberAction, + options: options + }, updateSequenceNumberOperationSpec, callback); + }; + PageBlob.prototype.copyIncremental = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, copyIncrementalOperationSpec, callback); + }; + return PageBlob; +}()); +export { PageBlob }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var createOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds + ], + headerParameters: [ + Parameters.contentLength, + Parameters.tier0, + Parameters.metadata, + Parameters.encryptionScope, + Parameters.blobContentLength, + Parameters.blobSequenceNumber, + Parameters.version, + Parameters.requestId, + Parameters.blobTagsString, + Parameters.blobType0, + Parameters.blobContentType, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentMD5, + Parameters.blobCacheControl, + Parameters.blobContentDisposition, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 201: { + headersMapper: Mappers.PageBlobCreateHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateHeaders + } + }, + isXML: true, + serializer: serializer +}; +var uploadPagesOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp16 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.range0, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.pageWrite0, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var clearPagesOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp16 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.range0, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.pageWrite1, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 201: { + headersMapper: Mappers.PageBlobClearPagesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var uploadPagesFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp16 + ], + headerParameters: [ + Parameters.sourceUrl, + Parameters.sourceRange0, + Parameters.sourceContentMD5, + Parameters.sourceContentCrc64, + Parameters.contentLength, + Parameters.range1, + Parameters.encryptionScope, + Parameters.version, + Parameters.requestId, + Parameters.pageWrite0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.leaseId0, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPageRangesOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.timeoutInSeconds, + Parameters.comp17 + ], + headerParameters: [ + Parameters.range0, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPageRangesDiffOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.snapshot, + Parameters.timeoutInSeconds, + Parameters.prevsnapshot, + Parameters.comp17 + ], + headerParameters: [ + Parameters.prevSnapshotUrl, + Parameters.range0, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders + } + }, + isXML: true, + serializer: serializer +}; +var resizeOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp0 + ], + headerParameters: [ + Parameters.encryptionScope, + Parameters.blobContentLength, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.PageBlobResizeHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeHeaders + } + }, + isXML: true, + serializer: serializer +}; +var updateSequenceNumberOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp0 + ], + headerParameters: [ + Parameters.sequenceNumberAction, + Parameters.blobSequenceNumber, + Parameters.version, + Parameters.requestId, + Parameters.leaseId0, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 200: { + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders + } + }, + isXML: true, + serializer: serializer +}; +var copyIncrementalOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp18 + ], + headerParameters: [ + Parameters.copySource, + Parameters.version, + Parameters.requestId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags + ], + responses: { + 202: { + headersMapper: Mappers.PageBlobCopyIncrementalHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=pageBlob.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map new file mode 100644 index 000000000..4af8e0be7 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pageBlob.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/pageBlob.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,qCAAqC;AACrC;IAGE;;;OAGG;IACH,kBAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IA0BD,yBAAM,GAAN,UAAO,aAAqB,EAAE,iBAAyB,EAAE,OAA8E,EAAE,QAAyC;QAChL,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,aAAa,eAAA;YACb,iBAAiB,mBAAA;YACjB,OAAO,SAAA;SACR,EACD,mBAAmB,EACnB,QAAQ,CAA2C,CAAC;IACxD,CAAC;IAuBD,8BAAW,GAAX,UAAY,IAA8B,EAAE,aAAqB,EAAE,OAAmF,EAAE,QAAyC;QAC/L,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,IAAI,MAAA;YACJ,aAAa,eAAA;YACb,OAAO,SAAA;SACR,EACD,wBAAwB,EACxB,QAAQ,CAAgD,CAAC;IAC7D,CAAC;IAo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CAAC,MAAM;KAClB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,4BAA4B,GAA2B;IAC3D,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,wBAAwB;IAC9B,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,MAAM;KAClB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;KAClB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,8BAA8B;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,8BAA8B;SACtD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/pageBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a PageBlob. */\nexport class PageBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a PageBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Create operation creates a new page blob.\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param callback The callback\n */\n create(contentLength: number, blobContentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param options The optional parameters\n * @param callback The callback\n */\n create(contentLength: number, blobContentLength: number, options: Models.PageBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n blobContentLength,\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.PageBlobUploadPagesOptionalParams, callback: coreHttp.ServiceCallback): void;\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n uploadPagesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Clear Pages operation clears a set of pages from a page blob\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n clearPages(contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n clearPages(contentLength: number, options: Models.PageBlobClearPagesOptionalParams, callback: coreHttp.ServiceCallback): void;\n clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n options\n },\n clearPagesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the contents are read\n * from a URL\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param [options] The optional parameters\n * @returns Promise\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options?: Models.PageBlobUploadPagesFromURLOptionalParams): Promise;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param callback The callback\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param options The optional parameters\n * @param callback The callback\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options: Models.PageBlobUploadPagesFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options?: Models.PageBlobUploadPagesFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sourceUrl,\n sourceRange,\n contentLength,\n range,\n options\n },\n uploadPagesFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot\n * of a page blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getPageRanges(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getPageRanges(options: Models.PageBlobGetPageRangesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPageRangesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that\n * were changed between target blob and previous snapshot.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getPageRangesDiff(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getPageRangesDiff(options: Models.PageBlobGetPageRangesDiffOptionalParams, callback: coreHttp.ServiceCallback): void;\n getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPageRangesDiffOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Resize the Blob\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param [options] The optional parameters\n * @returns Promise\n */\n resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams): Promise;\n /**\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param callback The callback\n */\n resize(blobContentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param options The optional parameters\n * @param callback The callback\n */\n resize(blobContentLength: number, options: Models.PageBlobResizeOptionalParams, callback: coreHttp.ServiceCallback): void;\n resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blobContentLength,\n options\n },\n resizeOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Update the sequence number of the blob\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param [options] The optional parameters\n * @returns Promise\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams): Promise;\n /**\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param callback The callback\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param options The optional parameters\n * @param callback The callback\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options: Models.PageBlobUpdateSequenceNumberOptionalParams, callback: coreHttp.ServiceCallback): void;\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sequenceNumberAction,\n options\n },\n updateSequenceNumberOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Copy Incremental operation copies a snapshot of the source page blob to a destination page\n * blob. The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination. The copied snapshots are complete copies of\n * the original snapshot and can be read or copied from as usual. This API is supported since REST\n * version 2016-05-31.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n copyIncremental(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n copyIncremental(copySource: string, options: Models.PageBlobCopyIncrementalOptionalParams, callback: coreHttp.ServiceCallback): void;\n copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n copyIncrementalOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.tier0,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.blobContentLength,\n Parameters.blobSequenceNumber,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType0,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst uploadPagesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.range0,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite0,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobUploadPagesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUploadPagesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst clearPagesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.range0,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite1,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobClearPagesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobClearPagesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.sourceUrl,\n Parameters.sourceRange0,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.contentLength,\n Parameters.range1,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPageRangesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.comp17\n ],\n headerParameters: [\n Parameters.range0,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.PageList,\n headersMapper: Mappers.PageBlobGetPageRangesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobGetPageRangesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPageRangesDiffOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.prevsnapshot,\n Parameters.comp17\n ],\n headerParameters: [\n Parameters.prevSnapshotUrl,\n Parameters.range0,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.PageList,\n headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst resizeOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.encryptionScope,\n Parameters.blobContentLength,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.PageBlobResizeHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobResizeHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst updateSequenceNumberOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.sequenceNumberAction,\n Parameters.blobSequenceNumber,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst copyIncrementalOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp18\n ],\n headerParameters: [\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.PageBlobCopyIncrementalHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobCopyIncrementalHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js new file mode 100644 index 000000000..b82a18686 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js @@ -0,0 +1,317 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import { __assign } from "tslib"; +import * as coreHttp from "@azure/core-http"; +import * as Mappers from "../models/serviceMappers"; +import * as Parameters from "../models/parameters"; +/** Class representing a Service. */ +var Service = /** @class */ (function () { + /** + * Create a Service. + * @param {StorageClientContext} client Reference to the service client. + */ + function Service(client) { + this.client = client; + } + Service.prototype.setProperties = function (blobServiceProperties, options, callback) { + return this.client.sendOperationRequest({ + blobServiceProperties: blobServiceProperties, + options: options + }, setPropertiesOperationSpec, callback); + }; + Service.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec, callback); + }; + Service.prototype.getStatistics = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getStatisticsOperationSpec, callback); + }; + Service.prototype.listContainersSegment = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, listContainersSegmentOperationSpec, callback); + }; + Service.prototype.getUserDelegationKey = function (keyInfo, options, callback) { + return this.client.sendOperationRequest({ + keyInfo: keyInfo, + options: options + }, getUserDelegationKeyOperationSpec, callback); + }; + Service.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec, callback); + }; + Service.prototype.submitBatch = function (body, contentLength, multipartContentType, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + multipartContentType: multipartContentType, + options: options + }, submitBatchOperationSpec, callback); + }; + Service.prototype.filterBlobs = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, filterBlobsOperationSpec, callback); + }; + return Service; +}()); +export { Service }; +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var setPropertiesOperationSpec = { + httpMethod: "PUT", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype0, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + requestBody: { + parameterPath: "blobServiceProperties", + mapper: __assign(__assign({}, Mappers.BlobServiceProperties), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 202: { + headersMapper: Mappers.ServiceSetPropertiesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPropertiesOperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype0, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getStatisticsOperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype0, + Parameters.comp1 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsHeaders + } + }, + isXML: true, + serializer: serializer +}; +var listContainersSegmentOperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.prefix, + Parameters.marker0, + Parameters.maxPageSize, + Parameters.include0, + Parameters.timeoutInSeconds, + Parameters.comp2 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getUserDelegationKeyOperationSpec = { + httpMethod: "POST", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype0, + Parameters.comp3 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + requestBody: { + parameterPath: "keyInfo", + mapper: __assign(__assign({}, Mappers.KeyInfo), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccountInfoOperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.restype1, + Parameters.comp0 + ], + headerParameters: [ + Parameters.version + ], + responses: { + 200: { + headersMapper: Mappers.ServiceGetAccountInfoHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer +}; +var submitBatchOperationSpec = { + httpMethod: "POST", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp4 + ], + headerParameters: [ + Parameters.contentLength, + Parameters.multipartContentType, + Parameters.version, + Parameters.requestId + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/xml; charset=utf-8", + responses: { + 202: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: Mappers.ServiceSubmitBatchHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchHeaders + } + }, + isXML: true, + serializer: serializer +}; +var filterBlobsOperationSpec = { + httpMethod: "GET", + urlParameters: [ + Parameters.url + ], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.where, + Parameters.marker0, + Parameters.maxPageSize, + Parameters.comp5 + ], + headerParameters: [ + Parameters.version, + Parameters.requestId + ], + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsHeaders + } + }, + isXML: true, + serializer: serializer +}; +//# sourceMappingURL=service.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js.map new file mode 100644 index 000000000..efbff5a84 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/operations/service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../../src/generated/src/operations/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAGnD,oCAAoC;AACpC;IAGE;;;OAGG;IACH,iBAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAqBD,+BAAa,GAAb,UAAc,qBAAmD,EAAE,OAAoF,EAAE,QAAyC;QAChM,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,qBAAqB,uBAAA;YACrB,OAAO,SAAA;SACR,EACD,0BAA0B,EAC1B,QAAQ,CAAiD,CAAC;IAC9D,CAAC;IAkBD,+BAAa,GAAb,UAAc,OAA4G,EAAE,QAAiE;QAC3L,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,0BAA0B,EAC1B,QAAQ,CAAiD,CAAC;IAC9D,CAAC;IAmBD,+BAAa,GAAb,UAAc,OAA4G,EAAE,QAAiE;QAC3L,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,OAAO,SAAA;SACR,EACD,0BAA0B,EAC1B,QAAQ,CAAiD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Aa,EAAE,MAAM;QACrB,MAAM,EAAE;YACN,QAAQ,EAAE,IAAI;YACd,cAAc,EAAE,MAAM;YACtB,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;SACF;KACF;IACD,WAAW,EAAE,gCAAgC;IAC7C,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE;gBACV,cAAc,EAAE,gBAAgB;gBAChC,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,aAAa,EAAE,OAAO,CAAC,yBAAyB;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,yBAAyB;SACjD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC;AAEF,IAAM,wBAAwB,GAA2B;IACvD,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE;QACb,UAAU,CAAC,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,CAAC,gBAAgB;QAC3B,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,KAAK;KACjB;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,SAAS;KACrB;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;YACrC,aAAa,EAAE,OAAO,CAAC,yBAAyB;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,YAAY;YAChC,aAAa,EAAE,OAAO,CAAC,yBAAyB;SACjD;KACF;IACD,KAAK,EAAE,IAAI;IACX,UAAU,YAAA;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/serviceMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Service. */\nexport class Service {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Service.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * Sets properties for a storage account's Blob service endpoint, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules\n * @param blobServiceProperties The StorageService properties.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams): Promise;\n /**\n * @param blobServiceProperties The StorageService properties.\n * @param callback The callback\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blobServiceProperties The StorageService properties.\n * @param options The optional parameters\n * @param callback The callback\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blobServiceProperties,\n options\n },\n setPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * gets the properties of a storage account's Blob service, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.ServiceGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.ServiceGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only available on the\n * secondary location endpoint when read-access geo-redundant replication is enabled for the\n * storage account.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getStatistics(options?: Models.ServiceGetStatisticsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getStatistics(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: coreHttp.ServiceCallback): void;\n getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getStatisticsOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The List Containers Segment operation returns a list of the containers under the specified\n * account\n * @param [options] The optional parameters\n * @returns Promise\n */\n listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n listContainersSegment(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n listContainersSegment(options: Models.ServiceListContainersSegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n listContainersSegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n * @param keyInfo\n * @param [options] The optional parameters\n * @returns Promise\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, options?: Models.ServiceGetUserDelegationKeyOptionalParams): Promise;\n /**\n * @param keyInfo\n * @param callback The callback\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, callback: coreHttp.ServiceCallback): void;\n /**\n * @param keyInfo\n * @param options The optional parameters\n * @param callback The callback\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, options: Models.ServiceGetUserDelegationKeyOptionalParams, callback: coreHttp.ServiceCallback): void;\n getUserDelegationKey(keyInfo: Models.KeyInfo, options?: Models.ServiceGetUserDelegationKeyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n keyInfo,\n options\n },\n getUserDelegationKeyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param [options] The optional parameters\n * @returns Promise\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options?: Models.ServiceSubmitBatchOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param callback The callback\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param options The optional parameters\n * @param callback The callback\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options: Models.ServiceSubmitBatchOptionalParams, callback: coreHttp.ServiceCallback): void;\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options?: Models.ServiceSubmitBatchOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n multipartContentType,\n options\n },\n submitBatchOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags match\n * a given search expression. Filter blobs searches across all containers within a storage account\n * but can be scoped within the expression to a single container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n filterBlobs(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n filterBlobs(options: Models.ServiceFilterBlobsOptionalParams, callback: coreHttp.ServiceCallback): void;\n filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n filterBlobsOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst setPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"blobServiceProperties\",\n mapper: {\n ...Mappers.BlobServiceProperties,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 202: {\n headersMapper: Mappers.ServiceSetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceSetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobServiceProperties,\n headersMapper: Mappers.ServiceGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getStatisticsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp1\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobServiceStatistics,\n headersMapper: Mappers.ServiceGetStatisticsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetStatisticsHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listContainersSegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include0,\n Parameters.timeoutInSeconds,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListContainersSegmentResponse,\n headersMapper: Mappers.ServiceListContainersSegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceListContainersSegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getUserDelegationKeyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp3\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"keyInfo\",\n mapper: {\n ...Mappers.KeyInfo,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n bodyMapper: Mappers.UserDelegationKey,\n headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ServiceGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst submitBatchOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp4\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.multipartContentType,\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 202: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.ServiceSubmitBatchHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceSubmitBatchHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst filterBlobsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.where,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.comp5\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.FilterBlobSegment,\n headersMapper: Mappers.ServiceFilterBlobsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceFilterBlobsHeaders\n }\n },\n isXML: true,\n serializer\n};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js new file mode 100644 index 000000000..ed1784388 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import { __extends } from "tslib"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { StorageClientContext } from "./storageClientContext"; +var StorageClient = /** @class */ (function (_super) { + __extends(StorageClient, _super); + /** + * Initializes a new instance of the StorageClient class. + * @param url The URL of the service account, container, or blob that is the targe of the desired + * operation. + * @param [options] The parameter options + */ + function StorageClient(url, options) { + var _this = _super.call(this, url, options) || this; + _this.service = new operations.Service(_this); + _this.container = new operations.Container(_this); + _this.directory = new operations.Directory(_this); + _this.blob = new operations.Blob(_this); + _this.pageBlob = new operations.PageBlob(_this); + _this.appendBlob = new operations.AppendBlob(_this); + _this.blockBlob = new operations.BlockBlob(_this); + return _this; + } + return StorageClient; +}(StorageClientContext)); +// Operation Specifications +export { StorageClient, StorageClientContext, Models as StorageModels, Mappers as StorageMappers }; +export * from "./operations"; +//# sourceMappingURL=storageClient.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js.map new file mode 100644 index 000000000..0c0ef4885 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"storageClient.js","sourceRoot":"","sources":["../../../../../src/generated/src/storageClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAGH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;IAA4B,iCAAoB;IAU9C;;;;;OAKG;IACH,uBAAY,GAAW,EAAE,OAAuC;QAAhE,YACE,kBAAM,GAAG,EAAE,OAAO,CAAC,SAQpB;QAPC,KAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,KAAI,CAAC,CAAC;QAC5C,KAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,KAAI,CAAC,CAAC;QAChD,KAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,KAAI,CAAC,CAAC;QAChD,KAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;QACtC,KAAI,CAAC,QAAQ,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAI,CAAC,CAAC;QAC9C,KAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,KAAI,CAAC,CAAC;QAClD,KAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,KAAI,CAAC,CAAC;;IAClD,CAAC;IACH,oBAAC;AAAD,CAAC,AA1BD,CAA4B,oBAAoB,GA0B/C;AAED,2BAA2B;AAE3B,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,MAAM,IAAI,aAAa,EACvB,OAAO,IAAI,cAAc,EAC1B,CAAC;AACF,cAAc,cAAc,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"./models\";\nimport * as Mappers from \"./models/mappers\";\nimport * as operations from \"./operations\";\nimport { StorageClientContext } from \"./storageClientContext\";\n\nclass StorageClient extends StorageClientContext {\n // Operation groups\n service: operations.Service;\n container: operations.Container;\n directory: operations.Directory;\n blob: operations.Blob;\n pageBlob: operations.PageBlob;\n appendBlob: operations.AppendBlob;\n blockBlob: operations.BlockBlob;\n\n /**\n * Initializes a new instance of the StorageClient class.\n * @param url The URL of the service account, container, or blob that is the targe of the desired\n * operation.\n * @param [options] The parameter options\n */\n constructor(url: string, options?: coreHttp.ServiceClientOptions) {\n super(url, options);\n this.service = new operations.Service(this);\n this.container = new operations.Container(this);\n this.directory = new operations.Directory(this);\n this.blob = new operations.Blob(this);\n this.pageBlob = new operations.PageBlob(this);\n this.appendBlob = new operations.AppendBlob(this);\n this.blockBlob = new operations.BlockBlob(this);\n }\n}\n\n// Operation Specifications\n\nexport {\n StorageClient,\n StorageClientContext,\n Models as StorageModels,\n Mappers as StorageMappers\n};\nexport * from \"./operations\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js new file mode 100644 index 000000000..4fb52a901 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +import { __extends } from "tslib"; +import * as coreHttp from "@azure/core-http"; +var packageName = "azure-storage-blob"; +var packageVersion = "12.3.0"; +var StorageClientContext = /** @class */ (function (_super) { + __extends(StorageClientContext, _super); + /** + * Initializes a new instance of the StorageClientContext class. + * @param url The URL of the service account, container, or blob that is the targe of the desired + * operation. + * @param [options] The parameter options + */ + function StorageClientContext(url, options) { + var _this = this; + if (url == undefined) { + throw new Error("'url' cannot be null."); + } + if (!options) { + options = {}; + } + if (!options.userAgent) { + var defaultUserAgent = coreHttp.getDefaultUserAgentValue(); + options.userAgent = packageName + "/" + packageVersion + " " + defaultUserAgent; + } + _this = _super.call(this, undefined, options) || this; + _this.version = "2020-02-10"; + _this.baseUri = "{url}"; + _this.requestContentType = "application/json; charset=utf-8"; + _this.url = url; + return _this; + } + return StorageClientContext; +}(coreHttp.ServiceClient)); +export { StorageClientContext }; +//# sourceMappingURL=storageClientContext.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map new file mode 100644 index 000000000..075c7ac9b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"storageClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/storageClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,IAAM,WAAW,GAAG,oBAAoB,CAAC;AACzC,IAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC;IAA0C,wCAAsB;IAI9D;;;;;OAKG;IACH,8BAAY,GAAW,EAAE,OAAuC;QAAhE,iBAoBC;QAnBC,IAAI,GAAG,IAAI,SAAS,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;SAC1C;QAED,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QAED,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACtB,IAAM,gBAAgB,GAAG,QAAQ,CAAC,wBAAwB,EAAE,CAAC;YAC7D,OAAO,CAAC,SAAS,GAAM,WAAW,SAAI,cAAc,SAAI,gBAAkB,CAAC;SAC5E;QAED,QAAA,kBAAM,SAAS,EAAE,OAAO,CAAC,SAAC;QAE1B,KAAI,CAAC,OAAO,GAAG,YAAY,CAAC;QAC5B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,kBAAkB,GAAG,iCAAiC,CAAC;QAC5D,KAAI,CAAC,GAAG,GAAG,GAAG,CAAC;;IACjB,CAAC;IACH,2BAAC;AAAD,CAAC,AA/BD,CAA0C,QAAQ,CAAC,aAAa,GA+B/D","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\nconst packageName = \"azure-storage-blob\";\nconst packageVersion = \"12.3.0\";\n\nexport class StorageClientContext extends coreHttp.ServiceClient {\n url: string;\n version: string;\n\n /**\n * Initializes a new instance of the StorageClientContext class.\n * @param url The URL of the service account, container, or blob that is the targe of the desired\n * operation.\n * @param [options] The parameter options\n */\n constructor(url: string, options?: coreHttp.ServiceClientOptions) {\n if (url == undefined) {\n throw new Error(\"'url' cannot be null.\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (!options.userAgent) {\n const defaultUserAgent = coreHttp.getDefaultUserAgentValue();\n options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;\n }\n\n super(undefined, options);\n\n this.version = \"2020-02-10\";\n this.baseUri = \"{url}\";\n this.requestContentType = \"application/json; charset=utf-8\";\n this.url = url;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js new file mode 100644 index 000000000..71106c3a1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +//# sourceMappingURL=generatedModels.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js.map new file mode 100644 index 000000000..3007164f8 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/generatedModels.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generatedModels.js","sourceRoot":"","sources":["../../../src/generatedModels.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport {\n AccessPolicy,\n AccessTier,\n AccountKind,\n AppendBlobCreateResponse,\n AppendBlobAppendBlockResponse,\n AppendBlobAppendBlockFromUrlHeaders,\n AppendBlobAppendBlockFromUrlResponse,\n AppendBlobAppendBlockHeaders,\n AppendBlobCreateHeaders,\n ArchiveStatus,\n ListBlobsFlatSegmentResponse as ListBlobsFlatSegmentResponseModel,\n BlobItemInternal,\n BlobFlatListSegment as BlobFlatListSegmentModel,\n BlobAbortCopyFromURLHeaders,\n BlobCopyFromURLHeaders,\n BlobCreateSnapshotHeaders,\n BlobDeleteHeaders,\n BlobDeleteResponse,\n BlobDownloadOptionalParams,\n BlobGetPropertiesHeaders,\n BlobGetPropertiesResponse as BlobGetPropertiesResponseModel,\n BlobPropertiesInternal as BlobProperties,\n BlobUndeleteResponse,\n BlobHTTPHeaders,\n BlobSetHTTPHeadersResponse,\n BlobSetMetadataResponse,\n BlobSetTagsResponse,\n BlobCreateSnapshotResponse,\n BlobStartCopyFromURLHeaders,\n BlobStartCopyFromURLResponse,\n BlobAbortCopyFromURLResponse,\n BlobCopyFromURLResponse,\n BlobSetHTTPHeadersHeaders,\n BlobSetMetadataHeaders,\n BlobSetTierHeaders,\n BlobSetTierResponse,\n BlobSetTagsHeaders,\n BlobPrefix,\n BlobDownloadHeaders,\n BlobDownloadResponse as BlobDownloadResponseModel,\n BlobType,\n BlobTags,\n BlobUndeleteHeaders,\n Block,\n BlockBlobCommitBlockListHeaders,\n BlockBlobUploadHeaders,\n BlockBlobUploadResponse,\n BlockBlobStageBlockResponse,\n BlockBlobStageBlockFromURLResponse,\n BlockBlobCommitBlockListResponse,\n BlockBlobGetBlockListHeaders,\n BlockBlobStageBlockFromURLHeaders,\n BlockBlobStageBlockHeaders,\n BlockList,\n BlockListType,\n BlockBlobGetBlockListResponse,\n BlobServiceProperties,\n BlobServiceStatistics,\n BlobGetTagsHeaders,\n BlobTag,\n ContainerCreateHeaders,\n ContainerCreateResponse,\n ContainerDeleteHeaders,\n ContainerDeleteResponse,\n ContainerGetAccessPolicyHeaders,\n ContainerGetPropertiesHeaders,\n ContainerBreakLeaseOptionalParams,\n ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobHierarchySegmentHeaders,\n ContainerGetPropertiesResponse,\n ContainerProperties,\n ContainerSetMetadataResponse,\n ContainerSetAccessPolicyHeaders,\n ContainerSetAccessPolicyResponse,\n ContainerSetMetadataHeaders,\n CopyStatusType,\n CorsRule,\n CpkInfo,\n DeleteSnapshotsOptionType,\n EncryptionAlgorithmType,\n GeoReplication,\n GeoReplicationStatusType,\n LeaseAccessConditions,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n ListBlobsHierarchySegmentResponse as ListBlobsHierarchySegmentResponseModel,\n BlobHierarchyListSegment as BlobHierarchyListSegmentModel,\n ListBlobsIncludeItem,\n ListContainersIncludeType,\n ListContainersSegmentResponse,\n FilterBlobSegment,\n ServiceFilterBlobsHeaders,\n Logging,\n Metrics,\n ModifiedAccessConditions as ModifiedAccessConditionsModel,\n PublicAccessType,\n PageBlobCreateResponse,\n PageBlobUploadPagesResponse,\n PageBlobUploadPagesFromURLResponse,\n PageBlobClearPagesHeaders,\n PageBlobClearPagesResponse,\n PageBlobCopyIncrementalHeaders,\n PageBlobCreateHeaders,\n PageBlobGetPageRangesHeaders,\n PageBlobGetPageRangesResponse,\n PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesDiffResponse,\n PageBlobResizeHeaders,\n PageBlobResizeResponse,\n PageBlobUpdateSequenceNumberHeaders,\n PageBlobUpdateSequenceNumberResponse,\n PageBlobUploadPagesFromURLHeaders,\n PageBlobUploadPagesHeaders,\n PageBlobCopyIncrementalResponse,\n SequenceNumberActionType,\n RehydratePriority,\n RetentionPolicy,\n AppendPositionAccessConditions,\n ServiceGetUserDelegationKeyHeaders,\n ServiceSubmitBatchHeaders,\n ServiceGetAccountInfoHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetPropertiesResponse,\n ServiceGetStatisticsHeaders,\n SequenceNumberAccessConditions,\n ServiceSetPropertiesResponse,\n ServiceGetStatisticsResponse,\n ServiceGetAccountInfoResponse,\n ServiceListContainersSegmentHeaders,\n ServiceListContainersSegmentResponse,\n ServiceSetPropertiesHeaders,\n SkuName,\n StaticWebsite,\n SyncCopyStatusType,\n ContainerItem,\n ServiceSubmitBatchResponse as ServiceSubmitBatchResponseModel,\n ServiceSubmitBatchOptionalParams as ServiceSubmitBatchOptionalParamsModel,\n SignedIdentifier as SignedIdentifierModel,\n UserDelegationKey as UserDelegationKeyModel,\n ContainerEncryptionScope,\n ServiceFilterBlobsResponse as ServiceFindBlobsByTagsSegmentResponse,\n FilterBlobItem,\n BlobQueryHeaders,\n BlobQueryResponse as BlobQueryResponseModel,\n ContainerRestoreResponse as ContainerUndeleteResponse,\n ContainerRestoreHeaders as ContainerUndeleteHeaders\n} from \"./generated/src/models\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js new file mode 100644 index 000000000..82e647406 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { RestError } from "@azure/core-http"; +export * from "./BlobServiceClient"; +export * from "./Clients"; +export * from "./BlobBatch"; +export * from "./BlobBatchClient"; +export * from "./BatchResponse"; +export * from "./StorageBrowserPolicyFactory"; +export * from "./credentials/AnonymousCredential"; +export * from "./credentials/Credential"; +export { BlockBlobTier, PremiumPageBlobTier } from "./models"; +export * from "./Pipeline"; +export * from "./policies/AnonymousCredentialPolicy"; +export * from "./policies/CredentialPolicy"; +export * from "./StorageRetryPolicyFactory"; +export * from "./generatedModels"; +export { RestError }; +export { logger } from "./log"; +//# sourceMappingURL=index.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js.map new file mode 100644 index 000000000..2f0e7c5e7 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../src/index.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EACL,aAAa,EACb,mBAAmB,EAMpB,MAAM,UAAU,CAAC;AAClB,cAAc,YAAY,CAAC;AAC3B,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,CAAC;AAMrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-http\";\n\nexport * from \"./BlobServiceClient\";\nexport * from \"./Clients\";\nexport * from \"./BlobBatch\";\nexport * from \"./BlobBatchClient\";\nexport * from \"./BatchResponse\";\nexport * from \"./StorageBrowserPolicyFactory\";\nexport * from \"./credentials/AnonymousCredential\";\nexport * from \"./credentials/Credential\";\nexport { SasIPRange } from \"./sas/SasIPRange\";\nexport { Range } from \"./Range\";\nexport {\n BlockBlobTier,\n PremiumPageBlobTier,\n Tags,\n TagConditions,\n ContainerRequestConditions,\n ModificationConditions,\n MatchConditions\n} from \"./models\";\nexport * from \"./Pipeline\";\nexport * from \"./policies/AnonymousCredentialPolicy\";\nexport * from \"./policies/CredentialPolicy\";\nexport * from \"./StorageRetryPolicyFactory\";\nexport { CommonOptions } from \"./StorageClient\";\nexport * from \"./generatedModels\";\nexport { RestError };\nexport {\n PageBlobGetPageRangesDiffResponse,\n PageBlobGetPageRangesResponse,\n PageList\n} from \"./PageBlobRangeResponse\";\nexport { logger } from \"./log\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js new file mode 100644 index 000000000..a97be334b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { RestError } from "@azure/core-http"; +export * from "./BlobServiceClient"; +export * from "./Clients"; +export * from "./sas/AccountSASPermissions"; +export * from "./sas/AccountSASResourceTypes"; +export * from "./sas/AccountSASServices"; +export * from "./sas/AccountSASSignatureValues"; +export * from "./BlobBatch"; +export * from "./BlobBatchClient"; +export * from "./BatchResponse"; +export * from "./sas/BlobSASPermissions"; +export * from "./sas/BlobSASSignatureValues"; +export * from "./StorageBrowserPolicyFactory"; +export * from "./sas/ContainerSASPermissions"; +export * from "./credentials/AnonymousCredential"; +export * from "./credentials/Credential"; +export * from "./credentials/StorageSharedKeyCredential"; +export { BlockBlobTier, PremiumPageBlobTier } from "./models"; +export * from "./Pipeline"; +export * from "./policies/AnonymousCredentialPolicy"; +export * from "./policies/CredentialPolicy"; +export * from "./StorageRetryPolicyFactory"; +export * from "./policies/StorageSharedKeyCredentialPolicy"; +export * from "./sas/SASQueryParameters"; +export * from "./generatedModels"; +export { RestError }; +export { logger } from "./log"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js.map new file mode 100644 index 000000000..41b524f8d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0CAA0C,CAAC;AAGzD,OAAO,EACL,aAAa,EACb,mBAAmB,EAQpB,MAAM,UAAU,CAAC;AAClB,cAAc,YAAY,CAAC;AAC3B,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0BAA0B,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAYlC,OAAO,EAAE,SAAS,EAAE,CAAC;AAMrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-http\";\n\nexport { PollerLike, PollOperationState } from \"@azure/core-lro\";\nexport * from \"./BlobServiceClient\";\nexport * from \"./Clients\";\nexport * from \"./sas/AccountSASPermissions\";\nexport * from \"./sas/AccountSASResourceTypes\";\nexport * from \"./sas/AccountSASServices\";\nexport * from \"./sas/AccountSASSignatureValues\";\nexport * from \"./BlobBatch\";\nexport * from \"./BlobBatchClient\";\nexport * from \"./BatchResponse\";\nexport * from \"./sas/BlobSASPermissions\";\nexport * from \"./sas/BlobSASSignatureValues\";\nexport * from \"./StorageBrowserPolicyFactory\";\nexport * from \"./sas/ContainerSASPermissions\";\nexport * from \"./credentials/AnonymousCredential\";\nexport * from \"./credentials/Credential\";\nexport * from \"./credentials/StorageSharedKeyCredential\";\nexport { SasIPRange } from \"./sas/SasIPRange\";\nexport { Range } from \"./Range\";\nexport {\n BlockBlobTier,\n PremiumPageBlobTier,\n Tags,\n BlobDownloadResponseParsed,\n ObjectReplicationPolicy,\n ObjectReplicationRule,\n ObjectReplicationStatus,\n BlobQueryArrowField,\n BlobQueryArrowFieldType\n} from \"./models\";\nexport * from \"./Pipeline\";\nexport * from \"./policies/AnonymousCredentialPolicy\";\nexport * from \"./policies/CredentialPolicy\";\nexport * from \"./StorageRetryPolicyFactory\";\nexport * from \"./policies/StorageSharedKeyCredentialPolicy\";\nexport * from \"./sas/SASQueryParameters\";\nexport { CommonOptions } from \"./StorageClient\";\nexport * from \"./generatedModels\";\nexport {\n AppendBlobRequestConditions,\n BlobRequestConditions,\n Metadata,\n PageBlobRequestConditions,\n TagConditions,\n ContainerRequestConditions,\n ModificationConditions,\n MatchConditions,\n ModifiedAccessConditions\n} from \"./models\";\nexport { RestError };\nexport {\n PageBlobGetPageRangesDiffResponse,\n PageBlobGetPageRangesResponse,\n PageList\n} from \"./PageBlobRangeResponse\";\nexport { logger } from \"./log\";\nexport {\n BlobBeginCopyFromUrlPollState,\n CopyPollerBlobClient\n} from \"./pollers/BlobStartCopyFromUrlPoller\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js new file mode 100644 index 000000000..107d534f1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { createClientLogger } from "@azure/logger"; +/** + * The @azure/logger configuration for this package. + */ +export var logger = createClientLogger("storage-blob"); +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js.map new file mode 100644 index 000000000..4940efaf0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/log.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,IAAM,MAAM,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The @azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"storage-blob\");\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js new file mode 100644 index 000000000..ea137da15 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { EncryptionAlgorithmAES25 } from "./utils/constants"; +/** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ +export var BlockBlobTier; +(function (BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; +})(BlockBlobTier || (BlockBlobTier = {})); +/** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ +export var PremiumPageBlobTier; +(function (PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; +})(PremiumPageBlobTier || (PremiumPageBlobTier = {})); +export function toAccessTier(tier) { + if (tier == undefined) { + return undefined; + } + return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). +} +export function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) { + throw new RangeError("Customer-provided encryption key must be used over HTTPS."); + } + if (cpk && !cpk.encryptionAlgorithm) { + cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + } +} +//# sourceMappingURL=models.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js.map new file mode 100644 index 000000000..ede643982 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/models.js.map @@ -0,0 +1 @@ +{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAUlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAyF7D;;;GAGG;AACH,MAAM,CAAN,IAAY,aAcX;AAdD,WAAY,aAAa;IACvB;;OAEG;IACH,4BAAW,CAAA;IACX;;OAEG;IACH,8BAAa,CAAA;IACb;;;OAGG;IACH,oCAAmB,CAAA;AACrB,CAAC,EAdW,aAAa,KAAb,aAAa,QAcxB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,mBA6CX;AA7CD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,gCAAS,CAAA;IACT;;OAEG;IACH,gCAAS,CAAA;IACT;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;IACX;;OAEG;IACH,kCAAW,CAAA;AACb,CAAC,EA7CW,mBAAmB,KAAnB,mBAAmB,QA6C9B;AAED,MAAM,UAAU,YAAY,CAC1B,IAA8D;IAE9D,IAAI,IAAI,IAAI,SAAS,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,IAAkB,CAAC,CAAC,qGAAqG;AAClI,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,GAAwB,EAAE,OAAgB;IAC7E,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;QACnB,MAAM,IAAI,UAAU,CAAC,2DAA2D,CAAC,CAAC;KACnF;IAED,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE;QACnC,GAAG,CAAC,mBAAmB,GAAG,wBAAwB,CAAC;KACpD;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n LeaseAccessConditions,\n SequenceNumberAccessConditions,\n AppendPositionAccessConditions,\n AccessTier,\n CpkInfo,\n BlobDownloadResponseModel\n} from \"./generatedModels\";\nimport { EncryptionAlgorithmAES25 } from \"./utils/constants\";\n\n/**\n * Blob tags.\n */\nexport type Tags = Record;\n\n/**\n * A map of name-value pairs to associate with the resource.\n */\nexport interface Metadata {\n /**\n * A name-value pair.\n */\n [propertyName: string]: string;\n}\n\n/**\n * standard HTTP conditional headers and tags condition.\n */\nexport interface ModifiedAccessConditions\n extends MatchConditions,\n ModificationConditions,\n TagConditions {}\n\n/**\n * standard HTTP conditional headers, tags condition and lease condition\n */\nexport interface BlobRequestConditions extends ModifiedAccessConditions, LeaseAccessConditions {}\n\n/**\n * Conditions to add to the creation of this page blob.\n */\nexport interface PageBlobRequestConditions\n extends BlobRequestConditions,\n SequenceNumberAccessConditions {}\n\n/**\n * Conditions to add to the creation of this append blob.\n */\nexport interface AppendBlobRequestConditions\n extends BlobRequestConditions,\n AppendPositionAccessConditions {}\n\n/**\n * Specifies HTTP options for conditional requests based on modification time.\n */\nexport interface ModificationConditions {\n /**\n * Specify this header value to operate only on a blob if it has been modified since the\n * specified date/time.\n */\n ifModifiedSince?: Date;\n /**\n * Specify this header value to operate only on a blob if it has not been modified since the\n * specified date/time.\n */\n ifUnmodifiedSince?: Date;\n}\n\n/**\n * Specifies HTTP options for conditional requests based on ETag matching.\n */\nexport interface MatchConditions {\n /**\n * Specify an ETag value to operate only on blobs with a matching value.\n */\n ifMatch?: string;\n /**\n * Specify an ETag value to operate only on blobs without a matching value.\n */\n ifNoneMatch?: string;\n}\n\n/**\n * Specifies HTTP options for conditional requests based on blob tags.\n */\nexport interface TagConditions {\n /**\n * Optional SQL statement to apply to the tags of the blob.\n */\n tagConditions?: string;\n}\n\n/**\n * Conditions to meet for the container.\n */\nexport interface ContainerRequestConditions extends LeaseAccessConditions, ModificationConditions {}\n\n/**\n * Represents the access tier on a blob.\n * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}\n */\nexport enum BlockBlobTier {\n /**\n * Optimized for storing data that is accessed frequently.\n */\n Hot = \"Hot\",\n /**\n * Optimized for storing data that is infrequently accessed and stored for at least 30 days.\n */\n Cool = \"Cool\",\n /**\n * Optimized for storing data that is rarely accessed and stored for at least 180 days\n * with flexible latency requirements (on the order of hours).\n */\n Archive = \"Archive\"\n}\n\n/**\n * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.\n * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}\n * for detailed information on the corresponding IOPS and throughput per PageBlobTier.\n */\nexport enum PremiumPageBlobTier {\n /**\n * P4 Tier.\n */\n P4 = \"P4\",\n /**\n * P6 Tier.\n */\n P6 = \"P6\",\n /**\n * P10 Tier.\n */\n P10 = \"P10\",\n /**\n * P15 Tier.\n */\n P15 = \"P15\",\n /**\n * P20 Tier.\n */\n P20 = \"P20\",\n /**\n * P30 Tier.\n */\n P30 = \"P30\",\n /**\n * P40 Tier.\n */\n P40 = \"P40\",\n /**\n * P50 Tier.\n */\n P50 = \"P50\",\n /**\n * P60 Tier.\n */\n P60 = \"P60\",\n /**\n * P70 Tier.\n */\n P70 = \"P70\",\n /**\n * P80 Tier.\n */\n P80 = \"P80\"\n}\n\nexport function toAccessTier(\n tier: BlockBlobTier | PremiumPageBlobTier | string | undefined\n): AccessTier | undefined {\n if (tier == undefined) {\n return undefined;\n }\n\n return tier as AccessTier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service).\n}\n\nexport function ensureCpkIfSpecified(cpk: CpkInfo | undefined, isHttps: boolean) {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n\n/**\n * Specifies the Replication Status of a blob. This is used when a storage account has\n * Object Replication Policy(s) applied. See {@link ObjectReplicationPolicy} and {@link ObjectReplicationRule}.\n */\nexport type ObjectReplicationStatus = \"complete\" | \"failed\";\n\n/**\n * Contains the Object Replication Rule ID and {@link ObjectReplicationStatus} of a blob.\n * There can be more than one {@link ObjectReplicationRule} under a {@link ObjectReplicationPolicy}.\n */\nexport interface ObjectReplicationRule {\n /**\n * The Object Replication Rule ID.\n *\n * @type {string}\n * @memberof ObjectReplicationRule\n */\n ruleId: string;\n\n /**\n * The Replication Status\n *\n * @type {ObjectReplicationStatus}\n * @memberof ObjectReplicationRule\n */\n replicationStatus: ObjectReplicationStatus;\n}\n\n/**\n * Contains Object Replication Policy ID and the respective list of {@link ObjectReplicationRule}.\n * This is used when retrieving the Object Replication Properties on the source blob. The policy id for the\n * destination blob is set in ObjectReplicationDestinationPolicyId of the respective method responses\n * (e.g. {@link BlobProperties.ObjectReplicationDestinationPolicyId}.\n *\n * @export\n * @interface ObjectReplicationPolicy\n */\nexport interface ObjectReplicationPolicy {\n /**\n * The Object Replication Policy ID.\n *\n * @type {string}\n * @memberof ObjectReplicationPolicy\n */\n policyId: string;\n\n /**\n * The Rule ID(s) and respective Replication Status(s) that are under the Policy ID.\n *\n * @type {ObjectReplicationRule[]}\n * @memberof ObjectReplicationPolicy\n */\n rules: ObjectReplicationRule[];\n}\n\n/**\n * Contains response data for the {@link BlobClient.download} operation.\n *\n * @export\n * @interface BlobDownloadResponseParsed\n */\nexport interface BlobDownloadResponseParsed extends BlobDownloadResponseModel {\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @type {ObjectReplicationPolicy[]}\n * @memberof BlobDownloadResponseParsed\n */\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @type {string}\n * @memberof BlobDownloadResponseParsed\n */\n objectReplicationDestinationPolicyId?: string;\n}\n\n/**\n * The type of a {@link BlobQueryArrowField}.\n */\nexport type BlobQueryArrowFieldType =\n | \"int64\"\n | \"bool\"\n | \"timestamp[ms]\"\n | \"string\"\n | \"double\"\n | \"decimal\";\n\n/**\n * Describe a field in {@link BlobQueryArrowConfiguration}.\n *\n * @export\n * @interface BlobQueryArrowField\n */\nexport interface BlobQueryArrowField {\n /**\n * The type of the field.\n *\n * @type {BlobQueryArrowFieldType}\n * @memberof BlobQueryArrowField\n */\n type: BlobQueryArrowFieldType;\n\n /**\n * The name of the field.\n *\n * @type {string}\n * @memberof BlobQueryArrowField\n */\n name?: string;\n\n /**\n * The precision of the field. Required if type is \"decimal\".\n *\n * @type {number}\n * @memberof BlobQueryArrowField\n */\n precision?: number;\n\n /**\n * The scale of the field. Required if type is is \"decimal\".\n *\n * @type {number}\n * @memberof BlobQueryArrowField\n */\n scale?: number;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js new file mode 100644 index 000000000..8cf607c80 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { CredentialPolicy } from "./CredentialPolicy"; +/** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + * + * @export + * @class AnonymousCredentialPolicy + * @extends {CredentialPolicy} + */ +var AnonymousCredentialPolicy = /** @class */ (function (_super) { + __extends(AnonymousCredentialPolicy, _super); + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof AnonymousCredentialPolicy + */ + function AnonymousCredentialPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + return AnonymousCredentialPolicy; +}(CredentialPolicy)); +export { AnonymousCredentialPolicy }; +//# sourceMappingURL=AnonymousCredentialPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map new file mode 100644 index 000000000..43f10738b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnonymousCredentialPolicy.js","sourceRoot":"","sources":["../../../../src/policies/AnonymousCredentialPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;GAOG;AACH;IAA+C,6CAAgB;IAC7D;;;;;OAKG;IACH,mCAAY,UAAyB,EAAE,OAA6B;eAClE,kBAAM,UAAU,EAAE,OAAO,CAAC;IAC5B,CAAC;IACH,gCAAC;AAAD,CAAC,AAVD,CAA+C,gBAAgB,GAU9D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { CredentialPolicy } from \"./CredentialPolicy\";\n\n/**\n * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources\n * or for use with Shared Access Signatures (SAS).\n *\n * @export\n * @class AnonymousCredentialPolicy\n * @extends {CredentialPolicy}\n */\nexport class AnonymousCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of AnonymousCredentialPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @memberof AnonymousCredentialPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js new file mode 100644 index 000000000..43dbd6b57 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { BaseRequestPolicy } from "@azure/core-http"; +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + * + * @export + * @abstract + * @class CredentialPolicy + * @extends {BaseRequestPolicy} + */ +var CredentialPolicy = /** @class */ (function (_super) { + __extends(CredentialPolicy, _super); + function CredentialPolicy() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof CredentialPolicy + */ + CredentialPolicy.prototype.sendRequest = function (request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + }; + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @protected + * @abstract + * @param {WebResource} request + * @returns {WebResource} + * @memberof CredentialPolicy + */ + CredentialPolicy.prototype.signRequest = function (request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + }; + return CredentialPolicy; +}(BaseRequestPolicy)); +export { CredentialPolicy }; +//# sourceMappingURL=CredentialPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map new file mode 100644 index 000000000..aa73d87bb --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CredentialPolicy.js","sourceRoot":"","sources":["../../../../src/policies/CredentialPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,iBAAiB,EAAsC,MAAM,kBAAkB,CAAC;AAEzF;;;;;;;;GAQG;AACH;IAA+C,oCAAiB;IAAhE;;IA2BA,CAAC;IA1BC;;;;;;OAMG;IACI,sCAAW,GAAlB,UAAmB,OAAoB;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACO,sCAAW,GAArB,UAAsB,OAAoB;QACxC,4EAA4E;QAC5E,qCAAqC;QACrC,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,uBAAC;AAAD,CAAC,AA3BD,CAA+C,iBAAiB,GA2B/D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { BaseRequestPolicy, HttpOperationResponse, WebResource } from \"@azure/core-http\";\n\n/**\n * Credential policy used to sign HTTP(S) requests before sending. This is an\n * abstract class.\n *\n * @export\n * @abstract\n * @class CredentialPolicy\n * @extends {BaseRequestPolicy}\n */\nexport abstract class CredentialPolicy extends BaseRequestPolicy {\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof CredentialPolicy\n */\n public sendRequest(request: WebResource): Promise {\n return this._nextPolicy.sendRequest(this.signRequest(request));\n }\n\n /**\n * Child classes must implement this method with request signing. This method\n * will be executed in {@link sendRequest}.\n *\n * @protected\n * @abstract\n * @param {WebResource} request\n * @returns {WebResource}\n * @memberof CredentialPolicy\n */\n protected signRequest(request: WebResource): WebResource {\n // Child classes must override this method with request signing. This method\n // will be executed in sendRequest().\n return request;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js new file mode 100644 index 000000000..d17945b33 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy, isNode } from "@azure/core-http"; +import { HeaderConstants, URLConstants } from "../utils/constants"; +import { setURLParameter } from "../utils/utils.common"; +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + * + * @class StorageBrowserPolicy + * @extends {BaseRequestPolicy} + */ +var StorageBrowserPolicy = /** @class */ (function (_super) { + __extends(StorageBrowserPolicy, _super); + /** + * Creates an instance of StorageBrowserPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof StorageBrowserPolicy + */ + function StorageBrowserPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageBrowserPolicy + */ + StorageBrowserPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (isNode) { + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + } + request.headers.remove(HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.remove(HeaderConstants.CONTENT_LENGTH); + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return StorageBrowserPolicy; +}(BaseRequestPolicy)); +export { StorageBrowserPolicy }; +//# sourceMappingURL=StorageBrowserPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map new file mode 100644 index 000000000..18fc667ee --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageBrowserPolicy.js","sourceRoot":"","sources":["../../../../src/policies/StorageBrowserPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EAEjB,MAAM,EAIP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH;IAA0C,wCAAiB;IACzD;;;;;OAKG;IACH,8BAAY,UAAyB,EAAE,OAA6B;eAClE,kBAAM,UAAU,EAAE,OAAO,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACU,0CAAW,GAAxB,UAAyB,OAAoB;;;gBAC3C,IAAI,MAAM,EAAE;oBACV,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;iBAC9C;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE;oBACrF,OAAO,CAAC,GAAG,GAAG,eAAe,CAC3B,OAAO,CAAC,GAAG,EACX,YAAY,CAAC,UAAU,CAAC,sBAAsB,EAC9C,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAChC,CAAC;iBACH;gBAED,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;gBAE/C,oFAAoF;gBACpF,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;gBAEvD,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,2BAAC;AAAD,CAAC,AAtCD,CAA0C,iBAAiB,GAsC1D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n HttpOperationResponse,\n isNode,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource\n} from \"@azure/core-http\";\n\nimport { HeaderConstants, URLConstants } from \"../utils/constants\";\nimport { setURLParameter } from \"../utils/utils.common\";\n\n/**\n * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:\n *\n * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.\n * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL\n * thus avoid the browser cache.\n *\n * 2. Remove cookie header for security\n *\n * 3. Remove content-length header to avoid browsers warning\n *\n * @class StorageBrowserPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class StorageBrowserPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of StorageBrowserPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @memberof StorageBrowserPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof StorageBrowserPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n if (isNode) {\n return this._nextPolicy.sendRequest(request);\n }\n\n if (request.method.toUpperCase() === \"GET\" || request.method.toUpperCase() === \"HEAD\") {\n request.url = setURLParameter(\n request.url,\n URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,\n new Date().getTime().toString()\n );\n }\n\n request.headers.remove(HeaderConstants.COOKIE);\n\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.remove(HeaderConstants.CONTENT_LENGTH);\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js new file mode 100644 index 000000000..ec1704c06 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __extends, __generator } from "tslib"; +import { AbortError } from "@azure/abort-controller"; +import { BaseRequestPolicy } from "@azure/core-http"; +import { URLConstants } from "../utils/constants"; +import { delay, setURLHost, setURLParameter } from "../utils/utils.common"; +import { logger } from "../log"; +/** + * A factory method used to generated a RetryPolicy factory. + * + * @export + * @param {StorageRetryOptions} retryOptions + * @returns + */ +export function NewRetryPolicyFactory(retryOptions) { + return { + create: function (nextPolicy, options) { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; +} +/** + * RetryPolicy types. + * + * @export + * @enum {number} + */ +export var StorageRetryPolicyType; +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(StorageRetryPolicyType || (StorageRetryPolicyType = {})); +// Default values of StorageRetryOptions +var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined // Use server side default timeout strategy +}; +var RETRY_ABORT_ERROR = new AbortError("The operation was aborted."); +/** + * Retry policy with exponential retry and linear retry implemented. + * + * @class RetryPolicy + * @extends {BaseRequestPolicy} + */ +var StorageRetryPolicy = /** @class */ (function (_super) { + __extends(StorageRetryPolicy, _super); + /** + * Creates an instance of RetryPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] + * @memberof StorageRetryPolicy + */ + function StorageRetryPolicy(nextPolicy, options, retryOptions) { + if (retryOptions === void 0) { retryOptions = DEFAULT_RETRY_OPTIONS; } + var _this = _super.call(this, nextPolicy, options) || this; + // Initialize retry options + _this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + return _this; + } + /** + * Sends request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.attemptSendRequest(request, false, 1)]; + }); + }); + }; + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @protected + * @param {WebResource} request + * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.attemptSendRequest = function (request, secondaryHas404, attempt) { + return __awaiter(this, void 0, void 0, function () { + var newRequest, isPrimaryRetry, response, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + newRequest = request.clone(); + isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + } + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + logger.info("RetryPolicy: =====> Try=" + attempt + " " + (isPrimaryRetry ? "Primary" : "Secondary")); + return [4 /*yield*/, this._nextPolicy.sendRequest(newRequest)]; + case 2: + response = _a.sent(); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return [2 /*return*/, response]; + } + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + logger.error("RetryPolicy: Caught error, message: " + err_1.message + ", code: " + err_1.code); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err_1)) { + throw err_1; + } + return [3 /*break*/, 4]; + case 4: return [4 /*yield*/, this.delay(isPrimaryRetry, attempt, request.abortSignal)]; + case 5: + _a.sent(); + return [4 /*yield*/, this.attemptSendRequest(request, secondaryHas404, ++attempt)]; + case 6: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @protected + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {HttpOperationResponse} [response] + * @param {RestError} [err] + * @returns {boolean} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.shouldRetry = function (isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + logger.info("RetryPolicy: Attempt(s) " + attempt + " >= maxTries " + this.retryOptions + .maxTries + ", no further try."); + return false; + } + // Handle network failures, you may need to customize the list when you implement + // your own http client + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (var _i = 0, retriableErrors_1 = retriableErrors; _i < retriableErrors_1.length; _i++) { + var retriableError = retriableErrors_1[_i]; + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && + err.code + .toString() + .toUpperCase() + .includes(retriableError))) { + logger.info("RetryPolicy: Network error " + retriableError + " found, will retry."); + return true; + } + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + var statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + logger.info("RetryPolicy: Secondary access with 404, will retry."); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + logger.info("RetryPolicy: Will retry for status code " + statusCode + "."); + return true; + } + } + return false; + }; + /** + * Delay a calculated time between retries. + * + * @private + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {AbortSignalLike} [abortSignal] + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.delay = function (isPrimaryRetry, attempt, abortSignal) { + return __awaiter(this, void 0, void 0, function () { + var delayTimeInMs; + return __generator(this, function (_a) { + delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + logger.info("RetryPolicy: Delay for " + delayTimeInMs + "ms"); + return [2 /*return*/, delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR)]; + }); + }); + }; + return StorageRetryPolicy; +}(BaseRequestPolicy)); +export { StorageRetryPolicy }; +//# sourceMappingURL=StorageRetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map new file mode 100644 index 000000000..0923b4f7e --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageRetryPolicy.js","sourceRoot":"","sources":["../../../../src/policies/StorageRetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAEL,iBAAiB,EAOlB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,YAAkC;IACtE,OAAO;QACL,MAAM,EAAE,UAAC,UAAyB,EAAE,OAA6B;YAC/D,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACnE,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,sBASX;AATD,WAAY,sB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AI,CAAC;aACb;YAED,0CAA0C;YAC1C,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,GAAG,EAAE;gBAC5C,MAAM,CAAC,IAAI,CAAC,6CAA2C,UAAU,MAAG,CAAC,CAAC;gBACtE,OAAO,IAAI,CAAC;aACb;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;;OAQG;IACW,kCAAK,GAAnB,UAAoB,cAAuB,EAAE,OAAe,EAAE,WAA6B;;;;gBACrF,aAAa,GAAW,CAAC,CAAC;gBAE9B,IAAI,cAAc,EAAE;oBAClB,QAAQ,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;wBACzC,KAAK,sBAAsB,CAAC,WAAW;4BACrC,aAAa,GAAG,IAAI,CAAC,GAAG,CACtB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,cAAe,EAClE,IAAI,CAAC,YAAY,CAAC,iBAAkB,CACrC,CAAC;4BACF,MAAM;wBACR,KAAK,sBAAsB,CAAC,KAAK;4BAC/B,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,cAAe,CAAC;4BAClD,MAAM;qBACT;iBACF;qBAAM;oBACL,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;iBACtC;gBAED,MAAM,CAAC,IAAI,CAAC,4BAA0B,aAAa,OAAI,CAAC,CAAC;gBACzD,sBAAO,KAAK,CAAC,aAAa,EAAE,WAAW,EAAE,iBAAiB,CAAC,EAAC;;;KAC7D;IACH,yBAAC;AAAD,CAAC,AA9OD,CAAwC,iBAAiB,GA8OxD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AbortError } from \"@azure/abort-controller\";\n\nimport {\n AbortSignalLike,\n BaseRequestPolicy,\n HttpOperationResponse,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n RestError,\n WebResource\n} from \"@azure/core-http\";\n\nimport { StorageRetryOptions } from \"../StorageRetryPolicyFactory\";\nimport { URLConstants } from \"../utils/constants\";\nimport { delay, setURLHost, setURLParameter } from \"../utils/utils.common\";\nimport { logger } from \"../log\";\n\n/**\n * A factory method used to generated a RetryPolicy factory.\n *\n * @export\n * @param {StorageRetryOptions} retryOptions\n * @returns\n */\nexport function NewRetryPolicyFactory(retryOptions?: StorageRetryOptions): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy => {\n return new StorageRetryPolicy(nextPolicy, options, retryOptions);\n }\n };\n}\n\n/**\n * RetryPolicy types.\n *\n * @export\n * @enum {number}\n */\nexport enum StorageRetryPolicyType {\n /**\n * Exponential retry. Retry time delay grows exponentially.\n */\n EXPONENTIAL,\n /**\n * Linear retry. Retry time delay grows linearly.\n */\n FIXED\n}\n\n// Default values of StorageRetryOptions\nconst DEFAULT_RETRY_OPTIONS: StorageRetryOptions = {\n maxRetryDelayInMs: 120 * 1000,\n maxTries: 4,\n retryDelayInMs: 4 * 1000,\n retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,\n secondaryHost: \"\",\n tryTimeoutInMs: undefined // Use server side default timeout strategy\n};\n\nconst RETRY_ABORT_ERROR = new AbortError(\"The operation was aborted.\");\n\n/**\n * Retry policy with exponential retry and linear retry implemented.\n *\n * @class RetryPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class StorageRetryPolicy extends BaseRequestPolicy {\n /**\n * RetryOptions.\n *\n * @private\n * @type {StorageRetryOptions}\n * @memberof StorageRetryPolicy\n */\n private readonly retryOptions: StorageRetryOptions;\n\n /**\n * Creates an instance of RetryPolicy.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS]\n * @memberof StorageRetryPolicy\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n retryOptions: StorageRetryOptions = DEFAULT_RETRY_OPTIONS\n ) {\n super(nextPolicy, options);\n\n // Initialize retry options\n this.retryOptions = {\n retryPolicyType: retryOptions.retryPolicyType\n ? retryOptions.retryPolicyType\n : DEFAULT_RETRY_OPTIONS.retryPolicyType,\n\n maxTries:\n retryOptions.maxTries && retryOptions.maxTries >= 1\n ? Math.floor(retryOptions.maxTries)\n : DEFAULT_RETRY_OPTIONS.maxTries,\n\n tryTimeoutInMs:\n retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0\n ? retryOptions.tryTimeoutInMs\n : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs,\n\n retryDelayInMs:\n retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0\n ? Math.min(\n retryOptions.retryDelayInMs,\n retryOptions.maxRetryDelayInMs\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs!\n )\n : DEFAULT_RETRY_OPTIONS.retryDelayInMs,\n\n maxRetryDelayInMs:\n retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,\n\n secondaryHost: retryOptions.secondaryHost\n ? retryOptions.secondaryHost\n : DEFAULT_RETRY_OPTIONS.secondaryHost\n };\n }\n\n /**\n * Sends request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof StorageRetryPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n return this.attemptSendRequest(request, false, 1);\n }\n\n /**\n * Decide and perform next retry. Won't mutate request parameter.\n *\n * @protected\n * @param {WebResource} request\n * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then\n * the resource was not found. This may be due to replication delay. So, in this\n * case, we'll never try the secondary again for this operation.\n * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes\n * the attempt will be performed by this method call.\n * @returns {Promise}\n * @memberof StorageRetryPolicy\n */\n protected async attemptSendRequest(\n request: WebResource,\n secondaryHas404: boolean,\n attempt: number\n ): Promise {\n const newRequest: WebResource = request.clone();\n\n const isPrimaryRetry =\n secondaryHas404 ||\n !this.retryOptions.secondaryHost ||\n !(request.method === \"GET\" || request.method === \"HEAD\" || request.method === \"OPTIONS\") ||\n attempt % 2 === 1;\n\n if (!isPrimaryRetry) {\n newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost!);\n }\n\n // Set the server-side timeout query parameter \"timeout=[seconds]\"\n if (this.retryOptions.tryTimeoutInMs) {\n newRequest.url = setURLParameter(\n newRequest.url,\n URLConstants.Parameters.TIMEOUT,\n Math.floor(this.retryOptions.tryTimeoutInMs! / 1000).toString()\n );\n }\n\n let response: HttpOperationResponse | undefined;\n try {\n logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? \"Primary\" : \"Secondary\"}`);\n response = await this._nextPolicy.sendRequest(newRequest);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {\n return response;\n }\n\n secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);\n } catch (err) {\n logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {\n throw err;\n }\n }\n\n await this.delay(isPrimaryRetry, attempt, request.abortSignal);\n return await this.attemptSendRequest(request, secondaryHas404, ++attempt);\n }\n\n /**\n * Decide whether to retry according to last HTTP response and retry counters.\n *\n * @protected\n * @param {boolean} isPrimaryRetry\n * @param {number} attempt\n * @param {HttpOperationResponse} [response]\n * @param {RestError} [err]\n * @returns {boolean}\n * @memberof StorageRetryPolicy\n */\n protected shouldRetry(\n isPrimaryRetry: boolean,\n attempt: number,\n response?: HttpOperationResponse,\n err?: RestError\n ): boolean {\n if (attempt >= this.retryOptions.maxTries!) {\n logger.info(\n `RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions\n .maxTries!}, no further try.`\n );\n return false;\n }\n\n // Handle network failures, you may need to customize the list when you implement\n // your own http client\n const retriableErrors = [\n \"ETIMEDOUT\",\n \"ESOCKETTIMEDOUT\",\n \"ECONNREFUSED\",\n \"ECONNRESET\",\n \"ENOENT\",\n \"ENOTFOUND\",\n \"TIMEOUT\",\n \"EPIPE\",\n \"REQUEST_SEND_ERROR\" // For default xhr based http client provided in ms-rest-js\n ];\n if (err) {\n for (const retriableError of retriableErrors) {\n if (\n err.name.toUpperCase().includes(retriableError) ||\n err.message.toUpperCase().includes(retriableError) ||\n (err.code &&\n err.code\n .toString()\n .toUpperCase()\n .includes(retriableError))\n ) {\n logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);\n return true;\n }\n }\n }\n\n // If attempt was against the secondary & it returned a StatusNotFound (404), then\n // the resource was not found. This may be due to replication delay. So, in this\n // case, we'll never try the secondary again for this operation.\n if (response || err) {\n const statusCode = response ? response.status : err ? err.statusCode : 0;\n if (!isPrimaryRetry && statusCode === 404) {\n logger.info(`RetryPolicy: Secondary access with 404, will retry.`);\n return true;\n }\n\n // Server internal error or server timeout\n if (statusCode === 503 || statusCode === 500) {\n logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Delay a calculated time between retries.\n *\n * @private\n * @param {boolean} isPrimaryRetry\n * @param {number} attempt\n * @param {AbortSignalLike} [abortSignal]\n * @memberof StorageRetryPolicy\n */\n private async delay(isPrimaryRetry: boolean, attempt: number, abortSignal?: AbortSignalLike) {\n let delayTimeInMs: number = 0;\n\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min(\n (Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs!,\n this.retryOptions.maxRetryDelayInMs!\n );\n break;\n case StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs!;\n break;\n }\n } else {\n delayTimeInMs = Math.random() * 1000;\n }\n\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js new file mode 100644 index 000000000..641b0ebf4 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { HeaderConstants } from "../utils/constants"; +import { getURLPath, getURLQueries } from "../utils/utils.common"; +import { CredentialPolicy } from "./CredentialPolicy"; +/** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + * + * @export + * @class StorageSharedKeyCredentialPolicy + * @extends {CredentialPolicy} + */ +var StorageSharedKeyCredentialPolicy = /** @class */ (function (_super) { + __extends(StorageSharedKeyCredentialPolicy, _super); + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageSharedKeyCredential} factory + * @memberof StorageSharedKeyCredentialPolicy + */ + function StorageSharedKeyCredentialPolicy(nextPolicy, options, factory) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.factory = factory; + return _this; + } + /** + * Signs request. + * + * @protected + * @param {WebResource} request + * @returns {WebResource} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.signRequest = function (request) { + request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && typeof request.body === "string" && request.body.length > 0) { + request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + var stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, HeaderConstants.DATE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.RANGE) + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + var signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(HeaderConstants.AUTHORIZATION, "SharedKey " + this.factory.accountName + ":" + signature); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; + }; + /** + * Retrieve header value according to shared key sign rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @private + * @param {WebResource} request + * @param {string} headerName + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getHeaderValueToSign = function (request, headerName) { + var value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + }; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getCanonicalizedHeadersString = function (request) { + var headersArray = request.headers.headersArray().filter(function (value) { + return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort(function (a, b) { + return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter(function (value, index, array) { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + var canonicalizedHeadersStringToSign = ""; + headersArray.forEach(function (header) { + canonicalizedHeadersStringToSign += header.name + .toLowerCase() + .trimRight() + ":" + header.value.trimLeft() + "\n"; + }); + return canonicalizedHeadersStringToSign; + }; + /** + * Retrieves the webResource canonicalized resource string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getCanonicalizedResourceString = function (request) { + var path = getURLPath(request.url) || "/"; + var canonicalizedResourceString = ""; + canonicalizedResourceString += "/" + this.factory.accountName + path; + var queries = getURLQueries(request.url); + var lowercaseQueries = {}; + if (queries) { + var queryKeys = []; + for (var key in queries) { + if (queries.hasOwnProperty(key)) { + var lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (var _i = 0, queryKeys_1 = queryKeys; _i < queryKeys_1.length; _i++) { + var key = queryKeys_1[_i]; + canonicalizedResourceString += "\n" + key + ":" + decodeURIComponent(lowercaseQueries[key]); + } + } + return canonicalizedResourceString; + }; + return StorageSharedKeyCredentialPolicy; +}(CredentialPolicy)); +export { StorageSharedKeyCredentialPolicy }; +//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map new file mode 100644 index 000000000..b4e5616db --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StorageSharedKeyCredentialPolicy.js","sourceRoot":"","sources":["../../../../src/policies/StorageSharedKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAIlC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;GAMG;AACH;IAAsD,oDAAgB;IASpE;;;;;;OAMG;IACH,0CACE,UAAyB,EACzB,OAA6B,EAC7B,OAAmC;QAHrC,YAKE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;;IACzB,CAAC;IAED;;;;;;;OAOG;IACO,sDAAW,GAArB,UAAsB,OAAoB;QACxC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAEzE,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/E,OAAO,CAAC,OAAO,C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AAG,SAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAG,CAAC;aACxF;SACF;QAED,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACH,uCAAC;AAAD,CAAC,AAhLD,CAAsD,gBAAgB,GAgLrE","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions, WebResource } from \"@azure/core-http\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { HeaderConstants } from \"../utils/constants\";\nimport { getURLPath, getURLQueries } from \"../utils/utils.common\";\nimport { CredentialPolicy } from \"./CredentialPolicy\";\n\n/**\n * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.\n *\n * @export\n * @class StorageSharedKeyCredentialPolicy\n * @extends {CredentialPolicy}\n */\nexport class StorageSharedKeyCredentialPolicy extends CredentialPolicy {\n /**\n * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy\n *\n * @type {StorageSharedKeyCredential}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private readonly factory: StorageSharedKeyCredential;\n\n /**\n * Creates an instance of StorageSharedKeyCredentialPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {StorageSharedKeyCredential} factory\n * @memberof StorageSharedKeyCredentialPolicy\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n factory: StorageSharedKeyCredential\n ) {\n super(nextPolicy, options);\n this.factory = factory;\n }\n\n /**\n * Signs request.\n *\n * @protected\n * @param {WebResource} request\n * @returns {WebResource}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n protected signRequest(request: WebResource): WebResource {\n request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());\n\n if (request.body && typeof request.body === \"string\" && request.body.length > 0) {\n request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));\n }\n\n const stringToSign: string =\n [\n request.method.toUpperCase(),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),\n this.getHeaderValueToSign(request, HeaderConstants.DATE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.RANGE)\n ].join(\"\\n\") +\n \"\\n\" +\n this.getCanonicalizedHeadersString(request) +\n this.getCanonicalizedResourceString(request);\n\n const signature: string = this.factory.computeHMACSHA256(stringToSign);\n request.headers.set(\n HeaderConstants.AUTHORIZATION,\n `SharedKey ${this.factory.accountName}:${signature}`\n );\n\n // console.log(`[URL]:${request.url}`);\n // console.log(`[HEADERS]:${request.headers.toString()}`);\n // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);\n // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);\n return request;\n }\n\n /**\n * Retrieve header value according to shared key sign rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n *\n * @private\n * @param {WebResource} request\n * @param {string} headerName\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getHeaderValueToSign(request: WebResource, headerName: string): string {\n const value = request.headers.get(headerName);\n\n if (!value) {\n return \"\";\n }\n\n // When using version 2015-02-21 or later, if Content-Length is zero, then\n // set the Content-Length part of the StringToSign to an empty string.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n if (headerName === HeaderConstants.CONTENT_LENGTH && value === \"0\") {\n return \"\";\n }\n\n return value;\n }\n\n /**\n * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:\n * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.\n * 2. Convert each HTTP header name to lowercase.\n * 3. Sort the headers lexicographically by header name, in ascending order.\n * Each header may appear only once in the string.\n * 4. Replace any linear whitespace in the header value with a single space.\n * 5. Trim any whitespace around the colon in the header.\n * 6. Finally, append a new-line character to each canonicalized header in the resulting list.\n * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.\n *\n * @private\n * @param {WebResource} request\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getCanonicalizedHeadersString(request: WebResource): string {\n let headersArray = request.headers.headersArray().filter((value) => {\n return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);\n });\n\n headersArray.sort((a, b): number => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n\n // Remove duplicate headers\n headersArray = headersArray.filter((value, index, array) => {\n if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {\n return false;\n }\n return true;\n });\n\n let canonicalizedHeadersStringToSign: string = \"\";\n headersArray.forEach((header) => {\n canonicalizedHeadersStringToSign += `${header.name\n .toLowerCase()\n .trimRight()}:${header.value.trimLeft()}\\n`;\n });\n\n return canonicalizedHeadersStringToSign;\n }\n\n /**\n * Retrieves the webResource canonicalized resource string.\n *\n * @private\n * @param {WebResource} request\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getCanonicalizedResourceString(request: WebResource): string {\n const path = getURLPath(request.url) || \"/\";\n\n let canonicalizedResourceString: string = \"\";\n canonicalizedResourceString += `/${this.factory.accountName}${path}`;\n\n const queries = getURLQueries(request.url);\n const lowercaseQueries: { [key: string]: string } = {};\n if (queries) {\n const queryKeys: string[] = [];\n for (const key in queries) {\n if (queries.hasOwnProperty(key)) {\n const lowercaseKey = key.toLowerCase();\n lowercaseQueries[lowercaseKey] = queries[key];\n queryKeys.push(lowercaseKey);\n }\n }\n\n queryKeys.sort();\n for (const key of queryKeys) {\n canonicalizedResourceString += `\\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;\n }\n }\n\n return canonicalizedResourceString;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js new file mode 100644 index 000000000..eaf3d840c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __extends, __generator } from "tslib"; +import { BaseRequestPolicy, HttpHeaders, isNode } from "@azure/core-http"; +import { HeaderConstants } from "../utils/constants"; +/** + * TelemetryPolicy is a policy used to tag user-agent header for every requests. + * + * @class TelemetryPolicy + * @extends {BaseRequestPolicy} + */ +var TelemetryPolicy = /** @class */ (function (_super) { + __extends(TelemetryPolicy, _super); + /** + * Creates an instance of TelemetryPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {string} telemetry + * @memberof TelemetryPolicy + */ + function TelemetryPolicy(nextPolicy, options, telemetry) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.telemetry = telemetry; + return _this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof TelemetryPolicy + */ + TelemetryPolicy.prototype.sendRequest = function (request) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (isNode) { + if (!request.headers) { + request.headers = new HttpHeaders(); + } + if (!request.headers.get(HeaderConstants.USER_AGENT)) { + request.headers.set(HeaderConstants.USER_AGENT, this.telemetry); + } + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return TelemetryPolicy; +}(BaseRequestPolicy)); +export { TelemetryPolicy }; +//# sourceMappingURL=TelemetryPolicy.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map new file mode 100644 index 000000000..5a3b1b993 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TelemetryPolicy.js","sourceRoot":"","sources":["../../../../src/policies/TelemetryPolicy.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EACL,iBAAiB,EACjB,WAAW,EAEX,MAAM,EAIP,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;GAKG;AACH;IAAqC,mCAAiB;IASpD;;;;;;OAMG;IACH,yBAAY,UAAyB,EAAE,OAA6B,EAAE,SAAiB;QAAvF,YACE,kBAAM,UAAU,EAAE,OAAO,CAAC,SAE3B;QADC,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAED;;;;;;OAMG;IACU,qCAAW,GAAxB,UAAyB,OAAoB;;;gBAC3C,IAAI,MAAM,EAAE;oBACV,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;wBACpB,OAAO,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;qBACrC;oBACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE;wBACpD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;qBACjE;iBACF;gBAED,sBAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;;KAC9C;IACH,sBAAC;AAAD,CAAC,AAxCD,CAAqC,iBAAiB,GAwCrD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n HttpHeaders,\n HttpOperationResponse,\n isNode,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource\n} from \"@azure/core-http\";\n\nimport { HeaderConstants } from \"../utils/constants\";\n\n/**\n * TelemetryPolicy is a policy used to tag user-agent header for every requests.\n *\n * @class TelemetryPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class TelemetryPolicy extends BaseRequestPolicy {\n /**\n * Telemetry string.\n *\n * @type {string}\n * @memberof TelemetryPolicy\n */\n public readonly telemetry: string;\n\n /**\n * Creates an instance of TelemetryPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {string} telemetry\n * @memberof TelemetryPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, telemetry: string) {\n super(nextPolicy, options);\n this.telemetry = telemetry;\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof TelemetryPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n if (isNode) {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n if (!request.headers.get(HeaderConstants.USER_AGENT)) {\n request.headers.set(HeaderConstants.USER_AGENT, this.telemetry);\n }\n }\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js new file mode 100644 index 000000000..8fa2d6ea5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __assign, __awaiter, __extends, __generator } from "tslib"; +import { delay } from "@azure/core-http"; +import { Poller } from "@azure/core-lro"; +/** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @ignore + */ +var BlobBeginCopyFromUrlPoller = /** @class */ (function (_super) { + __extends(BlobBeginCopyFromUrlPoller, _super); + function BlobBeginCopyFromUrlPoller(options) { + var _this = this; + var blobClient = options.blobClient, copySource = options.copySource, _a = options.intervalInMs, intervalInMs = _a === void 0 ? 15000 : _a, onProgress = options.onProgress, resumeFrom = options.resumeFrom, startCopyFromURLOptions = options.startCopyFromURLOptions; + var state; + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + var operation = makeBlobBeginCopyFromURLPollOperation(__assign(__assign({}, state), { blobClient: blobClient, + copySource: copySource, + startCopyFromURLOptions: startCopyFromURLOptions })); + _this = _super.call(this, operation) || this; + if (typeof onProgress === "function") { + _this.onProgress(onProgress); + } + _this.intervalInMs = intervalInMs; + return _this; + } + BlobBeginCopyFromUrlPoller.prototype.delay = function () { + return delay(this.intervalInMs); + }; + return BlobBeginCopyFromUrlPoller; +}(Poller)); +export { BlobBeginCopyFromUrlPoller }; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var cancel = function cancel(options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var state, copyId; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = this.state; + copyId = state.copyId; + if (state.isCompleted) { + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + if (!copyId) { + state.isCancelled = true; + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + return [4 /*yield*/, state.blobClient.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal + })]; + case 1: + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + _a.sent(); + state.isCancelled = true; + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + }); + }); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var update = function update(options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var state, blobClient, copySource, startCopyFromURLOptions, result, result, copyStatus, copyProgress, prevCopyProgress, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = this.state; + blobClient = state.blobClient, copySource = state.copySource, startCopyFromURLOptions = state.startCopyFromURLOptions; + if (!!state.isStarted) return [3 /*break*/, 2]; + state.isStarted = true; + return [4 /*yield*/, blobClient.startCopyFromURL(copySource, startCopyFromURLOptions)]; + case 1: + result = _a.sent(); + // copyId is needed to abort + state.copyId = result.copyId; + if (result.copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + return [3 /*break*/, 6]; + case 2: + if (!!state.isCompleted) return [3 /*break*/, 6]; + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, state.blobClient.getProperties({ abortSignal: options.abortSignal })]; + case 4: + result = _a.sent(); + copyStatus = result.copyStatus, copyProgress = result.copyProgress; + prevCopyProgress = state.copyProgress; + if (copyProgress) { + state.copyProgress = copyProgress; + } + if (copyStatus === "pending" && + copyProgress !== prevCopyProgress && + typeof options.fireProgress === "function") { + // trigger in setTimeout, or swallow error? + options.fireProgress(state); + } + else if (copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + else if (copyStatus === "failed") { + state.error = new Error("Blob copy failed with reason: \"" + (result.copyStatusDescription || "unknown") + "\""); + state.isCompleted = true; + } + return [3 /*break*/, 6]; + case 5: + err_1 = _a.sent(); + state.error = err_1; + state.isCompleted = true; + return [3 /*break*/, 6]; + case 6: return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + }); + }); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var toString = function toString() { + return JSON.stringify({ state: this.state }, function (key, value) { + // remove blobClient from serialized state since a client can't be hydrated from this info. + if (key === "blobClient") { + return undefined; + } + return value; + }); +}; +/** + * Creates a poll operation given the provided state. + * @ignore + */ +function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: __assign({}, state), + cancel: cancel, + toString: toString, + update: update + }; +} +//# sourceMappingURL=BlobStartCopyFromUrlPoller.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map new file mode 100644 index 000000000..f9800dd97 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobStartCopyFromUrlPoller.js","sourceRoot":"","sources":["../../../../src/pollers/BlobStartCopyFromUrlPoller.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAqC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAsE5E;;;;;GAKG;AACH;IAAgD,8CAG/C;IAGC,oCAAY,OAA0C;QAAtD,iBA8BC;QA5BG,IAAA,UAAU,GAMR,OAAO,WANC,EACV,UAAU,GAKR,OAAO,WALC,EACV,KAIE,OAAO,aAJW,EAApB,YAAY,mBAAG,KAAK,KAAA,EACpB,UAAU,GAGR,OAAO,WAHC,EACV,UAAU,GAER,OAAO,WAFC,EACV,uBAAuB,GACrB,OAAO,wBADc,CACb;QAEZ,IAAI,KAAgD,CAAC;QAErD,IAAI,UAAU,EAAE;YACd,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;SACtC;QAED,IAAM,SAAS,GAAG,qCAAqC,uBAClD,KAAK,KACR,UAAU,YAAA;YACV,UAAU,YAAA;YACV,uBAAuB,yBAAA,IACvB,C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AC,qBAAqB,IAAI,SAAS,QAAG,CAC/E,CAAC;wBACF,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;qBAC1B;;;;oBAED,KAAK,CAAC,KAAK,GAAG,KAAG,CAAC;oBAClB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;;wBAI7B,sBAAO,qCAAqC,CAAC,KAAK,CAAC,EAAC;;;;CACrD,CAAC;AAEF;;;;;GAKG;AACH,IAAM,QAAQ,GAAkD,SAAS,QAAQ;IAG/E,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,UAAC,GAAG,EAAE,KAAK;QACtD,2FAA2F;QAC3F,IAAI,GAAG,KAAK,YAAY,EAAE;YACxB,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAS,qCAAqC,CAC5C,KAAoC;IAEpC,OAAO;QACL,KAAK,eAAO,KAAK,CAAE;QACnB,MAAM,QAAA;QACN,QAAQ,UAAA;QACR,MAAM,QAAA;KACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { delay } from \"@azure/core-http\";\nimport { PollOperation, PollOperationState, Poller } from \"@azure/core-lro\";\nimport { BlobClient, BlobStartCopyFromURLOptions, BlobBeginCopyFromURLResponse } from \"../Clients\";\n\n/**\n * Defines the operations from a {@link BlobClient} that are needed for the poller\n * returned by {@link BlobClient.beginCopyFromURL} to work.\n */\nexport type CopyPollerBlobClient = Pick & {\n startCopyFromURL(\n copySource: string,\n options?: BlobStartCopyFromURLOptions\n ): Promise;\n};\n\n/**\n * The state used by the poller returned from {@link BlobClient.beginCopyFromURL}.\n *\n * This state is passed into the user-specified `onProgress` callback\n * whenever copy progress is detected.\n */\nexport interface BlobBeginCopyFromUrlPollState\n extends PollOperationState {\n /**\n * The instance of {@link BlobClient} that was used when calling {@link BlobClient.beginCopyFromURL}.\n */\n readonly blobClient: CopyPollerBlobClient;\n /**\n * The copyId that identifies the in-progress blob copy.\n */\n copyId?: string;\n /**\n * the progress of the blob copy as reported by the service.\n */\n copyProgress?: string;\n /**\n * The source URL provided in {@link BlobClient.beginCopyFromURL}.\n */\n copySource: string;\n /**\n * The options that were passed to the initial {@link BlobClient.beginCopyFromURL} call.\n * This is exposed for the poller and should not be modified directly.\n */\n readonly startCopyFromURLOptions?: BlobStartCopyFromURLOptions;\n}\n\n/**\n * The PollOperation responsible for:\n * - performing the initial startCopyFromURL\n * - checking the copy status via getProperties\n * - cancellation via abortCopyFromURL\n * @ignore\n */\nexport interface BlobBeginCopyFromURLPollOperation\n extends PollOperation {}\n\n/**\n * The set of options used to configure the poller.\n * This is an internal interface populated by {@link BlobClient.beginCopyFromURL}.\n *\n * @ignore\n */\nexport interface BlobBeginCopyFromUrlPollerOptions {\n blobClient: CopyPollerBlobClient;\n copySource: string;\n intervalInMs?: number;\n onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;\n resumeFrom?: string;\n startCopyFromURLOptions?: BlobStartCopyFromURLOptions;\n}\n\n/**\n * This is the poller returned by {@link BlobClient.beginCopyFromURL}.\n * This can not be instantiated directly outside of this package.\n *\n * @ignore\n */\nexport class BlobBeginCopyFromUrlPoller extends Poller<\n BlobBeginCopyFromUrlPollState,\n BlobBeginCopyFromURLResponse\n> {\n public intervalInMs: number;\n\n constructor(options: BlobBeginCopyFromUrlPollerOptions) {\n const {\n blobClient,\n copySource,\n intervalInMs = 15000,\n onProgress,\n resumeFrom,\n startCopyFromURLOptions\n } = options;\n\n let state: BlobBeginCopyFromUrlPollState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = makeBlobBeginCopyFromURLPollOperation({\n ...state,\n blobClient,\n copySource,\n startCopyFromURLOptions\n });\n\n super(operation);\n\n if (typeof onProgress === \"function\") {\n this.onProgress(onProgress);\n }\n\n this.intervalInMs = intervalInMs;\n }\n\n public delay(): Promise {\n return delay(this.intervalInMs);\n }\n}\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst cancel: BlobBeginCopyFromURLPollOperation[\"cancel\"] = async function cancel(\n this: BlobBeginCopyFromURLPollOperation,\n options = {}\n) {\n const state = this.state;\n const { copyId } = state;\n if (state.isCompleted) {\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n\n if (!copyId) {\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n\n // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call\n await state.blobClient.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal\n });\n state.isCancelled = true;\n\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst update: BlobBeginCopyFromURLPollOperation[\"update\"] = async function update(\n this: BlobBeginCopyFromURLPollOperation,\n options = {}\n): Promise {\n const state = this.state;\n const { blobClient, copySource, startCopyFromURLOptions } = state;\n\n if (!state.isStarted) {\n state.isStarted = true;\n const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions);\n\n // copyId is needed to abort\n state.copyId = result.copyId;\n if (result.copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n } else if (!state.isCompleted) {\n try {\n const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal });\n const { copyStatus, copyProgress } = result;\n const prevCopyProgress = state.copyProgress;\n if (copyProgress) {\n state.copyProgress = copyProgress;\n }\n if (\n copyStatus === \"pending\" &&\n copyProgress !== prevCopyProgress &&\n typeof options.fireProgress === \"function\"\n ) {\n // trigger in setTimeout, or swallow error?\n options.fireProgress(state);\n } else if (copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n } else if (copyStatus === \"failed\") {\n state.error = new Error(\n `Blob copy failed with reason: \"${result.copyStatusDescription || \"unknown\"}\"`\n );\n state.isCompleted = true;\n }\n } catch (err) {\n state.error = err;\n state.isCompleted = true;\n }\n }\n\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst toString: BlobBeginCopyFromURLPollOperation[\"toString\"] = function toString(\n this: BlobBeginCopyFromURLPollOperation\n) {\n return JSON.stringify({ state: this.state }, (key, value) => {\n // remove blobClient from serialized state since a client can't be hydrated from this info.\n if (key === \"blobClient\") {\n return undefined;\n }\n return value;\n });\n};\n\n/**\n * Creates a poll operation given the provided state.\n * @ignore\n */\nfunction makeBlobBeginCopyFromURLPollOperation(\n state: BlobBeginCopyFromUrlPollState\n): BlobBeginCopyFromURLPollOperation {\n return {\n state: { ...state },\n cancel,\n toString,\n update\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js new file mode 100644 index 000000000..15be5f0ea --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class AccountSASPermissions + */ +var AccountSASPermissions = /** @class */ (function () { + function AccountSASPermissions() { + /** + * Permission to read resources and list queues and tables granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.read = false; + /** + * Permission to write resources granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.write = false; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.delete = false; + /** + * Permission to delete versions granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.add = false; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.create = false; + /** + * Permissions to update messages and table entities granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.update = false; + /** + * Permission to get and delete messages granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.process = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.tag = false; + /** + * Permission to filter blobs. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.filter = false; + } + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @static + * @param {string} permissions + * @returns {AccountSASPermissions} + * @memberof AccountSASPermissions + */ + AccountSASPermissions.parse = function (permissions) { + var accountSASPermissions = new AccountSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var c = permissions_1[_i]; + switch (c) { + case "r": + accountSASPermissions.read = true; + break; + case "w": + accountSASPermissions.write = true; + break; + case "d": + accountSASPermissions.delete = true; + break; + case "x": + accountSASPermissions.deleteVersion = true; + break; + case "l": + accountSASPermissions.list = true; + break; + case "a": + accountSASPermissions.add = true; + break; + case "c": + accountSASPermissions.create = true; + break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + default: + throw new RangeError("Invalid permission character: " + c); + } + } + return accountSASPermissions; + }; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASPermissions + */ + AccountSASPermissions.prototype.toString = function () { + // The order of the characters should be as specified here to ensure correctness: + // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + // Use a string array instead of string concatenating += operator for performance + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.filter) { + permissions.push("f"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.list) { + permissions.push("l"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.update) { + permissions.push("u"); + } + if (this.process) { + permissions.push("p"); + } + return permissions.join(""); + }; + return AccountSASPermissions; +}()); +export { AccountSASPermissions }; +//# sourceMappingURL=AccountSASPermissions.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map new file mode 100644 index 000000000..5722e40b6 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountSASPermissions.js","sourceRoot":"","sources":["../../../../src/sas/AccountSASPermissions.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;;;;;GAWG;AACH;IAAA;QAuDE;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;;;;WAKG;Q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,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IACH,4BAAC;AAAD,CAAC,AAnMD,IAmMC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASPermissions\n */\nexport class AccountSASPermissions {\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @static\n * @param {string} permissions\n * @returns {AccountSASPermissions}\n * @memberof AccountSASPermissions\n */\n public static parse(permissions: string): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n\n return accountSASPermissions;\n }\n\n /**\n * Permission to read resources and list queues and tables granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Permission to write resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Permission to delete versions granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public list: boolean = false;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Permissions to update messages and table entities granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public update: boolean = false;\n\n /**\n * Permission to get and delete messages granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public process: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Permission to filter blobs.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public filter: boolean = false;\n\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @returns {string}\n * @memberof AccountSASPermissions\n */\n public toString(): string {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n return permissions.join(\"\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js new file mode 100644 index 000000000..9f6f2b71c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + * + * @export + * @class AccountSASResourceTypes + */ +var AccountSASResourceTypes = /** @class */ (function () { + function AccountSASResourceTypes() { + /** + * Permission to access service level APIs granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.object = false; + } + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @static + * @param {string} resourceTypes + * @returns {AccountSASResourceTypes} + * @memberof AccountSASResourceTypes + */ + AccountSASResourceTypes.parse = function (resourceTypes) { + var accountSASResourceTypes = new AccountSASResourceTypes(); + for (var _i = 0, resourceTypes_1 = resourceTypes; _i < resourceTypes_1.length; _i++) { + var c = resourceTypes_1[_i]; + switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: + throw new RangeError("Invalid resource type: " + c); + } + } + return accountSASResourceTypes; + }; + /** + * Converts the given resource types to a string. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASResourceTypes + */ + AccountSASResourceTypes.prototype.toString = function () { + var resourceTypes = []; + if (this.service) { + resourceTypes.push("s"); + } + if (this.container) { + resourceTypes.push("c"); + } + if (this.object) { + resourceTypes.push("o"); + } + return resourceTypes.join(""); + }; + return AccountSASResourceTypes; +}()); +export { AccountSASResourceTypes }; +//# sourceMappingURL=AccountSASResourceTypes.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map new file mode 100644 index 000000000..ce3d57c72 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountSASResourceTypes.js","sourceRoot":"","sources":["../../../../src/sas/AccountSASResourceTypes.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;;;;;GAWG;AACH;IAAA;QAgCE;;;;;WAKG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;;;;WAKG;QACI,cAAS,GAAY,KAAK,CAAC;QAElC;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;IAuBjC,CAAC;IA5EC;;;;;;;;OAQG;IACW,6BAAK,GAAnB,UAAoB,aAAqB;QACvC,IAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAE9D,KAAgB,UAAa,EAAb,+BAAa,EAAb,2BAAa,EAAb,IAAa,EAAE;YAA1B,IAAM,CAAC,sBAAA;YACV,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBACN,uBAAuB,CAAC,OAAO,GAAG,IAAI,CAAC;oBACvC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,SAAS,GAAG,IAAI,CAAC;oBACzC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACtC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,4BAA0B,CAAG,CAAC,CAAC;aACvD;SACF;QAED,OAAO,uBAAuB,CAAC;IACjC,CAAC;IA0BD;;;;;;;OAOG;IACI,0CAAQ,GAAf;QACE,IAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;IACH,8BAAC;AAAD,CAAC,AA7ED,IA6EC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASResourceTypes\n */\nexport class AccountSASResourceTypes {\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @static\n * @param {string} resourceTypes\n * @returns {AccountSASResourceTypes}\n * @memberof AccountSASResourceTypes\n */\n public static parse(resourceTypes: string): AccountSASResourceTypes {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n\n return accountSASResourceTypes;\n }\n\n /**\n * Permission to access service level APIs granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public service: boolean = false;\n\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public container: boolean = false;\n\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public object: boolean = false;\n\n /**\n * Converts the given resource types to a string.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @returns {string}\n * @memberof AccountSASResourceTypes\n */\n public toString(): string {\n const resourceTypes: string[] = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js new file mode 100644 index 000000000..2e6d91982 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + * + * @export + * @class AccountSASServices + */ +var AccountSASServices = /** @class */ (function () { + function AccountSASServices() { + /** + * Permission to access blob resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.blob = false; + /** + * Permission to access file resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.file = false; + /** + * Permission to access queue resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.queue = false; + /** + * Permission to access table resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.table = false; + } + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @static + * @param {string} services + * @returns {AccountSASServices} + * @memberof AccountSASServices + */ + AccountSASServices.parse = function (services) { + var accountSASServices = new AccountSASServices(); + for (var _i = 0, services_1 = services; _i < services_1.length; _i++) { + var c = services_1[_i]; + switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: + throw new RangeError("Invalid service character: " + c); + } + } + return accountSASServices; + }; + /** + * Converts the given services to a string. + * + * @returns {string} + * @memberof AccountSASServices + */ + AccountSASServices.prototype.toString = function () { + var services = []; + if (this.blob) { + services.push("b"); + } + if (this.table) { + services.push("t"); + } + if (this.queue) { + services.push("q"); + } + if (this.file) { + services.push("f"); + } + return services.join(""); + }; + return AccountSASServices; +}()); +export { AccountSASServices }; +//# sourceMappingURL=AccountSASServices.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js.map new file mode 100644 index 000000000..2c2e63531 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountSASServices.js","sourceRoot":"","sources":["../../../../src/sas/AccountSASServices.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;;;;;GAWG;AACH;IAAA;QAmCE;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;;;;WAKG;QACI,UAAK,GAAY,KAAK,CAAC;IAwBhC,CAAC;IAxFC;;;;;;;;OAQG;IACW,wBAAK,GAAnB,UAAoB,QAAgB;QAClC,IAAM,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEpD,KAAgB,UAAQ,EAAR,qBAAQ,EAAR,sBAAQ,EAAR,IAAQ,EAAE;YAArB,IAAM,CAAC,iBAAA;YACV,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAC/B,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR,KAAK,GAAG;oBACN,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,gCAA8B,CAAG,CAAC,CAAC;aAC3D;SACF;QAED,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAkCD;;;;;OAKG;IACI,qCAAQ,GAAf;QACE,IAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;QACD,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IACH,yBAAC;AAAD,CAAC,AAzFD,IAyFC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASServices\n */\nexport class AccountSASServices {\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @static\n * @param {string} services\n * @returns {AccountSASServices}\n * @memberof AccountSASServices\n */\n public static parse(services: string): AccountSASServices {\n const accountSASServices = new AccountSASServices();\n\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n\n return accountSASServices;\n }\n\n /**\n * Permission to access blob resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public blob: boolean = false;\n\n /**\n * Permission to access file resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public file: boolean = false;\n\n /**\n * Permission to access queue resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public queue: boolean = false;\n\n /**\n * Permission to access table resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public table: boolean = false;\n\n /**\n * Converts the given services to a string.\n *\n * @returns {string}\n * @memberof AccountSASServices\n */\n public toString(): string {\n const services: string[] = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js new file mode 100644 index 000000000..933e5960c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { AccountSASPermissions } from "./AccountSASPermissions"; +import { AccountSASResourceTypes } from "./AccountSASResourceTypes"; +import { AccountSASServices } from "./AccountSASServices"; +import { ipRangeToString } from "./SasIPRange"; +import { SASQueryParameters } from "./SASQueryParameters"; +import { SERVICE_VERSION } from "../utils/constants"; +import { truncatedISO8061Date } from "../utils/utils.common"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @param {AccountSASSignatureValues} accountSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + * @memberof AccountSASSignatureValues + */ +export function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + var version = accountSASSignatureValues.version + ? accountSASSignatureValues.version + : SERVICE_VERSION; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.filter && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + var parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + var parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); + var parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + var stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) + : "", + truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + "" // Account SAS requires an additional newline character + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange); +} +//# sourceMappingURL=AccountSASSignatureValues.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map new file mode 100644 index 000000000..9dc3a6cab --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../../../src/sas/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAyF7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iCAAiC,CAC/C,yBAAoD,EACpD,mBAA+C;IAE/C,IAAM,OAAO,GAAG,yBAAyB,CAAC,OAAO;QAC/C,CAAC,CAAC,yBAAyB,CAAC,OAAO;QACnC,CAAC,CAAC,eAAe,CAAC;IAEpB,IACE,yBAAyB,CAAC,WAAW;QACrC,yBAAyB,CAAC,WAAW,CAAC,aAAa;QACnD,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,iEAAiE,CAAC,CAAC;KACrF;IAED,IACE,yBAAyB,CAAC,WAAW;QACrC,yBAAyB,CAAC,WAAW,CAAC,GAAG;QACzC,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,iEAAiE,CAAC,CAAC;KACrF;IAED,IACE,yBAAyB,CAAC,WAAW;QACrC,yBAAyB,CAAC,W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,yBAAyB,CAAC,OAAO,CAClC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation\n * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters}\n * exist because the former is mutable and a logical representation while the latter is immutable and used to generate\n * actual REST requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n *\n * @export\n * @class AccountSASSignatureValues\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n *\n * @type {SASProtocol}\n * @memberof AccountSASSignatureValues\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n *\n * @type {Date}\n * @memberof AccountSASSignatureValues\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n *\n * @type {Date}\n * @memberof AccountSASSignatureValues\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n *\n * @type {AccountSASPermissions}\n * @memberof AccountSASSignatureValues\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n *\n * @type {SasIPRange}\n * @memberof AccountSASSignatureValues\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param {AccountSASSignatureValues} accountSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n * @memberof AccountSASSignatureValues\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString()\n );\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes\n ).toString();\n\n const stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\" // Account SAS requires an additional newline character\n ].join(\"\\n\");\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n parsedPermissions.toString(),\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js new file mode 100644 index 000000000..d552289b5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class BlobSASPermissions + */ +var BlobSASPermissions = /** @class */ (function () { + function BlobSASPermissions() { + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.read = false; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.add = false; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.create = false; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.write = false; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.delete = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.deleteVersion = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.tag = false; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.move = false; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.execute = false; + } + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {BlobSASPermissions} + * @memberof BlobSASPermissions + */ + BlobSASPermissions.parse = function (permissions) { + var blobSASPermissions = new BlobSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var char = permissions_1[_i]; + switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + default: + throw new RangeError("Invalid permission: " + char); + } + } + return blobSASPermissions; + }; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns {string} A string which represents the BlobSASPermissions + * @memberof BlobSASPermissions + */ + BlobSASPermissions.prototype.toString = function () { + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + return permissions.join(""); + }; + return BlobSASPermissions; +}()); +export { BlobSASPermissions }; +//# sourceMappingURL=BlobSASPermissions.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map new file mode 100644 index 000000000..3ea6a1e29 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobSASPermissions.js","sourceRoot":"","sources":["../../../../src/sas/BlobSASPermissions.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;;;;;GAWG;AACH;IAAA;QAkDE;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;;;;WAKG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;;;;WAKG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;;;;WAKG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,YAAO,GAAY,KAAK,CAAC;IAwClC,CAAC;IA/JC;;;;;;;;OAQG;IACW,wBAA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CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IACH,yBAAC;AAAD,CAAC,AAhKD,IAgKC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class BlobSASPermissions\n */\nexport class BlobSASPermissions {\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @static\n * @param {string} permissions\n * @returns {BlobSASPermissions}\n * @memberof BlobSASPermissions\n */\n public static parse(permissions: string): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return blobSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public execute: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns {string} A string which represents the BlobSASPermissions\n * @memberof BlobSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n return permissions.join(\"\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js new file mode 100644 index 000000000..1035d82f5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { BlobSASPermissions } from "./BlobSASPermissions"; +import { ContainerSASPermissions } from "./ContainerSASPermissions"; +import { StorageSharedKeyCredential } from "../credentials/StorageSharedKeyCredential"; +import { UserDelegationKeyCredential } from "../credentials/UserDelegationKeyCredential"; +import { ipRangeToString } from "./SasIPRange"; +import { SASQueryParameters } from "./SASQueryParameters"; +import { SERVICE_VERSION } from "../utils/constants"; +import { truncatedISO8061Date } from "../utils/utils.common"; +export function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + var version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + var sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential + ? sharedKeyCredentialOrUserDelegationKey + : undefined; + var userDelegationKeyCredential; + if (sharedKeyCredential === undefined && accountName !== undefined) { + userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + } + if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { + throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); + } + // Version 2019-12-12 adds support for the blob tags permission. + // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. + // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string + if (version >= "2018-11-09") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + } + else { + // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. + if (version >= "2020-02-10") { + return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + } + else { + return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + if (version >= "2015-04-05") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + } + else { + throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + } + } + throw new RangeError("'version' must be >= '2015-04-05'."); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + var resource = "c"; + if (blobSASSignatureValues.blobName) { + resource = "b"; + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKeyCredential} userDelegationKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + var signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKeyCredential} userDelegationKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + var signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId); +} +function getCanonicalName(accountName, containerName, blobName) { + // Container: "/blob/account/containerName" + // Blob: "/blob/account/containerName/blobName" + var elements = ["/blob/" + accountName + "/" + containerName]; + if (blobName) { + elements.push("/" + blobName); + } + return elements.join(""); +} +function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + var version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { + throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { + throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when providing 'versionId'."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + } + if (version < "2020-02-10" && + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + } + if (version < "2020-02-10" && + (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + } + blobSASSignatureValues.version = version; + return blobSASSignatureValues; +} +//# sourceMappingURL=BlobSASSignatureValues.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map new file mode 100644 index 000000000..c188bfe5a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobSASSignatureValues.js","sourceRoot":"","sources":["../../../../src/sas/BlobSASSignatureValues.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,eAAe,EAAc,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAoS7D,MAAM,UAAU,8BAA8B,CAC5C,sBAA8C,EAC9C,sCAAsF,EACtF,WAAoB;IAEpB,IAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;IAElG,IAAM,mBAAmB,GACvB,sCAAsC,YAAY,0BAA0B;QAC1E,CAAC,CAAC,sCAAsC;QACxC,CAAC,CAAC,SAAS,CAAC;IAChB,IAAI,2BAAoE,CAAC;IAEzE,IAAI,mBAAmB,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS,EAAE;QAClE,2BAA2B,GAAG,IAAI,2BAA2B,CAC3D,WAAW,EACX,sCAA2D,CAC5D,CAAC;KACH;IAED,IAAI,mBAAmB,KAAK,SAAS,IAAI,2BAA2B,KAAK,SAAS,EAAE;QAClF,MAAM,SAAS,CAAC,gEAAgE,CAAC,CAAC;KACnF;IAED,gEAAgE;IAChE,gGA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AAC,CAAC;KACtF;IACD,IAAI,sBAAsB,CAAC,QAAQ,KAAK,SAAS,IAAI,sBAAsB,CAAC,YAAY,EAAE;QACxF,MAAM,UAAU,CAAC,wDAAwD,CAAC,CAAC;KAC5E;IAED,IAAI,sBAAsB,CAAC,SAAS,IAAI,OAAO,GAAG,YAAY,EAAE;QAC9D,MAAM,UAAU,CAAC,+DAA+D,CAAC,CAAC;KACnF;IACD,IAAI,sBAAsB,CAAC,QAAQ,KAAK,SAAS,IAAI,sBAAsB,CAAC,SAAS,EAAE;QACrF,MAAM,UAAU,CAAC,qDAAqD,CAAC,CAAC;KACzE;IAED,IACE,sBAAsB,CAAC,WAAW;QAClC,sBAAsB,CAAC,WAAW,CAAC,aAAa;QAChD,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,kEAAkE,CAAC,CAAC;KACtF;IAED,IACE,sBAAsB,CAAC,WAAW;QAClC,sBAAsB,CAAC,WAAW,CAAC,GAAG;QACtC,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,kEAAkE,CAAC,CAAC;KACtF;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;QAClC,CAAC,sBAAsB,CAAC,WAAW,CAAC,IAAI,IAAI,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,EACvF;QACA,MAAM,UAAU,CAAC,6EAA6E,CAAC,CAAC;KACjG;IAED,IACE,OAAO,GAAG,YAAY;QACtB,CAAC,sBAAsB,CAAC,0BAA0B,IAAI,sBAAsB,CAAC,aAAa,CAAC,EAC3F;QACA,MAAM,UAAU,CACd,mGAAmG,CACpG,CAAC;KACH;IAED,sBAAsB,CAAC,OAAO,GAAG,OAAO,CAAC;IACzC,OAAO,sBAAsB,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { BlobSASPermissions } from \"./BlobSASPermissions\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\nimport { ContainerSASPermissions } from \"./ContainerSASPermissions\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { UserDelegationKeyCredential } from \"../credentials/UserDelegationKeyCredential\";\nimport { ipRangeToString, SasIPRange } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs.\n *\n * @export\n * @class BlobSASSignatureValues\n */\nexport interface BlobSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n *\n * @type {SASProtocol}\n * @memberof BlobSASSignatureValues\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n *\n * @type {Date}\n * @memberof BlobSASSignatureValues\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n *\n * @type {Date}\n * @memberof BlobSASSignatureValues\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n *\n * @type {BlobSASPermissions | ContainerSASPermissions}\n * @memberof BlobSASSignatureValues\n */\n permissions?: BlobSASPermissions | ContainerSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n *\n * @type {SasIPRange}\n * @memberof BlobSASSignatureValues\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the container the SAS user may access.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n containerName: string;\n\n /**\n * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n blobName?: string;\n\n /**\n * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n snapshotTime?: string;\n\n /**\n * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n versionId?: string;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n identifier?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentType?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user\n * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will\n * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission\n * check for the user specified in this value will be performed. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n preauthorizedAgentObjectId?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to\n * correlate SAS generation with storage resource access. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n correlationId?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * Fill in the required details before running the following snippets.\n *\n * Example usage:\n *\n * ```js\n * // Generate service level SAS for a container\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using an identifier:\n *\n * ```js\n * // Generate service level SAS for a container with identifier\n * // startsOn & permissions are optional when identifier is provided\n * const identifier = \"unique-id\";\n * await containerClient.setAccessPolicy(undefined, [\n * {\n * accessPolicy: {\n * expiresOn: new Date(new Date().valueOf() + 86400), // Date type\n * permissions: ContainerSASPermissions.parse(\"racwdl\").toString(),\n * startsOn: new Date() // Date type\n * },\n * id: identifier\n * }\n * ]);\n *\n * const containerSAS = generateBlobSASQueryParameters(\n * {\n * containerName, // Required\n * identifier // Required\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using a blob name:\n *\n * ```js\n * // Generate service level SAS for a blob\n * const blobSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * blobName, // Required\n * permissions: BlobSASPermissions.parse(\"racwd\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type\n * cacheControl: \"cache-control-override\", // Optional\n * contentDisposition: \"content-disposition-override\", // Optional\n * contentEncoding: \"content-encoding-override\", // Optional\n * contentLanguage: \"content-language-override\", // Optional\n * contentType: \"content-type-override\", // Optional\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * @export\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters;\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required.\n *\n * Example usage:\n *\n * ```js\n * // Generate user delegation SAS for a container\n * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Optional. Date type\n * expiresOn, // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\" // Must >= 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName\n * ).toString();\n * ```\n *\n * @export\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKey} userDelegationKey Return value of `blobServiceClient.getUserDelegationKey()`\n * @param {string} accountName\n * @returns {SASQueryParameters}\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKey: UserDelegationKey,\n accountName: string\n): SASQueryParameters;\n\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string\n): SASQueryParameters {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n\n const sharedKeyCredential =\n sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential: UserDelegationKeyCredential | undefined;\n\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(\n accountName,\n sharedKeyCredentialOrUserDelegationKey as UserDelegationKey\n );\n }\n\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n } else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues,\n userDelegationKeyCredential!\n );\n } else {\n return generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues,\n userDelegationKeyCredential!\n );\n }\n }\n }\n\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n } else {\n throw new RangeError(\n \"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\"\n );\n }\n }\n\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParameters20150405(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !blobSASSignatureValues.permissions &&\n !blobSASSignatureValues.expiresOn\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\"\n );\n }\n\n let resource: string = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\"\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParameters20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !blobSASSignatureValues.permissions &&\n !blobSASSignatureValues.expiresOn\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\"\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKeyCredential} userDelegationKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKeyCredential} userDelegationKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId\n );\n}\n\nfunction getCanonicalName(accountName: string, containerName: string, blobName?: string): string {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements: string[] = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\n\nfunction SASSignatureValuesSanityCheckAndAutofill(\n blobSASSignatureValues: BlobSASSignatureValues\n): BlobSASSignatureValues {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)\n ) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)\n ) {\n throw RangeError(\n \"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\"\n );\n }\n\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js new file mode 100644 index 000000000..7f78d55cc --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class ContainerSASPermissions + */ +var ContainerSASPermissions = /** @class */ (function () { + function ContainerSASPermissions() { + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.read = false; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.add = false; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.create = false; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.write = false; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.delete = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.deleteVersion = false; + /** + * Specifies List access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.list = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.tag = false; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.move = false; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.execute = false; + } + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {ContainerSASPermissions} + * @memberof ContainerSASPermissions + */ + ContainerSASPermissions.parse = function (permissions) { + var containerSASPermissions = new ContainerSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var char = permissions_1[_i]; + switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + default: + throw new RangeError("Invalid permission " + char); + } + } + return containerSASPermissions; + }; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @returns {string} + * @memberof ContainerSASPermissions + */ + ContainerSASPermissions.prototype.toString = function () { + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.list) { + permissions.push("l"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + return permissions.join(""); + }; + return ContainerSASPermissions; +}()); +export { ContainerSASPermissions }; +//# sourceMappingURL=ContainerSASPermissions.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map new file mode 100644 index 000000000..360fc1a51 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContainerSASPermissions.js","sourceRoot":"","sources":["../../../../src/sas/ContainerSASPermissions.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC;;;;;;;;;GASG;AACH;IAAA;QAqDE;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;;;;WAKG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;;;;WAKG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;;;;WAKG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;;;;WAKG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;;;;WAKG;QACI,YAAO,GAAY,KAAK,CAAC;IA8ClC,CAAC;IAhLC;;;;;;;;OAQG;IACW,6BAAK,GAAnB,UAAoB,WAAmB;QACrC,IAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,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C,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IACH,8BAAC;AAAD,CAAC,AAjLD,IAiLC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class ContainerSASPermissions\n */\nexport class ContainerSASPermissions {\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @static\n * @param {string} permissions\n * @returns {ContainerSASPermissions}\n * @memberof ContainerSASPermissions\n */\n public static parse(permissions: string) {\n const containerSASPermissions = new ContainerSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return containerSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specifies List access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public list: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public execute: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @returns {string}\n * @memberof ContainerSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n return permissions.join(\"\");\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js new file mode 100644 index 000000000..8d5d6973a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { ipRangeToString } from "./SasIPRange"; +import { truncatedISO8061Date } from "../utils/utils.common"; +/** + * Protocols for generated SAS. + * + * @export + * @enum {number} + */ +export var SASProtocol; +(function (SASProtocol) { + /** + * Protocol that allows HTTPS only + */ + SASProtocol["Https"] = "https"; + /** + * Protocol that allows both HTTPS and HTTP + */ + SASProtocol["HttpsAndHttp"] = "https,http"; +})(SASProtocol || (SASProtocol = {})); +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + * + * @export + * @class SASQueryParameters + */ +var SASQueryParameters = /** @class */ (function () { + function SASQueryParameters(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) { + this.version = version; + this.signature = signature; + if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { + // SASQueryParametersOptions + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } + } + else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } + } + } + Object.defineProperty(SASQueryParameters.prototype, "ipRange", { + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + * @type {(SasIPRange | undefined)} + * @memberof SASQueryParameters + */ + get: function () { + if (this.ipRangeInner) { + return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start + }; + } + return undefined; + }, + enumerable: false, + configurable: true + }); + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + * @returns {string} + * @memberof SASQueryParameters + */ + SASQueryParameters.prototype.toString = function () { + var params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "skoid", + "sktid", + "skt", + "ske", + "sks", + "skv", + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid" + ]; + var queries = []; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "skoid": // Signed object ID + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": // Signed tenant ID + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": // Signed key start time + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined); + break; + case "ske": // Signed key expiry time + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined); + break; + case "sks": // Signed key service + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": // Signed key version + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + } + } + return queries.join("&"); + }; + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @private + * @param {string[]} queries + * @param {string} key + * @param {string} [value] + * @returns {void} + * @memberof SASQueryParameters + */ + SASQueryParameters.prototype.tryAppendQueryParameter = function (queries, key, value) { + if (!value) { + return; + } + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) { + queries.push(key + "=" + value); + } + }; + return SASQueryParameters; +}()); +export { SASQueryParameters }; +//# sourceMappingURL=SASQueryParameters.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map new file mode 100644 index 000000000..82e0350b0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../../../src/sas/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D;;;;;GAKG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EAVW,WAAW,KAAX,WAAW,QAUtB;AA8ID;;;;;;;;;;;GAWG;AACH;IAkSE,4BACE,OAAe,EACf,SAAiB,EACjB,oBAAyD,EACzD,QAAiB,EACjB,aAAsB,EACtB,QAAsB,EACtB,QAAe,EACf,SAAgB,EAChB,OAAoB,EACpB,UAAmB,EACnB,QAAiB,EACjB,YAAqB,EACrB,kBAA2B,EAC3B,eAAwB,EACxB,eAAwB,EACxB,WAAoB,EACpB,iBAAqC,EACrC,0BAAmC,EACnC,aAAsB;QAEtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,oBAAoB,KAAK,SAAS,IAAI,OAAO,oBAAoB,KAAK,QAAQ,EAAE;YAClF,4BAA4B;YAC5B,IAAI,CAAC,WAAW,GAAG,oBAAoB,CAAC,WAAW,CAAC;YACpD,IAAI,CAAC,QAAQ,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O,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;oBACnE,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;gBACR,KAAK,OAAO;oBACV,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;oBAC9E,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;oBACjE,MAAM;aACT;SACF;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACK,oDAAuB,GAA/B,UAAgC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE;YACV,OAAO;SACR;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACtC,OAAO,CAAC,IAAI,CAAI,GAAG,SAAI,KAAO,CAAC,CAAC;SACjC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA/gBD,IA+gBC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * Protocols for generated SAS.\n *\n * @export\n * @enum {number}\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\"\n}\n\n/**\n * Options to construct {@link SASQueryParameters}.\n *\n * @export\n * @interface SASQueryParametersOptions\n */\nexport interface SASQueryParametersOptions {\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n permissions?: string;\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n services?: string;\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n resourceTypes?: string;\n /**\n * Optional. The allowed HTTP protocol(s).\n *\n * @type {SASProtocol}\n * @memberof SASQueryParametersOptions\n */\n protocol?: SASProtocol;\n /**\n * Optional. The start time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParametersOptions\n */\n startsOn?: Date;\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParametersOptions\n */\n expiresOn?: Date;\n /**\n * Optional. IP ranges allowed in this SAS.\n *\n * @type {SasIPRange}\n * @memberof SASQueryParametersOptions\n */\n ipRange?: SasIPRange;\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n identifier?: string;\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n resource?: string;\n /**\n * Value for cache-control header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n cacheControl?: string;\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentDisposition?: string;\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentEncoding?: string;\n /**\n * Value for content-length header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentLanguage?: string;\n /**\n * Value for content-type header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentType?: string;\n /**\n * User delegation key properties.\n *\n * @type {UserDelegationKey}\n * @memberof SASQueryParametersOptions\n */\n userDelegationKey?: UserDelegationKey;\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n preauthorizedAgentObjectId?: string;\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n correlationId?: string;\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n *\n * @export\n * @class SASQueryParameters\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n *\n * @type {SASProtocol}\n * @memberof SASQueryParameters\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParameters\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParameters\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly identifier?: string;\n\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n *\n * @private\n * @type {SasIPRange}\n * @memberof SASQueryParameters\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * The Azure Active Directory object ID in GUID format.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedOid?: string;\n\n /**\n * The Azure Active Directory tenant ID in GUID format.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedTenantId?: string;\n\n /**\n * The date-time the key is active.\n * Property of user delegation key.\n *\n * @private\n * @type {Date}\n * @memberof SASQueryParameters\n */\n private readonly signedStartsOn?: Date;\n\n /**\n * The date-time the key expires.\n * Property of user delegation key.\n *\n * @private\n * @type {Date}\n * @memberof SASQueryParameters\n */\n private readonly signedExpiresOn?: Date;\n\n /**\n * Abbreviation of the Azure Storage service that accepts the user delegation key.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedService?: string;\n\n /**\n * The service version that created the user delegation key.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedVersion?: string;\n\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly preauthorizedAgentObjectId?: string;\n\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly correlationId?: string;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n * @type {(SasIPRange | undefined)}\n * @memberof SASQueryParameters\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param {string} version Representing the storage version\n * @param {string} signature Representing the signature for the SAS token\n * @param {string} [permissions] Representing the storage permissions\n * @param {string} [services] Representing the storage services being accessed (only for Account SAS)\n * @param {string} [resourceTypes] Representing the storage resource types being accessed (only for Account SAS)\n * @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s)\n * @param {Date} [startsOn] Representing the start time for this SAS token\n * @param {Date} [expiresOn] Representing the expiry time for this SAS token\n * @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token\n * @param {string} [identifier] Representing the signed identifier (only for Service SAS)\n * @param {string} [resource] Representing the storage container or blob (only for Service SAS)\n * @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS)\n * @param {string} [contentDisposition] Representing the content-disposition header (only for Blob/File Service SAS)\n * @param {string} [contentEncoding] Representing the content-encoding header (only for Blob/File Service SAS)\n * @param {string} [contentLanguage] Representing the content-language header (only for Blob/File Service SAS)\n * @param {string} [contentType] Representing the content-type header (only for Blob/File Service SAS)\n * @param {userDelegationKey} [userDelegationKey] Representing the user delegation key properties\n * @param {string} [preauthorizedAgentObjectId] Representing the authorized AAD Object ID (only for User Delegation SAS)\n * @param {string} [correlationId] Representing the correlation ID (only for User Delegation SAS)\n * @memberof SASQueryParameters\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string\n );\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param {string} version Representing the storage version\n * @param {string} signature Representing the signature for the SAS token\n * @param {SASQueryParametersOptions} [options] Optional. Options to construct the SASQueryParameters.\n * @memberof SASQueryParameters\n */\n constructor(version: string, signature: string, options?: SASQueryParametersOptions);\n\n constructor(\n version: string,\n signature: string,\n permissionsOrOptions?: string | SASQueryParametersOptions,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string\n ) {\n this.version = version;\n this.signature = signature;\n\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n } else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n * @returns {string}\n * @memberof SASQueryParameters\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"skoid\", // Signed object ID\n \"sktid\", // Signed tenant ID\n \"skt\", // Signed key start time\n \"ske\", // Signed key expiry time\n \"sks\", // Signed key service\n \"skv\", // Signed key version\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\"\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined\n );\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined\n );\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @private\n * @param {string[]} queries\n * @param {string} key\n * @param {string} [value]\n * @returns {void}\n * @memberof SASQueryParameters\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js new file mode 100644 index 000000000..38a132585 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @export + * @param {SasIPRange} ipRange + * @returns {string} + */ +export function ipRangeToString(ipRange) { + return ipRange.end ? ipRange.start + "-" + ipRange.end : ipRange.start; +} +//# sourceMappingURL=SasIPRange.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js.map new file mode 100644 index 000000000..f14e12125 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/sas/SasIPRange.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SasIPRange.js","sourceRoot":"","sources":["../../../../src/sas/SasIPRange.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AA2BlC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAI,OAAO,CAAC,KAAK,SAAI,OAAO,CAAC,GAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACzE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * Allowed IP range for a SAS.\n *\n * @export\n * @interface SasIPRange\n */\nexport interface SasIPRange {\n /**\n * Starting IP address in the IP range.\n * If end IP doesn't provide, start IP will the only IP allowed.\n *\n * @type {string}\n * @memberof SasIPRange\n */\n start: string;\n /**\n * Optional. IP address that ends the IP range.\n * If not provided, start IP will the only IP allowed.\n *\n * @type {string}\n * @memberof SasIPRange\n */\n end?: string;\n}\n\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @export\n * @param {SasIPRange} ipRange\n * @returns {string}\n */\nexport function ipRangeToString(ipRange: SasIPRange): string {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js new file mode 100644 index 000000000..93558bfea --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __generator } from "tslib"; +// In browser, during webpack or browserify bundling, this module will be replaced by 'events' +// https://github.com/Gozala/events +import { EventEmitter } from "events"; +/** + * States for Batch. + * + * @enum {number} + */ +var BatchStates; +(function (BatchStates) { + BatchStates[BatchStates["Good"] = 0] = "Good"; + BatchStates[BatchStates["Error"] = 1] = "Error"; +})(BatchStates || (BatchStates = {})); +/** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + * + * @export + * @class Batch + */ +var Batch = /** @class */ (function () { + /** + * Creates an instance of Batch. + * @param {number} [concurrency=5] + * @memberof Batch + */ + function Batch(concurrency) { + if (concurrency === void 0) { concurrency = 5; } + /** + * Number of active operations under execution. + * + * @private + * @type {number} + * @memberof Batch + */ + this.actives = 0; + /** + * Number of completed operations under execution. + * + * @private + * @type {number} + * @memberof Batch + */ + this.completed = 0; + /** + * Offset of next operation to be executed. + * + * @private + * @type {number} + * @memberof Batch + */ + this.offset = 0; + /** + * Operation array to be executed. + * + * @private + * @type {Operation[]} + * @memberof Batch + */ + this.operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + * + * @private + * @type {BatchStates} + * @memberof Batch + */ + this.state = BatchStates.Good; + if (concurrency < 1) { + throw new RangeError("concurrency must be larger than 0"); + } + this.concurrency = concurrency; + this.emitter = new EventEmitter(); + } + /** + * Add a operation into queue. + * + * @param {Operation} operation + * @memberof Batch + */ + Batch.prototype.addOperation = function (operation) { + var _this = this; + this.operations.push(function () { return __awaiter(_this, void 0, void 0, function () { + var error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + this.actives++; + return [4 /*yield*/, operation()]; + case 1: + _a.sent(); + this.actives--; + this.completed++; + this.parallelExecute(); + return [3 /*break*/, 3]; + case 2: + error_1 = _a.sent(); + this.emitter.emit("error", error_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }; + /** + * Start execute operations in the queue. + * + * @returns {Promise} + * @memberof Batch + */ + Batch.prototype.do = function () { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + if (this.operations.length === 0) { + return [2 /*return*/, Promise.resolve()]; + } + this.parallelExecute(); + return [2 /*return*/, new Promise(function (resolve, reject) { + _this.emitter.on("finish", resolve); + _this.emitter.on("error", function (error) { + _this.state = BatchStates.Error; + reject(error); + }); + })]; + }); + }); + }; + /** + * Get next operation to be executed. Return null when reaching ends. + * + * @private + * @returns {(Operation | null)} + * @memberof Batch + */ + Batch.prototype.nextOperation = function () { + if (this.offset < this.operations.length) { + return this.operations[this.offset++]; + } + return null; + }; + /** + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. + * + * @private + * @returns {void} + * @memberof Batch + */ + Batch.prototype.parallelExecute = function () { + if (this.state === BatchStates.Error) { + return; + } + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + var operation = this.nextOperation(); + if (operation) { + operation(); + } + else { + return; + } + } + }; + return Batch; +}()); +export { Batch }; +//# sourceMappingURL=Batch.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js.map new file mode 100644 index 000000000..53bf773eb --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Batch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Batch.js","sourceRoot":"","sources":["../../../../src/utils/Batch.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,8FAA8F;AAC9F,mCAAmC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC;;;;GAIG;AACH,IAAK,WAGJ;AAHD,WAAK,WAAW;IACd,6CAAI,CAAA;IACJ,+CAAK,CAAA;AACP,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;AAED;;;;;;;GAOG;AACH;IAgEE;;;;OAIG;IACH,eAAmB,WAAuB;QAAvB,4BAAA,EAAA,eAAuB;QA5D1C;;;;;;WAMG;QACK,YAAO,GAAW,CAAC,CAAC;QAE5B;;;;;;WAMG;QACK,cAAS,GAAW,CAAC,CAAC;Q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;4BAC/B,MAAM,CAAC,KAAK,CAAC,CAAC;wBAChB,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC,EAAC;;;KACJ;IAED;;;;;;OAMG;IACK,6BAAa,GAArB;QACE,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACxC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;SACvC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACK,+BAAe,GAAvB;QACE,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,KAAK,EAAE;YACpC,OAAO;SACR;QAED,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO;SACR;QAED,OAAO,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE;YACtC,IAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YACvC,IAAI,SAAS,EAAE;gBACb,SAAS,EAAE,CAAC;aACb;iBAAM;gBACL,OAAO;aACR;SACF;IACH,CAAC;IACH,YAAC;AAAD,CAAC,AAjKD,IAiKC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// In browser, during webpack or browserify bundling, this module will be replaced by 'events'\n// https://github.com/Gozala/events\nimport { EventEmitter } from \"events\";\n\n/**\n * Operation is an async function to be executed and managed by Batch.\n */\nexport declare type Operation = () => Promise;\n\n/**\n * States for Batch.\n *\n * @enum {number}\n */\nenum BatchStates {\n Good,\n Error\n}\n\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n *\n * @export\n * @class Batch\n */\nexport class Batch {\n /**\n * Concurrency. Must be lager than 0.\n *\n * @type {number}\n * @memberof Batch\n */\n private concurrency: number;\n\n /**\n * Number of active operations under execution.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private actives: number = 0;\n\n /**\n * Number of completed operations under execution.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private completed: number = 0;\n\n /**\n * Offset of next operation to be executed.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private offset: number = 0;\n\n /**\n * Operation array to be executed.\n *\n * @private\n * @type {Operation[]}\n * @memberof Batch\n */\n private operations: Operation[] = [];\n\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n *\n * @private\n * @type {BatchStates}\n * @memberof Batch\n */\n private state: BatchStates = BatchStates.Good;\n\n /**\n * A private emitter used to pass events inside this class.\n *\n * @private\n * @type {EventEmitter}\n * @memberof Batch\n */\n private emitter: EventEmitter;\n\n /**\n * Creates an instance of Batch.\n * @param {number} [concurrency=5]\n * @memberof Batch\n */\n public constructor(concurrency: number = 5) {\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new EventEmitter();\n }\n\n /**\n * Add a operation into queue.\n *\n * @param {Operation} operation\n * @memberof Batch\n */\n public addOperation(operation: Operation): void {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n } catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n\n /**\n * Start execute operations in the queue.\n *\n * @returns {Promise}\n * @memberof Batch\n */\n public async do(): Promise {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n\n this.parallelExecute();\n\n return new Promise((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n * @private\n * @returns {(Operation | null)}\n * @memberof Batch\n */\n private nextOperation(): Operation | null {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n * @private\n * @returns {void}\n * @memberof Batch\n */\n private parallelExecute(): void {\n if (this.state === BatchStates.Error) {\n return;\n }\n\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n } else {\n return;\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js new file mode 100644 index 000000000..ad9249a21 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __asyncValues, __awaiter, __extends, __generator } from "tslib"; +import { Readable } from "stream"; +import { AvroReadableFromStream, AvroReader } from "../../../storage-internal-avro/src"; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. + * + * @class BlobQuickQueryStream + * @extends {Readable} + */ +var BlobQuickQueryStream = /** @class */ (function (_super) { + __extends(BlobQuickQueryStream, _super); + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQuickQueryStream + */ + function BlobQuickQueryStream(source, options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.source = source; + _this.onProgress = options.onProgress; + _this.onError = options.onError; + _this.avroReader = new AvroReader(new AvroReadableFromStream(_this.source)); + _this.avroIter = _this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + return _this; + } + BlobQuickQueryStream.prototype._read = function () { + var _this = this; + this.readInternal().catch(function (err) { + _this.emit("error", err); + }); + }; + BlobQuickQueryStream.prototype.readInternal = function () { + var e_1, _a; + return __awaiter(this, void 0, void 0, function () { + var _b, _c, obj, schema, exit, data, bytesScanned, totalBytes, fatal, name_1, description, position, e_1_1; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 5, 6, 11]); + _b = __asyncValues(this.avroIter); + _d.label = 1; + case 1: return [4 /*yield*/, _b.next()]; + case 2: + if (!(_c = _d.sent(), !_c.done)) return [3 /*break*/, 4]; + obj = _c.value; + schema = obj.$schema; + if (typeof schema !== "string") { + throw Error("Missing schema in avro record."); + } + exit = false; + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + data = obj.data; + if (data instanceof Uint8Array === false) { + throw Error("Invalid data in avro result record."); + } + if (!this.push(Buffer.from(data))) { + exit = true; + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") { + throw Error("Invalid bytesScanned in avro progress record."); + } + if (this.onProgress) { + this.onProgress({ loadedBytes: bytesScanned }); + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") { + throw Error("Invalid totalBytes in avro end record."); + } + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + fatal = obj.fatal; + if (typeof fatal !== "boolean") { + throw Error("Invalid fatal in avro error record."); + } + name_1 = obj.name; + if (typeof name_1 !== "string") { + throw Error("Invalid name in avro error record."); + } + description = obj.description; + if (typeof description !== "string") { + throw Error("Invalid description in avro error record."); + } + position = obj.position; + if (typeof position !== "number") { + throw Error("Invalid position in avro error record."); + } + this.onError({ + position: position, + name: name_1, + isFatal: fatal, + description: description + }); + } + break; + default: + throw Error("Unknown schema " + schema + " in avro progress record."); + } + if (exit) { + return [3 /*break*/, 4]; + } + _d.label = 3; + case 3: return [3 /*break*/, 1]; + case 4: return [3 /*break*/, 11]; + case 5: + e_1_1 = _d.sent(); + e_1 = { error: e_1_1 }; + return [3 /*break*/, 11]; + case 6: + _d.trys.push([6, , 9, 10]); + if (!(_c && !_c.done && (_a = _b.return))) return [3 /*break*/, 8]; + return [4 /*yield*/, _a.call(_b)]; + case 7: + _d.sent(); + _d.label = 8; + case 8: return [3 /*break*/, 10]; + case 9: + if (e_1) throw e_1.error; + return [7 /*endfinally*/]; + case 10: return [7 /*endfinally*/]; + case 11: return [2 /*return*/]; + } + }); + }); + }; + return BlobQuickQueryStream; +}(Readable)); +export { BlobQuickQueryStream }; +//# sourceMappingURL=BlobQuickQueryStream.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map new file mode 100644 index 000000000..66c609e39 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlobQuickQueryStream.js","sourceRoot":"","sources":["../../../../src/utils/BlobQuickQueryStream.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAKlC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AA4BxF;;;;;;;GAOG;AACH;IAA0C,wCAAQ;IAOhD;;;;;;OAMG;IACH,8BAAmB,MAA6B,EAAE,OAAyC;QAAzC,wBAAA,EAAA,YAAyC;QAA3F,YACE,iBAAO,SAMR;QALC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAA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AM,KAAK,CAAC,oBAAkB,MAAM,8BAA2B,CAAC,CAAC;yBACpE;wBAED,IAAI,IAAI,EAAE;4BACR,wBAAM;yBACP;;;;;;;;;;;;;;;;;;;;;;;;KAEJ;IACH,2BAAC;AAAD,CAAC,AArGD,CAA0C,QAAQ,GAqGjD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Readable } from \"stream\";\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-http\";\n\nimport { AvroReadableFromStream, AvroReader } from \"../../../storage-internal-avro/src\";\nimport { BlobQueryError } from \"../Clients\";\n\nexport interface BlobQuickQueryStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobQuickQueryStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Read progress event handler\n *\n * @memberof BlobQuickQueryStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback to receive error events during the query operaiton.\n *\n * @memberof BlockBlobQueryOptions\n */\n onError?: (error: BlobQueryError) => void;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n *\n * @class BlobQuickQueryStream\n * @extends {Readable}\n */\nexport class BlobQuickQueryStream extends Readable {\n private source: NodeJS.ReadableStream;\n private avroReader: AvroReader;\n private avroIter: AsyncIterableIterator;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private onError?: (error: BlobQueryError) => void;\n\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter\n * @param {BlobQuickQueryStreamOptions} [options={}]\n * @memberof BlobQuickQueryStream\n */\n public constructor(source: NodeJS.ReadableStream, options: BlobQuickQueryStreamOptions = {}) {\n super();\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n\n public _read() {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n\n private async readInternal() {\n for await (const obj of this.avroIter) {\n const schema = (obj as any).$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n\n let exit = false;\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n const data = (obj as any).data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n exit = true;\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n const bytesScanned = (obj as any).bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = (obj as any).totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = (obj as any).fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = (obj as any).name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = (obj as any).description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = (obj as any).position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n\n if (exit) {\n break;\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js new file mode 100644 index 000000000..4dbe075dc --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js @@ -0,0 +1,88 @@ +import { __awaiter, __generator } from "tslib"; +var MutexLockStatus; +(function (MutexLockStatus) { + MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; +})(MutexLockStatus || (MutexLockStatus = {})); +/** + * An async mutex lock. + * + * @export + * @class Mutex + */ +var Mutex = /** @class */ (function () { + function Mutex() { + } + /** + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. + * + * @static + * @param {string} key lock key + * @returns {Promise} + * @memberof Mutex + */ + Mutex.lock = function (key) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve) { + if (_this.keys[key] === undefined || _this.keys[key] === MutexLockStatus.UNLOCKED) { + _this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } + else { + _this.onUnlockEvent(key, function () { + _this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + } + })]; + }); + }); + }; + /** + * Unlock a key. + * + * @static + * @param {string} key + * @returns {Promise} + * @memberof Mutex + */ + Mutex.unlock = function (key) { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve) { + if (_this.keys[key] === MutexLockStatus.LOCKED) { + _this.emitUnlockEvent(key); + } + delete _this.keys[key]; + resolve(); + })]; + }); + }); + }; + Mutex.onUnlockEvent = function (key, handler) { + if (this.listeners[key] === undefined) { + this.listeners[key] = [handler]; + } + else { + this.listeners[key].push(handler); + } + }; + Mutex.emitUnlockEvent = function (key) { + var _this = this; + if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { + var handler_1 = this.listeners[key].shift(); + setImmediate(function () { + handler_1.call(_this); + }); + } + }; + Mutex.keys = {}; + Mutex.listeners = {}; + return Mutex; +}()); +export { Mutex }; +//# sourceMappingURL=Mutex.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js.map new file mode 100644 index 000000000..7d4599877 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/Mutex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Mutex.js","sourceRoot":"","sources":["../../../../src/utils/Mutex.ts"],"names":[],"mappings":";AAAA,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,yDAAM,CAAA;IACN,6DAAQ,CAAA;AACV,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAID;;;;;GAKG;AACH;IAAA;IA6DA,CAAC;IA5DC;;;;;;;;OAQG;IACiB,UAAI,GAAxB,UAAyB,GAAW;;;;gBAClC,sBAAO,IAAI,OAAO,CAAO,UAAC,OAAO;wBAC/B,IAAI,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,QAAQ,EAAE;4BAC/E,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC;4BACxC,OAAO,EAAE,CAAC;yBACX;6BAAM;4BACL,KAAI,CAAC,aAAa,CAAC,GAAG,EAAE;gCACtB,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC;gCACxC,OAAO,EAAE,CAAC;4BACZ,CAAC,CAAC,CAAC;yBACJ;oBACH,CAAC,CAAC,EAAC;;;KACJ;IAED;;;;;;;OAOG;IACiB,YAAM,GAA1B,UAA2B,GAAW;;;;gBACpC,sBAAO,IAAI,OAAO,CAAO,UAAC,OAAO;wBAC/B,IAAI,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,MAAM,EAAE;4BAC7C,KAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;yBAC3B;wBACD,OAAO,KAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;wBACtB,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC,EAAC;;;KACJ;IAKc,mBAAa,GAA5B,UAA6B,GAAW,EAAE,OAAiB;QACzD,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACjC;aAAM;YACL,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;IACH,CAAC;IAEc,qBAAe,GAA9B,UAA+B,GAAW;QAA1C,iBAOC;QANC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACvE,IAAM,SAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5C,YAAY,CAAC;gBACX,SAAQ,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAlBc,UAAI,GAAuC,EAAE,CAAC;IAC9C,eAAS,GAAkC,EAAE,CAAC;IAkB/D,YAAC;CAAA,AA7DD,IA6DC;SA7DY,KAAK","sourcesContent":["enum MutexLockStatus {\n LOCKED,\n UNLOCKED\n}\n\ntype Callback = (...args: any[]) => any;\n\n/**\n * An async mutex lock.\n *\n * @export\n * @class Mutex\n */\nexport class Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @static\n * @param {string} key lock key\n * @returns {Promise}\n * @memberof Mutex\n */\n public static async lock(key: string): Promise {\n return new Promise((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n } else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n\n /**\n * Unlock a key.\n *\n * @static\n * @param {string} key\n * @returns {Promise}\n * @memberof Mutex\n */\n public static async unlock(key: string): Promise {\n return new Promise((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n\n private static keys: { [key: string]: MutexLockStatus } = {};\n private static listeners: { [key: string]: Callback[] } = {};\n\n private static onUnlockEvent(key: string, handler: Callback) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n } else {\n this.listeners[key].push(handler);\n }\n }\n\n private static emitUnlockEvent(key: string) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler!.call(this);\n });\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js new file mode 100644 index 000000000..fa6d2fff5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { Readable } from "stream"; +import { AbortSignal, AbortError } from "@azure/abort-controller"; +var ABORT_ERROR = new AbortError("The operation was aborted."); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. + * + * @class RetriableReadableStream + * @extends {Readable} + */ +var RetriableReadableStream = /** @class */ (function (_super) { + __extends(RetriableReadableStream, _super); + /** + * Creates an instance of RetriableReadableStream. + * + * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter + * @param {ReadableStreamGetter} getter A method calling downloading request returning + * a new ReadableStream from specified offset + * @param {number} offset Offset position in original data source to read + * @param {number} count How much data in original data source to read + * @param {RetriableReadableStreamOptions} [options={}] + * @memberof RetriableReadableStream + */ + function RetriableReadableStream(source, getter, offset, count, options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.retries = 0; + _this.abortHandler = function () { + _this.source.pause(); + _this.emit("error", ABORT_ERROR); + }; + _this.aborter = options.abortSignal || AbortSignal.none; + _this.getter = getter; + _this.source = source; + _this.start = offset; + _this.offset = offset; + _this.end = offset + count - 1; + _this.maxRetryRequests = + options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; + _this.onProgress = options.onProgress; + _this.options = options; + _this.aborter.addEventListener("abort", _this.abortHandler); + _this.setSourceDataHandler(); + _this.setSourceEndHandler(); + _this.setSourceErrorHandler(); + return _this; + } + RetriableReadableStream.prototype._read = function () { + if (!this.aborter.aborted) { + this.source.resume(); + } + }; + RetriableReadableStream.prototype.setSourceDataHandler = function () { + var _this = this; + this.source.on("data", function (data) { + if (_this.options.doInjectErrorOnce) { + _this.options.doInjectErrorOnce = undefined; + _this.source.pause(); + _this.source.removeAllListeners("data"); + _this.source.emit("end"); + return; + } + // console.log( + // `Offset: ${this.offset}, Received ${data.length} from internal stream` + // ); + _this.offset += data.length; + if (_this.onProgress) { + _this.onProgress({ loadedBytes: _this.offset - _this.start }); + } + if (!_this.push(data)) { + _this.source.pause(); + } + }); + }; + RetriableReadableStream.prototype.setSourceEndHandler = function () { + var _this = this; + this.source.on("end", function () { + // console.log( + // `Source stream emits end, offset: ${ + // this.offset + // }, dest end : ${this.end}` + // ); + if (_this.offset - 1 === _this.end) { + _this.aborter.removeEventListener("abort", _this.abortHandler); + _this.push(null); + } + else if (_this.offset <= _this.end) { + // console.log( + // `retries: ${this.retries}, max retries: ${this.maxRetries}` + // ); + if (_this.retries < _this.maxRetryRequests) { + _this.retries += 1; + _this.getter(_this.offset) + .then(function (newSource) { + _this.source = newSource; + _this.setSourceDataHandler(); + _this.setSourceEndHandler(); + _this.setSourceErrorHandler(); + }) + .catch(function (error) { + _this.emit("error", error); + }); + } + else { + _this.emit("error", new Error( + // tslint:disable-next-line:max-line-length + "Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: " + (_this + .offset - 1) + ", data needed offset: " + _this.end + ", retries: " + _this.retries + ", max retries: " + _this.maxRetryRequests)); + } + } + else { + _this.emit("error", new Error("Data corruption failure: Received more data than original request, data needed offset is " + _this.end + ", received offset: " + (_this.offset - 1))); + } + }); + }; + RetriableReadableStream.prototype.setSourceErrorHandler = function () { + var _this = this; + this.source.on("error", function (error) { + _this.emit("error", error); + }); + }; + return RetriableReadableStream; +}(Readable)); +export { RetriableReadableStream }; +//# sourceMappingURL=RetriableReadableStream.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map new file mode 100644 index 000000000..87d9f9f55 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RetriableReadableStream.js","sourceRoot":"","sources":["../../../../src/utils/RetriableReadableStream.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAGlC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,WAAW,EAAmB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA4CnF,IAAM,WAAW,GAAG,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAEjE;;;;;;;G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A1ID,CAA6C,QAAQ,GA0IpD","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { TransferProgressEvent } from \"@azure/core-http\";\nimport { Readable } from \"stream\";\n\nimport { AbortSignal, AbortSignalLike, AbortError } from \"@azure/abort-controller\";\n\nexport type ReadableStreamGetter = (offset: number) => Promise;\n\nexport interface RetriableReadableStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof RetriableReadableStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Max retry count (>=0), undefined or invalid value means no retry\n *\n * @type {number}\n * @memberof RetriableReadableStreamOptions\n */\n maxRetryRequests?: number;\n\n /**\n * Read progress event handler\n *\n * @memberof RetriableReadableStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Debug purpose only. Used to inject an unexpected end to existing internal stream,\n * to test stream retry works well or not.\n *\n * When assign it to true, for next incoming \"data\" event of internal stream,\n * RetriableReadableStream will try to emit an \"end\" event to existing internal\n * stream to force it end and start retry from the breaking point.\n * The value will then update to \"undefined\", once the injection works.\n *\n * @type {boolean}\n * @memberof RetriableReadableStreamOptions\n */\n doInjectErrorOnce?: boolean;\n}\n\nconst ABORT_ERROR = new AbortError(\"The operation was aborted.\");\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n *\n * @class RetriableReadableStream\n * @extends {Readable}\n */\nexport class RetriableReadableStream extends Readable {\n private aborter: AbortSignalLike;\n private start: number;\n private offset: number;\n private end: number;\n private getter: ReadableStreamGetter;\n private source: NodeJS.ReadableStream;\n private retries: number = 0;\n private maxRetryRequests: number;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private options: RetriableReadableStreamOptions;\n private abortHandler = () => {\n this.source.pause();\n this.emit(\"error\", ABORT_ERROR);\n };\n\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter\n * @param {ReadableStreamGetter} getter A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param {number} offset Offset position in original data source to read\n * @param {number} count How much data in original data source to read\n * @param {RetriableReadableStreamOptions} [options={}]\n * @memberof RetriableReadableStream\n */\n public constructor(\n source: NodeJS.ReadableStream,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n super();\n this.aborter = options.abortSignal || AbortSignal.none;\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n\n this.aborter.addEventListener(\"abort\", this.abortHandler);\n\n this.setSourceDataHandler();\n this.setSourceEndHandler();\n this.setSourceErrorHandler();\n }\n\n public _read() {\n if (!this.aborter.aborted) {\n this.source.resume();\n }\n }\n\n private setSourceDataHandler() {\n this.source.on(\"data\", (data: Buffer) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n });\n }\n\n private setSourceEndHandler() {\n this.source.on(\"end\", () => {\n // console.log(\n // `Source stream emits end, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n if (this.offset - 1 === this.end) {\n this.aborter.removeEventListener(\"abort\", this.abortHandler);\n this.push(null);\n } else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceDataHandler();\n this.setSourceEndHandler();\n this.setSourceErrorHandler();\n })\n .catch((error) => {\n this.emit(\"error\", error);\n });\n } else {\n this.emit(\n \"error\",\n new Error(\n // tslint:disable-next-line:max-line-length\n `Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this\n .offset - 1}, data needed offset: ${this.end}, retries: ${\n this.retries\n }, max retries: ${this.maxRetryRequests}`\n )\n );\n }\n } else {\n this.emit(\n \"error\",\n new Error(\n `Data corruption failure: Received more data than original request, data needed offset is ${\n this.end\n }, received offset: ${this.offset - 1}`\n )\n );\n }\n });\n }\n\n private setSourceErrorHandler() {\n this.source.on(\"error\", (error) => {\n this.emit(\"error\", error);\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js new file mode 100644 index 000000000..2ccc5517e --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { DefaultHttpClient } from "@azure/core-http"; +var _defaultHttpClient = new DefaultHttpClient(); +export function getCachedDefaultHttpClient() { + return _defaultHttpClient; +} +//# sourceMappingURL=cache.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js.map new file mode 100644 index 000000000..5fcdb8f31 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../src/utils/cache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,IAAM,kBAAkB,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAEnD,MAAM,UAAU,0BAA0B;IACxC,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DefaultHttpClient } from \"@azure/core-http\";\nimport { IHttpClient } from \"../Pipeline\";\n\nconst _defaultHttpClient = new DefaultHttpClient();\n\nexport function getCachedDefaultHttpClient(): IHttpClient {\n return _defaultHttpClient;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js new file mode 100644 index 000000000..11f0d6c73 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export var SDK_VERSION = "12.3.0"; +export var SERVICE_VERSION = "2020-02-10"; +export var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB +export var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB +export var BLOCK_BLOB_MAX_BLOCKS = 50000; +export var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB +export var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB +export var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; +/** + * The OAuth scope to use with Azure Storage. + */ +export var StorageOAuthScopes = "https://storage.azure.com/.default"; +export var URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } +}; +export var HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416 +}; +export var HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version" +}; +export var ETagNone = ""; +export var ETagAny = "*"; +export var SIZE_1_MB = 1 * 1024 * 1024; +export var BATCH_MAX_REQUEST = 256; +export var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; +export var HTTP_LINE_ENDING = "\r\n"; +export var HTTP_VERSION_1_1 = "HTTP/1.1"; +export var EncryptionAlgorithmAES25 = "AES256"; +export var DevelopmentConnectionString = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"; +export var StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-if-tags", + "x-ms-source-if-tags" +]; +export var StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot" +]; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js.map new file mode 100644 index 000000000..cb1e25489 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,MAAM,CAAC,IAAM,WAAW,GAAW,QAAQ,CAAC;AAC5C,MAAM,CAAC,IAAM,eAAe,GAAW,YAAY,CAAC;AAEpD,MAAM,CAAC,IAAM,gCAAgC,GAAW,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AACnF,MAAM,CAAC,IAAM,gCAAgC,GAAW,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,SAAS;AACrF,MAAM,CAAC,IAAM,qBAAqB,GAAW,KAAK,CAAC;AACnD,MAAM,CAAC,IAAM,+BAA+B,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAC9E,MAAM,CAAC,IAAM,iCAAiC,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAChF,MAAM,CAAC,IAAM,mCAAm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wB;IACxB,yBAAyB;IACzB,2BAA2B;IAC3B,gBAAgB;IAChB,gCAAgC;IAChC,oBAAoB;IACpB,+BAA+B;IAC/B,uBAAuB;IACvB,4BAA4B;IAC5B,qCAAqC;IACrC,2BAA2B;IAC3B,4BAA4B;IAC5B,4BAA4B;IAC5B,4BAA4B;IAC5B,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,wBAAwB;IACxB,4BAA4B;IAC5B,yBAAyB;IACzB,6BAA6B;IAC7B,eAAe;IACf,yBAAyB;IACzB,sBAAsB;IACtB,+BAA+B;IAC/B,2BAA2B;IAC3B,iCAAiC;IACjC,gBAAgB;IAChB,4BAA4B;IAC5B,cAAc;IACd,qBAAqB;CACtB,CAAC;AAEF,MAAM,CAAC,IAAM,wCAAwC,GAAG;IACtD,MAAM;IACN,YAAY;IACZ,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,eAAe;IACf,WAAW;IACX,cAAc;IACd,KAAK;IACL,OAAO;IACP,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,UAAU;CACX,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.3.0\";\nexport const SERVICE_VERSION: string = \"2020-02-10\";\n\nexport const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB\nexport const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 4000 * 1024 * 1024; // 4000MB\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const DEFAULT_BLOCK_BUFFER_SIZE_BYTES: number = 8 * 1024 * 1024; // 8MB\nexport const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\"\n }\n};\n\nexport const HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\"\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\n\nexport const SIZE_1_MB = 1 * 1024 * 1024;\nexport const BATCH_MAX_REQUEST = 256;\nexport const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nexport const HTTP_LINE_ENDING = \"\\r\\n\";\nexport const HTTP_VERSION_1_1 = \"HTTP/1.1\";\n\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\nexport const StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\"\n];\n\nexport const StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\"\n];\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js new file mode 100644 index 000000000..8f1ca14ce --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { __assign } from "tslib"; +import { getTracer } from "@azure/core-tracing"; +import { SpanKind } from "@opentelemetry/api"; +/** + * Creates a span using the global tracer. + * @param name The name of the operation being performed. + * @param tracingOptions The options for the underlying http request. + */ +export function createSpan(operationName, tracingOptions) { + if (tracingOptions === void 0) { tracingOptions = {}; } + var tracer = getTracer(); + var spanOptions = __assign(__assign({}, tracingOptions.spanOptions), { kind: SpanKind.INTERNAL }); + var span = tracer.startSpan("Azure.Storage.Blob." + operationName, spanOptions); + span.setAttribute("az.namespace", "Microsoft.Storage"); + var newOptions = tracingOptions.spanOptions || {}; + if (span.isRecording()) { + newOptions = __assign(__assign({}, tracingOptions.spanOptions), { parent: span.context(), attributes: __assign(__assign({}, spanOptions.attributes), { "az.namespace": "Microsoft.Storage" }) }); + } + return { + span: span, + spanOptions: newOptions + }; +} +//# sourceMappingURL=tracing.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js.map new file mode 100644 index 000000000..581e6523e --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/tracing.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,SAAS,EAAwC,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAsC,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAElF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,aAAqB,EACrB,cAA4C;IAA5C,+BAAA,EAAA,mBAA4C;IAE5C,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,IAAM,WAAW,yBACZ,cAAc,CAAC,WAAW,KAC7B,IAAI,EAAE,QAAQ,CAAC,QAAQ,GACxB,CAAC;IAEF,IAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAsB,aAAe,EAAE,WAAW,CAAC,CAAC;IAClF,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,cAAc,CAAC,WAAW,IAAI,EAAE,CAAC;IAClD,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACtB,UAAU,yBACL,cAAc,CAAC,WAAW,KAC7B,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EACtB,UAAU,wBACL,WAAW,CAAC,UAAU,KACzB,cAAc,EAAE,mBAAmB,MAEtC,CAAC;KACH;IAED,OAAO;QACL,IAAI,MAAA;QACJ,WAAW,EAAE,UAAU;KACxB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getTracer, OperationTracingOptions, SpanOptions } from \"@azure/core-tracing\";\nimport { Span, SpanOptions as OTSpanOptions, SpanKind } from \"@opentelemetry/api\";\n\n/**\n * Creates a span using the global tracer.\n * @param name The name of the operation being performed.\n * @param tracingOptions The options for the underlying http request.\n */\nexport function createSpan(\n operationName: string,\n tracingOptions: OperationTracingOptions = {}\n): { span: Span; spanOptions: SpanOptions } {\n const tracer = getTracer();\n const spanOptions: OTSpanOptions = {\n ...tracingOptions.spanOptions,\n kind: SpanKind.INTERNAL\n };\n\n const span = tracer.startSpan(`Azure.Storage.Blob.${operationName}`, spanOptions);\n span.setAttribute(\"az.namespace\", \"Microsoft.Storage\");\n\n let newOptions = tracingOptions.spanOptions || {};\n if (span.isRecording()) {\n newOptions = {\n ...tracingOptions.spanOptions,\n parent: span.context(),\n attributes: {\n ...spanOptions.attributes,\n \"az.namespace\": \"Microsoft.Storage\"\n }\n };\n }\n\n return {\n span,\n spanOptions: newOptions\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js new file mode 100644 index 000000000..1e96311ea --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __generator } from "tslib"; +/** + * Convert a Browser Blob object into ArrayBuffer. + * + * @export + * @param {Blob} blob + * @returns {Promise} + */ +export function blobToArrayBuffer(blob) { + return __awaiter(this, void 0, void 0, function () { + var fileReader; + return __generator(this, function (_a) { + fileReader = new FileReader(); + return [2 /*return*/, new Promise(function (resolve, reject) { + fileReader.onloadend = function (ev) { + resolve(ev.target.result); + }; + fileReader.onerror = reject; + fileReader.readAsArrayBuffer(blob); + })]; + }); + }); +} +/** + * Convert a Browser Blob object into string. + * + * @export + * @param {Blob} blob + * @returns {Promise} + */ +export function blobToString(blob) { + return __awaiter(this, void 0, void 0, function () { + var fileReader; + return __generator(this, function (_a) { + fileReader = new FileReader(); + return [2 /*return*/, new Promise(function (resolve, reject) { + fileReader.onloadend = function (ev) { + resolve(ev.target.result); + }; + fileReader.onerror = reject; + fileReader.readAsText(blob); + })]; + }); + }); +} +export function streamToBuffer() { } +export function streamToBuffer2() { } +export function readStreamToLocalFile() { } +export var fsStat = function stat() { }; +export var fsCreateReadStream = function createReadStream() { }; +//# sourceMappingURL=utils.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js.map new file mode 100644 index 000000000..c7921c4b1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.browser.js","sourceRoot":"","sources":["../../../../src/utils/utils.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC;;;;;;GAMG;AACH,MAAM,UAAgB,iBAAiB,CAAC,IAAU;;;;YAC1C,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;YACpC,sBAAO,IAAI,OAAO,CAAc,UAAC,OAAO,EAAE,MAAM;oBAC9C,UAAU,CAAC,SAAS,GAAG,UAAC,EAAO;wBAC7B,OAAO,CAAC,EAAE,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC;oBAC7B,CAAC,CAAC;oBACF,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC;oBAC5B,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACrC,CAAC,CAAC,EAAC;;;CACJ;AAED;;;;;;GAMG;AACH,MAAM,UAAgB,YAAY,CAAC,IAAU;;;;YACrC,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;YACpC,sBAAO,IAAI,OAAO,CAAS,UAAC,OAAO,EAAE,MAAM;oBACzC,UAAU,CAAC,SAAS,GAAG,UAAC,EAAO;wBAC7B,OAAO,CAAC,EAAE,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC;oBAC7B,CAAC,CAAC;oBACF,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC;oBAC5B,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAC9B,CAAC,CAAC,EAAC;;;CACJ;AAED,MAAM,UAAU,cAAc,KAAI,CAAC;AAEnC,MAAM,UAAU,eAAe,KAAI,CAAC;AAEpC,MAAM,UAAU,qBAAqB,KAAI,CAAC;AAE1C,MAAM,CAAC,IAAM,MAAM,GAAG,SAAS,IAAI,KAAI,CAAC,CAAC;AAEzC,MAAM,CAAC,IAAM,kBAAkB,GAAG,SAAS,gBAAgB,KAAI,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * Convert a Browser Blob object into ArrayBuffer.\n *\n * @export\n * @param {Blob} blob\n * @returns {Promise}\n */\nexport async function blobToArrayBuffer(blob: Blob): Promise {\n const fileReader = new FileReader();\n return new Promise((resolve, reject) => {\n fileReader.onloadend = (ev: any) => {\n resolve(ev.target!.result);\n };\n fileReader.onerror = reject;\n fileReader.readAsArrayBuffer(blob);\n });\n}\n\n/**\n * Convert a Browser Blob object into string.\n *\n * @export\n * @param {Blob} blob\n * @returns {Promise}\n */\nexport async function blobToString(blob: Blob): Promise {\n const fileReader = new FileReader();\n return new Promise((resolve, reject) => {\n fileReader.onloadend = (ev: any) => {\n resolve(ev.target!.result);\n };\n fileReader.onerror = reject;\n fileReader.readAsText(blob);\n });\n}\n\nexport function streamToBuffer() {}\n\nexport function streamToBuffer2() {}\n\nexport function readStreamToLocalFile() {}\n\nexport const fsStat = function stat() {};\n\nexport const fsCreateReadStream = function createReadStream() {};\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js new file mode 100644 index 000000000..7a10363fa --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js @@ -0,0 +1,643 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __generator } from "tslib"; +import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; +import { DevelopmentConnectionString, HeaderConstants, URLConstants } from "./constants"; +/** + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @export + * @param {string} url + * @returns {string} + */ +export function escapeURLPath(url) { + var urlParsed = URLBuilder.parse(url); + var path = urlParsed.getPath(); + path = path || "/"; + path = escape(path); + urlParsed.setPath(path); + return urlParsed.toString(); +} +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + var proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + var matchCredentials = connectionString.split(";"); + for (var _i = 0, matchCredentials_1 = matchCredentials; _i < matchCredentials_1.length; _i++) { + var element = matchCredentials_1[_i]; + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; +} +export function getValueInConnString(connectionString, argument) { + var elements = connectionString.split(";"); + for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { + var element = elements_1[_i]; + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; +} +/** + * Extracts the parts of an Azure Storage account connection string. + * + * @export + * @param {string} connectionString Connection string. + * @returns {ConnectionString} String key value pairs of the storage account's url and credentials. + */ +export function extractConnectionStringParts(connectionString) { + var proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + var blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + var defaultEndpointsProtocol = ""; + var accountName = ""; + var accountKey = Buffer.from("accountKey", "base64"); + var endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + var protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = defaultEndpointsProtocol + "://" + accountName + ".blob." + endpointSuffix; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName: accountName, + accountKey: accountKey, + proxyUri: proxyUri + }; + } + else { + // SAS connection string + var accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + var accountName = getAccountNameFromUrl(blobEndpoint); + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + return { kind: "SASConnString", url: blobEndpoint, accountName: accountName, accountSas: accountSas }; + } +} +/** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param {string} text + * @returns {string} + */ +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} +/** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @export + * @param {string} url Source URL string + * @param {string} name String to be appended to URL + * @returns {string} An updated URL string + */ +export function appendToURLPath(url, name) { + var urlParsed = URLBuilder.parse(url); + var path = urlParsed.getPath(); + path = path ? (path.endsWith("/") ? "" + path + name : path + "/" + name) : name; + urlParsed.setPath(path); + return urlParsed.toString(); +} +/** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @export + * @param {string} url Source URL string + * @param {string} name Parameter name + * @param {string} [value] Parameter value + * @returns {string} An updated URL string + */ +export function setURLParameter(url, name, value) { + var urlParsed = URLBuilder.parse(url); + urlParsed.setQueryParameter(name, value); + return urlParsed.toString(); +} +/** + * Get URL parameter by name. + * + * @export + * @param {string} url + * @param {string} name + * @returns {(string | string[] | undefined)} + */ +export function getURLParameter(url, name) { + var urlParsed = URLBuilder.parse(url); + return urlParsed.getQueryParameterValue(name); +} +/** + * Set URL host. + * + * @export + * @param {string} url Source URL string + * @param {string} host New host string + * @returns An updated URL string + */ +export function setURLHost(url, host) { + var urlParsed = URLBuilder.parse(url); + urlParsed.setHost(host); + return urlParsed.toString(); +} +/** + * Get URL path from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +export function getURLPath(url) { + var urlParsed = URLBuilder.parse(url); + return urlParsed.getPath(); +} +/** + * Get URL scheme from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +export function getURLScheme(url) { + var urlParsed = URLBuilder.parse(url); + return urlParsed.getScheme(); +} +/** + * Get URL path and query from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +export function getURLPathAndQuery(url) { + var urlParsed = URLBuilder.parse(url); + var pathString = urlParsed.getPath(); + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + var queryString = urlParsed.getQuery() || ""; + queryString = queryString.trim(); + if (queryString != "") { + queryString = queryString.startsWith("?") ? queryString : "?" + queryString; // Ensure query string start with '?' + } + return "" + pathString + queryString; +} +/** + * Get URL query key value pairs from an URL string. + * + * @export + * @param {string} url + * @returns {{[key: string]: string}} + */ +export function getURLQueries(url) { + var queryString = URLBuilder.parse(url).getQuery(); + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substr(1) : queryString; + var querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter(function (value) { + var indexOfEqual = value.indexOf("="); + var lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + var queries = {}; + for (var _i = 0, querySubStrings_1 = querySubStrings; _i < querySubStrings_1.length; _i++) { + var querySubString = querySubStrings_1[_i]; + var splitResults = querySubString.split("="); + var key = splitResults[0]; + var value = splitResults[1]; + queries[key] = value; + } + return queries; +} +/** + * Rounds a date off to seconds. + * + * @export + * @param {Date} date + * @param {boolean} [withMilliseconds=true] If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns {string} Date string in ISO8061 format, with or without 7 milliseconds component + */ +export function truncatedISO8061Date(date, withMilliseconds) { + if (withMilliseconds === void 0) { withMilliseconds = true; } + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + var dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; +} +/** + * Base64 encode. + * + * @export + * @param {string} content + * @returns {string} + */ +export function base64encode(content) { + return !isNode ? btoa(content) : Buffer.from(content).toString("base64"); +} +/** + * Base64 decode. + * + * @export + * @param {string} encodedString + * @returns {string} + */ +export function base64decode(encodedString) { + return !isNode ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); +} +/** + * Generate a 64 bytes base64 block ID string. + * + * @export + * @param {number} blockIndex + * @returns {string} + */ +export function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + var maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + var maxBlockIndexLength = 6; + var maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + var res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); +} +/** + * Delay specified time interval. + * + * @export + * @param {number} timeInMs + * @param {AbortSignalLike} [aborter] + * @param {Error} [abortError] + */ +export function delay(timeInMs, aborter, abortError) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + var timeout; + var abortHandler = function () { + if (timeout !== undefined) { + clearTimeout(timeout); + } + reject(abortError); + }; + var resolveHandler = function () { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); + } + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); + } + })]; + }); + }); +} +/** + * String.prototype.padStart() + * + * @export + * @param {string} currentString + * @param {number} targetLength + * @param {string} [padString=" "] + * @returns {string} + */ +export function padStart(currentString, targetLength, padString) { + if (padString === void 0) { padString = " "; } + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } +} +export function sanitizeURL(url) { + var safeURL = url; + if (getURLParameter(safeURL, URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; +} +export function sanitizeHeaders(originalHeader) { + var headers = new HttpHeaders(); + for (var _i = 0, _a = originalHeader.headersArray(); _i < _a.length; _i++) { + var header = _a[_i]; + if (header.name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(header.name, "*****"); + } + else if (header.name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(header.name, sanitizeURL(header.value)); + } + else { + headers.set(header.name, header.value); + } + } + return headers; +} +/** + * If two strings are equal when compared case insensitive. + * + * @export + * @param {string} str1 + * @param {string} str2 + * @returns {boolean} + */ +export function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); +} +/** + * Extracts account name from the url + * @param {string} url url to extract the account name from + * @returns {string} with the account name + */ +export function getAccountNameFromUrl(url) { + var parsedUrl = URLBuilder.parse(url); + var accountName; + try { + if (parsedUrl.getHost().split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.getHost().split(".")[0]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.getPath().split("/")[1]; + } + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; + } + return accountName; + } + catch (error) { + throw new Error("Unable to extract accountName with provided information."); + } +} +export function isIpEndpointStyle(parsedUrl) { + if (parsedUrl.getHost() == undefined) { + return false; + } + var host = parsedUrl.getHost() + (parsedUrl.getPort() == undefined ? "" : ":" + parsedUrl.getPort()); + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // 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); +} +/** + * Convert Tags to encoded string. + * + * @export + * @param {Tags} tags + * @returns {string | undefined} + */ +export function toBlobTagsString(tags) { + if (tags === undefined) { + return undefined; + } + var tagPairs = []; + for (var key in tags) { + if (tags.hasOwnProperty(key)) { + var value = tags[key]; + tagPairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); + } + } + return tagPairs.join("&"); +} +/** + * Convert Tags type to BlobTags. + * + * @export + * @param {Tags} [tags] + * @returns {(BlobTags | undefined)} + */ +export function toBlobTags(tags) { + if (tags === undefined) { + return undefined; + } + var res = { + blobTagSet: [] + }; + for (var key in tags) { + if (tags.hasOwnProperty(key)) { + var value = tags[key]; + res.blobTagSet.push({ + key: key, + value: value + }); + } + } + return res; +} +/** + * Covert BlobTags to Tags type. + * + * @export + * @param {BlobTags} [tags] + * @returns {(Tags | undefined)} + */ +export function toTags(tags) { + if (tags === undefined) { + return undefined; + } + var res = {}; + for (var _i = 0, _a = tags.blobTagSet; _i < _a.length; _i++) { + var blobTag = _a[_i]; + res[blobTag.key] = blobTag.value; + } + return res; +} +/** + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @export + * @param {(BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration)} [textConfiguration] + * @returns {(QuerySerialization | undefined)} + */ +export function toQuerySerialization(textConfiguration) { + if (textConfiguration === undefined) { + return undefined; + } + switch (textConfiguration.kind) { + case "csv": + return { + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false + } + } + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator + } + } + }; + case "arrow": + return { + format: { + type: "arrow", + arrowConfiguration: { + schema: textConfiguration.schema + } + } + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } +} +export function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) { + return undefined; + } + if ("policy-id" in objectReplicationRecord) { + // If the dictionary contains a key with policy id, we are not required to do any parsing since + // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. + return undefined; + } + var orProperties = []; + var _loop_1 = function (key) { + var ids = key.split("_"); + var policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) { + ids[0] = ids[0].substring(policyPrefix.length); + } + var rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key] + }; + var policyIndex = orProperties.findIndex(function (policy) { return policy.policyId === ids[0]; }); + if (policyIndex > -1) { + orProperties[policyIndex].rules.push(rule); + } + else { + orProperties.push({ + policyId: ids[0], + rules: [rule] + }); + } + }; + for (var key in objectReplicationRecord) { + _loop_1(key); + } + return orProperties; +} +//# sourceMappingURL=utils.common.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js.map new file mode 100644 index 000000000..9677d80c7 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.common.js","sourceRoot":"","sources":["../../../../src/utils/utils.common.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnE,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;IAEnB,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC;AAWD,SAAS,4BAA4B,CAAC,gBAAwB;IAC5D,gCAAgC;IAChC,sKAAsK;IACtK,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,gBAAgB,CAAC,MAAM,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,EAAE;QACjE,4FAA4F;QAC5F,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrD,KAAsB,UAAgB,EAAhB,qCAAgB,EAAhB,8BAAgB,EAAhB,IAAgB,EAAE;YAAnC,IAAM,OAAO,yBAAA;YAChB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE;gBAC5D,QAAQ,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AAI,WAAW,GAAG,CAAC,CAAC,EAAE;YACpB,YAAY,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC5C;aAAM;YACL,YAAY,CAAC,IAAI,CAAC;gBAChB,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;gBAChB,KAAK,EAAE,CAAC,IAAI,CAAC;aACd,CAAC,CAAC;SACJ;;IAlBH,KAAK,IAAM,GAAG,IAAI,uBAAuB;gBAA9B,GAAG;KAmBb;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpHeaders, isNode, URLBuilder } from \"@azure/core-http\";\n\nimport {\n BlobQueryArrowConfiguration,\n BlobQueryCsvTextConfiguration,\n BlobQueryJsonTextConfiguration\n} from \"../Clients\";\nimport { QuerySerialization, BlobTags } from \"../generated/src/models\";\nimport { DevelopmentConnectionString, HeaderConstants, URLConstants } from \"./constants\";\nimport {\n Tags,\n ObjectReplicationPolicy,\n ObjectReplicationRule,\n ObjectReplicationStatus\n} from \"../models\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @export\n * @param {string} url\n * @returns {string}\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n proxyUri?: string; // Development Connection String may contain proxyUri\n}\n\nfunction getProxyUriFromDevConnString(connectionString: string): string {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")![1];\n }\n }\n }\n return proxyUri;\n}\n\nexport function getValueInConnString(\n connectionString: string,\n argument:\n | \"BlobEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\"\n) {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @export\n * @param {string} connectionString Connection string.\n * @returns {ConnectionString} String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n let proxyUri = \"\";\n\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\"\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri\n };\n } else {\n // SAS connection string\n\n let accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n let accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param {string} text\n * @returns {string}\n */\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} name String to be appended to URL\n * @returns {string} An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} name Parameter name\n * @param {string} [value] Parameter value\n * @returns {string} An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @export\n * @param {string} url\n * @param {string} name\n * @returns {(string | string[] | undefined)}\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n\n/**\n * Set URL host.\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} host New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLPath(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n\n/**\n * Get URL scheme from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLScheme(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n\n/**\n * Get URL path and query from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLPathAndQuery(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString != \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n\n return `${pathString}${queryString}`;\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @export\n * @param {string} url\n * @returns {{[key: string]: string}}\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @export\n * @param {Date} date\n * @param {boolean} [withMilliseconds=true] If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns {string} Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @export\n * @param {string} content\n * @returns {string}\n */\nexport function base64encode(content: string): string {\n return !isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @export\n * @param {string} encodedString\n * @returns {string}\n */\nexport function base64decode(encodedString: string): string {\n return !isNode ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @export\n * @param {number} blockIndex\n * @returns {string}\n */\nexport function generateBlockID(blockIDPrefix: string, blockIndex: number): string {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res =\n blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n\n/**\n * Delay specified time interval.\n *\n * @export\n * @param {number} timeInMs\n * @param {AbortSignalLike} [aborter]\n * @param {Error} [abortError]\n */\nexport async function delay(timeInMs: number, aborter?: AbortSignalLike, abortError?: Error) {\n return new Promise((resolve, reject) => {\n let timeout: any;\n\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\n/**\n * String.prototype.padStart()\n *\n * @export\n * @param {string} currentString\n * @param {number} targetLength\n * @param {string} [padString=\" \"]\n * @returns {string}\n */\nexport function padStart(\n currentString: string,\n targetLength: number,\n padString: string = \" \"\n): string {\n // TS doesn't know this code needs to run downlevel sometimes.\n // @ts-expect-error\n if (String.prototype.padStart) {\n return currentString.padStart(targetLength, padString);\n }\n\n padString = padString || \" \";\n if (currentString.length > targetLength) {\n return currentString;\n } else {\n targetLength = targetLength - currentString.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + currentString;\n }\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, URLConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, URLConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = new HttpHeaders();\n for (const header of originalHeader.headersArray()) {\n if (header.name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(header.name, \"*****\");\n } else if (header.name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(header.name, sanitizeURL(header.value));\n } else {\n headers.set(header.name, header.value);\n }\n }\n\n return headers;\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @export\n * @param {string} str1\n * @param {string} str2\n * @returns {boolean}\n */\nexport function iEqual(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n\n/**\n * Extracts account name from the url\n * @param {string} url url to extract the account name from\n * @returns {string} with the account name\n */\nexport function getAccountNameFromUrl(url: string): string {\n const parsedUrl: URLBuilder = URLBuilder.parse(url);\n let accountName;\n try {\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost()!.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath()!.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n } catch (error) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URLBuilder): boolean {\n if (parsedUrl.getHost() == undefined) {\n return false;\n }\n\n const host =\n parsedUrl.getHost()! + (parsedUrl.getPort() == undefined ? \"\" : \":\" + parsedUrl.getPort());\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n 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(\n host\n );\n}\n\n/**\n * Convert Tags to encoded string.\n *\n * @export\n * @param {Tags} tags\n * @returns {string | undefined}\n */\nexport function toBlobTagsString(tags?: Tags): string | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const tagPairs = [];\n for (const key in tags) {\n if (tags.hasOwnProperty(key)) {\n const value = tags[key];\n tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n }\n }\n\n return tagPairs.join(\"&\");\n}\n\n/**\n * Convert Tags type to BlobTags.\n *\n * @export\n * @param {Tags} [tags]\n * @returns {(BlobTags | undefined)}\n */\nexport function toBlobTags(tags?: Tags): BlobTags | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const res: BlobTags = {\n blobTagSet: []\n };\n\n for (const key in tags) {\n if (tags.hasOwnProperty(key)) {\n const value = tags[key];\n res.blobTagSet.push({\n key,\n value\n });\n }\n }\n return res;\n}\n\n/**\n * Covert BlobTags to Tags type.\n *\n * @export\n * @param {BlobTags} [tags]\n * @returns {(Tags | undefined)}\n */\nexport function toTags(tags?: BlobTags): Tags | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const res: Tags = {};\n for (const blobTag of tags.blobTagSet) {\n res[blobTag.key] = blobTag.value;\n }\n return res;\n}\n\n/**\n * Convert BlobQueryTextConfiguration to QuerySerialization type.\n *\n * @export\n * @param {(BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration)} [textConfiguration]\n * @returns {(QuerySerialization | undefined)}\n */\nexport function toQuerySerialization(\n textConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryArrowConfiguration\n): QuerySerialization | undefined {\n if (textConfiguration === undefined) {\n return undefined;\n }\n\n switch (textConfiguration.kind) {\n case \"csv\":\n return {\n format: {\n type: \"delimited\",\n delimitedTextConfiguration: {\n columnSeparator: textConfiguration.columnSeparator || \",\",\n fieldQuote: textConfiguration.fieldQuote || \"\",\n recordSeparator: textConfiguration.recordSeparator,\n escapeChar: textConfiguration.escapeCharacter || \"\",\n headersPresent: textConfiguration.hasHeaders || false\n }\n }\n };\n case \"json\":\n return {\n format: {\n type: \"json\",\n jsonTextConfiguration: {\n recordSeparator: textConfiguration.recordSeparator\n }\n }\n };\n case \"arrow\":\n return {\n format: {\n type: \"arrow\",\n arrowConfiguration: {\n schema: textConfiguration.schema\n }\n }\n };\n\n default:\n throw Error(\"Invalid BlobQueryTextConfiguration.\");\n }\n}\n\nexport function parseObjectReplicationRecord(\n objectReplicationRecord?: Record\n): ObjectReplicationPolicy[] | undefined {\n if (!objectReplicationRecord) {\n return undefined;\n }\n\n if (\"policy-id\" in objectReplicationRecord) {\n // If the dictionary contains a key with policy id, we are not required to do any parsing since\n // the policy id should already be stored in the ObjectReplicationDestinationPolicyId.\n return undefined;\n }\n\n let orProperties: ObjectReplicationPolicy[] = [];\n for (const key in objectReplicationRecord) {\n const ids = key.split(\"_\");\n const policyPrefix = \"or-\";\n if (ids[0].startsWith(policyPrefix)) {\n ids[0] = ids[0].substring(policyPrefix.length);\n }\n const rule: ObjectReplicationRule = {\n ruleId: ids[1],\n replicationStatus: objectReplicationRecord[key] as ObjectReplicationStatus\n };\n const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);\n if (policyIndex > -1) {\n orProperties[policyIndex].rules.push(rule);\n } else {\n orProperties.push({\n policyId: ids[0],\n rules: [rule]\n });\n }\n }\n return orProperties;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js new file mode 100644 index 000000000..e93b262b6 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __generator } from "tslib"; +import * as fs from "fs"; +import * as util from "util"; +/** + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @export + * @param {NodeJS.ReadableStream} stream A Node.js Readable stream + * @param {Buffer} buffer Buffer to be filled, length must >= offset + * @param {number} offset From which position in the buffer to be filled, inclusive + * @param {number} end To which position in the buffer to be filled, exclusive + * @param {string} [encoding] Encoding of the Readable stream + * @returns {Promise} + */ +export function streamToBuffer(stream, buffer, offset, end, encoding) { + return __awaiter(this, void 0, void 0, function () { + var pos, count; + return __generator(this, function (_a) { + pos = 0; + count = end - offset; + return [2 /*return*/, new Promise(function (resolve, reject) { + stream.on("readable", function () { + if (pos >= count) { + resolve(); + return; + } + var chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + // How much data needed in this chunk + var chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", function () { + if (pos < count) { + reject(new Error("Stream drains before getting enough data needed. Data read: " + pos + ", data need: " + count)); + } + resolve(); + }); + stream.on("error", reject); + })]; + }); + }); +} +/** + * Reads a readable stream into buffer entirely. + * + * @export + * @param {NodeJS.ReadableStream} stream A Node.js Readable stream + * @param {Buffer} buffer Buffer to be filled, length must >= offset + * @param {string} [encoding] Encoding of the Readable stream + * @returns {Promise} with the count of bytes read. + * @throws {RangeError} If buffer size is not big enough. + */ +export function streamToBuffer2(stream, buffer, encoding) { + return __awaiter(this, void 0, void 0, function () { + var pos, bufferSize; + return __generator(this, function (_a) { + pos = 0; + bufferSize = buffer.length; + return [2 /*return*/, new Promise(function (resolve, reject) { + stream.on("readable", function () { + var chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error("Stream exceeds buffer size. Buffer size: " + bufferSize)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", function () { + resolve(pos); + }); + stream.on("error", reject); + })]; + }); + }); +} +/** + * Reads a readable stream into a buffer. + * + * @export + * @param {NodeJS.ReadableStream} stream A Node.js Readable stream + * @param {string} [encoding] Encoding of the Readable stream + * @returns {Promise} with the count of bytes read. + */ +export function streamToBuffer3(readableStream, encoding) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + var chunks = []; + readableStream.on("data", function (data) { + chunks.push(data instanceof Buffer ? data : Buffer.from(data, encoding)); + }); + readableStream.on("end", function () { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + })]; + }); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @export + * @param {NodeJS.ReadableStream} rs The read stream. + * @param {string} file Destination file path. + * @returns {Promise} + */ +export function readStreamToLocalFile(rs, file) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + var ws = fs.createWriteStream(file); + rs.on("error", function (err) { + reject(err); + }); + ws.on("error", function (err) { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + })]; + }); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ +export var fsStat = util.promisify(fs.stat); +export var fsCreateReadStream = fs.createReadStream; +//# sourceMappingURL=utils.node.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js.map new file mode 100644 index 000000000..4da50da4d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-blob/src/utils/utils.node.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.node.js","sourceRoot":"","sources":["../../../../src/utils/utils.node.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA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.\n// Licensed under the MIT License.\n\nimport * as fs from \"fs\";\nimport * as util from \"util\";\n\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {Buffer} buffer Buffer to be filled, length must >= offset\n * @param {number} offset From which position in the buffer to be filled, inclusive\n * @param {number} end To which position in the buffer to be filled, exclusive\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise}\n */\nexport async function streamToBuffer(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n offset: number,\n end: number,\n encoding?: string\n): Promise {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n if (pos >= count) {\n resolve();\n return;\n }\n\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n\n stream.on(\"end\", () => {\n if (pos < count) {\n reject(\n new Error(\n `Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`\n )\n );\n }\n resolve();\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {Buffer} buffer Buffer to be filled, length must >= offset\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise} with the count of bytes read.\n * @throws {RangeError} If buffer size is not big enough.\n */\nexport async function streamToBuffer2(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n encoding?: string\n): Promise {\n let pos = 0; // Position in stream\n let bufferSize = buffer.length;\n\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n });\n\n stream.on(\"end\", () => {\n resolve(pos);\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into a buffer.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise} with the count of bytes read.\n */\nexport async function streamToBuffer3(\n readableStream: NodeJS.ReadableStream,\n encoding?: string\n): Promise {\n return new Promise((resolve, reject) => {\n const chunks: Buffer[] = [];\n readableStream.on(\"data\", (data: Buffer | string) => {\n chunks.push(data instanceof Buffer ? data : Buffer.from(data, encoding));\n });\n readableStream.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n });\n readableStream.on(\"error\", reject);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.\n *\n * @export\n * @param {NodeJS.ReadableStream} rs The read stream.\n * @param {string} file Destination file path.\n * @returns {Promise}\n */\nexport async function readStreamToLocalFile(\n rs: NodeJS.ReadableStream,\n file: string\n): Promise {\n return new Promise((resolve, reject) => {\n const ws = fs.createWriteStream(file);\n\n rs.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"close\", resolve);\n\n rs.pipe(ws);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nexport const fsStat = util.promisify(fs.stat);\n\nexport const fsCreateReadStream = fs.createReadStream;\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js new file mode 100644 index 000000000..d07336a60 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// This file is used as a shim of "BufferScheduler" for some browser bundlers +// when trying to bundle "BufferScheduler" +// "BufferScheduler" class is only available in Node.js runtime +var BufferScheduler = /** @class */ (function () { + function BufferScheduler() { + } + return BufferScheduler; +}()); +export { BufferScheduler }; +//# sourceMappingURL=BufferScheduler.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js.map new file mode 100644 index 000000000..fa4decb3b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BufferScheduler.browser.js","sourceRoot":"","sources":["../../../../storage-common/src/BufferScheduler.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,6EAA6E;AAC7E,0CAA0C;AAC1C,+DAA+D;AAC/D;IAAA;IAA8B,CAAC;IAAD,sBAAC;AAAD,CAAC,AAA/B,IAA+B","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// This file is used as a shim of \"BufferScheduler\" for some browser bundlers\n// when trying to bundle \"BufferScheduler\"\n// \"BufferScheduler\" class is only available in Node.js runtime\nexport class BufferScheduler {}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js new file mode 100644 index 000000000..552c7e8f4 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __awaiter, __generator } from "tslib"; +import { EventEmitter } from "events"; +import { PooledBuffer } from "./PooledBuffer"; +/** + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. + * + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. + * + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS <= maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. + * @export + * @class BufferScheduler + */ +var BufferScheduler = /** @class */ (function () { + /** + * Creates an instance of BufferScheduler. + * + * @param {Readable} readable A Node.js Readable stream + * @param {number} bufferSize Buffer size of every maintained buffer + * @param {number} maxBuffers How many buffers can be allocated + * @param {OutgoingHandler} outgoingHandler An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param {number} concurrency Concurrency of executing outgoingHandlers (>0) + * @param {string} [encoding] [Optional] Encoding of Readable stream when it's a string stream + * @memberof BufferScheduler + */ + function BufferScheduler(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + /** + * An internal event emitter. + * + * @private + * @type {EventEmitter} + * @memberof BufferScheduler + */ + this.emitter = new EventEmitter(); + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.offset = 0; + /** + * An internal marker to track whether stream is end. + * + * @private + * @type {boolean} + * @memberof BufferScheduler + */ + this.isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + * + * @private + * @type {boolean} + * @memberof BufferScheduler + */ + this.isError = false; + /** + * How many handlers are executing. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.executingOutgoingHandlers = 0; + /** + * How many buffers have been allocated. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + * + * @private + * @type {Buffer[]} + * @memberof BufferScheduler + */ + this.unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + * + * @private + * @type {PooledBuffer[]} + * @memberof BufferScheduler + */ + this.incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + * + * @private + * @type {PooledBuffer[]} + * @memberof BufferScheduler + */ + this.outgoing = []; + if (bufferSize <= 0) { + throw new RangeError("bufferSize must be larger than 0, current is " + bufferSize); + } + if (maxBuffers <= 0) { + throw new RangeError("maxBuffers must be larger than 0, current is " + maxBuffers); + } + if (concurrency <= 0) { + throw new RangeError("concurrency must be larger than 0, current is " + concurrency); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + * @returns {Promise} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.do = function () { + return __awaiter(this, void 0, void 0, function () { + var _this = this; + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + _this.readable.on("data", function (data) { + data = typeof data === "string" ? Buffer.from(data, _this.encoding) : data; + _this.appendUnresolvedData(data); + if (!_this.resolveData()) { + _this.readable.pause(); + } + }); + _this.readable.on("error", function (err) { + _this.emitter.emit("error", err); + }); + _this.readable.on("end", function () { + _this.isStreamEnd = true; + _this.emitter.emit("checkEnd"); + }); + _this.emitter.on("error", function (err) { + _this.isError = true; + _this.readable.pause(); + reject(err); + }); + _this.emitter.on("checkEnd", function () { + if (_this.outgoing.length > 0) { + _this.triggerOutgoingHandlers(); + return; + } + if (_this.isStreamEnd && _this.executingOutgoingHandlers === 0) { + if (_this.unresolvedLength > 0 && _this.unresolvedLength < _this.bufferSize) { + var buffer_1 = _this.shiftBufferFromUnresolvedDataArray(); + _this.outgoingHandler(function () { return buffer_1.getReadableStream(); }, buffer_1.size, _this.offset) + .then(resolve) + .catch(reject); + } + else if (_this.unresolvedLength >= _this.bufferSize) { + return; + } + else { + resolve(); + } + } + }); + })]; + }); + }); + }; + /** + * Insert a new data into unresolved array. + * + * @private + * @param {Buffer} data + * @memberof BufferScheduler + */ + BufferScheduler.prototype.appendUnresolvedData = function (data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + }; + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + * @private + * @returns {PooledBuffer} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.shiftBufferFromUnresolvedDataArray = function (buffer) { + if (!buffer) { + buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } + else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + }; + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @private + * @returns {boolean} Return false when buffers in incoming are not enough, else true. + * @memberof BufferScheduler + */ + BufferScheduler.prototype.resolveData = function () { + while (this.unresolvedLength >= this.bufferSize) { + var buffer = void 0; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } + else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } + else { + // No available buffer, wait for buffer returned + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + }; + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + * + * @private + * @memberof BufferScheduler + */ + BufferScheduler.prototype.triggerOutgoingHandlers = function () { + return __awaiter(this, void 0, void 0, function () { + var buffer; + return __generator(this, function (_a) { + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return [2 /*return*/]; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + return [2 /*return*/]; + }); + }); + }; + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @private + * @param {Buffer} buffer + * @returns {Promise} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.triggerOutgoingHandler = function (buffer) { + return __awaiter(this, void 0, void 0, function () { + var bufferLength, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this.outgoingHandler(function () { return buffer.getReadableStream(); }, bufferLength, this.offset - bufferLength)]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + this.emitter.emit("error", err_1); + return [2 /*return*/]; + case 4: + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + return [2 /*return*/]; + } + }); + }); + }; + /** + * Return buffer used by outgoing handler into incoming. + * + * @private + * @param {Buffer} buffer + * @memberof BufferScheduler + */ + BufferScheduler.prototype.reuseBuffer = function (buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + }; + return BufferScheduler; +}()); +export { BufferScheduler }; +//# sourceMappingURL=BufferScheduler.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js.map new file mode 100644 index 000000000..63ecbe750 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BufferScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BufferScheduler.js","sourceRoot":"","sources":["../../../../storage-common/src/BufferScheduler.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAW9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAuJE;;;;;;;;;;;;OAYG;IACH,yBACE,QAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAgC,EAChC,WAAmB,EACnB,QAAiB;QAnInB;;;;;;WAMG;QACc,YAAO,GAAiB,IAAI,YAAY,EAAE,CAAC;QAW5D;;;;;;WAMG;QACK,WAAM,GAAW,CAAC,CAAC;QAE3B;;;;;;WAMG;QACK,gBAAW,GAAY,KAAK,CAAC;QAErC;;;;;;WAMG;QACK,YAAO,GAAY,KAAK,CAAC;QAEjC;;;;;;WAMG;QACK,8BAAyB,GAAW,CAAC,CAAC;QAW9C;;;;;;WAMG;QACK,eAAU,GAAW,CAAC,CAAC;QAE/B;;;;;;;;;;WAUG;QACK,wBAAmB,GAAa,EAAE,CAAC;QAE3C;;;;;;WAMG;QACK,qBAAgB,GAAW,CAAC,CAAC;QAErC;;;;;;WAMG;QACK,aAAQ,GAAmB,EAAE,CAAC;QAEtC;;;;;;WAMG;QACK,aAAQ,GAAmB,EAAE,CAAC;QAuBpC,IAAI,UAAU,IAAI,CAAC,EAAE;YACnB,MAAM,IAAI,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cesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { EventEmitter } from \"events\";\nimport { Readable } from \"stream\";\nimport { PooledBuffer } from \"./PooledBuffer\";\n\n/**\n * OutgoingHandler is an async function triggered by BufferScheduler.\n */\nexport declare type OutgoingHandler = (\n body: () => NodeJS.ReadableStream,\n length: number,\n offset?: number\n) => Promise;\n\n/**\n * This class accepts a Node.js Readable stream as input, and keeps reading data\n * from the stream into the internal buffer structure, until it reaches maxBuffers.\n * Every available buffer will try to trigger outgoingHandler.\n *\n * The internal buffer structure includes an incoming buffer array, and a outgoing\n * buffer array. The incoming buffer array includes the \"empty\" buffers can be filled\n * with new incoming data. The outgoing array includes the filled buffers to be\n * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.\n *\n * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING\n *\n * NUM_OF_ALL_BUFFERS <= maxBuffers\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * 1. Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n * 2. concurrency should set a smaller value than maxBuffers, which is helpful to\n * reduce the possibility when a outgoing handler waits for the stream data.\n * in this situation, outgoing handlers are blocked.\n * Outgoing queue shouldn't be empty.\n * @export\n * @class BufferScheduler\n */\nexport class BufferScheduler {\n /**\n * Size of buffers in incoming and outgoing queues. This class will try to align\n * data read from Readable stream into buffer chunks with bufferSize defined.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly bufferSize: number;\n\n /**\n * How many buffers can be created or maintained.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly maxBuffers: number;\n\n /**\n * A Node.js Readable stream.\n *\n * @private\n * @type {Readable}\n * @memberof BufferScheduler\n */\n private readonly readable: Readable;\n\n /**\n * OutgoingHandler is an async function triggered by BufferScheduler when there\n * are available buffers in outgoing array.\n *\n * @private\n * @type {OutgoingHandler}\n * @memberof BufferScheduler\n */\n private readonly outgoingHandler: OutgoingHandler;\n\n /**\n * An internal event emitter.\n *\n * @private\n * @type {EventEmitter}\n * @memberof BufferScheduler\n */\n private readonly emitter: EventEmitter = new EventEmitter();\n\n /**\n * Concurrency of executing outgoingHandlers. (0 < concurrency <= maxBuffers)\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly concurrency: number;\n\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private offset: number = 0;\n\n /**\n * An internal marker to track whether stream is end.\n *\n * @private\n * @type {boolean}\n * @memberof BufferScheduler\n */\n private isStreamEnd: boolean = false;\n\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n *\n * @private\n * @type {boolean}\n * @memberof BufferScheduler\n */\n private isError: boolean = false;\n\n /**\n * How many handlers are executing.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private executingOutgoingHandlers: number = 0;\n\n /**\n * Encoding of the input Readable stream which has string data type instead of Buffer.\n *\n * @private\n * @type {string}\n * @memberof BufferScheduler\n */\n private encoding?: string;\n\n /**\n * How many buffers have been allocated.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private numBuffers: number = 0;\n\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n *\n * @private\n * @type {Buffer[]}\n * @memberof BufferScheduler\n */\n private unresolvedDataArray: Buffer[] = [];\n\n /**\n * How much data consisted in unresolvedDataArray.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private unresolvedLength: number = 0;\n\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n *\n * @private\n * @type {PooledBuffer[]}\n * @memberof BufferScheduler\n */\n private incoming: PooledBuffer[] = [];\n\n /**\n * The array (queue) includes all the buffers filled from stream data.\n *\n * @private\n * @type {PooledBuffer[]}\n * @memberof BufferScheduler\n */\n private outgoing: PooledBuffer[] = [];\n\n /**\n * Creates an instance of BufferScheduler.\n *\n * @param {Readable} readable A Node.js Readable stream\n * @param {number} bufferSize Buffer size of every maintained buffer\n * @param {number} maxBuffers How many buffers can be allocated\n * @param {OutgoingHandler} outgoingHandler An async function scheduled to be\n * triggered when a buffer fully filled\n * with stream data\n * @param {number} concurrency Concurrency of executing outgoingHandlers (>0)\n * @param {string} [encoding] [Optional] Encoding of Readable stream when it's a string stream\n * @memberof BufferScheduler\n */\n constructor(\n readable: Readable,\n bufferSize: number,\n maxBuffers: number,\n outgoingHandler: OutgoingHandler,\n concurrency: number,\n encoding?: string\n ) {\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }\n\n /**\n * Start the scheduler, will return error when stream of any of the outgoingHandlers\n * returns error.\n *\n * @returns {Promise}\n * @memberof BufferScheduler\n */\n public async do(): Promise {\n return new Promise((resolve, reject) => {\n this.readable.on(\"data\", (data) => {\n data = typeof data === \"string\" ? Buffer.from(data, this.encoding) : data;\n this.appendUnresolvedData(data);\n\n if (!this.resolveData()) {\n this.readable.pause();\n }\n });\n\n this.readable.on(\"error\", (err) => {\n this.emitter.emit(\"error\", err);\n });\n\n this.readable.on(\"end\", () => {\n this.isStreamEnd = true;\n this.emitter.emit(\"checkEnd\");\n });\n\n this.emitter.on(\"error\", (err) => {\n this.isError = true;\n this.readable.pause();\n reject(err);\n });\n\n this.emitter.on(\"checkEnd\", () => {\n if (this.outgoing.length > 0) {\n this.triggerOutgoingHandlers();\n return;\n }\n\n if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {\n if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {\n const buffer = this.shiftBufferFromUnresolvedDataArray();\n this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)\n .then(resolve)\n .catch(reject);\n } else if (this.unresolvedLength >= this.bufferSize) {\n return;\n } else {\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Insert a new data into unresolved array.\n *\n * @private\n * @param {Buffer} data\n * @memberof BufferScheduler\n */\n private appendUnresolvedData(data: Buffer) {\n this.unresolvedDataArray.push(data);\n this.unresolvedLength += data.length;\n }\n\n /**\n * Try to shift a buffer with size in blockSize. The buffer returned may be less\n * than blockSize when data in unresolvedDataArray is less than bufferSize.\n *\n * @private\n * @returns {PooledBuffer}\n * @memberof BufferScheduler\n */\n private shiftBufferFromUnresolvedDataArray(buffer?: PooledBuffer): PooledBuffer {\n if (!buffer) {\n buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);\n } else {\n buffer.fill(this.unresolvedDataArray, this.unresolvedLength);\n }\n\n this.unresolvedLength -= buffer.size;\n return buffer;\n }\n\n /**\n * Resolve data in unresolvedDataArray. For every buffer with size in blockSize\n * shifted, it will try to get (or allocate a buffer) from incoming, and fill it,\n * then push it into outgoing to be handled by outgoing handler.\n *\n * Return false when available buffers in incoming are not enough, else true.\n *\n * @private\n * @returns {boolean} Return false when buffers in incoming are not enough, else true.\n * @memberof BufferScheduler\n */\n private resolveData(): boolean {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer: PooledBuffer;\n\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift()!;\n this.shiftBufferFromUnresolvedDataArray(buffer);\n } else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n } else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }\n\n /**\n * Try to trigger a outgoing handler for every buffer in outgoing. Stop when\n * concurrency reaches.\n *\n * @private\n * @memberof BufferScheduler\n */\n private async triggerOutgoingHandlers() {\n let buffer: PooledBuffer | undefined;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }\n\n /**\n * Trigger a outgoing handler for a buffer shifted from outgoing.\n *\n * @private\n * @param {Buffer} buffer\n * @returns {Promise}\n * @memberof BufferScheduler\n */\n private async triggerOutgoingHandler(buffer: PooledBuffer): Promise {\n const bufferLength = buffer.size;\n\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n\n try {\n await this.outgoingHandler(\n () => buffer.getReadableStream(),\n bufferLength,\n this.offset - bufferLength\n );\n } catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }\n\n /**\n * Return buffer used by outgoing handler into incoming.\n *\n * @private\n * @param {Buffer} buffer\n * @memberof BufferScheduler\n */\n private reuseBuffer(buffer: PooledBuffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js new file mode 100644 index 000000000..bad02d628 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { __extends } from "tslib"; +import { Readable } from "stream"; +/** + * This class generates a readable stream from the data in an array of buffers. + * + * @export + * @class BuffersStream + */ +var BuffersStream = /** @class */ (function (_super) { + __extends(BuffersStream, _super); + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param {Buffer[]} buffers Array of buffers containing the data + * @param {number} byteLength The total length of data contained in the buffers + * @memberof BuffersStream + */ + function BuffersStream(buffers, byteLength, options) { + var _this = _super.call(this, options) || this; + _this.buffers = buffers; + _this.byteLength = byteLength; + _this.byteOffsetInCurrentBuffer = 0; + _this.bufferIndex = 0; + _this.pushedBytesLength = 0; + // check byteLength is no larger than buffers[] total length + var buffersLength = 0; + for (var _i = 0, _a = _this.buffers; _i < _a.length; _i++) { + var buf = _a[_i]; + buffersLength += buf.byteLength; + } + if (buffersLength < _this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + return _this; + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param {number} size Optional. The size of data to be read + * @memberof BuffersStream + */ + BuffersStream.prototype._read = function (size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + var outBuffers = []; + var i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + // The last buffer may be longer than the data it contains. + var remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + var remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + var remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + // chunkSize = size - i + var end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } + else { + // chunkSize = remaining + var end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + // this.buffers[this.bufferIndex] used up, shift to next one + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } + else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } + else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + }; + return BuffersStream; +}(Readable)); +export { BuffersStream }; +//# sourceMappingURL=BuffersStream.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js.map new file mode 100644 index 000000000..563260632 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/BuffersStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BuffersStream.js","sourceRoot":"","sources":["../../../../storage-common/src/BuffersStream.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;;AAElC,OAAO,EAAE,QAAQ,EAAmB,MAAM,QAAQ,CAAC;AAOnD;;;;;GAKG;AACH;IAAmC,iCAAQ;IA4BzC;;;;;;;OAOG;IACH,uBACU,OAAiB,EACjB,UAAkB,EAC1B,OAA8B;QAHhC,YAKE,kBAAM,OAAO,CAAC,SAaf;QAjBS,aAAO,GAAP,OAAO,CAAU;QACjB,gBAAU,GAAV,UAAU,CAAQ;QAI1B,KAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;QACnC,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAE3B,4DAA4D;QAC5D,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,KAAkB,UAAY,EAAZ,KAAA,KAAI,CAAC,OAAO,EAAZ,cAAY,EAAZ,IAAY,EAAE;YAA3B,IAAM,GAAG,SAAA;YACZ,aAAa,IAAI,GAAG,CAAC,UAAU,CAAC;SACjC;QACD,IAAI,aAAa,GAAG,KAAI,CAAC,UAAU,EAAE;YACnC,MAAM,IAAI,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AG,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC;gBACvD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC3F,IAAI,SAAS,KAAK,6BAA6B,EAAE;oBAC/C,4DAA4D;oBAC5D,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;oBACnC,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;qBAAM;oBACL,IAAI,CAAC,yBAAyB,GAAG,GAAG,CAAC;iBACtC;gBACD,IAAI,CAAC,iBAAiB,IAAI,SAAS,CAAC;gBACpC,CAAC,IAAI,SAAS,CAAC;aAChB;SACF;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;SACtC;aAAM,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AA7GD,CAAmC,QAAQ,GA6G1C","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Readable, ReadableOptions } from \"stream\";\n\n/**\n * Options to configure the BuffersStream.\n */\nexport interface BuffersStreamOptions extends ReadableOptions {}\n\n/**\n * This class generates a readable stream from the data in an array of buffers.\n *\n * @export\n * @class BuffersStream\n */\nexport class BuffersStream extends Readable {\n /**\n * The offset of data to be read in the current buffer.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private byteOffsetInCurrentBuffer: number;\n\n /**\n * The index of buffer to be read in the array of buffers.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private bufferIndex: number;\n\n /**\n * The total length of data already read.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private pushedBytesLength: number;\n\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param {Buffer[]} buffers Array of buffers containing the data\n * @param {number} byteLength The total length of data contained in the buffers\n * @memberof BuffersStream\n */\n constructor(\n private buffers: Buffer[],\n private byteLength: number,\n options?: BuffersStreamOptions\n ) {\n super(options);\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param {number} size Optional. The size of data to be read\n * @memberof BuffersStream\n */\n public _read(size?: number) {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n\n if (!size) {\n size = this.readableHighWaterMark;\n }\n\n const outBuffers: Buffer[] = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer =\n this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n } else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n } else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n } else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js new file mode 100644 index 000000000..f4d2a8f15 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { BuffersStream } from "./BuffersStream"; +/** + * maxBufferLength is max size of each buffer in the pooled buffers. + */ +// Can't use import as Typescript doesn't recognize "buffer". +var maxBufferLength = require("buffer").constants.MAX_LENGTH; +/** + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". + * + * @export + * @class BufferScheduler + */ +var PooledBuffer = /** @class */ (function () { + function PooledBuffer(capacity, buffers, totalLength) { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + * + * @private + * @type {Buffer[]} + * @memberof PooledBuffer + */ + this.buffers = []; + this.capacity = capacity; + this._size = 0; + // allocate + var bufferNum = Math.ceil(capacity / maxBufferLength); + for (var i = 0; i < bufferNum; i++) { + var len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + Object.defineProperty(PooledBuffer.prototype, "size", { + /** + * The size of the data contained in the pooled buffers. + */ + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer + * @param {number} totalLength Total length of the data to be filled in. + * + * @returns {void} + * @memberof PooledBuffer + */ + PooledBuffer.prototype.fill = function (buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + var i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + var source = buffers[i]; + var target = this.buffers[j]; + var copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + // clear copied from source buffers + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + }; + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + * @returns {Readable} + * @memberof PooledBuffer + */ + PooledBuffer.prototype.getReadableStream = function () { + return new BuffersStream(this.buffers, this.size); + }; + return PooledBuffer; +}()); +export { PooledBuffer }; +//# sourceMappingURL=PooledBuffer.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js.map new file mode 100644 index 000000000..c8128325c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PooledBuffer.js","sourceRoot":"","sources":["../../../../storage-common/src/PooledBuffer.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD;;GAEG;AACH,6DA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,cAAc,GAAG,CAAC,CAAC;QACrB,OAAO,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE;YAClC,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;YAElE,cAAc,IAAI,SAAS,CAAC;YAC5B,YAAY,IAAI,SAAS,CAAC;YAC1B,YAAY,IAAI,SAAS,CAAC;YAC1B,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE;gBAClC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;aAClB;YACD,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE;gBAClC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;aAClB;SACF;QAED,mCAAmC;QACnC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SAC7C;IACH,CAAC;IAED;;;;;OAKG;IACI,wCAAiB,GAAxB;QACE,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACH,mBAAC;AAAD,CAAC,AAlID,IAkIC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { BuffersStream } from \"./BuffersStream\";\nimport { Readable } from \"stream\";\n\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n// Can't use import as Typescript doesn't recognize \"buffer\".\nconst maxBufferLength = require(\"buffer\").constants.MAX_LENGTH;\n\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n *\n * @export\n * @class BufferScheduler\n */\nexport class PooledBuffer {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n *\n * @private\n * @type {Buffer[]}\n * @memberof PooledBuffer\n */\n private buffers: Buffer[] = [];\n\n /**\n * The total size of internal buffers.\n *\n * @private\n * @type {number}\n * @memberof PooledBuffer\n */\n private readonly capacity: number;\n\n /**\n * The total size of data contained in internal buffers.\n *\n * @private\n * @type {number}\n * @memberof PooledBuffer\n */\n private _size: number;\n\n /**\n * The size of the data contained in the pooled buffers.\n */\n public get size(): number {\n return this._size;\n }\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated but contains no data.\n * Users may call the {@link PooledBuffer.fill} method to fill this\n * pooled buffer with data.\n *\n * @param {number} capacity Total capacity of the internal buffers\n * @memberof PooledBuffer\n */\n constructor(capacity: number);\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated and filled with data in the input buffers serially\n * with respect to the total length.\n *\n * @param {number} capacity Total capacity of the internal buffers\n * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer\n * @param {number} totalLength Total length of the data to be filled in.\n * @memberof PooledBuffer\n */\n constructor(capacity: number, buffers: Buffer[], totalLength: number);\n constructor(capacity: number, buffers?: Buffer[], totalLength?: number) {\n this.capacity = capacity;\n this._size = 0;\n\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n\n if (buffers) {\n this.fill(buffers, totalLength!);\n }\n }\n\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer\n * @param {number} totalLength Total length of the data to be filled in.\n *\n * @returns {void}\n * @memberof PooledBuffer\n */\n public fill(buffers: Buffer[], totalLength: number) {\n this._size = Math.min(this.capacity, totalLength);\n\n let i = 0,\n j = 0,\n targetOffset = 0,\n sourceOffset = 0,\n totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n * @returns {Readable}\n * @memberof PooledBuffer\n */\n public getReadableStream(): Readable {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js new file mode 100644 index 000000000..77c10185b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export * from "./BufferScheduler.browser"; +//# sourceMappingURL=index.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js.map new file mode 100644 index 000000000..5ccf9803c --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../../storage-common/src/index.browser.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,cAAc,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport * from \"./BufferScheduler.browser\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js new file mode 100644 index 000000000..2528e9321 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +export * from "./BufferScheduler"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js.map new file mode 100644 index 000000000..56ad28f4f --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-common/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../storage-common/src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,kCAAkC;AAElC,cAAc,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport * from \"./BufferScheduler\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js new file mode 100644 index 000000000..a9a0bf917 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export var AVRO_SYNC_MARKER_SIZE = 16; +export var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); +export var AVRO_CODEC_KEY = "avro.codec"; +export var AVRO_SCHEMA_KEY = "avro.schema"; +//# sourceMappingURL=AvroConstants.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js.map new file mode 100644 index 000000000..b4a389629 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroConstants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AvroConstants.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/AvroConstants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,IAAM,qBAAqB,GAAW,EAAE,CAAC;AAChD,MAAM,CAAC,IAAM,eAAe,GAAe,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,MAAM,CAAC,IAAM,cAAc,GAAW,YAAY,CAAC;AACnD,MAAM,CAAC,IAAM,eAAe,GAAW,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const AVRO_SYNC_MARKER_SIZE: number = 16;\nexport const AVRO_INIT_BYTES: Uint8Array = new Uint8Array([79, 98, 106, 1]);\nexport const AVRO_CODEC_KEY: string = \"avro.codec\";\nexport const AVRO_SCHEMA_KEY: string = \"avro.schema\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js new file mode 100644 index 000000000..d29255535 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +var AvroParser = /** @class */ (function () { + function AvroParser() { + } + /** + * Reads a fixed number of bytes from the stream. + * + * @static + * @param {AvroReadable} [stream] + * @param {number} [length] + * @param {AvroParserReadOptions} [options={}] + * @returns {Promise} + * @memberof AvroParser + */ + AvroParser.readFixedBytes = function (stream, length, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var bytes; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, stream.read(length, { abortSignal: options.abortSignal })]; + case 1: + bytes = _a.sent(); + if (bytes.length != length) { + throw new Error("Hit stream end."); + } + return [2 /*return*/, bytes]; + } + }); + }); + }; + /** + * Reads a single byte from the stream. + * + * @static + * @param {AvroReadable} [stream] + * @param {AvroParserReadOptions} [options={}] + * @returns {Promise} + * @memberof AvroParser + */ + AvroParser.readByte = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var buf; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 1, options)]; + case 1: + buf = _a.sent(); + return [2 /*return*/, buf[0]]; + } + }); + }); + }; + // int and long are stored in variable-length zig-zag coding. + // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt + // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types + AvroParser.readZigZagLong = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var zigZagEncoded, significanceInBit, byte, haveMoreByte, significanceInFloat, res; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + zigZagEncoded = 0; + significanceInBit = 0; + _a.label = 1; + case 1: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 2: + byte = _a.sent(); + haveMoreByte = byte & 0x80; + zigZagEncoded |= (byte & 0x7f) << significanceInBit; + significanceInBit += 7; + _a.label = 3; + case 3: + if (haveMoreByte && significanceInBit < 28) return [3 /*break*/, 1]; + _a.label = 4; + case 4: + if (!haveMoreByte) return [3 /*break*/, 9]; + // Switch to float arithmetic + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; // 2 ** 28. + _a.label = 5; + case 5: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 6: + byte = _a.sent(); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + _a.label = 7; + case 7: + if (byte & 0x80) return [3 /*break*/, 5]; + _a.label = 8; + case 8: + res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { + throw new Error("Integer overflow."); + } + return [2 /*return*/, res]; + case 9: return [2 /*return*/, (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1)]; + } + }); + }); + }; + AvroParser.readLong = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, AvroParser.readZigZagLong(stream, options)]; + }); + }); + }; + AvroParser.readInt = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, AvroParser.readZigZagLong(stream, options)]; + }); + }); + }; + AvroParser.readNull = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, null]; + }); + }); + }; + AvroParser.readBoolean = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var b; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 1: + b = _a.sent(); + if (b == 1) { + return [2 /*return*/, true]; + } + else if (b == 0) { + return [2 /*return*/, false]; + } + else { + throw new Error("Byte was not a boolean."); + } + return [2 /*return*/]; + } + }); + }); + }; + AvroParser.readFloat = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var u8arr, view; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 4, options)]; + case 1: + u8arr = _a.sent(); + view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return [2 /*return*/, view.getFloat32(0, true)]; // littleEndian = true + } + }); + }); + }; + AvroParser.readDouble = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var u8arr, view; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 8, options)]; + case 1: + u8arr = _a.sent(); + view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return [2 /*return*/, view.getFloat64(0, true)]; // littleEndian = true + } + }); + }); + }; + AvroParser.readBytes = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var size; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 1: + size = _a.sent(); + if (size < 0) { + throw new Error("Bytes size was negative."); + } + return [4 /*yield*/, stream.read(size, { abortSignal: options.abortSignal })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + AvroParser.readString = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var u8arr, utf8decoder; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readBytes(stream, options)]; + case 1: + u8arr = _a.sent(); + // polyfill TextDecoder to be backward compatible with older + // nodejs that doesn't expose TextDecoder as a global variable + if (typeof TextDecoder === "undefined" && typeof require !== "undefined") { + global.TextDecoder = require("util").TextDecoder; + } + utf8decoder = new TextDecoder(); + return [2 /*return*/, utf8decoder.decode(u8arr)]; + } + }); + }); + }; + AvroParser.readMapPair = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var key, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readString(stream, options)]; + case 1: + key = _a.sent(); + return [4 /*yield*/, readItemMethod(stream, options)]; + case 2: + value = _a.sent(); + return [2 /*return*/, { key: key, value: value }]; + } + }); + }); + }; + AvroParser.readMap = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var readPairMethod, pairs, dict, _i, pairs_1, pair; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + readPairMethod = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readMapPair(stream, readItemMethod, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return [4 /*yield*/, AvroParser.readArray(stream, readPairMethod, options)]; + case 1: + pairs = _a.sent(); + dict = {}; + for (_i = 0, pairs_1 = pairs; _i < pairs_1.length; _i++) { + pair = pairs_1[_i]; + dict[pair.key] = pair.value; + } + return [2 /*return*/, dict]; + } + }); + }); + }; + AvroParser.readArray = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var items, count, item; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + items = []; + return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 1: + count = _a.sent(); + _a.label = 2; + case 2: + if (!(count != 0)) return [3 /*break*/, 8]; + if (!(count < 0)) return [3 /*break*/, 4]; + // Ignore block sizes + return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 3: + // Ignore block sizes + _a.sent(); + count = -count; + _a.label = 4; + case 4: + if (!count--) return [3 /*break*/, 6]; + return [4 /*yield*/, readItemMethod(stream, options)]; + case 5: + item = _a.sent(); + items.push(item); + return [3 /*break*/, 4]; + case 6: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 7: + count = _a.sent(); + return [3 /*break*/, 2]; + case 8: return [2 /*return*/, items]; + } + }); + }); + }; + return AvroParser; +}()); +export { AvroParser }; +var AvroComplex; +(function (AvroComplex) { + AvroComplex["RECORD"] = "record"; + AvroComplex["ENUM"] = "enum"; + AvroComplex["ARRAY"] = "array"; + AvroComplex["MAP"] = "map"; + AvroComplex["UNION"] = "union"; + AvroComplex["FIXED"] = "fixed"; +})(AvroComplex || (AvroComplex = {})); +var AvroType = /** @class */ (function () { + function AvroType() { + } + /** + * Determines the AvroType from the Avro Schema. + */ + AvroType.fromSchema = function (schema) { + if (typeof schema == "string") { + return AvroType.fromStringSchema(schema); + } + else if (Array.isArray(schema)) { + return AvroType.fromArraySchema(schema); + } + else { + return AvroType.fromObjectSchema(schema); + } + }; + AvroType.fromStringSchema = function (schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: + return new AvroPrimitiveType(schema); + default: + throw new Error("Unexpected Avro type " + schema); + } + }; + AvroType.fromArraySchema = function (schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + }; + AvroType.fromObjectSchema = function (schema) { + var type = schema.type; + // Primitives can be defined as strings or objects + try { + return AvroType.fromStringSchema(type); + } + catch (err) { } + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) { + throw new Error("aliases currently is not supported, schema: " + schema); + } + if (!schema.name) { + throw new Error("Required attribute 'name' doesn't exist on schema: " + schema); + } + var fields = {}; + if (!schema.fields) { + throw new Error("Required attribute 'fields' doesn't exist on schema: " + schema); + } + for (var _i = 0, _a = schema.fields; _i < _a.length; _i++) { + var field = _a[_i]; + fields[field.name] = AvroType.fromSchema(field.type); + } + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) { + throw new Error("aliases currently is not supported, schema: " + schema); + } + if (!schema.symbols) { + throw new Error("Required attribute 'symbols' doesn't exist on schema: " + schema); + } + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) { + throw new Error("Required attribute 'values' doesn't exist on schema: " + schema); + } + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: // Unused today + case AvroComplex.FIXED: // Unused today + default: + throw new Error("Unexpected Avro type " + type + " in " + schema); + } + }; + return AvroType; +}()); +export { AvroType }; +var AvroPrimitive; +(function (AvroPrimitive) { + AvroPrimitive["NULL"] = "null"; + AvroPrimitive["BOOLEAN"] = "boolean"; + AvroPrimitive["INT"] = "int"; + AvroPrimitive["LONG"] = "long"; + AvroPrimitive["FLOAT"] = "float"; + AvroPrimitive["DOUBLE"] = "double"; + AvroPrimitive["BYTES"] = "bytes"; + AvroPrimitive["STRING"] = "string"; +})(AvroPrimitive || (AvroPrimitive = {})); +var AvroPrimitiveType = /** @class */ (function (_super) { + __extends(AvroPrimitiveType, _super); + function AvroPrimitiveType(primitive) { + var _this = _super.call(this) || this; + _this._primitive = primitive; + return _this; + } + AvroPrimitiveType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this._primitive; + switch (_a) { + case AvroPrimitive.NULL: return [3 /*break*/, 1]; + case AvroPrimitive.BOOLEAN: return [3 /*break*/, 3]; + case AvroPrimitive.INT: return [3 /*break*/, 5]; + case AvroPrimitive.LONG: return [3 /*break*/, 7]; + case AvroPrimitive.FLOAT: return [3 /*break*/, 9]; + case AvroPrimitive.DOUBLE: return [3 /*break*/, 11]; + case AvroPrimitive.BYTES: return [3 /*break*/, 13]; + case AvroPrimitive.STRING: return [3 /*break*/, 15]; + } + return [3 /*break*/, 17]; + case 1: return [4 /*yield*/, AvroParser.readNull()]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: return [4 /*yield*/, AvroParser.readBoolean(stream, options)]; + case 4: return [2 /*return*/, _b.sent()]; + case 5: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 6: return [2 /*return*/, _b.sent()]; + case 7: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 8: return [2 /*return*/, _b.sent()]; + case 9: return [4 /*yield*/, AvroParser.readFloat(stream, options)]; + case 10: return [2 /*return*/, _b.sent()]; + case 11: return [4 /*yield*/, AvroParser.readDouble(stream, options)]; + case 12: return [2 /*return*/, _b.sent()]; + case 13: return [4 /*yield*/, AvroParser.readBytes(stream, options)]; + case 14: return [2 /*return*/, _b.sent()]; + case 15: return [4 /*yield*/, AvroParser.readString(stream, options)]; + case 16: return [2 /*return*/, _b.sent()]; + case 17: throw new Error("Unknown Avro Primitive"); + } + }); + }); + }; + return AvroPrimitiveType; +}(AvroType)); +var AvroEnumType = /** @class */ (function (_super) { + __extends(AvroEnumType, _super); + function AvroEnumType(symbols) { + var _this = _super.call(this) || this; + _this._symbols = symbols; + return _this; + } + AvroEnumType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 1: + value = _a.sent(); + return [2 /*return*/, this._symbols[value]]; + } + }); + }); + }; + return AvroEnumType; +}(AvroType)); +var AvroUnionType = /** @class */ (function (_super) { + __extends(AvroUnionType, _super); + function AvroUnionType(types) { + var _this = _super.call(this) || this; + _this._types = types; + return _this; + } + AvroUnionType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var typeIndex; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 1: + typeIndex = _a.sent(); + return [4 /*yield*/, this._types[typeIndex].read(stream, options)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return AvroUnionType; +}(AvroType)); +var AvroMapType = /** @class */ (function (_super) { + __extends(AvroMapType, _super); + function AvroMapType(itemType) { + var _this = _super.call(this) || this; + _this._itemType = itemType; + return _this; + } + AvroMapType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var readItemMethod; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + readItemMethod = function (s, options) { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._itemType.read(s, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); }; + return [4 /*yield*/, AvroParser.readMap(stream, readItemMethod, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return AvroMapType; +}(AvroType)); +var AvroRecordType = /** @class */ (function (_super) { + __extends(AvroRecordType, _super); + function AvroRecordType(fields, name) { + var _this = _super.call(this) || this; + _this._fields = fields; + _this._name = name; + return _this; + } + AvroRecordType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var record, _a, _b, _i, key, _c, _d; + return __generator(this, function (_e) { + switch (_e.label) { + case 0: + record = {}; + record["$schema"] = this._name; + _a = []; + for (_b in this._fields) + _a.push(_b); + _i = 0; + _e.label = 1; + case 1: + if (!(_i < _a.length)) return [3 /*break*/, 4]; + key = _a[_i]; + if (!this._fields.hasOwnProperty(key)) return [3 /*break*/, 3]; + _c = record; + _d = key; + return [4 /*yield*/, this._fields[key].read(stream, options)]; + case 2: + _c[_d] = _e.sent(); + _e.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, record]; + } + }); + }); + }; + return AvroRecordType; +}(AvroType)); +//# sourceMappingURL=AvroParser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js.map new file mode 100644 index 000000000..be9b8e286 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroParser.js.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O,SAAyD,EAAC;;;;KAClE;IACH,kBAAC;AAAD,CAAC,AAjBD,CAA0B,QAAQ,GAiBjC;AAED;IAA6B,kCAAQ;IAInC,wBAAY,MAAgC,EAAE,IAAY;QAA1D,YACE,iBAAO,SAGR;QAFC,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;;IACpB,CAAC;IAEY,6BAAI,GAAjB,UAAkB,MAAoB,EAAE,OAAmC;QAAnC,wBAAA,EAAA,YAAmC;;;;;;wBACrE,MAAM,GAAkC,EAAE,CAAC;wBAC/C,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;;mCACb,IAAI,CAAC,OAAO;;;;;;;6BACxB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAhC,wBAAgC;wBAClC,KAAA,MAAM,CAAA;wBAAC,KAAA,GAAG,CAAA;wBAAI,qBAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAA;;wBAA3D,MAAW,GAAG,SAA6C,CAAC;;;;;4BAGhE,sBAAO,MAAM,EAAC;;;;KACf;IACH,qBAAC;AAAD,CAAC,AApBD,CAA6B,QAAQ,GAoBpC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable } from \"./AvroReadable\";\nimport { KeyValuePair } from \"./utils/utils.common\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the AvroParser read methods.\n * See {@link AvroParser.readFixedBytes}, {@link AvroParser.readMap} and etc.\n *\n * @export\n * @interface AvroParserReadOptions\n */\ninterface AvroParserReadOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroParserReadOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport class AvroParser {\n /**\n * Reads a fixed number of bytes from the stream.\n *\n * @static\n * @param {AvroReadable} [stream]\n * @param {number} [length]\n * @param {AvroParserReadOptions} [options={}]\n * @returns {Promise}\n * @memberof AvroParser\n */\n public static async readFixedBytes(\n stream: AvroReadable,\n length: number,\n options: AvroParserReadOptions = {}\n ): Promise {\n const bytes = await stream.read(length, { abortSignal: options.abortSignal });\n if (bytes.length != length) {\n throw new Error(\"Hit stream end.\");\n }\n return bytes;\n }\n\n /**\n * Reads a single byte from the stream.\n *\n * @static\n * @param {AvroReadable} [stream]\n * @param {AvroParserReadOptions} [options={}]\n * @returns {Promise}\n * @memberof AvroParser\n */\n private static async readByte(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const buf = await AvroParser.readFixedBytes(stream, 1, options);\n return buf[0];\n }\n\n // int and long are stored in variable-length zig-zag coding.\n // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt\n // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types\n private static async readZigZagLong(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n let zigZagEncoded = 0;\n let significanceInBit = 0;\n let byte, haveMoreByte, significanceInFloat;\n\n do {\n byte = await AvroParser.readByte(stream, options);\n haveMoreByte = byte & 0x80;\n zigZagEncoded |= (byte & 0x7f) << significanceInBit;\n significanceInBit += 7;\n } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers\n\n if (haveMoreByte) {\n // Switch to float arithmetic\n zigZagEncoded = zigZagEncoded;\n significanceInFloat = 268435456; // 2 ** 28.\n do {\n byte = await AvroParser.readByte(stream, options);\n zigZagEncoded += (byte & 0x7f) * significanceInFloat;\n significanceInFloat *= 128; // 2 ** 7\n } while (byte & 0x80);\n\n const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;\n if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {\n throw new Error(\"Integer overflow.\");\n }\n return res;\n }\n\n return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);\n }\n\n public static async readLong(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n return AvroParser.readZigZagLong(stream, options);\n }\n\n public static async readInt(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n return AvroParser.readZigZagLong(stream, options);\n }\n\n public static async readNull(): Promise {\n return null;\n }\n\n public static async readBoolean(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const b = await AvroParser.readByte(stream, options);\n if (b == 1) {\n return true;\n } else if (b == 0) {\n return false;\n } else {\n throw new Error(\"Byte was not a boolean.\");\n }\n }\n\n public static async readFloat(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readFixedBytes(stream, 4, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat32(0, true); // littleEndian = true\n }\n\n public static async readDouble(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readFixedBytes(stream, 8, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat64(0, true); // littleEndian = true\n }\n\n public static async readBytes(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const size = await AvroParser.readLong(stream, options);\n if (size < 0) {\n throw new Error(\"Bytes size was negative.\");\n }\n\n return await stream.read(size, { abortSignal: options.abortSignal });\n }\n\n public static async readString(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readBytes(stream, options);\n\n // polyfill TextDecoder to be backward compatible with older\n // nodejs that doesn't expose TextDecoder as a global variable\n if (typeof TextDecoder === \"undefined\" && typeof require !== \"undefined\") {\n (global as any).TextDecoder = require(\"util\").TextDecoder;\n }\n\n // FUTURE: need TextDecoder polyfill for IE\n let utf8decoder = new TextDecoder();\n return utf8decoder.decode(u8arr);\n }\n\n private static async readMapPair(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise> {\n const key = await AvroParser.readString(stream, options);\n // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.\n const value = await readItemMethod(stream, options);\n return { key, value };\n }\n\n public static async readMap(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise> {\n const readPairMethod = async (\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise> => {\n return await AvroParser.readMapPair(stream, readItemMethod, options);\n };\n\n const pairs: KeyValuePair[] = await AvroParser.readArray(stream, readPairMethod, options);\n\n let dict: Record = {};\n for (const pair of pairs) {\n dict[pair.key] = pair.value;\n }\n return dict;\n }\n\n private static async readArray(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise {\n let items: T[] = [];\n for (\n let count = await AvroParser.readLong(stream, options);\n count != 0;\n count = await AvroParser.readLong(stream, options)\n ) {\n if (count < 0) {\n // Ignore block sizes\n await AvroParser.readLong(stream, options);\n count = -count;\n }\n\n while (count--) {\n const item: T = await readItemMethod(stream, options);\n items.push(item);\n }\n }\n return items;\n }\n}\n\ninterface RecordField {\n name: string;\n type: string | ObjectSchema | (string | ObjectSchema)[]; // Unions may not immediately contain other unions.\n}\n\nenum AvroComplex {\n RECORD = \"record\",\n ENUM = \"enum\",\n ARRAY = \"array\",\n MAP = \"map\",\n UNION = \"union\",\n FIXED = \"fixed\"\n}\n\ninterface ObjectSchema {\n type: Exclude;\n name?: string;\n aliases?: string;\n fields?: RecordField[];\n symbols?: string[];\n values?: string;\n size?: number;\n}\n\nexport abstract class AvroType {\n /**\n * Reads an object from the stream.\n *\n * @param stream\n */\n public abstract read(\n stream: AvroReadable,\n options?: AvroParserReadOptions\n ): Promise;\n\n /**\n * Determines the AvroType from the Avro Schema.\n */\n public static fromSchema(schema: string | Object): AvroType {\n if (typeof schema == \"string\") {\n return AvroType.fromStringSchema(schema);\n } else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n } else {\n return AvroType.fromObjectSchema(schema as ObjectSchema);\n }\n }\n\n private static fromStringSchema(schema: string): AvroType {\n switch (schema) {\n case AvroPrimitive.NULL:\n case AvroPrimitive.BOOLEAN:\n case AvroPrimitive.INT:\n case AvroPrimitive.LONG:\n case AvroPrimitive.FLOAT:\n case AvroPrimitive.DOUBLE:\n case AvroPrimitive.BYTES:\n case AvroPrimitive.STRING:\n return new AvroPrimitiveType(schema as AvroPrimitive);\n default:\n throw new Error(`Unexpected Avro type ${schema}`);\n }\n }\n\n private static fromArraySchema(schema: any[]): AvroType {\n return new AvroUnionType(schema.map(AvroType.fromSchema));\n }\n\n private static fromObjectSchema(schema: ObjectSchema): AvroType {\n const type = schema.type;\n // Primitives can be defined as strings or objects\n try {\n return AvroType.fromStringSchema(type);\n } catch (err) {}\n\n switch (type) {\n case AvroComplex.RECORD:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.name) {\n throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);\n }\n\n let fields: Record = {};\n if (!schema.fields) {\n throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);\n }\n for (const field of schema.fields) {\n fields[field.name] = AvroType.fromSchema(field.type);\n }\n return new AvroRecordType(fields, schema.name);\n case AvroComplex.ENUM:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.symbols) {\n throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);\n }\n return new AvroEnumType(schema.symbols);\n case AvroComplex.MAP:\n if (!schema.values) {\n throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);\n }\n return new AvroMapType(AvroType.fromSchema(schema.values));\n case AvroComplex.ARRAY: // Unused today\n case AvroComplex.FIXED: // Unused today\n default:\n throw new Error(`Unexpected Avro type ${type} in ${schema}`);\n }\n }\n}\n\nenum AvroPrimitive {\n NULL = \"null\",\n BOOLEAN = \"boolean\",\n INT = \"int\",\n LONG = \"long\",\n FLOAT = \"float\",\n DOUBLE = \"double\",\n BYTES = \"bytes\",\n STRING = \"string\"\n}\n\nclass AvroPrimitiveType extends AvroType {\n private _primitive: AvroPrimitive;\n\n constructor(primitive: AvroPrimitive) {\n super();\n this._primitive = primitive;\n }\n\n public async read(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n switch (this._primitive) {\n case AvroPrimitive.NULL:\n return await AvroParser.readNull();\n case AvroPrimitive.BOOLEAN:\n return await AvroParser.readBoolean(stream, options);\n case AvroPrimitive.INT:\n return await AvroParser.readInt(stream, options);\n case AvroPrimitive.LONG:\n return await AvroParser.readLong(stream, options);\n case AvroPrimitive.FLOAT:\n return await AvroParser.readFloat(stream, options);\n case AvroPrimitive.DOUBLE:\n return await AvroParser.readDouble(stream, options);\n case AvroPrimitive.BYTES:\n return await AvroParser.readBytes(stream, options);\n case AvroPrimitive.STRING:\n return await AvroParser.readString(stream, options);\n default:\n throw new Error(\"Unknown Avro Primitive\");\n }\n }\n}\n\nclass AvroEnumType extends AvroType {\n private readonly _symbols: string[];\n\n constructor(symbols: string[]) {\n super();\n this._symbols = symbols;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n const value = await AvroParser.readInt(stream, options);\n return this._symbols[value];\n }\n}\n\nclass AvroUnionType extends AvroType {\n private readonly _types: AvroType[];\n\n constructor(types: AvroType[]) {\n super();\n this._types = types;\n }\n\n public async read(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const typeIndex = await AvroParser.readInt(stream, options);\n return await this._types[typeIndex].read(stream, options);\n }\n}\n\nclass AvroMapType extends AvroType {\n private readonly _itemType: AvroType;\n\n constructor(itemType: AvroType) {\n super();\n this._itemType = itemType;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n const readItemMethod = async (\n s: AvroReadable,\n options?: AvroParserReadOptions\n ): Promise => {\n return await this._itemType.read(s, options);\n };\n return await AvroParser.readMap(stream, readItemMethod, options);\n }\n}\n\nclass AvroRecordType extends AvroType {\n private readonly _name: string;\n private readonly _fields: Record;\n\n constructor(fields: Record, name: string) {\n super();\n this._fields = fields;\n this._name = name;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n let record: Record = {};\n record[\"$schema\"] = this._name;\n for (const key in this._fields) {\n if (this._fields.hasOwnProperty(key)) {\n record[key] = await this._fields[key].read(stream, options);\n }\n }\n return record;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js new file mode 100644 index 000000000..ac1ce8469 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var AvroReadable = /** @class */ (function () { + function AvroReadable() { + } + return AvroReadable; +}()); +export { AvroReadable }; +//# sourceMappingURL=AvroReadable.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js.map new file mode 100644 index 000000000..cdaf54559 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AvroReadable.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/AvroReadable.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqBlC;IAAA;IAGA,CAAC;IAAD,mBAAC;AAAD,CAAC,AAHD,IAGC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the {@link AvroReadable.read} operation.\n *\n * @export\n * @interface AvroReadableReadOptions\n */\nexport interface AvroReadableReadOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroReadableReadOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport abstract class AvroReadable {\n public abstract get position(): number;\n public abstract async read(size: number, options?: AvroReadableReadOptions): Promise;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js new file mode 100644 index 000000000..3e2d82805 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { AvroReadable } from "./AvroReadable"; +import { AbortError } from "@azure/abort-controller"; +var ABORT_ERROR = new AbortError("Reading from the avro blob was aborted."); +var AvroReadableFromBlob = /** @class */ (function (_super) { + __extends(AvroReadableFromBlob, _super); + function AvroReadableFromBlob(blob) { + var _this = _super.call(this) || this; + _this._blob = blob; + _this._position = 0; + return _this; + } + Object.defineProperty(AvroReadableFromBlob.prototype, "position", { + get: function () { + return this._position; + }, + enumerable: false, + configurable: true + }); + AvroReadableFromBlob.prototype.read = function (size, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var fileReader; + var _this = this; + return __generator(this, function (_a) { + size = Math.min(size, this._blob.size - this._position); + if (size <= 0) { + return [2 /*return*/, new Uint8Array()]; + } + fileReader = new FileReader(); + return [2 /*return*/, new Promise(function (resolve, reject) { + var cleanUp = function () { + if (options.abortSignal) { + options.abortSignal.removeEventListener("abort", abortHandler); + } + }; + var abortHandler = function () { + fileReader.abort(); + cleanUp(); + reject(ABORT_ERROR); + }; + if (options.abortSignal) { + options.abortSignal.addEventListener("abort", abortHandler); + } + fileReader.onloadend = function (ev) { + cleanUp(); + resolve(new Uint8Array(ev.target.result)); + }; + fileReader.onerror = function () { + cleanUp(); + reject(); + }; + fileReader.readAsArrayBuffer(_this._blob.slice(_this._position, (_this._position += size))); + })]; + }); + }); + }; + return AvroReadableFromBlob; +}(AvroReadable)); +export { AvroReadableFromBlob }; +//# sourceMappingURL=AvroReadableFromBlob.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js.map new file mode 100644 index 000000000..188fd142b --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromBlob.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AvroReadableFromBlob.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/AvroReadableFromBlob.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,IAAM,WAAW,GAAG,IAAI,UAAU,CAAC,yCAAyC,CAAC,CAAC;AAE9E;IAA0C,wCAAY;IAIpD,8BAAY,IAAU;QAAtB,YACE,iBAAO,SAGR;QAFC,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,KAAI,CAAC,SAAS,GAAG,CAAC,CAAC;;IACrB,CAAC;IAED,sBAAW,0CAAQ;aAAnB;YACE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;;;OAAA;IAEY,mCAAI,GAAjB,UAAkB,IAAY,EAA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;IACH,2BAAC;AAAD,CAAC,AAnDD,CAA0C,YAAY,GAmDrD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable, AvroReadableReadOptions } from \"./AvroReadable\";\nimport { AbortError } from \"@azure/abort-controller\";\n\nconst ABORT_ERROR = new AbortError(\"Reading from the avro blob was aborted.\");\n\nexport class AvroReadableFromBlob extends AvroReadable {\n private _position: number;\n private _blob: Blob;\n\n constructor(blob: Blob) {\n super();\n this._blob = blob;\n this._position = 0;\n }\n\n public get position(): number {\n return this._position;\n }\n\n public async read(size: number, options: AvroReadableReadOptions = {}): Promise {\n size = Math.min(size, this._blob.size - this._position);\n if (size <= 0) {\n return new Uint8Array();\n }\n\n const fileReader = new FileReader();\n return new Promise((resolve, reject) => {\n const cleanUp = () => {\n if (options.abortSignal) {\n options.abortSignal!.removeEventListener(\"abort\", abortHandler);\n }\n };\n\n const abortHandler = () => {\n fileReader.abort();\n cleanUp();\n reject(ABORT_ERROR);\n };\n\n if (options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", abortHandler);\n }\n\n fileReader.onloadend = (ev: any) => {\n cleanUp();\n resolve(new Uint8Array(ev.target!.result));\n };\n\n fileReader.onerror = () => {\n cleanUp();\n reject();\n };\n\n fileReader.readAsArrayBuffer(this._blob.slice(this._position, (this._position += size)));\n });\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js new file mode 100644 index 000000000..d68e7432a --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __awaiter, __extends, __generator } from "tslib"; +import { AvroReadable } from "./AvroReadable"; +import { AbortError } from "@azure/abort-controller"; +var ABORT_ERROR = new AbortError("Reading from the avro stream was aborted."); +var AvroReadableFromStream = /** @class */ (function (_super) { + __extends(AvroReadableFromStream, _super); + function AvroReadableFromStream(readable) { + var _this = _super.call(this) || this; + _this._readable = readable; + _this._position = 0; + return _this; + } + AvroReadableFromStream.prototype.toUint8Array = function (data) { + if (typeof data === "string") { + return Buffer.from(data); + } + return data; + }; + Object.defineProperty(AvroReadableFromStream.prototype, "position", { + get: function () { + return this._position; + }, + enumerable: false, + configurable: true + }); + AvroReadableFromStream.prototype.read = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var chunk; + var _this = this; + return __generator(this, function (_b) { + if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + throw ABORT_ERROR; + } + if (size < 0) { + throw new Error("size parameter should be positive: " + size); + } + if (size === 0) { + return [2 /*return*/, new Uint8Array()]; + } + if (!this._readable.readable) { + throw new Error("Stream no longer readable."); + } + chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.length maybe less than desired size if the stream ends. + return [2 /*return*/, this.toUint8Array(chunk)]; + } + else { + // register callback to wait for enough data to read + return [2 /*return*/, new Promise(function (resolve, reject) { + var cleanUp = function () { + _this._readable.removeListener("readable", readableCallback); + _this._readable.removeListener("error", rejectCallback); + _this._readable.removeListener("end", rejectCallback); + _this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.removeEventListener("abort", abortHandler); + } + }; + var readableCallback = function () { + var chunk = _this._readable.read(size); + if (chunk) { + _this._position += chunk.length; + cleanUp(); + // chunk.length maybe less than desired size if the stream ends. + resolve(_this.toUint8Array(chunk)); + } + }; + var rejectCallback = function () { + cleanUp(); + reject(); + }; + var abortHandler = function () { + cleanUp(); + reject(ABORT_ERROR); + }; + _this._readable.on("readable", readableCallback); + _this._readable.once("error", rejectCallback); + _this._readable.once("end", rejectCallback); + _this._readable.once("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.addEventListener("abort", abortHandler); + } + })]; + } + return [2 /*return*/]; + }); + }); + }; + return AvroReadableFromStream; +}(AvroReadable)); +export { AvroReadableFromStream }; +//# sourceMappingURL=AvroReadableFromStream.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map new file mode 100644 index 000000000..cc8090b70 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AvroReadableFromStream.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/AvroReadableFromStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,IAAM,WAAW,GAAG,IAAI,UAAU,CAAC,2CAA2C,CAAC,CAAC;AAEhF;IAA4C,0CAAY;IAWtD,gCAAY,QAA+B;QAA3C,YACE,iBAAO,SAGR;QAFC,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,KAAI,CAAC,SAAS,GAAG,CAAC,CAAC;;IACrB,CAAC;IAXO,6CAAY,GAApB,UAAqB,IAAqB;QACxC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAOD,sBAAW,4CAAQ;aAAnB;YACE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;;;OAAA;IACY,qCAAI,GAAjB,UAAkB,IAAY,EAAE,OAAqC;;QAArC,wBAAA,EAAA,YAAqC;;;;;gBACnE,UAAI,OAAO,CAAC,WAAW,0CAAE,OAAO,EAAE;oBAChC,MAAM,WAAW,CAAC;iBACnB;gBAED,IAA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AAC,MAAM,CAAC;oCAC/B,OAAO,EAAE,CAAC;oCACV,gEAAgE;oCAChE,OAAO,CAAC,KAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;iCACnC;4BACH,CAAC,CAAC;4BAEF,IAAM,cAAc,GAAG;gCACrB,OAAO,EAAE,CAAC;gCACV,MAAM,EAAE,CAAC;4BACX,CAAC,CAAC;4BAEF,IAAM,YAAY,GAAG;gCACnB,OAAO,EAAE,CAAC;gCACV,MAAM,CAAC,WAAW,CAAC,CAAC;4BACtB,CAAC,CAAC;4BAEF,KAAI,CAAC,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;4BAChD,KAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;4BAC7C,KAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;4BAC3C,KAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;4BAC7C,IAAI,OAAO,CAAC,WAAW,EAAE;gCACvB,OAAO,CAAC,WAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;6BAC9D;wBACH,CAAC,CAAC,EAAC;iBACJ;;;;KACF;IACH,6BAAC;AAAD,CAAC,AArFD,CAA4C,YAAY,GAqFvD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable, AvroReadableReadOptions } from \"./AvroReadable\";\nimport { AbortError } from \"@azure/abort-controller\";\n\nconst ABORT_ERROR = new AbortError(\"Reading from the avro stream was aborted.\");\n\nexport class AvroReadableFromStream extends AvroReadable {\n private _position: number;\n private _readable: NodeJS.ReadableStream;\n\n private toUint8Array(data: string | Buffer): Uint8Array {\n if (typeof data === \"string\") {\n return Buffer.from(data);\n }\n return data;\n }\n\n constructor(readable: NodeJS.ReadableStream) {\n super();\n this._readable = readable;\n this._position = 0;\n }\n public get position(): number {\n return this._position;\n }\n public async read(size: number, options: AvroReadableReadOptions = {}): Promise {\n if (options.abortSignal?.aborted) {\n throw ABORT_ERROR;\n }\n\n if (size < 0) {\n throw new Error(`size parameter should be positive: ${size}`);\n }\n\n if (size === 0) {\n return new Uint8Array();\n }\n\n if (!this._readable.readable) {\n throw new Error(\"Stream no longer readable.\");\n }\n // See if there is already enough data.\n let chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n // chunk.length maybe less than desired size if the stream ends.\n return this.toUint8Array(chunk);\n } else {\n // register callback to wait for enough data to read\n return new Promise((resolve, reject) => {\n const cleanUp = () => {\n this._readable.removeListener(\"readable\", readableCallback);\n this._readable.removeListener(\"error\", rejectCallback);\n this._readable.removeListener(\"end\", rejectCallback);\n this._readable.removeListener(\"close\", rejectCallback);\n\n if (options.abortSignal) {\n options.abortSignal!.removeEventListener(\"abort\", abortHandler);\n }\n };\n\n const readableCallback = () => {\n let chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n cleanUp();\n // chunk.length maybe less than desired size if the stream ends.\n resolve(this.toUint8Array(chunk));\n }\n };\n\n const rejectCallback = () => {\n cleanUp();\n reject();\n };\n\n const abortHandler = () => {\n cleanUp();\n reject(ABORT_ERROR);\n };\n\n this._readable.on(\"readable\", readableCallback);\n this._readable.once(\"error\", rejectCallback);\n this._readable.once(\"end\", rejectCallback);\n this._readable.once(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal!.addEventListener(\"abort\", abortHandler);\n }\n });\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js new file mode 100644 index 000000000..8c4809c71 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { __asyncGenerator, __await, __awaiter, __generator } from "tslib"; +import { AVRO_SYNC_MARKER_SIZE, AVRO_INIT_BYTES, AVRO_CODEC_KEY, AVRO_SCHEMA_KEY } from "./AvroConstants"; +import { arraysEqual } from "./utils/utils.common"; +import { AvroType, AvroParser } from "./AvroParser"; +import "@azure/core-paging"; +var AvroReader = /** @class */ (function () { + function AvroReader(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; + } + Object.defineProperty(AvroReader.prototype, "blockOffset", { + get: function () { + return this._blockOffset; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(AvroReader.prototype, "objectIndex", { + get: function () { + return this._objectIndex; + }, + enumerable: false, + configurable: true + }); + AvroReader.prototype.initialize = function (options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var header, _a, codec, _b, schema, _c, i; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + abortSignal: options.abortSignal + })]; + case 1: + header = _d.sent(); + if (!arraysEqual(header, AVRO_INIT_BYTES)) { + throw new Error("Stream is not an Avro file."); + } + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + _a = this; + return [4 /*yield*/, AvroParser.readMap(this._headerStream, AvroParser.readString, { + abortSignal: options.abortSignal + })]; + case 2: + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + _a._metadata = _d.sent(); + codec = this._metadata[AVRO_CODEC_KEY]; + if (!(codec == undefined || codec == "null")) { + throw new Error("Codecs are not supported"); + } + // The 16-byte, randomly-generated sync marker for this file. + _b = this; + return [4 /*yield*/, AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal + })]; + case 3: + // The 16-byte, randomly-generated sync marker for this file. + _b._syncMarker = _d.sent(); + schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema); + if (this._blockOffset == 0) { + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + } + _c = this; + return [4 /*yield*/, AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + })]; + case 4: + _c._itemsRemainingInBlock = _d.sent(); + // skip block length + return [4 /*yield*/, AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })]; + case 5: + // skip block length + _d.sent(); + this._initialized = true; + if (!(this._objectIndex && this._objectIndex > 0)) return [3 /*break*/, 9]; + i = 0; + _d.label = 6; + case 6: + if (!(i < this._objectIndex)) return [3 /*break*/, 9]; + return [4 /*yield*/, this._itemType.read(this._dataStream, { abortSignal: options.abortSignal })]; + case 7: + _d.sent(); + this._itemsRemainingInBlock--; + _d.label = 8; + case 8: + i++; + return [3 /*break*/, 6]; + case 9: return [2 /*return*/]; + } + }); + }); + }; + AvroReader.prototype.hasNext = function () { + return !this._initialized || this._itemsRemainingInBlock > 0; + }; + AvroReader.prototype.parseObjects = function (options) { + if (options === void 0) { options = {}; } + return __asyncGenerator(this, arguments, function parseObjects_1() { + var result, marker, _a, err_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!!this._initialized) return [3 /*break*/, 2]; + return [4 /*yield*/, __await(this.initialize(options))]; + case 1: + _b.sent(); + _b.label = 2; + case 2: + if (!this.hasNext()) return [3 /*break*/, 13]; + return [4 /*yield*/, __await(this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }))]; + case 3: + result = _b.sent(); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (!(this._itemsRemainingInBlock == 0)) return [3 /*break*/, 10]; + return [4 /*yield*/, __await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal + }))]; + case 4: + marker = _b.sent(); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!arraysEqual(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + _b.label = 5; + case 5: + _b.trys.push([5, 7, , 8]); + _a = this; + return [4 /*yield*/, __await(AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }))]; + case 6: + _a._itemsRemainingInBlock = _b.sent(); + return [3 /*break*/, 8]; + case 7: + err_1 = _b.sent(); + // We hit the end of the stream. + this._itemsRemainingInBlock = 0; + return [3 /*break*/, 8]; + case 8: + if (!(this._itemsRemainingInBlock > 0)) return [3 /*break*/, 10]; + // Ignore block size + return [4 /*yield*/, __await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }))]; + case 9: + // Ignore block size + _b.sent(); + _b.label = 10; + case 10: return [4 /*yield*/, __await(result)]; + case 11: return [4 /*yield*/, _b.sent()]; + case 12: + _b.sent(); + return [3 /*break*/, 2]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + return AvroReader; +}()); +export { AvroReader }; +//# sourceMappingURL=AvroReader.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js.map new file mode 100644 index 000000000..05e7e6ee6 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/AvroReader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AvroReader.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/AvroReader.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,oBAAoB,CAAC;AAoB5B;IA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AAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAY,EAAE,MAAM,CAAC,EAAE;4BAC3C,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;yBACrD;;;;wBAGC,KAAA,IAAI,CAAA;wBAA0B,6BAAM,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE;gCACxE,WAAW,EAAE,OAAO,CAAC,WAAW;6BACjC,CAAC,GAAA;;wBAFF,GAAK,sBAAsB,GAAG,SAE5B,CAAC;;;;wBAEH,gCAAgC;wBAChC,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC;;;6BAG9B,CAAA,IAAI,CAAC,sBAAuB,GAAG,CAAC,CAAA,EAAhC,yBAAgC;wBAClC,oBAAoB;wBACpB,6BAAM,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,GAAA;;wBADjF,oBAAoB;wBACpB,SAAiF,CAAC;;0DAGhF,MAAM;6BAAZ,gCAAY;;wBAAZ,SAAY,CAAC;;;;;;KAEhB;IACH,iBAAC;AAAD,CAAC,AArJD,IAqJC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable } from \"./AvroReadable\";\nimport {\n AVRO_SYNC_MARKER_SIZE,\n AVRO_INIT_BYTES,\n AVRO_CODEC_KEY,\n AVRO_SCHEMA_KEY\n} from \"./AvroConstants\";\nimport { arraysEqual } from \"./utils/utils.common\";\nimport { AvroType, AvroParser } from \"./AvroParser\";\nimport \"@azure/core-paging\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the {@link AvroReader.parseObjects} operation.\n *\n * @export\n * @interface AvroParseOptions\n */\nexport interface AvroParseOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroParseOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport class AvroReader {\n private readonly _dataStream: AvroReadable;\n\n private readonly _headerStream: AvroReadable;\n\n private _syncMarker?: Uint8Array;\n\n private _metadata?: Record;\n\n private _itemType?: AvroType;\n\n private _itemsRemainingInBlock?: number;\n\n // Remembers where we started if partial data stream was provided.\n private readonly _initialBlockOffset: number;\n\n /// The byte offset within the Avro file (both header and data)\n /// of the start of the current block.\n private _blockOffset: number;\n public get blockOffset(): number {\n return this._blockOffset;\n }\n\n private _objectIndex: number;\n public get objectIndex(): number {\n return this._objectIndex;\n }\n\n private _initialized: boolean;\n\n constructor(dataStream: AvroReadable);\n\n constructor(\n dataStream: AvroReadable,\n headerStream: AvroReadable,\n currentBlockOffset: number,\n indexWithinCurrentBlock: number\n );\n\n constructor(\n dataStream: AvroReadable,\n headerStream?: AvroReadable,\n currentBlockOffset?: number,\n indexWithinCurrentBlock?: number\n ) {\n this._dataStream = dataStream;\n this._headerStream = headerStream || dataStream;\n this._initialized = false;\n this._blockOffset = currentBlockOffset || 0;\n this._objectIndex = indexWithinCurrentBlock || 0;\n this._initialBlockOffset = currentBlockOffset || 0;\n }\n\n private async initialize(options: AvroParseOptions = {}) {\n const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {\n abortSignal: options.abortSignal\n });\n if (!arraysEqual(header, AVRO_INIT_BYTES)) {\n throw new Error(\"Stream is not an Avro file.\");\n }\n\n // File metadata is written as if defined by the following map schema:\n // { \"type\": \"map\", \"values\": \"bytes\"}\n this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {\n abortSignal: options.abortSignal\n });\n\n // Validate codec\n const codec = this._metadata![AVRO_CODEC_KEY];\n if (!(codec == undefined || codec == \"null\")) {\n throw new Error(\"Codecs are not supported\");\n }\n\n // The 16-byte, randomly-generated sync marker for this file.\n this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal\n });\n\n // Parse the schema\n const schema = JSON.parse(this._metadata![AVRO_SCHEMA_KEY]);\n this._itemType = AvroType.fromSchema(schema);\n\n if (this._blockOffset == 0) {\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n }\n\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal\n });\n // skip block length\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n\n this._initialized = true;\n if (this._objectIndex && this._objectIndex > 0) {\n for (let i = 0; i < this._objectIndex; i++) {\n await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });\n this._itemsRemainingInBlock!--;\n }\n }\n }\n\n public hasNext(): boolean {\n return !this._initialized || this._itemsRemainingInBlock! > 0;\n }\n\n public async *parseObjects(\n options: AvroParseOptions = {}\n ): AsyncIterableIterator | null> {\n if (!this._initialized) {\n await this.initialize(options);\n }\n\n while (this.hasNext()) {\n const result = await this._itemType!.read(this._dataStream, {\n abortSignal: options.abortSignal\n });\n\n this._itemsRemainingInBlock!--;\n this._objectIndex!++;\n\n if (this._itemsRemainingInBlock == 0) {\n const marker = await AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal\n });\n\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n this._objectIndex = 0;\n\n if (!arraysEqual(this._syncMarker!, marker)) {\n throw new Error(\"Stream is not a valid Avro file.\");\n }\n\n try {\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal\n });\n } catch (err) {\n // We hit the end of the stream.\n this._itemsRemainingInBlock = 0;\n }\n\n if (this._itemsRemainingInBlock! > 0) {\n // Ignore block size\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n }\n }\n yield result;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js new file mode 100644 index 000000000..475b1d615 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { AvroReader } from "./AvroReader"; +export { AvroReadable } from "./AvroReadable"; +export { AvroReadableFromBlob } from "./AvroReadableFromBlob"; +//# sourceMappingURL=index.browser.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js.map new file mode 100644 index 000000000..ef6000cc0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.browser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/index.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AvroReader } from \"./AvroReader\";\nexport { AvroReadable } from \"./AvroReadable\";\nexport { AvroReadableFromBlob } from \"./AvroReadableFromBlob\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js new file mode 100644 index 000000000..15ab942a0 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export { AvroReader } from "./AvroReader"; +export { AvroReadable } from "./AvroReadable"; +export { AvroReadableFromStream } from "./AvroReadableFromStream"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js.map new file mode 100644 index 000000000..c46e8668d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../storage-internal-avro/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AvroReader } from \"./AvroReader\";\nexport { AvroReadable } from \"./AvroReadable\";\nexport { AvroReadableFromStream } from \"./AvroReadableFromStream\";\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js new file mode 100644 index 000000000..40aefb1f1 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +export function arraysEqual(a, b) { + if (a === b) + return true; + if (a == null || b == null) + return false; + if (a.length != b.length) + return false; + for (var i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; + } + return true; +} +//# sourceMappingURL=utils.common.js.map \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js.map b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js.map new file mode 100644 index 000000000..49beeece5 --- /dev/null +++ b/node_modules/@azure/storage-blob/dist-esm/storage-internal-avro/src/utils/utils.common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.common.js","sourceRoot":"","sources":["../../../../../storage-internal-avro/src/utils/utils.common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,MAAM,UAAU,WAAW,CAAC,CAAa,EAAE,CAAa;IACtD,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAEvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACjC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;KACjC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface KeyValuePair {\n key: string;\n value: T;\n}\n\nexport function arraysEqual(a: Uint8Array, b: Uint8Array): boolean {\n if (a === b) return true;\n if (a == null || b == null) return false;\n if (a.length != b.length) return false;\n\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/dist/index.js b/node_modules/@azure/storage-blob/dist/index.js new file mode 100644 index 000000000..7b3202dfd --- /dev/null +++ b/node_modules/@azure/storage-blob/dist/index.js @@ -0,0 +1,24528 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var coreHttp = require('@azure/core-http'); +var tslib = require('tslib'); +var api = require('@opentelemetry/api'); +var logger$1 = require('@azure/logger'); +var abortController = require('@azure/abort-controller'); +var os = require('os'); +var stream = require('stream'); +require('@azure/core-paging'); +var crypto = require('crypto'); +var coreLro = require('@azure/core-lro'); +var events = require('events'); +var coreTracing = require('@azure/core-tracing'); +var fs = require('fs'); +var util = require('util'); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +var KeyInfo = { + serializedName: "KeyInfo", + type: { + name: "Composite", + className: "KeyInfo", + modelProperties: { + startsOn: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "String" + } + }, + expiresOn: { + xmlName: "Expiry", + required: true, + serializedName: "Expiry", + type: { + name: "String" + } + } + } + } +}; +var UserDelegationKey = { + serializedName: "UserDelegationKey", + type: { + name: "Composite", + className: "UserDelegationKey", + modelProperties: { + signedObjectId: { + xmlName: "SignedOid", + required: true, + serializedName: "SignedOid", + type: { + name: "String" + } + }, + signedTenantId: { + xmlName: "SignedTid", + required: true, + serializedName: "SignedTid", + type: { + name: "String" + } + }, + signedStartsOn: { + xmlName: "SignedStart", + required: true, + serializedName: "SignedStart", + type: { + name: "String" + } + }, + signedExpiresOn: { + xmlName: "SignedExpiry", + required: true, + serializedName: "SignedExpiry", + type: { + name: "String" + } + }, + signedService: { + xmlName: "SignedService", + required: true, + serializedName: "SignedService", + type: { + name: "String" + } + }, + signedVersion: { + xmlName: "SignedVersion", + required: true, + serializedName: "SignedVersion", + type: { + name: "String" + } + }, + value: { + xmlName: "Value", + required: true, + serializedName: "Value", + type: { + name: "String" + } + } + } + } +}; +var StorageError = { + serializedName: "StorageError", + type: { + name: "Composite", + className: "StorageError", + modelProperties: { + message: { + xmlName: "Message", + serializedName: "Message", + type: { + name: "String" + } + }, + code: { + xmlName: "Code", + serializedName: "Code", + type: { + name: "String" + } + } + } + } +}; +var DataLakeStorageErrorError = { + serializedName: "DataLakeStorageError_error", + type: { + name: "Composite", + className: "DataLakeStorageErrorError", + modelProperties: { + code: { + xmlName: "Code", + serializedName: "Code", + type: { + name: "String" + } + }, + message: { + xmlName: "Message", + serializedName: "Message", + type: { + name: "String" + } + } + } + } +}; +var DataLakeStorageError = { + serializedName: "DataLakeStorageError", + type: { + name: "Composite", + className: "DataLakeStorageError", + modelProperties: { + dataLakeStorageErrorDetails: { + xmlName: "error", + serializedName: "error", + type: { + name: "Composite", + className: "DataLakeStorageErrorError" + } + } + } + } +}; +var AccessPolicy = { + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + modelProperties: { + startsOn: { + xmlName: "Start", + serializedName: "Start", + type: { + name: "String" + } + }, + expiresOn: { + xmlName: "Expiry", + serializedName: "Expiry", + type: { + name: "String" + } + }, + permissions: { + xmlName: "Permission", + serializedName: "Permission", + type: { + name: "String" + } + } + } + } +}; +var BlobPropertiesInternal = { + xmlName: "Properties", + serializedName: "BlobPropertiesInternal", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + modelProperties: { + createdOn: { + xmlName: "Creation-Time", + serializedName: "Creation-Time", + type: { + name: "DateTimeRfc1123" + } + }, + lastModified: { + xmlName: "Last-Modified", + required: true, + serializedName: "Last-Modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + xmlName: "Etag", + required: true, + serializedName: "Etag", + type: { + name: "String" + } + }, + contentLength: { + xmlName: "Content-Length", + serializedName: "Content-Length", + type: { + name: "Number" + } + }, + contentType: { + xmlName: "Content-Type", + serializedName: "Content-Type", + type: { + name: "String" + } + }, + contentEncoding: { + xmlName: "Content-Encoding", + serializedName: "Content-Encoding", + type: { + name: "String" + } + }, + contentLanguage: { + xmlName: "Content-Language", + serializedName: "Content-Language", + type: { + name: "String" + } + }, + contentMD5: { + xmlName: "Content-MD5", + serializedName: "Content-MD5", + type: { + name: "ByteArray" + } + }, + contentDisposition: { + xmlName: "Content-Disposition", + serializedName: "Content-Disposition", + type: { + name: "String" + } + }, + cacheControl: { + xmlName: "Cache-Control", + serializedName: "Cache-Control", + type: { + name: "String" + } + }, + blobSequenceNumber: { + xmlName: "x-ms-blob-sequence-number", + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + xmlName: "BlobType", + serializedName: "BlobType", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + leaseStatus: { + xmlName: "LeaseStatus", + serializedName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + leaseState: { + xmlName: "LeaseState", + serializedName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + xmlName: "LeaseDuration", + serializedName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + copyId: { + xmlName: "CopyId", + serializedName: "CopyId", + type: { + name: "String" + } + }, + copyStatus: { + xmlName: "CopyStatus", + serializedName: "CopyStatus", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + copySource: { + xmlName: "CopySource", + serializedName: "CopySource", + type: { + name: "String" + } + }, + copyProgress: { + xmlName: "CopyProgress", + serializedName: "CopyProgress", + type: { + name: "String" + } + }, + copyCompletedOn: { + xmlName: "CopyCompletionTime", + serializedName: "CopyCompletionTime", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + xmlName: "CopyStatusDescription", + serializedName: "CopyStatusDescription", + type: { + name: "String" + } + }, + serverEncrypted: { + xmlName: "ServerEncrypted", + serializedName: "ServerEncrypted", + type: { + name: "Boolean" + } + }, + incrementalCopy: { + xmlName: "IncrementalCopy", + serializedName: "IncrementalCopy", + type: { + name: "Boolean" + } + }, + destinationSnapshot: { + xmlName: "DestinationSnapshot", + serializedName: "DestinationSnapshot", + type: { + name: "String" + } + }, + deletedOn: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } + }, + accessTier: { + xmlName: "AccessTier", + serializedName: "AccessTier", + type: { + name: "String" + } + }, + accessTierInferred: { + xmlName: "AccessTierInferred", + serializedName: "AccessTierInferred", + type: { + name: "Boolean" + } + }, + archiveStatus: { + xmlName: "ArchiveStatus", + serializedName: "ArchiveStatus", + type: { + name: "String" + } + }, + customerProvidedKeySha256: { + xmlName: "CustomerProvidedKeySha256", + serializedName: "CustomerProvidedKeySha256", + type: { + name: "String" + } + }, + encryptionScope: { + xmlName: "EncryptionScope", + serializedName: "EncryptionScope", + type: { + name: "String" + } + }, + accessTierChangedOn: { + xmlName: "AccessTierChangeTime", + serializedName: "AccessTierChangeTime", + type: { + name: "DateTimeRfc1123" + } + }, + tagCount: { + xmlName: "TagCount", + serializedName: "TagCount", + type: { + name: "Number" + } + }, + expiresOn: { + xmlName: "Expiry-Time", + serializedName: "Expiry-Time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + xmlName: "Sealed", + serializedName: "Sealed", + type: { + name: "Boolean" + } + }, + rehydratePriority: { + xmlName: "RehydratePriority", + serializedName: "RehydratePriority", + type: { + name: "String" + } + }, + lastAccessedOn: { + xmlName: "LastAccessTime", + serializedName: "LastAccessTime", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +var BlobTag = { + xmlName: "Tag", + serializedName: "BlobTag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + xmlName: "Key", + required: true, + serializedName: "Key", + type: { + name: "String" + } + }, + value: { + xmlName: "Value", + required: true, + serializedName: "Value", + type: { + name: "String" + } + } + } + } +}; +var BlobTags = { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { + blobTagSet: { + xmlIsWrapped: true, + xmlName: "TagSet", + xmlElementName: "Tag", + required: true, + serializedName: "BlobTagSet", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobTag" + } + } + } + } + } + } +}; +var BlobItemInternal = { + xmlName: "Blob", + serializedName: "BlobItemInternal", + type: { + name: "Composite", + className: "BlobItemInternal", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + deleted: { + xmlName: "Deleted", + required: true, + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + snapshot: { + xmlName: "Snapshot", + required: true, + serializedName: "Snapshot", + type: { + name: "String" + } + }, + versionId: { + xmlName: "VersionId", + serializedName: "VersionId", + type: { + name: "String" + } + }, + isCurrentVersion: { + xmlName: "IsCurrentVersion", + serializedName: "IsCurrentVersion", + type: { + name: "Boolean" + } + }, + properties: { + xmlName: "Properties", + required: true, + serializedName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal" + } + }, + metadata: { + xmlName: "Metadata", + serializedName: "Metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + blobTags: { + xmlName: "Tags", + serializedName: "BlobTags", + type: { + name: "Composite", + className: "BlobTags" + } + }, + objectReplicationMetadata: { + xmlName: "OrMetadata", + serializedName: "ObjectReplicationMetadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; +var BlobFlatListSegment = { + xmlName: "Blobs", + serializedName: "BlobFlatListSegment", + type: { + name: "Composite", + className: "BlobFlatListSegment", + modelProperties: { + blobItems: { + xmlName: "BlobItems", + xmlElementName: "Blob", + required: true, + serializedName: "BlobItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal" + } + } + } + } + } + } +}; +var ListBlobsFlatSegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListBlobsFlatSegmentResponse", + type: { + name: "Composite", + className: "ListBlobsFlatSegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + containerName: { + xmlIsAttribute: true, + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + segment: { + xmlName: "Blobs", + required: true, + serializedName: "Segment", + type: { + name: "Composite", + className: "BlobFlatListSegment" + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +var BlobPrefix = { + serializedName: "BlobPrefix", + type: { + name: "Composite", + className: "BlobPrefix", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + } + } + } +}; +var BlobHierarchyListSegment = { + xmlName: "Blobs", + serializedName: "BlobHierarchyListSegment", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + modelProperties: { + blobPrefixes: { + xmlName: "BlobPrefixes", + xmlElementName: "BlobPrefix", + serializedName: "BlobPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobPrefix" + } + } + } + }, + blobItems: { + xmlName: "BlobItems", + xmlElementName: "Blob", + required: true, + serializedName: "BlobItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal" + } + } + } + } + } + } +}; +var ListBlobsHierarchySegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListBlobsHierarchySegmentResponse", + type: { + name: "Composite", + className: "ListBlobsHierarchySegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + containerName: { + xmlIsAttribute: true, + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + delimiter: { + xmlName: "Delimiter", + serializedName: "Delimiter", + type: { + name: "String" + } + }, + segment: { + xmlName: "Blobs", + required: true, + serializedName: "Segment", + type: { + name: "Composite", + className: "BlobHierarchyListSegment" + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +var Block = { + serializedName: "Block", + type: { + name: "Composite", + className: "Block", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + size: { + xmlName: "Size", + required: true, + serializedName: "Size", + type: { + name: "Number" + } + } + } + } +}; +var BlockList = { + serializedName: "BlockList", + type: { + name: "Composite", + className: "BlockList", + modelProperties: { + committedBlocks: { + xmlIsWrapped: true, + xmlName: "CommittedBlocks", + xmlElementName: "Block", + serializedName: "CommittedBlocks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block" + } + } + } + }, + uncommittedBlocks: { + xmlIsWrapped: true, + xmlName: "UncommittedBlocks", + xmlElementName: "Block", + serializedName: "UncommittedBlocks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block" + } + } + } + } + } + } +}; +var BlockLookupList = { + xmlName: "BlockList", + serializedName: "BlockLookupList", + type: { + name: "Composite", + className: "BlockLookupList", + modelProperties: { + committed: { + xmlName: "Committed", + xmlElementName: "Committed", + serializedName: "Committed", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + uncommitted: { + xmlName: "Uncommitted", + xmlElementName: "Uncommitted", + serializedName: "Uncommitted", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + latest: { + xmlName: "Latest", + xmlElementName: "Latest", + serializedName: "Latest", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; +var ContainerProperties = { + serializedName: "ContainerProperties", + type: { + name: "Composite", + className: "ContainerProperties", + modelProperties: { + lastModified: { + xmlName: "Last-Modified", + required: true, + serializedName: "Last-Modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + xmlName: "Etag", + required: true, + serializedName: "Etag", + type: { + name: "String" + } + }, + leaseStatus: { + xmlName: "LeaseStatus", + serializedName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + leaseState: { + xmlName: "LeaseState", + serializedName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseDuration: { + xmlName: "LeaseDuration", + serializedName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + publicAccess: { + xmlName: "PublicAccess", + serializedName: "PublicAccess", + type: { + name: "String" + } + }, + hasImmutabilityPolicy: { + xmlName: "HasImmutabilityPolicy", + serializedName: "HasImmutabilityPolicy", + type: { + name: "Boolean" + } + }, + hasLegalHold: { + xmlName: "HasLegalHold", + serializedName: "HasLegalHold", + type: { + name: "Boolean" + } + }, + defaultEncryptionScope: { + xmlName: "DefaultEncryptionScope", + serializedName: "DefaultEncryptionScope", + type: { + name: "String" + } + }, + preventEncryptionScopeOverride: { + xmlName: "DenyEncryptionScopeOverride", + serializedName: "DenyEncryptionScopeOverride", + type: { + name: "Boolean" + } + }, + deletedOn: { + xmlName: "DeletedTime", + serializedName: "DeletedTime", + type: { + name: "DateTimeRfc1123" + } + }, + remainingRetentionDays: { + xmlName: "RemainingRetentionDays", + serializedName: "RemainingRetentionDays", + type: { + name: "Number" + } + } + } + } +}; +var ContainerItem = { + xmlName: "Container", + serializedName: "ContainerItem", + type: { + name: "Composite", + className: "ContainerItem", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + deleted: { + xmlName: "Deleted", + serializedName: "Deleted", + type: { + name: "Boolean" + } + }, + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, + properties: { + xmlName: "Properties", + required: true, + serializedName: "Properties", + type: { + name: "Composite", + className: "ContainerProperties" + } + }, + metadata: { + xmlName: "Metadata", + serializedName: "Metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; +var DelimitedTextConfiguration = { + serializedName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + xmlName: "ColumnSeparator", + required: true, + serializedName: "ColumnSeparator", + type: { + name: "String" + } + }, + fieldQuote: { + xmlName: "FieldQuote", + required: true, + serializedName: "FieldQuote", + type: { + name: "String" + } + }, + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + }, + escapeChar: { + xmlName: "EscapeChar", + required: true, + serializedName: "EscapeChar", + type: { + name: "String" + } + }, + headersPresent: { + xmlName: "HasHeaders", + required: true, + serializedName: "HeadersPresent", + type: { + name: "Boolean" + } + } + } + } +}; +var JsonTextConfiguration = { + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { + recordSeparator: { + xmlName: "RecordSeparator", + required: true, + serializedName: "RecordSeparator", + type: { + name: "String" + } + } + } + } +}; +var ArrowField = { + xmlName: "Field", + serializedName: "ArrowField", + type: { + name: "Composite", + className: "ArrowField", + modelProperties: { + type: { + xmlName: "Type", + required: true, + serializedName: "Type", + type: { + name: "String" + } + }, + name: { + xmlName: "Name", + serializedName: "Name", + type: { + name: "String" + } + }, + precision: { + xmlName: "Precision", + serializedName: "Precision", + type: { + name: "Number" + } + }, + scale: { + xmlName: "Scale", + serializedName: "Scale", + type: { + name: "Number" + } + } + } + } +}; +var ArrowConfiguration = { + serializedName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + modelProperties: { + schema: { + xmlIsWrapped: true, + xmlName: "Schema", + xmlElementName: "Field", + required: true, + serializedName: "Schema", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArrowField" + } + } + } + } + } + } +}; +var ListContainersSegmentResponse = { + xmlName: "EnumerationResults", + serializedName: "ListContainersSegmentResponse", + type: { + name: "Composite", + className: "ListContainersSegmentResponse", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + prefix: { + xmlName: "Prefix", + serializedName: "Prefix", + type: { + name: "String" + } + }, + marker: { + xmlName: "Marker", + serializedName: "Marker", + type: { + name: "String" + } + }, + maxPageSize: { + xmlName: "MaxResults", + serializedName: "MaxResults", + type: { + name: "Number" + } + }, + containerItems: { + xmlIsWrapped: true, + xmlName: "Containers", + xmlElementName: "Container", + required: true, + serializedName: "ContainerItems", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerItem" + } + } + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +var CorsRule = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + xmlName: "AllowedOrigins", + required: true, + serializedName: "AllowedOrigins", + type: { + name: "String" + } + }, + allowedMethods: { + xmlName: "AllowedMethods", + required: true, + serializedName: "AllowedMethods", + type: { + name: "String" + } + }, + allowedHeaders: { + xmlName: "AllowedHeaders", + required: true, + serializedName: "AllowedHeaders", + type: { + name: "String" + } + }, + exposedHeaders: { + xmlName: "ExposedHeaders", + required: true, + serializedName: "ExposedHeaders", + type: { + name: "String" + } + }, + maxAgeInSeconds: { + xmlName: "MaxAgeInSeconds", + required: true, + serializedName: "MaxAgeInSeconds", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; +var FilterBlobItem = { + xmlName: "Blob", + serializedName: "FilterBlobItem", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + xmlName: "Name", + required: true, + serializedName: "Name", + type: { + name: "String" + } + }, + containerName: { + xmlName: "ContainerName", + required: true, + serializedName: "ContainerName", + type: { + name: "String" + } + }, + tagValue: { + xmlName: "TagValue", + required: true, + serializedName: "TagValue", + type: { + name: "String" + } + } + } + } +}; +var FilterBlobSegment = { + xmlName: "EnumerationResults", + serializedName: "FilterBlobSegment", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + xmlIsAttribute: true, + xmlName: "ServiceEndpoint", + required: true, + serializedName: "ServiceEndpoint", + type: { + name: "String" + } + }, + where: { + xmlName: "Where", + required: true, + serializedName: "Where", + type: { + name: "String" + } + }, + blobs: { + xmlIsWrapped: true, + xmlName: "Blobs", + xmlElementName: "Blob", + required: true, + serializedName: "Blobs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterBlobItem" + } + } + } + }, + continuationToken: { + xmlName: "NextMarker", + serializedName: "NextMarker", + type: { + name: "String" + } + } + } + } +}; +var GeoReplication = { + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + modelProperties: { + status: { + xmlName: "Status", + required: true, + serializedName: "Status", + type: { + name: "String" + } + }, + lastSyncOn: { + xmlName: "LastSyncTime", + required: true, + serializedName: "LastSyncTime", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +var RetentionPolicy = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + days: { + xmlName: "Days", + serializedName: "Days", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; +var Logging = { + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging", + modelProperties: { + version: { + xmlName: "Version", + required: true, + serializedName: "Version", + type: { + name: "String" + } + }, + deleteProperty: { + xmlName: "Delete", + required: true, + serializedName: "Delete", + type: { + name: "Boolean" + } + }, + read: { + xmlName: "Read", + required: true, + serializedName: "Read", + type: { + name: "Boolean" + } + }, + write: { + xmlName: "Write", + required: true, + serializedName: "Write", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + xmlName: "RetentionPolicy", + required: true, + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; +var Metrics = { + serializedName: "Metrics", + type: { + name: "Composite", + className: "Metrics", + modelProperties: { + version: { + xmlName: "Version", + serializedName: "Version", + type: { + name: "String" + } + }, + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + includeAPIs: { + xmlName: "IncludeAPIs", + serializedName: "IncludeAPIs", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + xmlName: "RetentionPolicy", + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; +var PageRange = { + serializedName: "PageRange", + type: { + name: "Composite", + className: "PageRange", + modelProperties: { + start: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "Number" + } + }, + end: { + xmlName: "End", + required: true, + serializedName: "End", + type: { + name: "Number" + } + } + } + } +}; +var ClearRange = { + serializedName: "ClearRange", + type: { + name: "Composite", + className: "ClearRange", + modelProperties: { + start: { + xmlName: "Start", + required: true, + serializedName: "Start", + type: { + name: "Number" + } + }, + end: { + xmlName: "End", + required: true, + serializedName: "End", + type: { + name: "Number" + } + } + } + } +}; +var PageList = { + serializedName: "PageList", + type: { + name: "Composite", + className: "PageList", + modelProperties: { + pageRange: { + xmlName: "PageRange", + xmlElementName: "PageRange", + serializedName: "PageRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PageRange" + } + } + } + }, + clearRange: { + xmlName: "ClearRange", + xmlElementName: "ClearRange", + serializedName: "ClearRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClearRange" + } + } + } + } + } + } +}; +var QueryFormat = { + serializedName: "QueryFormat", + type: { + name: "Composite", + className: "QueryFormat", + modelProperties: { + type: { + xmlName: "Type", + serializedName: "Type", + type: { + name: "Enum", + allowedValues: [ + "delimited", + "json", + "arrow" + ] + } + }, + delimitedTextConfiguration: { + xmlName: "DelimitedTextConfiguration", + serializedName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration" + } + }, + jsonTextConfiguration: { + xmlName: "JsonTextConfiguration", + serializedName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration" + } + }, + arrowConfiguration: { + xmlName: "ArrowConfiguration", + serializedName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration" + } + } + } + } +}; +var QuerySerialization = { + serializedName: "QuerySerialization", + type: { + name: "Composite", + className: "QuerySerialization", + modelProperties: { + format: { + xmlName: "Format", + required: true, + serializedName: "Format", + type: { + name: "Composite", + className: "QueryFormat" + } + } + } + } +}; +var QueryRequest = { + serializedName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + xmlName: "QueryType", + required: true, + isConstant: true, + serializedName: "QueryType", + defaultValue: 'SQL', + type: { + name: "String" + } + }, + expression: { + xmlName: "Expression", + required: true, + serializedName: "Expression", + type: { + name: "String" + } + }, + inputSerialization: { + xmlName: "InputSerialization", + serializedName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + }, + outputSerialization: { + xmlName: "OutputSerialization", + serializedName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization" + } + } + } + } +}; +var SignedIdentifier = { + serializedName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + xmlName: "Id", + required: true, + serializedName: "Id", + type: { + name: "String" + } + }, + accessPolicy: { + xmlName: "AccessPolicy", + required: true, + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy" + } + } + } + } +}; +var StaticWebsite = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + xmlName: "Enabled", + required: true, + serializedName: "Enabled", + type: { + name: "Boolean" + } + }, + indexDocument: { + xmlName: "IndexDocument", + serializedName: "IndexDocument", + type: { + name: "String" + } + }, + errorDocument404Path: { + xmlName: "ErrorDocument404Path", + serializedName: "ErrorDocument404Path", + type: { + name: "String" + } + }, + defaultIndexDocumentPath: { + xmlName: "DefaultIndexDocumentPath", + serializedName: "DefaultIndexDocumentPath", + type: { + name: "String" + } + } + } + } +}; +var BlobServiceProperties = { + xmlName: "StorageServiceProperties", + serializedName: "BlobServiceProperties", + type: { + name: "Composite", + className: "BlobServiceProperties", + modelProperties: { + blobAnalyticsLogging: { + xmlName: "Logging", + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging" + } + }, + hourMetrics: { + xmlName: "HourMetrics", + serializedName: "HourMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + minuteMetrics: { + xmlName: "MinuteMetrics", + serializedName: "MinuteMetrics", + type: { + name: "Composite", + className: "Metrics" + } + }, + cors: { + xmlIsWrapped: true, + xmlName: "Cors", + xmlElementName: "CorsRule", + serializedName: "Cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsRule" + } + } + } + }, + defaultServiceVersion: { + xmlName: "DefaultServiceVersion", + serializedName: "DefaultServiceVersion", + type: { + name: "String" + } + }, + deleteRetentionPolicy: { + xmlName: "DeleteRetentionPolicy", + serializedName: "DeleteRetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + }, + staticWebsite: { + xmlName: "StaticWebsite", + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite" + } + } + } + } +}; +var BlobServiceStatistics = { + xmlName: "StorageServiceStats", + serializedName: "BlobServiceStatistics", + type: { + name: "Composite", + className: "BlobServiceStatistics", + modelProperties: { + geoReplication: { + xmlName: "GeoReplication", + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication" + } + } + } + } +}; +var ServiceSetPropertiesHeaders = { + serializedName: "service-setproperties-headers", + type: { + name: "Composite", + className: "ServiceSetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceGetPropertiesHeaders = { + serializedName: "service-getproperties-headers", + type: { + name: "Composite", + className: "ServiceGetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceGetStatisticsHeaders = { + serializedName: "service-getstatistics-headers", + type: { + name: "Composite", + className: "ServiceGetStatisticsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceListContainersSegmentHeaders = { + serializedName: "service-listcontainerssegment-headers", + type: { + name: "Composite", + className: "ServiceListContainersSegmentHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceGetUserDelegationKeyHeaders = { + serializedName: "service-getuserdelegationkey-headers", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceGetAccountInfoHeaders = { + serializedName: "service-getaccountinfo-headers", + type: { + name: "Composite", + className: "ServiceGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceSubmitBatchHeaders = { + serializedName: "service-submitbatch-headers", + type: { + name: "Composite", + className: "ServiceSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ServiceFilterBlobsHeaders = { + serializedName: "service-filterblobs-headers", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerCreateHeaders = { + serializedName: "container-create-headers", + type: { + name: "Composite", + className: "ContainerCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerGetPropertiesHeaders = { + serializedName: "container-getproperties-headers", + type: { + name: "Composite", + className: "ContainerGetPropertiesHeaders", + modelProperties: { + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + }, + hasImmutabilityPolicy: { + serializedName: "x-ms-has-immutability-policy", + type: { + name: "Boolean" + } + }, + hasLegalHold: { + serializedName: "x-ms-has-legal-hold", + type: { + name: "Boolean" + } + }, + defaultEncryptionScope: { + serializedName: "x-ms-default-encryption-scope", + type: { + name: "String" + } + }, + denyEncryptionScopeOverride: { + serializedName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerDeleteHeaders = { + serializedName: "container-delete-headers", + type: { + name: "Composite", + className: "ContainerDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerSetMetadataHeaders = { + serializedName: "container-setmetadata-headers", + type: { + name: "Composite", + className: "ContainerSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerGetAccessPolicyHeaders = { + serializedName: "container-getaccesspolicy-headers", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyHeaders", + modelProperties: { + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerSetAccessPolicyHeaders = { + serializedName: "container-setaccesspolicy-headers", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerRestoreHeaders = { + serializedName: "container-restore-headers", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerAcquireLeaseHeaders = { + serializedName: "container-acquirelease-headers", + type: { + name: "Composite", + className: "ContainerAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerReleaseLeaseHeaders = { + serializedName: "container-releaselease-headers", + type: { + name: "Composite", + className: "ContainerReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerRenewLeaseHeaders = { + serializedName: "container-renewlease-headers", + type: { + name: "Composite", + className: "ContainerRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerBreakLeaseHeaders = { + serializedName: "container-breaklease-headers", + type: { + name: "Composite", + className: "ContainerBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerChangeLeaseHeaders = { + serializedName: "container-changelease-headers", + type: { + name: "Composite", + className: "ContainerChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerListBlobFlatSegmentHeaders = { + serializedName: "container-listblobflatsegment-headers", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerListBlobHierarchySegmentHeaders = { + serializedName: "container-listblobhierarchysegment-headers", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var ContainerGetAccountInfoHeaders = { + serializedName: "container-getaccountinfo-headers", + type: { + name: "Composite", + className: "ContainerGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobDownloadHeaders = { + serializedName: "blob-download-headers", + type: { + name: "Composite", + className: "BlobDownloadHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + contentRange: { + serializedName: "content-range", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123" + } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobGetPropertiesHeaders = { + serializedName: "blob-getproperties-headers", + type: { + name: "Composite", + className: "BlobGetPropertiesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + createdOn: { + serializedName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + type: { + name: "String" + } + }, + objectReplicationRules: { + serializedName: "x-ms-or", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-or-" + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + isIncrementalCopy: { + serializedName: "x-ms-incremental-copy", + type: { + name: "Boolean" + } + }, + destinationSnapshot: { + serializedName: "x-ms-copy-destination-snapshot", + type: { + name: "String" + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + accessTier: { + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + }, + accessTierInferred: { + serializedName: "x-ms-access-tier-inferred", + type: { + name: "Boolean" + } + }, + archiveStatus: { + serializedName: "x-ms-archive-status", + type: { + name: "String" + } + }, + accessTierChangedOn: { + serializedName: "x-ms-access-tier-change-time", + type: { + name: "DateTimeRfc1123" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + type: { + name: "Boolean" + } + }, + tagCount: { + serializedName: "x-ms-tag-count", + type: { + name: "Number" + } + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + rehydratePriority: { + serializedName: "x-ms-rehydrate-priority", + type: { + name: "String" + } + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobDeleteHeaders = { + serializedName: "blob-delete-headers", + type: { + name: "Composite", + className: "BlobDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetAccessControlHeaders = { + serializedName: "blob-setaccesscontrol-headers", + type: { + name: "Composite", + className: "BlobSetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +var BlobGetAccessControlHeaders = { + serializedName: "blob-getaccesscontrol-headers", + type: { + name: "Composite", + className: "BlobGetAccessControlHeaders", + modelProperties: { + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + xMsOwner: { + serializedName: "x-ms-owner", + type: { + name: "String" + } + }, + xMsGroup: { + serializedName: "x-ms-group", + type: { + name: "String" + } + }, + xMsPermissions: { + serializedName: "x-ms-permissions", + type: { + name: "String" + } + }, + xMsAcl: { + serializedName: "x-ms-acl", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } + } + } +}; +var BlobRenameHeaders = { + serializedName: "blob-rename-headers", + type: { + name: "Composite", + className: "BlobRenameHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + } + } + } +}; +var PageBlobCreateHeaders = { + serializedName: "pageblob-create-headers", + type: { + name: "Composite", + className: "PageBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var AppendBlobCreateHeaders = { + serializedName: "appendblob-create-headers", + type: { + name: "Composite", + className: "AppendBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlockBlobUploadHeaders = { + serializedName: "blockblob-upload-headers", + type: { + name: "Composite", + className: "BlockBlobUploadHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobUndeleteHeaders = { + serializedName: "blob-undelete-headers", + type: { + name: "Composite", + className: "BlobUndeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetExpiryHeaders = { + serializedName: "blob-setexpiry-headers", + type: { + name: "Composite", + className: "BlobSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetHTTPHeadersHeaders = { + serializedName: "blob-sethttpheaders-headers", + type: { + name: "Composite", + className: "BlobSetHTTPHeadersHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetMetadataHeaders = { + serializedName: "blob-setmetadata-headers", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobAcquireLeaseHeaders = { + serializedName: "blob-acquirelease-headers", + type: { + name: "Composite", + className: "BlobAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobReleaseLeaseHeaders = { + serializedName: "blob-releaselease-headers", + type: { + name: "Composite", + className: "BlobReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobRenewLeaseHeaders = { + serializedName: "blob-renewlease-headers", + type: { + name: "Composite", + className: "BlobRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobChangeLeaseHeaders = { + serializedName: "blob-changelease-headers", + type: { + name: "Composite", + className: "BlobChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + leaseId: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobBreakLeaseHeaders = { + serializedName: "blob-breaklease-headers", + type: { + name: "Composite", + className: "BlobBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + leaseTime: { + serializedName: "x-ms-lease-time", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobCreateSnapshotHeaders = { + serializedName: "blob-createsnapshot-headers", + type: { + name: "Composite", + className: "BlobCreateSnapshotHeaders", + modelProperties: { + snapshot: { + serializedName: "x-ms-snapshot", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobStartCopyFromURLHeaders = { + serializedName: "blob-startcopyfromurl-headers", + type: { + name: "Composite", + className: "BlobStartCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobCopyFromURLHeaders = { + serializedName: "blob-copyfromurl-headers", + type: { + name: "Composite", + className: "BlobCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "success" + ] + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobAbortCopyFromURLHeaders = { + serializedName: "blob-abortcopyfromurl-headers", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetTierHeaders = { + serializedName: "blob-settier-headers", + type: { + name: "Composite", + className: "BlobSetTierHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobGetAccountInfoHeaders = { + serializedName: "blob-getaccountinfo-headers", + type: { + name: "Composite", + className: "BlobGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + skuName: { + serializedName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS" + ] + } + }, + accountKind: { + serializedName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlockBlobStageBlockHeaders = { + serializedName: "blockblob-stageblock-headers", + type: { + name: "Composite", + className: "BlockBlobStageBlockHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlockBlobStageBlockFromURLHeaders = { + serializedName: "blockblob-stageblockfromurl-headers", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlockBlobCommitBlockListHeaders = { + serializedName: "blockblob-commitblocklist-headers", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + versionId: { + serializedName: "x-ms-version-id", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlockBlobGetBlockListHeaders = { + serializedName: "blockblob-getblocklist-headers", + type: { + name: "Composite", + className: "BlockBlobGetBlockListHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobUploadPagesHeaders = { + serializedName: "pageblob-uploadpages-headers", + type: { + name: "Composite", + className: "PageBlobUploadPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobClearPagesHeaders = { + serializedName: "pageblob-clearpages-headers", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobUploadPagesFromURLHeaders = { + serializedName: "pageblob-uploadpagesfromurl-headers", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobGetPageRangesHeaders = { + serializedName: "pageblob-getpageranges-headers", + type: { + name: "Composite", + className: "PageBlobGetPageRangesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobGetPageRangesDiffHeaders = { + serializedName: "pageblob-getpagerangesdiff-headers", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobResizeHeaders = { + serializedName: "pageblob-resize-headers", + type: { + name: "Composite", + className: "PageBlobResizeHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobUpdateSequenceNumberHeaders = { + serializedName: "pageblob-updatesequencenumber-headers", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var PageBlobCopyIncrementalHeaders = { + serializedName: "pageblob-copyincremental-headers", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var AppendBlobAppendBlockHeaders = { + serializedName: "appendblob-appendblock-headers", + type: { + name: "Composite", + className: "AppendBlobAppendBlockHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var AppendBlobAppendBlockFromUrlHeaders = { + serializedName: "appendblob-appendblockfromurl-headers", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + type: { + name: "String" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var AppendBlobSealHeaders = { + serializedName: "appendblob-seal-headers", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + type: { + name: "Boolean" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobQueryHeaders = { + serializedName: "blob-query-headers", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + type: { + name: "DateTimeRfc1123" + } + }, + metadata: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + }, + contentLength: { + serializedName: "content-length", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + }, + contentRange: { + serializedName: "content-range", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + contentMD5: { + serializedName: "content-md5", + type: { + name: "ByteArray" + } + }, + contentEncoding: { + serializedName: "content-encoding", + type: { + name: "String" + } + }, + cacheControl: { + serializedName: "cache-control", + type: { + name: "String" + } + }, + contentDisposition: { + serializedName: "content-disposition", + type: { + name: "String" + } + }, + contentLanguage: { + serializedName: "content-language", + type: { + name: "String" + } + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: [ + "BlockBlob", + "PageBlob", + "AppendBlob" + ] + } + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123" + } + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + type: { + name: "String" + } + }, + copyId: { + serializedName: "x-ms-copy-id", + type: { + name: "String" + } + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + type: { + name: "String" + } + }, + copySource: { + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: [ + "pending", + "success", + "aborted", + "failed" + ] + } + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: [ + "infinite", + "fixed" + ] + } + }, + leaseState: { + serializedName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken" + ] + } + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: [ + "locked", + "unlocked" + ] + } + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + acceptRanges: { + serializedName: "accept-ranges", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + type: { + name: "Number" + } + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + type: { + name: "Boolean" + } + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobGetTagsHeaders = { + serializedName: "blob-gettags-headers", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; +var BlobSetTagsHeaders = { + serializedName: "blob-settags-headers", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + }, + requestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + version: { + serializedName: "x-ms-version", + type: { + name: "String" + } + }, + date: { + serializedName: "date", + type: { + name: "DateTimeRfc1123" + } + }, + errorCode: { + serializedName: "x-ms-error-code", + type: { + name: "String" + } + } + } + } +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers = /*#__PURE__*/Object.freeze({ + __proto__: null, + BlobServiceProperties: BlobServiceProperties, + BlobServiceStatistics: BlobServiceStatistics, + ContainerItem: ContainerItem, + ContainerProperties: ContainerProperties, + CorsRule: CorsRule, + FilterBlobItem: FilterBlobItem, + FilterBlobSegment: FilterBlobSegment, + GeoReplication: GeoReplication, + KeyInfo: KeyInfo, + ListContainersSegmentResponse: ListContainersSegmentResponse, + Logging: Logging, + Metrics: Metrics, + RetentionPolicy: RetentionPolicy, + ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders, + ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders, + ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders, + ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders, + ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders, + ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders, + ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders, + ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders, + StaticWebsite: StaticWebsite, + StorageError: StorageError, + UserDelegationKey: UserDelegationKey +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +var access = { + parameterPath: [ + "options", + "access" + ], + mapper: { + serializedName: "x-ms-blob-public-access", + type: { + name: "String" + } + } +}; +var action0 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'acquire', + type: { + name: "String" + } + } +}; +var action1 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'release', + type: { + name: "String" + } + } +}; +var action2 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'renew', + type: { + name: "String" + } + } +}; +var action3 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'break', + type: { + name: "String" + } + } +}; +var action4 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-lease-action", + defaultValue: 'change', + type: { + name: "String" + } + } +}; +var action5 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "action", + defaultValue: 'setAccessControl', + type: { + name: "String" + } + } +}; +var action6 = { + parameterPath: "action", + mapper: { + required: true, + isConstant: true, + serializedName: "action", + defaultValue: 'getAccessControl', + type: { + name: "String" + } + } +}; +var appendPosition = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "appendPosition" + ], + mapper: { + serializedName: "x-ms-blob-condition-appendpos", + type: { + name: "Number" + } + } +}; +var blobCacheControl = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobCacheControl" + ], + mapper: { + serializedName: "x-ms-blob-cache-control", + type: { + name: "String" + } + } +}; +var blobContentDisposition = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentDisposition" + ], + mapper: { + serializedName: "x-ms-blob-content-disposition", + type: { + name: "String" + } + } +}; +var blobContentEncoding = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentEncoding" + ], + mapper: { + serializedName: "x-ms-blob-content-encoding", + type: { + name: "String" + } + } +}; +var blobContentLanguage = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentLanguage" + ], + mapper: { + serializedName: "x-ms-blob-content-language", + type: { + name: "String" + } + } +}; +var blobContentLength = { + parameterPath: "blobContentLength", + mapper: { + required: true, + serializedName: "x-ms-blob-content-length", + type: { + name: "Number" + } + } +}; +var blobContentMD5 = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentMD5" + ], + mapper: { + serializedName: "x-ms-blob-content-md5", + type: { + name: "ByteArray" + } + } +}; +var blobContentType = { + parameterPath: [ + "options", + "blobHTTPHeaders", + "blobContentType" + ], + mapper: { + serializedName: "x-ms-blob-content-type", + type: { + name: "String" + } + } +}; +var blobSequenceNumber = { + parameterPath: [ + "options", + "blobSequenceNumber" + ], + mapper: { + serializedName: "x-ms-blob-sequence-number", + defaultValue: 0, + type: { + name: "Number" + } + } +}; +var blobTagsString = { + parameterPath: [ + "options", + "blobTagsString" + ], + mapper: { + serializedName: "x-ms-tags", + type: { + name: "String" + } + } +}; +var blobType0 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'PageBlob', + type: { + name: "String" + } + } +}; +var blobType1 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'AppendBlob', + type: { + name: "String" + } + } +}; +var blobType2 = { + parameterPath: "blobType", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-blob-type", + defaultValue: 'BlockBlob', + type: { + name: "String" + } + } +}; +var blockId = { + parameterPath: "blockId", + mapper: { + required: true, + serializedName: "blockid", + type: { + name: "String" + } + } +}; +var breakPeriod = { + parameterPath: [ + "options", + "breakPeriod" + ], + mapper: { + serializedName: "x-ms-lease-break-period", + type: { + name: "Number" + } + } +}; +var cacheControl = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "cacheControl" + ], + mapper: { + serializedName: "x-ms-cache-control", + type: { + name: "String" + } + } +}; +var comp0 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'properties', + type: { + name: "String" + } + } +}; +var comp1 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'stats', + type: { + name: "String" + } + } +}; +var comp10 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'expiry', + type: { + name: "String" + } + } +}; +var comp11 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'snapshot', + type: { + name: "String" + } + } +}; +var comp12 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'copy', + type: { + name: "String" + } + } +}; +var comp13 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'tier', + type: { + name: "String" + } + } +}; +var comp14 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'query', + type: { + name: "String" + } + } +}; +var comp15 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'tags', + type: { + name: "String" + } + } +}; +var comp16 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'page', + type: { + name: "String" + } + } +}; +var comp17 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'pagelist', + type: { + name: "String" + } + } +}; +var comp18 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'incrementalcopy', + type: { + name: "String" + } + } +}; +var comp19 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'appendblock', + type: { + name: "String" + } + } +}; +var comp2 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'list', + type: { + name: "String" + } + } +}; +var comp20 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'seal', + type: { + name: "String" + } + } +}; +var comp21 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'block', + type: { + name: "String" + } + } +}; +var comp22 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'blocklist', + type: { + name: "String" + } + } +}; +var comp3 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'userdelegationkey', + type: { + name: "String" + } + } +}; +var comp4 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'batch', + type: { + name: "String" + } + } +}; +var comp5 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'blobs', + type: { + name: "String" + } + } +}; +var comp6 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'metadata', + type: { + name: "String" + } + } +}; +var comp7 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'acl', + type: { + name: "String" + } + } +}; +var comp8 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'undelete', + type: { + name: "String" + } + } +}; +var comp9 = { + parameterPath: "comp", + mapper: { + required: true, + isConstant: true, + serializedName: "comp", + defaultValue: 'lease', + type: { + name: "String" + } + } +}; +var contentDisposition = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentDisposition" + ], + mapper: { + serializedName: "x-ms-content-disposition", + type: { + name: "String" + } + } +}; +var contentEncoding = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentEncoding" + ], + mapper: { + serializedName: "x-ms-content-encoding", + type: { + name: "String" + } + } +}; +var contentLanguage = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentLanguage" + ], + mapper: { + serializedName: "x-ms-content-language", + type: { + name: "String" + } + } +}; +var contentLength = { + parameterPath: "contentLength", + mapper: { + required: true, + serializedName: "Content-Length", + type: { + name: "Number" + } + } +}; +var contentType = { + parameterPath: [ + "options", + "directoryHttpHeaders", + "contentType" + ], + mapper: { + serializedName: "x-ms-content-type", + type: { + name: "String" + } + } +}; +var copyActionAbortConstant = { + parameterPath: "copyActionAbortConstant", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-copy-action", + defaultValue: 'abort', + type: { + name: "String" + } + } +}; +var copyId = { + parameterPath: "copyId", + mapper: { + required: true, + serializedName: "copyid", + type: { + name: "String" + } + } +}; +var copySource = { + parameterPath: "copySource", + mapper: { + required: true, + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + } +}; +var defaultEncryptionScope = { + parameterPath: [ + "options", + "containerEncryptionScope", + "defaultEncryptionScope" + ], + mapper: { + serializedName: "x-ms-default-encryption-scope", + type: { + name: "String" + } + } +}; +var deletedContainerName = { + parameterPath: [ + "options", + "deletedContainerName" + ], + mapper: { + serializedName: "x-ms-deleted-container-name", + type: { + name: "String" + } + } +}; +var deletedContainerVersion = { + parameterPath: [ + "options", + "deletedContainerVersion" + ], + mapper: { + serializedName: "x-ms-deleted-container-version", + type: { + name: "String" + } + } +}; +var deleteSnapshots = { + parameterPath: [ + "options", + "deleteSnapshots" + ], + mapper: { + serializedName: "x-ms-delete-snapshots", + type: { + name: "Enum", + allowedValues: [ + "include", + "only" + ] + } + } +}; +var delimiter = { + parameterPath: "delimiter", + mapper: { + required: true, + serializedName: "delimiter", + type: { + name: "String" + } + } +}; +var directoryProperties = { + parameterPath: [ + "options", + "directoryProperties" + ], + mapper: { + serializedName: "x-ms-properties", + type: { + name: "String" + } + } +}; +var duration = { + parameterPath: [ + "options", + "duration" + ], + mapper: { + serializedName: "x-ms-lease-duration", + type: { + name: "Number" + } + } +}; +var encryptionAlgorithm = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionAlgorithm" + ], + mapper: { + serializedName: "x-ms-encryption-algorithm", + type: { + name: "Enum", + allowedValues: [ + "AES256" + ] + } + } +}; +var encryptionKey = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKey" + ], + mapper: { + serializedName: "x-ms-encryption-key", + type: { + name: "String" + } + } +}; +var encryptionKeySha256 = { + parameterPath: [ + "options", + "cpkInfo", + "encryptionKeySha256" + ], + mapper: { + serializedName: "x-ms-encryption-key-sha256", + type: { + name: "String" + } + } +}; +var encryptionScope = { + parameterPath: [ + "options", + "encryptionScope" + ], + mapper: { + serializedName: "x-ms-encryption-scope", + type: { + name: "String" + } + } +}; +var expiresOn = { + parameterPath: [ + "options", + "expiresOn" + ], + mapper: { + serializedName: "x-ms-expiry-time", + type: { + name: "String" + } + } +}; +var expiryOptions = { + parameterPath: "expiryOptions", + mapper: { + required: true, + serializedName: "x-ms-expiry-option", + type: { + name: "String" + } + } +}; +var group = { + parameterPath: [ + "options", + "group" + ], + mapper: { + serializedName: "x-ms-group", + type: { + name: "String" + } + } +}; +var ifMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifMatch" + ], + mapper: { + serializedName: "If-Match", + type: { + name: "String" + } + } +}; +var ifModifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifModifiedSince" + ], + mapper: { + serializedName: "If-Modified-Since", + type: { + name: "DateTimeRfc1123" + } + } +}; +var ifNoneMatch = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifNoneMatch" + ], + mapper: { + serializedName: "If-None-Match", + type: { + name: "String" + } + } +}; +var ifSequenceNumberEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-eq", + type: { + name: "Number" + } + } +}; +var ifSequenceNumberLessThan = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThan" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-lt", + type: { + name: "Number" + } + } +}; +var ifSequenceNumberLessThanOrEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThanOrEqualTo" + ], + mapper: { + serializedName: "x-ms-if-sequence-number-le", + type: { + name: "Number" + } + } +}; +var ifTags = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifTags" + ], + mapper: { + serializedName: "x-ms-if-tags", + type: { + name: "String" + } + } +}; +var ifUnmodifiedSince = { + parameterPath: [ + "options", + "modifiedAccessConditions", + "ifUnmodifiedSince" + ], + mapper: { + serializedName: "If-Unmodified-Since", + type: { + name: "DateTimeRfc1123" + } + } +}; +var include0 = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "include", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "metadata", + "deleted" + ] + } + } + } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv +}; +var include1 = { + parameterPath: [ + "options", + "include" + ], + mapper: { + serializedName: "include", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags" + ] + } + } + } + }, + collectionFormat: coreHttp.QueryCollectionFormat.Csv +}; +var leaseId0 = { + parameterPath: [ + "options", + "leaseAccessConditions", + "leaseId" + ], + mapper: { + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + } +}; +var leaseId1 = { + parameterPath: "leaseId", + mapper: { + required: true, + serializedName: "x-ms-lease-id", + type: { + name: "String" + } + } +}; +var listType = { + parameterPath: "listType", + mapper: { + required: true, + serializedName: "blocklisttype", + defaultValue: 'committed', + type: { + name: "Enum", + allowedValues: [ + "committed", + "uncommitted", + "all" + ] + } + } +}; +var marker0 = { + parameterPath: [ + "options", + "marker" + ], + mapper: { + serializedName: "marker", + type: { + name: "String" + } + } +}; +var maxPageSize = { + parameterPath: [ + "options", + "maxPageSize" + ], + mapper: { + serializedName: "maxresults", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } +}; +var maxSize = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "maxSize" + ], + mapper: { + serializedName: "x-ms-blob-condition-maxsize", + type: { + name: "Number" + } + } +}; +var metadata = { + parameterPath: [ + "options", + "metadata" + ], + mapper: { + serializedName: "x-ms-meta", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + }, + headerCollectionPrefix: "x-ms-meta-" + } +}; +var multipartContentType = { + parameterPath: "multipartContentType", + mapper: { + required: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; +var owner = { + parameterPath: [ + "options", + "owner" + ], + mapper: { + serializedName: "x-ms-owner", + type: { + name: "String" + } + } +}; +var pageWrite0 = { + parameterPath: "pageWrite", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-page-write", + defaultValue: 'update', + type: { + name: "String" + } + } +}; +var pageWrite1 = { + parameterPath: "pageWrite", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-page-write", + defaultValue: 'clear', + type: { + name: "String" + } + } +}; +var pathRenameMode = { + parameterPath: [ + "options", + "pathRenameMode" + ], + mapper: { + serializedName: "mode", + type: { + name: "Enum", + allowedValues: [ + "legacy", + "posix" + ] + } + } +}; +var posixAcl = { + parameterPath: [ + "options", + "posixAcl" + ], + mapper: { + serializedName: "x-ms-acl", + type: { + name: "String" + } + } +}; +var posixPermissions = { + parameterPath: [ + "options", + "posixPermissions" + ], + mapper: { + serializedName: "x-ms-permissions", + type: { + name: "String" + } + } +}; +var posixUmask = { + parameterPath: [ + "options", + "posixUmask" + ], + mapper: { + serializedName: "x-ms-umask", + type: { + name: "String" + } + } +}; +var prefix = { + parameterPath: [ + "options", + "prefix" + ], + mapper: { + serializedName: "prefix", + type: { + name: "String" + } + } +}; +var preventEncryptionScopeOverride = { + parameterPath: [ + "options", + "containerEncryptionScope", + "preventEncryptionScopeOverride" + ], + mapper: { + serializedName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean" + } + } +}; +var prevsnapshot = { + parameterPath: [ + "options", + "prevsnapshot" + ], + mapper: { + serializedName: "prevsnapshot", + type: { + name: "String" + } + } +}; +var prevSnapshotUrl = { + parameterPath: [ + "options", + "prevSnapshotUrl" + ], + mapper: { + serializedName: "x-ms-previous-snapshot-url", + type: { + name: "String" + } + } +}; +var proposedLeaseId0 = { + parameterPath: [ + "options", + "proposedLeaseId" + ], + mapper: { + serializedName: "x-ms-proposed-lease-id", + type: { + name: "String" + } + } +}; +var proposedLeaseId1 = { + parameterPath: "proposedLeaseId", + mapper: { + required: true, + serializedName: "x-ms-proposed-lease-id", + type: { + name: "String" + } + } +}; +var range0 = { + parameterPath: [ + "options", + "range" + ], + mapper: { + serializedName: "x-ms-range", + type: { + name: "String" + } + } +}; +var range1 = { + parameterPath: "range", + mapper: { + required: true, + serializedName: "x-ms-range", + type: { + name: "String" + } + } +}; +var rangeGetContentCRC64 = { + parameterPath: [ + "options", + "rangeGetContentCRC64" + ], + mapper: { + serializedName: "x-ms-range-get-content-crc64", + type: { + name: "Boolean" + } + } +}; +var rangeGetContentMD5 = { + parameterPath: [ + "options", + "rangeGetContentMD5" + ], + mapper: { + serializedName: "x-ms-range-get-content-md5", + type: { + name: "Boolean" + } + } +}; +var rehydratePriority = { + parameterPath: [ + "options", + "rehydratePriority" + ], + mapper: { + serializedName: "x-ms-rehydrate-priority", + type: { + name: "String" + } + } +}; +var renameSource = { + parameterPath: "renameSource", + mapper: { + required: true, + serializedName: "x-ms-rename-source", + type: { + name: "String" + } + } +}; +var requestId = { + parameterPath: [ + "options", + "requestId" + ], + mapper: { + serializedName: "x-ms-client-request-id", + type: { + name: "String" + } + } +}; +var restype0 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'service', + type: { + name: "String" + } + } +}; +var restype1 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'account', + type: { + name: "String" + } + } +}; +var restype2 = { + parameterPath: "restype", + mapper: { + required: true, + isConstant: true, + serializedName: "restype", + defaultValue: 'container', + type: { + name: "String" + } + } +}; +var sealBlob = { + parameterPath: [ + "options", + "sealBlob" + ], + mapper: { + serializedName: "x-ms-seal-blob", + type: { + name: "Boolean" + } + } +}; +var sequenceNumberAction = { + parameterPath: "sequenceNumberAction", + mapper: { + required: true, + serializedName: "x-ms-sequence-number-action", + type: { + name: "Enum", + allowedValues: [ + "max", + "update", + "increment" + ] + } + } +}; +var snapshot = { + parameterPath: [ + "options", + "snapshot" + ], + mapper: { + serializedName: "snapshot", + type: { + name: "String" + } + } +}; +var sourceContentCrc64 = { + parameterPath: [ + "options", + "sourceContentCrc64" + ], + mapper: { + serializedName: "x-ms-source-content-crc64", + type: { + name: "ByteArray" + } + } +}; +var sourceContentMD5 = { + parameterPath: [ + "options", + "sourceContentMD5" + ], + mapper: { + serializedName: "x-ms-source-content-md5", + type: { + name: "ByteArray" + } + } +}; +var sourceIfMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfMatch" + ], + mapper: { + serializedName: "x-ms-source-if-match", + type: { + name: "String" + } + } +}; +var sourceIfModifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfModifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-modified-since", + type: { + name: "DateTimeRfc1123" + } + } +}; +var sourceIfNoneMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfNoneMatch" + ], + mapper: { + serializedName: "x-ms-source-if-none-match", + type: { + name: "String" + } + } +}; +var sourceIfTags = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfTags" + ], + mapper: { + serializedName: "x-ms-source-if-tags", + type: { + name: "String" + } + } +}; +var sourceIfUnmodifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfUnmodifiedSince" + ], + mapper: { + serializedName: "x-ms-source-if-unmodified-since", + type: { + name: "DateTimeRfc1123" + } + } +}; +var sourceLeaseId = { + parameterPath: [ + "options", + "sourceLeaseId" + ], + mapper: { + serializedName: "x-ms-source-lease-id", + type: { + name: "String" + } + } +}; +var sourceRange0 = { + parameterPath: "sourceRange", + mapper: { + required: true, + serializedName: "x-ms-source-range", + type: { + name: "String" + } + } +}; +var sourceRange1 = { + parameterPath: [ + "options", + "sourceRange" + ], + mapper: { + serializedName: "x-ms-source-range", + type: { + name: "String" + } + } +}; +var sourceUrl = { + parameterPath: "sourceUrl", + mapper: { + required: true, + serializedName: "x-ms-copy-source", + type: { + name: "String" + } + } +}; +var tier0 = { + parameterPath: [ + "options", + "tier" + ], + mapper: { + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + } +}; +var tier1 = { + parameterPath: "tier", + mapper: { + required: true, + serializedName: "x-ms-access-tier", + type: { + name: "String" + } + } +}; +var timeoutInSeconds = { + parameterPath: [ + "options", + "timeoutInSeconds" + ], + mapper: { + serializedName: "timeout", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } +}; +var transactionalContentCrc64 = { + parameterPath: [ + "options", + "transactionalContentCrc64" + ], + mapper: { + serializedName: "x-ms-content-crc64", + type: { + name: "ByteArray" + } + } +}; +var transactionalContentMD5 = { + parameterPath: [ + "options", + "transactionalContentMD5" + ], + mapper: { + serializedName: "Content-MD5", + type: { + name: "ByteArray" + } + } +}; +var upn = { + parameterPath: [ + "options", + "upn" + ], + mapper: { + serializedName: "upn", + type: { + name: "Boolean" + } + } +}; +var url = { + parameterPath: "url", + mapper: { + required: true, + serializedName: "url", + defaultValue: '', + type: { + name: "String" + } + }, + skipEncoding: true +}; +var version = { + parameterPath: "version", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-version", + defaultValue: '2020-02-10', + type: { + name: "String" + } + } +}; +var versionId = { + parameterPath: [ + "options", + "versionId" + ], + mapper: { + serializedName: "versionid", + type: { + name: "String" + } + } +}; +var where = { + parameterPath: [ + "options", + "where" + ], + mapper: { + serializedName: "where", + type: { + name: "String" + } + } +}; +var xMsRequiresSync = { + parameterPath: "xMsRequiresSync", + mapper: { + required: true, + isConstant: true, + serializedName: "x-ms-requires-sync", + defaultValue: 'true', + type: { + name: "String" + } + } +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a Service. */ +var Service = /** @class */ (function () { + /** + * Create a Service. + * @param {StorageClientContext} client Reference to the service client. + */ + function Service(client) { + this.client = client; + } + Service.prototype.setProperties = function (blobServiceProperties, options, callback) { + return this.client.sendOperationRequest({ + blobServiceProperties: blobServiceProperties, + options: options + }, setPropertiesOperationSpec, callback); + }; + Service.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec, callback); + }; + Service.prototype.getStatistics = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getStatisticsOperationSpec, callback); + }; + Service.prototype.listContainersSegment = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, listContainersSegmentOperationSpec, callback); + }; + Service.prototype.getUserDelegationKey = function (keyInfo, options, callback) { + return this.client.sendOperationRequest({ + keyInfo: keyInfo, + options: options + }, getUserDelegationKeyOperationSpec, callback); + }; + Service.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec, callback); + }; + Service.prototype.submitBatch = function (body, contentLength, multipartContentType, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + multipartContentType: multipartContentType, + options: options + }, submitBatchOperationSpec, callback); + }; + Service.prototype.filterBlobs = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, filterBlobsOperationSpec, callback); + }; + return Service; +}()); +// Operation Specifications +var serializer = new coreHttp.Serializer(Mappers, true); +var setPropertiesOperationSpec = { + httpMethod: "PUT", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype0, + comp0 + ], + headerParameters: [ + version, + requestId + ], + requestBody: { + parameterPath: "blobServiceProperties", + mapper: tslib.__assign(tslib.__assign({}, BlobServiceProperties), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 202: { + headersMapper: ServiceSetPropertiesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceSetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getPropertiesOperationSpec = { + httpMethod: "GET", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype0, + comp0 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: BlobServiceProperties, + headersMapper: ServiceGetPropertiesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getStatisticsOperationSpec = { + httpMethod: "GET", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype0, + comp1 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: BlobServiceStatistics, + headersMapper: ServiceGetStatisticsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetStatisticsHeaders + } + }, + isXML: true, + serializer: serializer +}; +var listContainersSegmentOperationSpec = { + httpMethod: "GET", + urlParameters: [ + url + ], + queryParameters: [ + prefix, + marker0, + maxPageSize, + include0, + timeoutInSeconds, + comp2 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: ListContainersSegmentResponse, + headersMapper: ServiceListContainersSegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceListContainersSegmentHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getUserDelegationKeyOperationSpec = { + httpMethod: "POST", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype0, + comp3 + ], + headerParameters: [ + version, + requestId + ], + requestBody: { + parameterPath: "keyInfo", + mapper: tslib.__assign(tslib.__assign({}, KeyInfo), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + bodyMapper: UserDelegationKey, + headersMapper: ServiceGetUserDelegationKeyHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetUserDelegationKeyHeaders + } + }, + isXML: true, + serializer: serializer +}; +var getAccountInfoOperationSpec = { + httpMethod: "GET", + urlParameters: [ + url + ], + queryParameters: [ + restype1, + comp0 + ], + headerParameters: [ + version + ], + responses: { + 200: { + headersMapper: ServiceGetAccountInfoHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer +}; +var submitBatchOperationSpec = { + httpMethod: "POST", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp4 + ], + headerParameters: [ + contentLength, + multipartContentType, + version, + requestId + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/xml; charset=utf-8", + responses: { + 202: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: ServiceSubmitBatchHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceSubmitBatchHeaders + } + }, + isXML: true, + serializer: serializer +}; +var filterBlobsOperationSpec = { + httpMethod: "GET", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + where, + marker0, + maxPageSize, + comp5 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: FilterBlobSegment, + headersMapper: ServiceFilterBlobsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ServiceFilterBlobsHeaders + } + }, + isXML: true, + serializer: serializer +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + AccessPolicy: AccessPolicy, + BlobFlatListSegment: BlobFlatListSegment, + BlobHierarchyListSegment: BlobHierarchyListSegment, + BlobItemInternal: BlobItemInternal, + BlobPrefix: BlobPrefix, + BlobPropertiesInternal: BlobPropertiesInternal, + BlobTag: BlobTag, + BlobTags: BlobTags, + ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders, + ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders, + ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders, + ContainerCreateHeaders: ContainerCreateHeaders, + ContainerDeleteHeaders: ContainerDeleteHeaders, + ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders, + ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders, + ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders, + ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders, + ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders, + ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders, + ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders, + ContainerRestoreHeaders: ContainerRestoreHeaders, + ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders, + ContainerSetMetadataHeaders: ContainerSetMetadataHeaders, + ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse, + ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse, + SignedIdentifier: SignedIdentifier, + StorageError: StorageError +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a Container. */ +var Container = /** @class */ (function () { + /** + * Create a Container. + * @param {StorageClientContext} client Reference to the service client. + */ + function Container(client) { + this.client = client; + } + Container.prototype.create = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, createOperationSpec, callback); + }; + Container.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec$1, callback); + }; + Container.prototype.deleteMethod = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, deleteMethodOperationSpec, callback); + }; + Container.prototype.setMetadata = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setMetadataOperationSpec, callback); + }; + Container.prototype.getAccessPolicy = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccessPolicyOperationSpec, callback); + }; + Container.prototype.setAccessPolicy = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setAccessPolicyOperationSpec, callback); + }; + Container.prototype.restore = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, restoreOperationSpec, callback); + }; + Container.prototype.acquireLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, acquireLeaseOperationSpec, callback); + }; + Container.prototype.releaseLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, releaseLeaseOperationSpec, callback); + }; + Container.prototype.renewLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, renewLeaseOperationSpec, callback); + }; + Container.prototype.breakLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, breakLeaseOperationSpec, callback); + }; + Container.prototype.changeLease = function (leaseId, proposedLeaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + proposedLeaseId: proposedLeaseId, + options: options + }, changeLeaseOperationSpec, callback); + }; + Container.prototype.listBlobFlatSegment = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, listBlobFlatSegmentOperationSpec, callback); + }; + Container.prototype.listBlobHierarchySegment = function (delimiter, options, callback) { + return this.client.sendOperationRequest({ + delimiter: delimiter, + options: options + }, listBlobHierarchySegmentOperationSpec, callback); + }; + Container.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec$1, callback); + }; + return Container; +}()); +// Operation Specifications +var serializer$1 = new coreHttp.Serializer(Mappers$1, true); +var createOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2 + ], + headerParameters: [ + metadata, + access, + version, + requestId, + defaultEncryptionScope, + preventEncryptionScopeOverride + ], + responses: { + 201: { + headersMapper: ContainerCreateHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerCreateHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var getPropertiesOperationSpec$1 = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2 + ], + headerParameters: [ + version, + requestId, + leaseId0 + ], + responses: { + 200: { + headersMapper: ContainerGetPropertiesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var deleteMethodOperationSpec = { + httpMethod: "DELETE", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2 + ], + headerParameters: [ + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 202: { + headersMapper: ContainerDeleteHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerDeleteHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var setMetadataOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2, + comp6 + ], + headerParameters: [ + metadata, + version, + requestId, + leaseId0, + ifModifiedSince + ], + responses: { + 200: { + headersMapper: ContainerSetMetadataHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerSetMetadataHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var getAccessPolicyOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2, + comp7 + ], + headerParameters: [ + version, + requestId, + leaseId0 + ], + responses: { + 200: { + bodyMapper: { + xmlElementName: "SignedIdentifier", + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier" + } + } + } + }, + headersMapper: ContainerGetAccessPolicyHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetAccessPolicyHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var setAccessPolicyOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2, + comp7 + ], + headerParameters: [ + access, + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince + ], + requestBody: { + parameterPath: [ + "options", + "containerAcl" + ], + mapper: { + xmlName: "SignedIdentifiers", + xmlElementName: "SignedIdentifier", + serializedName: "containerAcl", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier" + } + } + } + } + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + headersMapper: ContainerSetAccessPolicyHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerSetAccessPolicyHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var restoreOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + restype2, + comp8 + ], + headerParameters: [ + version, + requestId, + deletedContainerName, + deletedContainerVersion + ], + responses: { + 201: { + headersMapper: ContainerRestoreHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerRestoreHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var acquireLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9, + restype2 + ], + headerParameters: [ + duration, + proposedLeaseId0, + version, + requestId, + action0, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 201: { + headersMapper: ContainerAcquireLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerAcquireLeaseHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var releaseLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9, + restype2 + ], + headerParameters: [ + leaseId1, + version, + requestId, + action1, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: ContainerReleaseLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerReleaseLeaseHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var renewLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9, + restype2 + ], + headerParameters: [ + leaseId1, + version, + requestId, + action2, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: ContainerRenewLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerRenewLeaseHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var breakLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9, + restype2 + ], + headerParameters: [ + breakPeriod, + version, + requestId, + action3, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 202: { + headersMapper: ContainerBreakLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerBreakLeaseHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var changeLeaseOperationSpec = { + httpMethod: "PUT", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9, + restype2 + ], + headerParameters: [ + leaseId1, + proposedLeaseId1, + version, + requestId, + action4, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: ContainerChangeLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerChangeLeaseHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var listBlobFlatSegmentOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + prefix, + marker0, + maxPageSize, + include1, + timeoutInSeconds, + restype2, + comp2 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: ListBlobsFlatSegmentResponse, + headersMapper: ContainerListBlobFlatSegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerListBlobFlatSegmentHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var listBlobHierarchySegmentOperationSpec = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + prefix, + delimiter, + marker0, + maxPageSize, + include1, + timeoutInSeconds, + restype2, + comp2 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + bodyMapper: ListBlobsHierarchySegmentResponse, + headersMapper: ContainerListBlobHierarchySegmentHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerListBlobHierarchySegmentHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; +var getAccountInfoOperationSpec$1 = { + httpMethod: "GET", + path: "{containerName}", + urlParameters: [ + url + ], + queryParameters: [ + restype1, + comp0 + ], + headerParameters: [ + version + ], + responses: { + 200: { + headersMapper: ContainerGetAccountInfoHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: ContainerGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer$1 +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers$2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + ArrowConfiguration: ArrowConfiguration, + ArrowField: ArrowField, + BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders, + BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders, + BlobBreakLeaseHeaders: BlobBreakLeaseHeaders, + BlobChangeLeaseHeaders: BlobChangeLeaseHeaders, + BlobCopyFromURLHeaders: BlobCopyFromURLHeaders, + BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders, + BlobDeleteHeaders: BlobDeleteHeaders, + BlobDownloadHeaders: BlobDownloadHeaders, + BlobGetAccessControlHeaders: BlobGetAccessControlHeaders, + BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders, + BlobGetPropertiesHeaders: BlobGetPropertiesHeaders, + BlobGetTagsHeaders: BlobGetTagsHeaders, + BlobQueryHeaders: BlobQueryHeaders, + BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders, + BlobRenameHeaders: BlobRenameHeaders, + BlobRenewLeaseHeaders: BlobRenewLeaseHeaders, + BlobSetAccessControlHeaders: BlobSetAccessControlHeaders, + BlobSetExpiryHeaders: BlobSetExpiryHeaders, + BlobSetHTTPHeadersHeaders: BlobSetHTTPHeadersHeaders, + BlobSetMetadataHeaders: BlobSetMetadataHeaders, + BlobSetTagsHeaders: BlobSetTagsHeaders, + BlobSetTierHeaders: BlobSetTierHeaders, + BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders, + BlobTag: BlobTag, + BlobTags: BlobTags, + BlobUndeleteHeaders: BlobUndeleteHeaders, + DataLakeStorageError: DataLakeStorageError, + DataLakeStorageErrorError: DataLakeStorageErrorError, + DelimitedTextConfiguration: DelimitedTextConfiguration, + JsonTextConfiguration: JsonTextConfiguration, + QueryFormat: QueryFormat, + QueryRequest: QueryRequest, + QuerySerialization: QuerySerialization, + StorageError: StorageError +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a Blob. */ +var Blob$1 = /** @class */ (function () { + /** + * Create a Blob. + * @param {StorageClientContext} client Reference to the service client. + */ + function Blob(client) { + this.client = client; + } + Blob.prototype.download = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, downloadOperationSpec, callback); + }; + Blob.prototype.getProperties = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPropertiesOperationSpec$2, callback); + }; + Blob.prototype.deleteMethod = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, deleteMethodOperationSpec$1, callback); + }; + Blob.prototype.setAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setAccessControlOperationSpec, callback); + }; + Blob.prototype.getAccessControl = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccessControlOperationSpec, callback); + }; + Blob.prototype.rename = function (renameSource, options, callback) { + return this.client.sendOperationRequest({ + renameSource: renameSource, + options: options + }, renameOperationSpec, callback); + }; + Blob.prototype.undelete = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, undeleteOperationSpec, callback); + }; + Blob.prototype.setExpiry = function (expiryOptions, options, callback) { + return this.client.sendOperationRequest({ + expiryOptions: expiryOptions, + options: options + }, setExpiryOperationSpec, callback); + }; + Blob.prototype.setHTTPHeaders = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setHTTPHeadersOperationSpec, callback); + }; + Blob.prototype.setMetadata = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setMetadataOperationSpec$1, callback); + }; + Blob.prototype.acquireLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, acquireLeaseOperationSpec$1, callback); + }; + Blob.prototype.releaseLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, releaseLeaseOperationSpec$1, callback); + }; + Blob.prototype.renewLease = function (leaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + options: options + }, renewLeaseOperationSpec$1, callback); + }; + Blob.prototype.changeLease = function (leaseId, proposedLeaseId, options, callback) { + return this.client.sendOperationRequest({ + leaseId: leaseId, + proposedLeaseId: proposedLeaseId, + options: options + }, changeLeaseOperationSpec$1, callback); + }; + Blob.prototype.breakLease = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, breakLeaseOperationSpec$1, callback); + }; + Blob.prototype.createSnapshot = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, createSnapshotOperationSpec, callback); + }; + Blob.prototype.startCopyFromURL = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, startCopyFromURLOperationSpec, callback); + }; + Blob.prototype.copyFromURL = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, copyFromURLOperationSpec, callback); + }; + Blob.prototype.abortCopyFromURL = function (copyId, options, callback) { + return this.client.sendOperationRequest({ + copyId: copyId, + options: options + }, abortCopyFromURLOperationSpec, callback); + }; + Blob.prototype.setTier = function (tier, options, callback) { + return this.client.sendOperationRequest({ + tier: tier, + options: options + }, setTierOperationSpec, callback); + }; + Blob.prototype.getAccountInfo = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getAccountInfoOperationSpec$2, callback); + }; + Blob.prototype.query = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, queryOperationSpec, callback); + }; + Blob.prototype.getTags = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getTagsOperationSpec, callback); + }; + Blob.prototype.setTags = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, setTagsOperationSpec, callback); + }; + return Blob; +}()); +// Operation Specifications +var serializer$2 = new coreHttp.Serializer(Mappers$2, true); +var downloadOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + versionId, + timeoutInSeconds + ], + headerParameters: [ + range0, + rangeGetContentMD5, + rangeGetContentCRC64, + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: BlobDownloadHeaders + }, + 206: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: BlobDownloadHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobDownloadHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var getPropertiesOperationSpec$2 = { + httpMethod: "HEAD", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + versionId, + timeoutInSeconds + ], + headerParameters: [ + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobGetPropertiesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetPropertiesHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var deleteMethodOperationSpec$1 = { + httpMethod: "DELETE", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + versionId, + timeoutInSeconds + ], + headerParameters: [ + deleteSnapshots, + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 202: { + headersMapper: BlobDeleteHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobDeleteHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setAccessControlOperationSpec = { + httpMethod: "PATCH", + path: "{filesystem}/{path}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + action5 + ], + headerParameters: [ + owner, + group, + posixPermissions, + posixAcl, + requestId, + version, + leaseId0, + ifMatch, + ifNoneMatch, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: BlobSetAccessControlHeaders + }, + default: { + bodyMapper: DataLakeStorageError, + headersMapper: BlobSetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var getAccessControlOperationSpec = { + httpMethod: "HEAD", + path: "{filesystem}/{path}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + upn, + action6 + ], + headerParameters: [ + requestId, + version, + leaseId0, + ifMatch, + ifNoneMatch, + ifModifiedSince, + ifUnmodifiedSince + ], + responses: { + 200: { + headersMapper: BlobGetAccessControlHeaders + }, + default: { + bodyMapper: DataLakeStorageError, + headersMapper: BlobGetAccessControlHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var renameOperationSpec = { + httpMethod: "PUT", + path: "{filesystem}/{path}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + pathRenameMode + ], + headerParameters: [ + renameSource, + directoryProperties, + posixPermissions, + posixUmask, + sourceLeaseId, + version, + requestId, + cacheControl, + contentType, + contentEncoding, + contentLanguage, + contentDisposition, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: BlobRenameHeaders + }, + default: { + bodyMapper: DataLakeStorageError, + headersMapper: BlobRenameHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var undeleteOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp8 + ], + headerParameters: [ + version, + requestId + ], + responses: { + 200: { + headersMapper: BlobUndeleteHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobUndeleteHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setExpiryOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp10 + ], + headerParameters: [ + version, + requestId, + expiryOptions, + expiresOn + ], + responses: { + 200: { + headersMapper: BlobSetExpiryHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetExpiryHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setHTTPHeadersOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp0 + ], + headerParameters: [ + version, + requestId, + blobCacheControl, + blobContentType, + blobContentMD5, + blobContentEncoding, + blobContentLanguage, + blobContentDisposition, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobSetHTTPHeadersHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetHTTPHeadersHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setMetadataOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp6 + ], + headerParameters: [ + metadata, + encryptionScope, + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobSetMetadataHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetMetadataHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var acquireLeaseOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9 + ], + headerParameters: [ + duration, + proposedLeaseId0, + version, + requestId, + action0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 201: { + headersMapper: BlobAcquireLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobAcquireLeaseHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var releaseLeaseOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9 + ], + headerParameters: [ + leaseId1, + version, + requestId, + action1, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobReleaseLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobReleaseLeaseHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var renewLeaseOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9 + ], + headerParameters: [ + leaseId1, + version, + requestId, + action2, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobRenewLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobRenewLeaseHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var changeLeaseOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9 + ], + headerParameters: [ + leaseId1, + proposedLeaseId1, + version, + requestId, + action4, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: BlobChangeLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobChangeLeaseHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var breakLeaseOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp9 + ], + headerParameters: [ + breakPeriod, + version, + requestId, + action3, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 202: { + headersMapper: BlobBreakLeaseHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobBreakLeaseHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var createSnapshotOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp11 + ], + headerParameters: [ + metadata, + encryptionScope, + version, + requestId, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + leaseId0 + ], + responses: { + 201: { + headersMapper: BlobCreateSnapshotHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobCreateSnapshotHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var startCopyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds + ], + headerParameters: [ + metadata, + tier0, + rehydratePriority, + copySource, + version, + requestId, + blobTagsString, + sealBlob, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + sourceIfTags, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + leaseId0 + ], + responses: { + 202: { + headersMapper: BlobStartCopyFromURLHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobStartCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var copyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds + ], + headerParameters: [ + metadata, + tier0, + copySource, + version, + requestId, + sourceContentMD5, + blobTagsString, + xMsRequiresSync, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + leaseId0 + ], + responses: { + 202: { + headersMapper: BlobCopyFromURLHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var abortCopyFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + copyId, + timeoutInSeconds, + comp12 + ], + headerParameters: [ + version, + requestId, + copyActionAbortConstant, + leaseId0 + ], + responses: { + 204: { + headersMapper: BlobAbortCopyFromURLHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobAbortCopyFromURLHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setTierOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + versionId, + timeoutInSeconds, + comp13 + ], + headerParameters: [ + tier1, + rehydratePriority, + version, + requestId, + leaseId0, + ifTags + ], + responses: { + 200: { + headersMapper: BlobSetTierHeaders + }, + 202: { + headersMapper: BlobSetTierHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetTierHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var getAccountInfoOperationSpec$2 = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + restype1, + comp0 + ], + headerParameters: [ + version + ], + responses: { + 200: { + headersMapper: BlobGetAccountInfoHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetAccountInfoHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var queryOperationSpec = { + httpMethod: "POST", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + timeoutInSeconds, + comp14 + ], + headerParameters: [ + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + requestBody: { + parameterPath: [ + "options", + "queryRequest" + ], + mapper: QueryRequest + }, + contentType: "application/xml; charset=utf-8", + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: BlobQueryHeaders + }, + 206: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Stream" + } + }, + headersMapper: BlobQueryHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobQueryHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var getTagsOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + snapshot, + versionId, + comp15 + ], + headerParameters: [ + version, + requestId, + ifTags + ], + responses: { + 200: { + bodyMapper: BlobTags, + headersMapper: BlobGetTagsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobGetTagsHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; +var setTagsOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + versionId, + comp15 + ], + headerParameters: [ + version, + transactionalContentMD5, + transactionalContentCrc64, + requestId, + ifTags + ], + requestBody: { + parameterPath: [ + "options", + "tags" + ], + mapper: BlobTags + }, + contentType: "application/xml; charset=utf-8", + responses: { + 204: { + headersMapper: BlobSetTagsHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlobSetTagsHeaders + } + }, + isXML: true, + serializer: serializer$2 +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers$3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + ClearRange: ClearRange, + PageBlobClearPagesHeaders: PageBlobClearPagesHeaders, + PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders, + PageBlobCreateHeaders: PageBlobCreateHeaders, + PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders, + PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders, + PageBlobResizeHeaders: PageBlobResizeHeaders, + PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders, + PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders, + PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders, + PageList: PageList, + PageRange: PageRange, + StorageError: StorageError +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a PageBlob. */ +var PageBlob = /** @class */ (function () { + /** + * Create a PageBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function PageBlob(client) { + this.client = client; + } + PageBlob.prototype.create = function (contentLength, blobContentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + blobContentLength: blobContentLength, + options: options + }, createOperationSpec$1, callback); + }; + PageBlob.prototype.uploadPages = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, uploadPagesOperationSpec, callback); + }; + PageBlob.prototype.clearPages = function (contentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + options: options + }, clearPagesOperationSpec, callback); + }; + PageBlob.prototype.uploadPagesFromURL = function (sourceUrl, sourceRange, contentLength, range, options, callback) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl, + sourceRange: sourceRange, + contentLength: contentLength, + range: range, + options: options + }, uploadPagesFromURLOperationSpec, callback); + }; + PageBlob.prototype.getPageRanges = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPageRangesOperationSpec, callback); + }; + PageBlob.prototype.getPageRangesDiff = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, getPageRangesDiffOperationSpec, callback); + }; + PageBlob.prototype.resize = function (blobContentLength, options, callback) { + return this.client.sendOperationRequest({ + blobContentLength: blobContentLength, + options: options + }, resizeOperationSpec, callback); + }; + PageBlob.prototype.updateSequenceNumber = function (sequenceNumberAction, options, callback) { + return this.client.sendOperationRequest({ + sequenceNumberAction: sequenceNumberAction, + options: options + }, updateSequenceNumberOperationSpec, callback); + }; + PageBlob.prototype.copyIncremental = function (copySource, options, callback) { + return this.client.sendOperationRequest({ + copySource: copySource, + options: options + }, copyIncrementalOperationSpec, callback); + }; + return PageBlob; +}()); +// Operation Specifications +var serializer$3 = new coreHttp.Serializer(Mappers$3, true); +var createOperationSpec$1 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds + ], + headerParameters: [ + contentLength, + tier0, + metadata, + encryptionScope, + blobContentLength, + blobSequenceNumber, + version, + requestId, + blobTagsString, + blobType0, + blobContentType, + blobContentEncoding, + blobContentLanguage, + blobContentMD5, + blobCacheControl, + blobContentDisposition, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 201: { + headersMapper: PageBlobCreateHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobCreateHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var uploadPagesOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp16 + ], + headerParameters: [ + contentLength, + transactionalContentMD5, + transactionalContentCrc64, + range0, + encryptionScope, + version, + requestId, + pageWrite0, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: PageBlobUploadPagesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUploadPagesHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var clearPagesOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp16 + ], + headerParameters: [ + contentLength, + range0, + encryptionScope, + version, + requestId, + pageWrite1, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 201: { + headersMapper: PageBlobClearPagesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobClearPagesHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var uploadPagesFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp16 + ], + headerParameters: [ + sourceUrl, + sourceRange0, + sourceContentMD5, + sourceContentCrc64, + contentLength, + range1, + encryptionScope, + version, + requestId, + pageWrite0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + leaseId0, + ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: PageBlobUploadPagesFromURLHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUploadPagesFromURLHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var getPageRangesOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + timeoutInSeconds, + comp17 + ], + headerParameters: [ + range0, + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + bodyMapper: PageList, + headersMapper: PageBlobGetPageRangesHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobGetPageRangesHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var getPageRangesDiffOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + timeoutInSeconds, + prevsnapshot, + comp17 + ], + headerParameters: [ + prevSnapshotUrl, + range0, + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + bodyMapper: PageList, + headersMapper: PageBlobGetPageRangesDiffHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobGetPageRangesDiffHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var resizeOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp0 + ], + headerParameters: [ + encryptionScope, + blobContentLength, + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: PageBlobResizeHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobResizeHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var updateSequenceNumberOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp0 + ], + headerParameters: [ + sequenceNumberAction, + blobSequenceNumber, + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 200: { + headersMapper: PageBlobUpdateSequenceNumberHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobUpdateSequenceNumberHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; +var copyIncrementalOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp18 + ], + headerParameters: [ + copySource, + version, + requestId, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 202: { + headersMapper: PageBlobCopyIncrementalHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: PageBlobCopyIncrementalHeaders + } + }, + isXML: true, + serializer: serializer$3 +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers$4 = /*#__PURE__*/Object.freeze({ + __proto__: null, + AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders, + AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders, + AppendBlobCreateHeaders: AppendBlobCreateHeaders, + AppendBlobSealHeaders: AppendBlobSealHeaders, + StorageError: StorageError +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a AppendBlob. */ +var AppendBlob = /** @class */ (function () { + /** + * Create a AppendBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function AppendBlob(client) { + this.client = client; + } + AppendBlob.prototype.create = function (contentLength, options, callback) { + return this.client.sendOperationRequest({ + contentLength: contentLength, + options: options + }, createOperationSpec$2, callback); + }; + AppendBlob.prototype.appendBlock = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, appendBlockOperationSpec, callback); + }; + AppendBlob.prototype.appendBlockFromUrl = function (sourceUrl, contentLength, options, callback) { + return this.client.sendOperationRequest({ + sourceUrl: sourceUrl, + contentLength: contentLength, + options: options + }, appendBlockFromUrlOperationSpec, callback); + }; + AppendBlob.prototype.seal = function (options, callback) { + return this.client.sendOperationRequest({ + options: options + }, sealOperationSpec, callback); + }; + return AppendBlob; +}()); +// Operation Specifications +var serializer$4 = new coreHttp.Serializer(Mappers$4, true); +var createOperationSpec$2 = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds + ], + headerParameters: [ + contentLength, + metadata, + encryptionScope, + version, + requestId, + blobTagsString, + blobType1, + blobContentType, + blobContentEncoding, + blobContentLanguage, + blobContentMD5, + blobCacheControl, + blobContentDisposition, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + responses: { + 201: { + headersMapper: AppendBlobCreateHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobCreateHeaders + } + }, + isXML: true, + serializer: serializer$4 +}; +var appendBlockOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp19 + ], + headerParameters: [ + contentLength, + transactionalContentMD5, + transactionalContentCrc64, + encryptionScope, + version, + requestId, + leaseId0, + maxSize, + appendPosition, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: AppendBlobAppendBlockHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobAppendBlockHeaders + } + }, + isXML: true, + serializer: serializer$4 +}; +var appendBlockFromUrlOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp19 + ], + headerParameters: [ + sourceUrl, + sourceRange1, + sourceContentMD5, + sourceContentCrc64, + contentLength, + transactionalContentMD5, + encryptionScope, + version, + requestId, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + leaseId0, + maxSize, + appendPosition, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: AppendBlobAppendBlockFromUrlHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobAppendBlockFromUrlHeaders + } + }, + isXML: true, + serializer: serializer$4 +}; +var sealOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp20 + ], + headerParameters: [ + version, + requestId, + leaseId0, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + appendPosition + ], + responses: { + 200: { + headersMapper: AppendBlobSealHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: AppendBlobSealHeaders + } + }, + isXML: true, + serializer: serializer$4 +}; + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +var Mappers$5 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Block: Block, + BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders, + BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders, + BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders, + BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders, + BlockBlobUploadHeaders: BlockBlobUploadHeaders, + BlockList: BlockList, + BlockLookupList: BlockLookupList, + StorageError: StorageError +}); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +/** Class representing a BlockBlob. */ +var BlockBlob = /** @class */ (function () { + /** + * Create a BlockBlob. + * @param {StorageClientContext} client Reference to the service client. + */ + function BlockBlob(client) { + this.client = client; + } + BlockBlob.prototype.upload = function (body, contentLength, options, callback) { + return this.client.sendOperationRequest({ + body: body, + contentLength: contentLength, + options: options + }, uploadOperationSpec, callback); + }; + BlockBlob.prototype.stageBlock = function (blockId, contentLength, body, options, callback) { + return this.client.sendOperationRequest({ + blockId: blockId, + contentLength: contentLength, + body: body, + options: options + }, stageBlockOperationSpec, callback); + }; + BlockBlob.prototype.stageBlockFromURL = function (blockId, contentLength, sourceUrl, options, callback) { + return this.client.sendOperationRequest({ + blockId: blockId, + contentLength: contentLength, + sourceUrl: sourceUrl, + options: options + }, stageBlockFromURLOperationSpec, callback); + }; + BlockBlob.prototype.commitBlockList = function (blocks, options, callback) { + return this.client.sendOperationRequest({ + blocks: blocks, + options: options + }, commitBlockListOperationSpec, callback); + }; + BlockBlob.prototype.getBlockList = function (listType, options, callback) { + return this.client.sendOperationRequest({ + listType: listType, + options: options + }, getBlockListOperationSpec, callback); + }; + return BlockBlob; +}()); +// Operation Specifications +var serializer$5 = new coreHttp.Serializer(Mappers$5, true); +var uploadOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds + ], + headerParameters: [ + transactionalContentMD5, + contentLength, + metadata, + encryptionScope, + tier0, + version, + requestId, + blobTagsString, + blobType2, + blobContentType, + blobContentEncoding, + blobContentLanguage, + blobContentMD5, + blobCacheControl, + blobContentDisposition, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: BlockBlobUploadHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobUploadHeaders + } + }, + isXML: true, + serializer: serializer$5 +}; +var stageBlockOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + blockId, + timeoutInSeconds, + comp21 + ], + headerParameters: [ + contentLength, + transactionalContentMD5, + transactionalContentCrc64, + encryptionScope, + version, + requestId, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm + ], + requestBody: { + parameterPath: "body", + mapper: { + required: true, + serializedName: "body", + type: { + name: "Stream" + } + } + }, + contentType: "application/octet-stream", + responses: { + 201: { + headersMapper: BlockBlobStageBlockHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobStageBlockHeaders + } + }, + isXML: true, + serializer: serializer$5 +}; +var stageBlockFromURLOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + blockId, + timeoutInSeconds, + comp21 + ], + headerParameters: [ + contentLength, + sourceUrl, + sourceRange1, + sourceContentMD5, + sourceContentCrc64, + encryptionScope, + version, + requestId, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + leaseId0, + sourceIfModifiedSince, + sourceIfUnmodifiedSince, + sourceIfMatch, + sourceIfNoneMatch + ], + responses: { + 201: { + headersMapper: BlockBlobStageBlockFromURLHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobStageBlockFromURLHeaders + } + }, + isXML: true, + serializer: serializer$5 +}; +var commitBlockListOperationSpec = { + httpMethod: "PUT", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + timeoutInSeconds, + comp22 + ], + headerParameters: [ + transactionalContentMD5, + transactionalContentCrc64, + metadata, + encryptionScope, + tier0, + version, + requestId, + blobTagsString, + blobCacheControl, + blobContentType, + blobContentEncoding, + blobContentLanguage, + blobContentMD5, + blobContentDisposition, + leaseId0, + encryptionKey, + encryptionKeySha256, + encryptionAlgorithm, + ifModifiedSince, + ifUnmodifiedSince, + ifMatch, + ifNoneMatch, + ifTags + ], + requestBody: { + parameterPath: "blocks", + mapper: tslib.__assign(tslib.__assign({}, BlockLookupList), { required: true }) + }, + contentType: "application/xml; charset=utf-8", + responses: { + 201: { + headersMapper: BlockBlobCommitBlockListHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobCommitBlockListHeaders + } + }, + isXML: true, + serializer: serializer$5 +}; +var getBlockListOperationSpec = { + httpMethod: "GET", + path: "{containerName}/{blob}", + urlParameters: [ + url + ], + queryParameters: [ + snapshot, + listType, + timeoutInSeconds, + comp22 + ], + headerParameters: [ + version, + requestId, + leaseId0, + ifTags + ], + responses: { + 200: { + bodyMapper: BlockList, + headersMapper: BlockBlobGetBlockListHeaders + }, + default: { + bodyMapper: StorageError, + headersMapper: BlockBlobGetBlockListHeaders + } + }, + isXML: true, + serializer: serializer$5 +}; + +// Copyright (c) Microsoft Corporation. +/** + * The @azure/logger configuration for this package. + */ +var logger = logger$1.createClientLogger("storage-blob"); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +var SDK_VERSION = "12.3.0"; +var SERVICE_VERSION = "2020-02-10"; +var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB +var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB +var BLOCK_BLOB_MAX_BLOCKS = 50000; +var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB +var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB +var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; +/** + * The OAuth scope to use with Azure Storage. + */ +var StorageOAuthScopes = "https://storage.azure.com/.default"; +var URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } +}; +var HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416 +}; +var HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version" +}; +var ETagNone = ""; +var ETagAny = "*"; +var SIZE_1_MB = 1 * 1024 * 1024; +var BATCH_MAX_REQUEST = 256; +var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; +var HTTP_LINE_ENDING = "\r\n"; +var HTTP_VERSION_1_1 = "HTTP/1.1"; +var EncryptionAlgorithmAES25 = "AES256"; +var DevelopmentConnectionString = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"; +var StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-if-tags", + "x-ms-source-if-tags" +]; +var StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot" +]; + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @export + * @param {string} url + * @returns {string} + */ +function escapeURLPath(url) { + var urlParsed = coreHttp.URLBuilder.parse(url); + var path = urlParsed.getPath(); + path = path || "/"; + path = escape(path); + urlParsed.setPath(path); + return urlParsed.toString(); +} +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + var proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + var matchCredentials = connectionString.split(";"); + for (var _i = 0, matchCredentials_1 = matchCredentials; _i < matchCredentials_1.length; _i++) { + var element = matchCredentials_1[_i]; + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; +} +function getValueInConnString(connectionString, argument) { + var elements = connectionString.split(";"); + for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { + var element = elements_1[_i]; + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; +} +/** + * Extracts the parts of an Azure Storage account connection string. + * + * @export + * @param {string} connectionString Connection string. + * @returns {ConnectionString} String key value pairs of the storage account's url and credentials. + */ +function extractConnectionStringParts(connectionString) { + var proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + var blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + var defaultEndpointsProtocol = ""; + var accountName = ""; + var accountKey = Buffer.from("accountKey", "base64"); + var endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + var protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = defaultEndpointsProtocol + "://" + accountName + ".blob." + endpointSuffix; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName: accountName, + accountKey: accountKey, + proxyUri: proxyUri + }; + } + else { + // SAS connection string + var accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + var accountName = getAccountNameFromUrl(blobEndpoint); + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + return { kind: "SASConnString", url: blobEndpoint, accountName: accountName, accountSas: accountSas }; + } +} +/** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param {string} text + * @returns {string} + */ +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} +/** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @export + * @param {string} url Source URL string + * @param {string} name String to be appended to URL + * @returns {string} An updated URL string + */ +function appendToURLPath(url, name) { + var urlParsed = coreHttp.URLBuilder.parse(url); + var path = urlParsed.getPath(); + path = path ? (path.endsWith("/") ? "" + path + name : path + "/" + name) : name; + urlParsed.setPath(path); + return urlParsed.toString(); +} +/** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @export + * @param {string} url Source URL string + * @param {string} name Parameter name + * @param {string} [value] Parameter value + * @returns {string} An updated URL string + */ +function setURLParameter(url, name, value) { + var urlParsed = coreHttp.URLBuilder.parse(url); + urlParsed.setQueryParameter(name, value); + return urlParsed.toString(); +} +/** + * Set URL host. + * + * @export + * @param {string} url Source URL string + * @param {string} host New host string + * @returns An updated URL string + */ +function setURLHost(url, host) { + var urlParsed = coreHttp.URLBuilder.parse(url); + urlParsed.setHost(host); + return urlParsed.toString(); +} +/** + * Get URL path from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +function getURLPath(url) { + var urlParsed = coreHttp.URLBuilder.parse(url); + return urlParsed.getPath(); +} +/** + * Get URL scheme from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +function getURLScheme(url) { + var urlParsed = coreHttp.URLBuilder.parse(url); + return urlParsed.getScheme(); +} +/** + * Get URL path and query from an URL string. + * + * @export + * @param {string} url Source URL string + * @returns {(string | undefined)} + */ +function getURLPathAndQuery(url) { + var urlParsed = coreHttp.URLBuilder.parse(url); + var pathString = urlParsed.getPath(); + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + var queryString = urlParsed.getQuery() || ""; + queryString = queryString.trim(); + if (queryString != "") { + queryString = queryString.startsWith("?") ? queryString : "?" + queryString; // Ensure query string start with '?' + } + return "" + pathString + queryString; +} +/** + * Get URL query key value pairs from an URL string. + * + * @export + * @param {string} url + * @returns {{[key: string]: string}} + */ +function getURLQueries(url) { + var queryString = coreHttp.URLBuilder.parse(url).getQuery(); + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substr(1) : queryString; + var querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter(function (value) { + var indexOfEqual = value.indexOf("="); + var lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + var queries = {}; + for (var _i = 0, querySubStrings_1 = querySubStrings; _i < querySubStrings_1.length; _i++) { + var querySubString = querySubStrings_1[_i]; + var splitResults = querySubString.split("="); + var key = splitResults[0]; + var value = splitResults[1]; + queries[key] = value; + } + return queries; +} +/** + * Rounds a date off to seconds. + * + * @export + * @param {Date} date + * @param {boolean} [withMilliseconds=true] If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns {string} Date string in ISO8061 format, with or without 7 milliseconds component + */ +function truncatedISO8061Date(date, withMilliseconds) { + if (withMilliseconds === void 0) { withMilliseconds = true; } + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + var dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; +} +/** + * Base64 encode. + * + * @export + * @param {string} content + * @returns {string} + */ +function base64encode(content) { + return !coreHttp.isNode ? btoa(content) : Buffer.from(content).toString("base64"); +} +/** + * Generate a 64 bytes base64 block ID string. + * + * @export + * @param {number} blockIndex + * @returns {string} + */ +function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + var maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + var maxBlockIndexLength = 6; + var maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + var res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); +} +/** + * Delay specified time interval. + * + * @export + * @param {number} timeInMs + * @param {AbortSignalLike} [aborter] + * @param {Error} [abortError] + */ +function delay(timeInMs, aborter, abortError) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + var timeout; + var abortHandler = function () { + if (timeout !== undefined) { + clearTimeout(timeout); + } + reject(abortError); + }; + var resolveHandler = function () { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); + } + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); + } + })]; + }); + }); +} +/** + * String.prototype.padStart() + * + * @export + * @param {string} currentString + * @param {number} targetLength + * @param {string} [padString=" "] + * @returns {string} + */ +function padStart(currentString, targetLength, padString) { + if (padString === void 0) { padString = " "; } + // TS doesn't know this code needs to run downlevel sometimes. + // @ts-expect-error + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } +} +/** + * If two strings are equal when compared case insensitive. + * + * @export + * @param {string} str1 + * @param {string} str2 + * @returns {boolean} + */ +function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); +} +/** + * Extracts account name from the url + * @param {string} url url to extract the account name from + * @returns {string} with the account name + */ +function getAccountNameFromUrl(url) { + var parsedUrl = coreHttp.URLBuilder.parse(url); + var accountName; + try { + if (parsedUrl.getHost().split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.getHost().split(".")[0]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.getPath().split("/")[1]; + } + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; + } + return accountName; + } + catch (error) { + throw new Error("Unable to extract accountName with provided information."); + } +} +function isIpEndpointStyle(parsedUrl) { + if (parsedUrl.getHost() == undefined) { + return false; + } + var host = parsedUrl.getHost() + (parsedUrl.getPort() == undefined ? "" : ":" + parsedUrl.getPort()); + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // 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); +} +/** + * Convert Tags to encoded string. + * + * @export + * @param {Tags} tags + * @returns {string | undefined} + */ +function toBlobTagsString(tags) { + if (tags === undefined) { + return undefined; + } + var tagPairs = []; + for (var key in tags) { + if (tags.hasOwnProperty(key)) { + var value = tags[key]; + tagPairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); + } + } + return tagPairs.join("&"); +} +/** + * Convert Tags type to BlobTags. + * + * @export + * @param {Tags} [tags] + * @returns {(BlobTags | undefined)} + */ +function toBlobTags(tags) { + if (tags === undefined) { + return undefined; + } + var res = { + blobTagSet: [] + }; + for (var key in tags) { + if (tags.hasOwnProperty(key)) { + var value = tags[key]; + res.blobTagSet.push({ + key: key, + value: value + }); + } + } + return res; +} +/** + * Covert BlobTags to Tags type. + * + * @export + * @param {BlobTags} [tags] + * @returns {(Tags | undefined)} + */ +function toTags(tags) { + if (tags === undefined) { + return undefined; + } + var res = {}; + for (var _i = 0, _a = tags.blobTagSet; _i < _a.length; _i++) { + var blobTag = _a[_i]; + res[blobTag.key] = blobTag.value; + } + return res; +} +/** + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @export + * @param {(BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration)} [textConfiguration] + * @returns {(QuerySerialization | undefined)} + */ +function toQuerySerialization(textConfiguration) { + if (textConfiguration === undefined) { + return undefined; + } + switch (textConfiguration.kind) { + case "csv": + return { + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false + } + } + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator + } + } + }; + case "arrow": + return { + format: { + type: "arrow", + arrowConfiguration: { + schema: textConfiguration.schema + } + } + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } +} +function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) { + return undefined; + } + if ("policy-id" in objectReplicationRecord) { + // If the dictionary contains a key with policy id, we are not required to do any parsing since + // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. + return undefined; + } + var orProperties = []; + var _loop_1 = function (key) { + var ids = key.split("_"); + var policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) { + ids[0] = ids[0].substring(policyPrefix.length); + } + var rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key] + }; + var policyIndex = orProperties.findIndex(function (policy) { return policy.policyId === ids[0]; }); + if (policyIndex > -1) { + orProperties[policyIndex].rules.push(rule); + } + else { + orProperties.push({ + policyId: ids[0], + rules: [rule] + }); + } + }; + for (var key in objectReplicationRecord) { + _loop_1(key); + } + return orProperties; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + * + * @class StorageBrowserPolicy + * @extends {BaseRequestPolicy} + */ +var StorageBrowserPolicy = /** @class */ (function (_super) { + tslib.__extends(StorageBrowserPolicy, _super); + /** + * Creates an instance of StorageBrowserPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof StorageBrowserPolicy + */ + function StorageBrowserPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageBrowserPolicy + */ + StorageBrowserPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + { + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + } + }); + }); + }; + return StorageBrowserPolicy; +}(coreHttp.BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + * + * @export + * @class StorageBrowserPolicyFactory + * @implements {RequestPolicyFactory} + */ +var StorageBrowserPolicyFactory = /** @class */ (function () { + function StorageBrowserPolicyFactory() { + } + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageBrowserPolicy} + * @memberof StorageBrowserPolicyFactory + */ + StorageBrowserPolicyFactory.prototype.create = function (nextPolicy, options) { + return new StorageBrowserPolicy(nextPolicy, options); + }; + return StorageBrowserPolicyFactory; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {})); +// Default values of StorageRetryOptions +var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined // Use server side default timeout strategy +}; +var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); +/** + * Retry policy with exponential retry and linear retry implemented. + * + * @class RetryPolicy + * @extends {BaseRequestPolicy} + */ +var StorageRetryPolicy = /** @class */ (function (_super) { + tslib.__extends(StorageRetryPolicy, _super); + /** + * Creates an instance of RetryPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] + * @memberof StorageRetryPolicy + */ + function StorageRetryPolicy(nextPolicy, options, retryOptions) { + if (retryOptions === void 0) { retryOptions = DEFAULT_RETRY_OPTIONS; } + var _this = _super.call(this, nextPolicy, options) || this; + // Initialize retry options + _this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + return _this; + } + /** + * Sends request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, this.attemptSendRequest(request, false, 1)]; + }); + }); + }; + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @protected + * @param {WebResource} request + * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.attemptSendRequest = function (request, secondaryHas404, attempt) { + return tslib.__awaiter(this, void 0, void 0, function () { + var newRequest, isPrimaryRetry, response, err_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + newRequest = request.clone(); + isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + } + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + logger.info("RetryPolicy: =====> Try=" + attempt + " " + (isPrimaryRetry ? "Primary" : "Secondary")); + return [4 /*yield*/, this._nextPolicy.sendRequest(newRequest)]; + case 2: + response = _a.sent(); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return [2 /*return*/, response]; + } + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + logger.error("RetryPolicy: Caught error, message: " + err_1.message + ", code: " + err_1.code); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err_1)) { + throw err_1; + } + return [3 /*break*/, 4]; + case 4: return [4 /*yield*/, this.delay(isPrimaryRetry, attempt, request.abortSignal)]; + case 5: + _a.sent(); + return [4 /*yield*/, this.attemptSendRequest(request, secondaryHas404, ++attempt)]; + case 6: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @protected + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {HttpOperationResponse} [response] + * @param {RestError} [err] + * @returns {boolean} + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.shouldRetry = function (isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + logger.info("RetryPolicy: Attempt(s) " + attempt + " >= maxTries " + this.retryOptions + .maxTries + ", no further try."); + return false; + } + // Handle network failures, you may need to customize the list when you implement + // your own http client + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (var _i = 0, retriableErrors_1 = retriableErrors; _i < retriableErrors_1.length; _i++) { + var retriableError = retriableErrors_1[_i]; + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && + err.code + .toString() + .toUpperCase() + .includes(retriableError))) { + logger.info("RetryPolicy: Network error " + retriableError + " found, will retry."); + return true; + } + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + var statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + logger.info("RetryPolicy: Secondary access with 404, will retry."); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + logger.info("RetryPolicy: Will retry for status code " + statusCode + "."); + return true; + } + } + return false; + }; + /** + * Delay a calculated time between retries. + * + * @private + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {AbortSignalLike} [abortSignal] + * @memberof StorageRetryPolicy + */ + StorageRetryPolicy.prototype.delay = function (isPrimaryRetry, attempt, abortSignal) { + return tslib.__awaiter(this, void 0, void 0, function () { + var delayTimeInMs; + return tslib.__generator(this, function (_a) { + delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case exports.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case exports.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + logger.info("RetryPolicy: Delay for " + delayTimeInMs + "ms"); + return [2 /*return*/, delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR)]; + }); + }); + }; + return StorageRetryPolicy; +}(coreHttp.BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + * + * @export + * @class StorageRetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +var StorageRetryPolicyFactory = /** @class */ (function () { + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param {StorageRetryOptions} [retryOptions] + * @memberof StorageRetryPolicyFactory + */ + function StorageRetryPolicyFactory(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageRetryPolicy} + * @memberof StorageRetryPolicyFactory + */ + StorageRetryPolicyFactory.prototype.create = function (nextPolicy, options) { + return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + }; + return StorageRetryPolicyFactory; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + * + * @export + * @abstract + * @class CredentialPolicy + * @extends {BaseRequestPolicy} + */ +var CredentialPolicy = /** @class */ (function (_super) { + tslib.__extends(CredentialPolicy, _super); + function CredentialPolicy() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof CredentialPolicy + */ + CredentialPolicy.prototype.sendRequest = function (request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + }; + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @protected + * @abstract + * @param {WebResource} request + * @returns {WebResource} + * @memberof CredentialPolicy + */ + CredentialPolicy.prototype.signRequest = function (request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + }; + return CredentialPolicy; +}(coreHttp.BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + * + * @export + * @class AnonymousCredentialPolicy + * @extends {CredentialPolicy} + */ +var AnonymousCredentialPolicy = /** @class */ (function (_super) { + tslib.__extends(AnonymousCredentialPolicy, _super); + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof AnonymousCredentialPolicy + */ + function AnonymousCredentialPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + return AnonymousCredentialPolicy; +}(CredentialPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + * + * @export + * @abstract + * @class Credential + */ +var Credential = /** @class */ (function () { + function Credential() { + } + /** + * Creates a RequestPolicy object. + * + * @param {RequestPolicy} _nextPolicy + * @param {RequestPolicyOptions} _options + * @returns {RequestPolicy} + * @memberof Credential + */ + Credential.prototype.create = function ( + // tslint:disable-next-line:variable-name + _nextPolicy, + // tslint:disable-next-line:variable-name + _options) { + throw new Error("Method should be implemented in children classes."); + }; + return Credential; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + * + * @export + * @class AnonymousCredential + * @extends {Credential} + */ +var AnonymousCredential = /** @class */ (function (_super) { + tslib.__extends(AnonymousCredential, _super); + function AnonymousCredential() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {AnonymousCredentialPolicy} + * @memberof AnonymousCredential + */ + AnonymousCredential.prototype.create = function (nextPolicy, options) { + return new AnonymousCredentialPolicy(nextPolicy, options); + }; + return AnonymousCredential; +}(Credential)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * TelemetryPolicy is a policy used to tag user-agent header for every requests. + * + * @class TelemetryPolicy + * @extends {BaseRequestPolicy} + */ +var TelemetryPolicy = /** @class */ (function (_super) { + tslib.__extends(TelemetryPolicy, _super); + /** + * Creates an instance of TelemetryPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {string} telemetry + * @memberof TelemetryPolicy + */ + function TelemetryPolicy(nextPolicy, options, telemetry) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.telemetry = telemetry; + return _this; + } + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof TelemetryPolicy + */ + TelemetryPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + { + if (!request.headers) { + request.headers = new coreHttp.HttpHeaders(); + } + if (!request.headers.get(HeaderConstants.USER_AGENT)) { + request.headers.set(HeaderConstants.USER_AGENT, this.telemetry); + } + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return TelemetryPolicy; +}(coreHttp.BaseRequestPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects. + * + * @export + * @class TelemetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +var TelemetryPolicyFactory = /** @class */ (function () { + /** + * Creates an instance of TelemetryPolicyFactory. + * @param {UserAgentOptions} [telemetry] + * @memberof TelemetryPolicyFactory + */ + function TelemetryPolicyFactory(telemetry) { + var userAgentInfo = []; + { + if (telemetry) { + // FIXME: replace() only replaces the first space. And we have no idea why we need to replace spaces in the first place. + // But fixing this would be a breaking change. Logged an issue here: https://github.com/Azure/azure-sdk-for-js/issues/10793 + var telemetryString = (telemetry.userAgentPrefix || "").replace(" ", ""); + if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) { + userAgentInfo.push(telemetryString); + } + } + // e.g. azsdk-js-storageblob/10.0.0 + var libInfo = "azsdk-js-storageblob/" + SDK_VERSION; + if (userAgentInfo.indexOf(libInfo) === -1) { + userAgentInfo.push(libInfo); + } + // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299) + var runtimeInfo = "(NODE-VERSION " + process.version + "; " + os.type() + " " + os.release() + ")"; + if (userAgentInfo.indexOf(runtimeInfo) === -1) { + userAgentInfo.push(runtimeInfo); + } + } + this.telemetryString = userAgentInfo.join(" "); + } + /** + * Creates a TelemetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {TelemetryPolicy} + * @memberof TelemetryPolicyFactory + */ + TelemetryPolicyFactory.prototype.create = function (nextPolicy, options) { + return new TelemetryPolicy(nextPolicy, options, this.telemetryString); + }; + return TelemetryPolicyFactory; +}()); + +// Copyright (c) Microsoft Corporation. +var _defaultHttpClient = new coreHttp.DefaultHttpClient(); +function getCachedDefaultHttpClient() { + return _defaultHttpClient; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + * + * @export + * @class Pipeline + */ +var Pipeline = /** @class */ (function () { + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param {RequestPolicyFactory[]} factories + * @param {PipelineOptions} [options={}] + * @memberof Pipeline + */ + function Pipeline(factories, options) { + if (options === void 0) { options = {}; } + this.factories = factories; + // when options.httpClient is not specified, passing in a DefaultHttpClient instance to + // avoid each client creating its own http client. + this.options = tslib.__assign(tslib.__assign({}, options), { httpClient: options.httpClient || getCachedDefaultHttpClient() }); + } + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline. + * @memberof Pipeline + */ + Pipeline.prototype.toServiceClientOptions = function () { + return { + httpClient: this.options.httpClient, + requestPolicyFactories: this.factories + }; + }; + return Pipeline; +}()); +/** + * Creates a new Pipeline object with Credential provided. + * + * @export + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options. + * @returns {Pipeline} A new Pipeline object. + */ +function newPipeline(credential, pipelineOptions) { + if (pipelineOptions === void 0) { pipelineOptions = {}; } + if (credential === undefined) { + credential = new AnonymousCredential(); + } + // Order is important. Closer to the API at the top & closer to the network at the bottom. + // The credential's policy factory must appear close to the wire so it can sign any + // changes made by other factories (like UniqueRequestIDPolicyFactory) + var telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions); + var factories = [ + coreHttp.tracingPolicy({ userAgent: telemetryPolicy.telemetryString }), + coreHttp.keepAlivePolicy(pipelineOptions.keepAliveOptions), + telemetryPolicy, + coreHttp.generateClientRequestIdPolicy(), + new StorageBrowserPolicyFactory(), + coreHttp.deserializationPolicy(), + new StorageRetryPolicyFactory(pipelineOptions.retryOptions), + coreHttp.logPolicy({ + logger: logger.info, + allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, + allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters + }) + ]; + { + // policies only available in Node.js runtime, not in browsers + factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions)); + factories.push(coreHttp.disableResponseDecompressionPolicy()); + } + factories.push(coreHttp.isTokenCredential(credential) + ? coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes) + : credential); + return new Pipeline(factories, pipelineOptions); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +var ABORT_ERROR = new abortController.AbortError("The operation was aborted."); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. + * + * @class RetriableReadableStream + * @extends {Readable} + */ +var RetriableReadableStream = /** @class */ (function (_super) { + tslib.__extends(RetriableReadableStream, _super); + /** + * Creates an instance of RetriableReadableStream. + * + * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter + * @param {ReadableStreamGetter} getter A method calling downloading request returning + * a new ReadableStream from specified offset + * @param {number} offset Offset position in original data source to read + * @param {number} count How much data in original data source to read + * @param {RetriableReadableStreamOptions} [options={}] + * @memberof RetriableReadableStream + */ + function RetriableReadableStream(source, getter, offset, count, options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.retries = 0; + _this.abortHandler = function () { + _this.source.pause(); + _this.emit("error", ABORT_ERROR); + }; + _this.aborter = options.abortSignal || abortController.AbortSignal.none; + _this.getter = getter; + _this.source = source; + _this.start = offset; + _this.offset = offset; + _this.end = offset + count - 1; + _this.maxRetryRequests = + options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; + _this.onProgress = options.onProgress; + _this.options = options; + _this.aborter.addEventListener("abort", _this.abortHandler); + _this.setSourceDataHandler(); + _this.setSourceEndHandler(); + _this.setSourceErrorHandler(); + return _this; + } + RetriableReadableStream.prototype._read = function () { + if (!this.aborter.aborted) { + this.source.resume(); + } + }; + RetriableReadableStream.prototype.setSourceDataHandler = function () { + var _this = this; + this.source.on("data", function (data) { + if (_this.options.doInjectErrorOnce) { + _this.options.doInjectErrorOnce = undefined; + _this.source.pause(); + _this.source.removeAllListeners("data"); + _this.source.emit("end"); + return; + } + // console.log( + // `Offset: ${this.offset}, Received ${data.length} from internal stream` + // ); + _this.offset += data.length; + if (_this.onProgress) { + _this.onProgress({ loadedBytes: _this.offset - _this.start }); + } + if (!_this.push(data)) { + _this.source.pause(); + } + }); + }; + RetriableReadableStream.prototype.setSourceEndHandler = function () { + var _this = this; + this.source.on("end", function () { + // console.log( + // `Source stream emits end, offset: ${ + // this.offset + // }, dest end : ${this.end}` + // ); + if (_this.offset - 1 === _this.end) { + _this.aborter.removeEventListener("abort", _this.abortHandler); + _this.push(null); + } + else if (_this.offset <= _this.end) { + // console.log( + // `retries: ${this.retries}, max retries: ${this.maxRetries}` + // ); + if (_this.retries < _this.maxRetryRequests) { + _this.retries += 1; + _this.getter(_this.offset) + .then(function (newSource) { + _this.source = newSource; + _this.setSourceDataHandler(); + _this.setSourceEndHandler(); + _this.setSourceErrorHandler(); + }) + .catch(function (error) { + _this.emit("error", error); + }); + } + else { + _this.emit("error", new Error( + // tslint:disable-next-line:max-line-length + "Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: " + (_this + .offset - 1) + ", data needed offset: " + _this.end + ", retries: " + _this.retries + ", max retries: " + _this.maxRetryRequests)); + } + } + else { + _this.emit("error", new Error("Data corruption failure: Received more data than original request, data needed offset is " + _this.end + ", received offset: " + (_this.offset - 1))); + } + }); + }; + RetriableReadableStream.prototype.setSourceErrorHandler = function () { + var _this = this; + this.source.on("error", function (error) { + _this.emit("error", error); + }); + }; + return RetriableReadableStream; +}(stream.Readable)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. + * + * @export + * @class BlobDownloadResponse + * @implements {BlobDownloadResponseParsed} + */ +var BlobDownloadResponse = /** @class */ (function () { + /** + * Creates an instance of BlobDownloadResponse. + * + * @param {BlobDownloadResponseParsed} originalResponse + * @param {ReadableStreamGetter} getter + * @param {number} offset + * @param {number} count + * @param {RetriableReadableStreamOptions} [options={}] + * @memberof BlobDownloadResponse + */ + function BlobDownloadResponse(originalResponse, getter, offset, count, options) { + if (options === void 0) { options = {}; } + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + } + Object.defineProperty(BlobDownloadResponse.prototype, "acceptRanges", { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.acceptRanges; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "cacheControl", { + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.cacheControl; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentDisposition", { + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentDisposition; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentEncoding", { + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentEncoding; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentLanguage", { + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentLanguage; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobSequenceNumber", { + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobSequenceNumber; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobType", { + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentLength", { + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentLength; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentMD5", { + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentRange", { + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentRange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentType", { + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyCompletedOn", { + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyCompletedOn; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyId", { + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyProgress", { + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyProgress; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copySource", { + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copySource; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyStatus", { + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "copyStatusDescription", { + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.copyStatusDescription; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseDuration", { + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseDuration; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseState", { + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseState; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "leaseStatus", { + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.leaseStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "date", { + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.date; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobCommittedBlockCount", { + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobCommittedBlockCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "etag", { + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.etag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "tagCount", { + /** + * The number of tags associated with the blob + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.tagCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "errorCode", { + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.errorCode; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "isServerEncrypted", { + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.isServerEncrypted; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "blobContentMD5", { + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobContentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "lastModified", { + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.lastModified; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "lastAccessed", { + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.lastAccessed; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "metadata", { + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.metadata; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "requestId", { + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.requestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "clientRequestId", { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.clientRequestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "version", { + /** + * Indicates the version of the Blob service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.version; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "versionId", { + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.versionId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "encryptionKeySha256", { + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.encryptionKeySha256; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentCrc64", { + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.contentCrc64; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "objectReplicationDestinationPolicyId", { + /** + * Object Replication Policy Id of the destination blob. + * + * @readonly + * @type {(string| undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.objectReplicationDestinationPolicyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "objectReplicationSourceProperties", { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @readonly + * @type {(ObjectReplicationPolicy[] | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.objectReplicationSourceProperties; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "isSealed", { + /** + * If this blob has been sealed. + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.isSealed; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "contentAsBlob", { + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse.blobBody; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "readableStreamBody", { + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will automatically retry when internal read stream unexpected ends. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobDownloadResponse + */ + get: function () { + return coreHttp.isNode ? this.blobDownloadStream : undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobDownloadResponse.prototype, "_response", { + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobDownloadResponse + */ + get: function () { + return this.originalResponse._response; + }, + enumerable: false, + configurable: true + }); + return BlobDownloadResponse; +}()); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var AVRO_SYNC_MARKER_SIZE = 16; +var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); +var AVRO_CODEC_KEY = "avro.codec"; +var AVRO_SCHEMA_KEY = "avro.schema"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +function arraysEqual(a, b) { + if (a === b) + return true; + if (a == null || b == null) + return false; + if (a.length != b.length) + return false; + for (var i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; + } + return true; +} + +// Copyright (c) Microsoft Corporation. +var AvroParser = /** @class */ (function () { + function AvroParser() { + } + /** + * Reads a fixed number of bytes from the stream. + * + * @static + * @param {AvroReadable} [stream] + * @param {number} [length] + * @param {AvroParserReadOptions} [options={}] + * @returns {Promise} + * @memberof AvroParser + */ + AvroParser.readFixedBytes = function (stream, length, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var bytes; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, stream.read(length, { abortSignal: options.abortSignal })]; + case 1: + bytes = _a.sent(); + if (bytes.length != length) { + throw new Error("Hit stream end."); + } + return [2 /*return*/, bytes]; + } + }); + }); + }; + /** + * Reads a single byte from the stream. + * + * @static + * @param {AvroReadable} [stream] + * @param {AvroParserReadOptions} [options={}] + * @returns {Promise} + * @memberof AvroParser + */ + AvroParser.readByte = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var buf; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 1, options)]; + case 1: + buf = _a.sent(); + return [2 /*return*/, buf[0]]; + } + }); + }); + }; + // int and long are stored in variable-length zig-zag coding. + // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt + // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types + AvroParser.readZigZagLong = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var zigZagEncoded, significanceInBit, byte, haveMoreByte, significanceInFloat, res; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + zigZagEncoded = 0; + significanceInBit = 0; + _a.label = 1; + case 1: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 2: + byte = _a.sent(); + haveMoreByte = byte & 0x80; + zigZagEncoded |= (byte & 0x7f) << significanceInBit; + significanceInBit += 7; + _a.label = 3; + case 3: + if (haveMoreByte && significanceInBit < 28) return [3 /*break*/, 1]; + _a.label = 4; + case 4: + if (!haveMoreByte) return [3 /*break*/, 9]; + // Switch to float arithmetic + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; // 2 ** 28. + _a.label = 5; + case 5: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 6: + byte = _a.sent(); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + _a.label = 7; + case 7: + if (byte & 0x80) return [3 /*break*/, 5]; + _a.label = 8; + case 8: + res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { + throw new Error("Integer overflow."); + } + return [2 /*return*/, res]; + case 9: return [2 /*return*/, (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1)]; + } + }); + }); + }; + AvroParser.readLong = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, AvroParser.readZigZagLong(stream, options)]; + }); + }); + }; + AvroParser.readInt = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, AvroParser.readZigZagLong(stream, options)]; + }); + }); + }; + AvroParser.readNull = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, null]; + }); + }); + }; + AvroParser.readBoolean = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var b; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readByte(stream, options)]; + case 1: + b = _a.sent(); + if (b == 1) { + return [2 /*return*/, true]; + } + else if (b == 0) { + return [2 /*return*/, false]; + } + else { + throw new Error("Byte was not a boolean."); + } + } + }); + }); + }; + AvroParser.readFloat = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var u8arr, view; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 4, options)]; + case 1: + u8arr = _a.sent(); + view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return [2 /*return*/, view.getFloat32(0, true)]; // littleEndian = true + } + }); + }); + }; + AvroParser.readDouble = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var u8arr, view; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(stream, 8, options)]; + case 1: + u8arr = _a.sent(); + view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return [2 /*return*/, view.getFloat64(0, true)]; // littleEndian = true + } + }); + }); + }; + AvroParser.readBytes = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var size; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 1: + size = _a.sent(); + if (size < 0) { + throw new Error("Bytes size was negative."); + } + return [4 /*yield*/, stream.read(size, { abortSignal: options.abortSignal })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + AvroParser.readString = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var u8arr, utf8decoder; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readBytes(stream, options)]; + case 1: + u8arr = _a.sent(); + // polyfill TextDecoder to be backward compatible with older + // nodejs that doesn't expose TextDecoder as a global variable + if (typeof TextDecoder === "undefined" && typeof require !== "undefined") { + global.TextDecoder = require("util").TextDecoder; + } + utf8decoder = new TextDecoder(); + return [2 /*return*/, utf8decoder.decode(u8arr)]; + } + }); + }); + }; + AvroParser.readMapPair = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var key, value; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readString(stream, options)]; + case 1: + key = _a.sent(); + return [4 /*yield*/, readItemMethod(stream, options)]; + case 2: + value = _a.sent(); + return [2 /*return*/, { key: key, value: value }]; + } + }); + }); + }; + AvroParser.readMap = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var readPairMethod, pairs, dict, _i, pairs_1, pair; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + readPairMethod = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(_this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readMapPair(stream, readItemMethod, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return [4 /*yield*/, AvroParser.readArray(stream, readPairMethod, options)]; + case 1: + pairs = _a.sent(); + dict = {}; + for (_i = 0, pairs_1 = pairs; _i < pairs_1.length; _i++) { + pair = pairs_1[_i]; + dict[pair.key] = pair.value; + } + return [2 /*return*/, dict]; + } + }); + }); + }; + AvroParser.readArray = function (stream, readItemMethod, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var items, count, item; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + items = []; + return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 1: + count = _a.sent(); + _a.label = 2; + case 2: + if (!(count != 0)) return [3 /*break*/, 8]; + if (!(count < 0)) return [3 /*break*/, 4]; + // Ignore block sizes + return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 3: + // Ignore block sizes + _a.sent(); + count = -count; + _a.label = 4; + case 4: + if (!count--) return [3 /*break*/, 6]; + return [4 /*yield*/, readItemMethod(stream, options)]; + case 5: + item = _a.sent(); + items.push(item); + return [3 /*break*/, 4]; + case 6: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 7: + count = _a.sent(); + return [3 /*break*/, 2]; + case 8: return [2 /*return*/, items]; + } + }); + }); + }; + return AvroParser; +}()); +var AvroComplex; +(function (AvroComplex) { + AvroComplex["RECORD"] = "record"; + AvroComplex["ENUM"] = "enum"; + AvroComplex["ARRAY"] = "array"; + AvroComplex["MAP"] = "map"; + AvroComplex["UNION"] = "union"; + AvroComplex["FIXED"] = "fixed"; +})(AvroComplex || (AvroComplex = {})); +var AvroType = /** @class */ (function () { + function AvroType() { + } + /** + * Determines the AvroType from the Avro Schema. + */ + AvroType.fromSchema = function (schema) { + if (typeof schema == "string") { + return AvroType.fromStringSchema(schema); + } + else if (Array.isArray(schema)) { + return AvroType.fromArraySchema(schema); + } + else { + return AvroType.fromObjectSchema(schema); + } + }; + AvroType.fromStringSchema = function (schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: + return new AvroPrimitiveType(schema); + default: + throw new Error("Unexpected Avro type " + schema); + } + }; + AvroType.fromArraySchema = function (schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + }; + AvroType.fromObjectSchema = function (schema) { + var type = schema.type; + // Primitives can be defined as strings or objects + try { + return AvroType.fromStringSchema(type); + } + catch (err) { } + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) { + throw new Error("aliases currently is not supported, schema: " + schema); + } + if (!schema.name) { + throw new Error("Required attribute 'name' doesn't exist on schema: " + schema); + } + var fields = {}; + if (!schema.fields) { + throw new Error("Required attribute 'fields' doesn't exist on schema: " + schema); + } + for (var _i = 0, _a = schema.fields; _i < _a.length; _i++) { + var field = _a[_i]; + fields[field.name] = AvroType.fromSchema(field.type); + } + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) { + throw new Error("aliases currently is not supported, schema: " + schema); + } + if (!schema.symbols) { + throw new Error("Required attribute 'symbols' doesn't exist on schema: " + schema); + } + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) { + throw new Error("Required attribute 'values' doesn't exist on schema: " + schema); + } + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: // Unused today + case AvroComplex.FIXED: // Unused today + default: + throw new Error("Unexpected Avro type " + type + " in " + schema); + } + }; + return AvroType; +}()); +var AvroPrimitive; +(function (AvroPrimitive) { + AvroPrimitive["NULL"] = "null"; + AvroPrimitive["BOOLEAN"] = "boolean"; + AvroPrimitive["INT"] = "int"; + AvroPrimitive["LONG"] = "long"; + AvroPrimitive["FLOAT"] = "float"; + AvroPrimitive["DOUBLE"] = "double"; + AvroPrimitive["BYTES"] = "bytes"; + AvroPrimitive["STRING"] = "string"; +})(AvroPrimitive || (AvroPrimitive = {})); +var AvroPrimitiveType = /** @class */ (function (_super) { + tslib.__extends(AvroPrimitiveType, _super); + function AvroPrimitiveType(primitive) { + var _this = _super.call(this) || this; + _this._primitive = primitive; + return _this; + } + AvroPrimitiveType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this._primitive; + switch (_a) { + case AvroPrimitive.NULL: return [3 /*break*/, 1]; + case AvroPrimitive.BOOLEAN: return [3 /*break*/, 3]; + case AvroPrimitive.INT: return [3 /*break*/, 5]; + case AvroPrimitive.LONG: return [3 /*break*/, 7]; + case AvroPrimitive.FLOAT: return [3 /*break*/, 9]; + case AvroPrimitive.DOUBLE: return [3 /*break*/, 11]; + case AvroPrimitive.BYTES: return [3 /*break*/, 13]; + case AvroPrimitive.STRING: return [3 /*break*/, 15]; + } + return [3 /*break*/, 17]; + case 1: return [4 /*yield*/, AvroParser.readNull()]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: return [4 /*yield*/, AvroParser.readBoolean(stream, options)]; + case 4: return [2 /*return*/, _b.sent()]; + case 5: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 6: return [2 /*return*/, _b.sent()]; + case 7: return [4 /*yield*/, AvroParser.readLong(stream, options)]; + case 8: return [2 /*return*/, _b.sent()]; + case 9: return [4 /*yield*/, AvroParser.readFloat(stream, options)]; + case 10: return [2 /*return*/, _b.sent()]; + case 11: return [4 /*yield*/, AvroParser.readDouble(stream, options)]; + case 12: return [2 /*return*/, _b.sent()]; + case 13: return [4 /*yield*/, AvroParser.readBytes(stream, options)]; + case 14: return [2 /*return*/, _b.sent()]; + case 15: return [4 /*yield*/, AvroParser.readString(stream, options)]; + case 16: return [2 /*return*/, _b.sent()]; + case 17: throw new Error("Unknown Avro Primitive"); + } + }); + }); + }; + return AvroPrimitiveType; +}(AvroType)); +var AvroEnumType = /** @class */ (function (_super) { + tslib.__extends(AvroEnumType, _super); + function AvroEnumType(symbols) { + var _this = _super.call(this) || this; + _this._symbols = symbols; + return _this; + } + AvroEnumType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var value; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 1: + value = _a.sent(); + return [2 /*return*/, this._symbols[value]]; + } + }); + }); + }; + return AvroEnumType; +}(AvroType)); +var AvroUnionType = /** @class */ (function (_super) { + tslib.__extends(AvroUnionType, _super); + function AvroUnionType(types) { + var _this = _super.call(this) || this; + _this._types = types; + return _this; + } + AvroUnionType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var typeIndex; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, AvroParser.readInt(stream, options)]; + case 1: + typeIndex = _a.sent(); + return [4 /*yield*/, this._types[typeIndex].read(stream, options)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return AvroUnionType; +}(AvroType)); +var AvroMapType = /** @class */ (function (_super) { + tslib.__extends(AvroMapType, _super); + function AvroMapType(itemType) { + var _this = _super.call(this) || this; + _this._itemType = itemType; + return _this; + } + AvroMapType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var readItemMethod; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + readItemMethod = function (s, options) { return tslib.__awaiter(_this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._itemType.read(s, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); }; + return [4 /*yield*/, AvroParser.readMap(stream, readItemMethod, options)]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return AvroMapType; +}(AvroType)); +var AvroRecordType = /** @class */ (function (_super) { + tslib.__extends(AvroRecordType, _super); + function AvroRecordType(fields, name) { + var _this = _super.call(this) || this; + _this._fields = fields; + _this._name = name; + return _this; + } + AvroRecordType.prototype.read = function (stream, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var record, _a, _b, _i, key, _c, _d; + return tslib.__generator(this, function (_e) { + switch (_e.label) { + case 0: + record = {}; + record["$schema"] = this._name; + _a = []; + for (_b in this._fields) + _a.push(_b); + _i = 0; + _e.label = 1; + case 1: + if (!(_i < _a.length)) return [3 /*break*/, 4]; + key = _a[_i]; + if (!this._fields.hasOwnProperty(key)) return [3 /*break*/, 3]; + _c = record; + _d = key; + return [4 /*yield*/, this._fields[key].read(stream, options)]; + case 2: + _c[_d] = _e.sent(); + _e.label = 3; + case 3: + _i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, record]; + } + }); + }); + }; + return AvroRecordType; +}(AvroType)); + +// Copyright (c) Microsoft Corporation. +var AvroReader = /** @class */ (function () { + function AvroReader(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; + } + Object.defineProperty(AvroReader.prototype, "blockOffset", { + get: function () { + return this._blockOffset; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(AvroReader.prototype, "objectIndex", { + get: function () { + return this._objectIndex; + }, + enumerable: false, + configurable: true + }); + AvroReader.prototype.initialize = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var header, _a, codec, _b, schema, _c, i; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: return [4 /*yield*/, AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + abortSignal: options.abortSignal + })]; + case 1: + header = _d.sent(); + if (!arraysEqual(header, AVRO_INIT_BYTES)) { + throw new Error("Stream is not an Avro file."); + } + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + _a = this; + return [4 /*yield*/, AvroParser.readMap(this._headerStream, AvroParser.readString, { + abortSignal: options.abortSignal + })]; + case 2: + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + _a._metadata = _d.sent(); + codec = this._metadata[AVRO_CODEC_KEY]; + if (!(codec == undefined || codec == "null")) { + throw new Error("Codecs are not supported"); + } + // The 16-byte, randomly-generated sync marker for this file. + _b = this; + return [4 /*yield*/, AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal + })]; + case 3: + // The 16-byte, randomly-generated sync marker for this file. + _b._syncMarker = _d.sent(); + schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); + this._itemType = AvroType.fromSchema(schema); + if (this._blockOffset == 0) { + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + } + _c = this; + return [4 /*yield*/, AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + })]; + case 4: + _c._itemsRemainingInBlock = _d.sent(); + // skip block length + return [4 /*yield*/, AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })]; + case 5: + // skip block length + _d.sent(); + this._initialized = true; + if (!(this._objectIndex && this._objectIndex > 0)) return [3 /*break*/, 9]; + i = 0; + _d.label = 6; + case 6: + if (!(i < this._objectIndex)) return [3 /*break*/, 9]; + return [4 /*yield*/, this._itemType.read(this._dataStream, { abortSignal: options.abortSignal })]; + case 7: + _d.sent(); + this._itemsRemainingInBlock--; + _d.label = 8; + case 8: + i++; + return [3 /*break*/, 6]; + case 9: return [2 /*return*/]; + } + }); + }); + }; + AvroReader.prototype.hasNext = function () { + return !this._initialized || this._itemsRemainingInBlock > 0; + }; + AvroReader.prototype.parseObjects = function (options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function parseObjects_1() { + var result, marker, _a, err_1; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!!this._initialized) return [3 /*break*/, 2]; + return [4 /*yield*/, tslib.__await(this.initialize(options))]; + case 1: + _b.sent(); + _b.label = 2; + case 2: + if (!this.hasNext()) return [3 /*break*/, 13]; + return [4 /*yield*/, tslib.__await(this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }))]; + case 3: + result = _b.sent(); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (!(this._itemsRemainingInBlock == 0)) return [3 /*break*/, 10]; + return [4 /*yield*/, tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal + }))]; + case 4: + marker = _b.sent(); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!arraysEqual(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + _b.label = 5; + case 5: + _b.trys.push([5, 7, , 8]); + _a = this; + return [4 /*yield*/, tslib.__await(AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }))]; + case 6: + _a._itemsRemainingInBlock = _b.sent(); + return [3 /*break*/, 8]; + case 7: + err_1 = _b.sent(); + // We hit the end of the stream. + this._itemsRemainingInBlock = 0; + return [3 /*break*/, 8]; + case 8: + if (!(this._itemsRemainingInBlock > 0)) return [3 /*break*/, 10]; + // Ignore block size + return [4 /*yield*/, tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }))]; + case 9: + // Ignore block size + _b.sent(); + _b.label = 10; + case 10: return [4 /*yield*/, tslib.__await(result)]; + case 11: return [4 /*yield*/, _b.sent()]; + case 12: + _b.sent(); + return [3 /*break*/, 2]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + return AvroReader; +}()); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +var AvroReadable = /** @class */ (function () { + function AvroReadable() { + } + return AvroReadable; +}()); + +// Copyright (c) Microsoft Corporation. +var ABORT_ERROR$1 = new abortController.AbortError("Reading from the avro stream was aborted."); +var AvroReadableFromStream = /** @class */ (function (_super) { + tslib.__extends(AvroReadableFromStream, _super); + function AvroReadableFromStream(readable) { + var _this = _super.call(this) || this; + _this._readable = readable; + _this._position = 0; + return _this; + } + AvroReadableFromStream.prototype.toUint8Array = function (data) { + if (typeof data === "string") { + return Buffer.from(data); + } + return data; + }; + Object.defineProperty(AvroReadableFromStream.prototype, "position", { + get: function () { + return this._position; + }, + enumerable: false, + configurable: true + }); + AvroReadableFromStream.prototype.read = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var chunk; + var _this = this; + return tslib.__generator(this, function (_b) { + if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + throw ABORT_ERROR$1; + } + if (size < 0) { + throw new Error("size parameter should be positive: " + size); + } + if (size === 0) { + return [2 /*return*/, new Uint8Array()]; + } + if (!this._readable.readable) { + throw new Error("Stream no longer readable."); + } + chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.length maybe less than desired size if the stream ends. + return [2 /*return*/, this.toUint8Array(chunk)]; + } + else { + // register callback to wait for enough data to read + return [2 /*return*/, new Promise(function (resolve, reject) { + var cleanUp = function () { + _this._readable.removeListener("readable", readableCallback); + _this._readable.removeListener("error", rejectCallback); + _this._readable.removeListener("end", rejectCallback); + _this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.removeEventListener("abort", abortHandler); + } + }; + var readableCallback = function () { + var chunk = _this._readable.read(size); + if (chunk) { + _this._position += chunk.length; + cleanUp(); + // chunk.length maybe less than desired size if the stream ends. + resolve(_this.toUint8Array(chunk)); + } + }; + var rejectCallback = function () { + cleanUp(); + reject(); + }; + var abortHandler = function () { + cleanUp(); + reject(ABORT_ERROR$1); + }; + _this._readable.on("readable", readableCallback); + _this._readable.once("error", rejectCallback); + _this._readable.once("end", rejectCallback); + _this._readable.once("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.addEventListener("abort", abortHandler); + } + })]; + } + }); + }); + }; + return AvroReadableFromStream; +}(AvroReadable)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. + * + * @class BlobQuickQueryStream + * @extends {Readable} + */ +var BlobQuickQueryStream = /** @class */ (function (_super) { + tslib.__extends(BlobQuickQueryStream, _super); + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQuickQueryStream + */ + function BlobQuickQueryStream(source, options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.source = source; + _this.onProgress = options.onProgress; + _this.onError = options.onError; + _this.avroReader = new AvroReader(new AvroReadableFromStream(_this.source)); + _this.avroIter = _this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + return _this; + } + BlobQuickQueryStream.prototype._read = function () { + var _this = this; + this.readInternal().catch(function (err) { + _this.emit("error", err); + }); + }; + BlobQuickQueryStream.prototype.readInternal = function () { + var e_1, _a; + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, _c, obj, schema, exit, data, bytesScanned, totalBytes, fatal, name_1, description, position, e_1_1; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 5, 6, 11]); + _b = tslib.__asyncValues(this.avroIter); + _d.label = 1; + case 1: return [4 /*yield*/, _b.next()]; + case 2: + if (!(_c = _d.sent(), !_c.done)) return [3 /*break*/, 4]; + obj = _c.value; + schema = obj.$schema; + if (typeof schema !== "string") { + throw Error("Missing schema in avro record."); + } + exit = false; + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + data = obj.data; + if (data instanceof Uint8Array === false) { + throw Error("Invalid data in avro result record."); + } + if (!this.push(Buffer.from(data))) { + exit = true; + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") { + throw Error("Invalid bytesScanned in avro progress record."); + } + if (this.onProgress) { + this.onProgress({ loadedBytes: bytesScanned }); + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") { + throw Error("Invalid totalBytes in avro end record."); + } + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + fatal = obj.fatal; + if (typeof fatal !== "boolean") { + throw Error("Invalid fatal in avro error record."); + } + name_1 = obj.name; + if (typeof name_1 !== "string") { + throw Error("Invalid name in avro error record."); + } + description = obj.description; + if (typeof description !== "string") { + throw Error("Invalid description in avro error record."); + } + position = obj.position; + if (typeof position !== "number") { + throw Error("Invalid position in avro error record."); + } + this.onError({ + position: position, + name: name_1, + isFatal: fatal, + description: description + }); + } + break; + default: + throw Error("Unknown schema " + schema + " in avro progress record."); + } + if (exit) { + return [3 /*break*/, 4]; + } + _d.label = 3; + case 3: return [3 /*break*/, 1]; + case 4: return [3 /*break*/, 11]; + case 5: + e_1_1 = _d.sent(); + e_1 = { error: e_1_1 }; + return [3 /*break*/, 11]; + case 6: + _d.trys.push([6, , 9, 10]); + if (!(_c && !_c.done && (_a = _b.return))) return [3 /*break*/, 8]; + return [4 /*yield*/, _a.call(_b)]; + case 7: + _d.sent(); + _d.label = 8; + case 8: return [3 /*break*/, 10]; + case 9: + if (e_1) throw e_1.error; + return [7 /*endfinally*/]; + case 10: return [7 /*endfinally*/]; + case 11: return [2 /*return*/]; + } + }); + }); + }; + return BlobQuickQueryStream; +}(stream.Readable)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avor data returned by blob query. + * + * @export + * @class BlobQueryResponse + * @implements {BlobDownloadResponseModel} + */ +var BlobQueryResponse = /** @class */ (function () { + /** + * Creates an instance of BlobQueryResponse. + * + * @param {BlobQueryResponseModel} originalResponse + * @param {BlobQuickQueryStreamOptions} [options={}] + * @memberof BlobQueryResponse + */ + function BlobQueryResponse(originalResponse, options) { + if (options === void 0) { options = {}; } + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + } + Object.defineProperty(BlobQueryResponse.prototype, "acceptRanges", { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.acceptRanges; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "cacheControl", { + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.cacheControl; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentDisposition", { + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentDisposition; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentEncoding", { + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentEncoding; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLanguage", { + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLanguage; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobSequenceNumber", { + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobSequenceNumber; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobType", { + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + * @type {(BlobType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentLength", { + /** + * The number of bytes present in the + * response body. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentLength; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentMD5", { + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentRange", { + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentRange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentType", { + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentType; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyCompletedOn", { + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyId", { + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyProgress", { + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyProgress; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copySource", { + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copySource; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatus", { + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + * @type {(CopyStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "copyStatusDescription", { + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.copyStatusDescription; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseDuration", { + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + * @type {(LeaseDurationType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseDuration; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseState", { + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + * @type {(LeaseStateType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseState; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "leaseStatus", { + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + * @type {(LeaseStatusType | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.leaseStatus; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "date", { + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.date; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobCommittedBlockCount", { + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + * @type {(number | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobCommittedBlockCount; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "etag", { + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.etag; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "errorCode", { + /** + * The error code. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.errorCode; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "isServerEncrypted", { + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + * @type {(boolean | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.isServerEncrypted; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobContentMD5", { + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.blobContentMD5; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "lastModified", { + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + * @type {(Date | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.lastModified; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "metadata", { + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + * @type {(Metadata | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.metadata; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "requestId", { + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.requestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "clientRequestId", { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.clientRequestId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "version", { + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.version; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "encryptionKeySha256", { + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + * @type {(string | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.encryptionKeySha256; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "contentCrc64", { + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + * + * @type {(Uint8Array | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse.contentCrc64; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "blobBody", { + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + * @type {(Promise | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "readableStreamBody", { + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + * @type {(NodeJS.ReadableStream | undefined)} + * @memberof BlobQueryResponse + */ + get: function () { + return coreHttp.isNode ? this.blobDownloadStream : undefined; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobQueryResponse.prototype, "_response", { + /** + * The HTTP response. + * + * @type {HttpResponse} + * @memberof BlobQueryResponse + */ + get: function () { + return this.originalResponse._response; + }, + enumerable: false, + configurable: true + }); + return BlobQueryResponse; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + * + * @export + * @class StorageSharedKeyCredentialPolicy + * @extends {CredentialPolicy} + */ +var StorageSharedKeyCredentialPolicy = /** @class */ (function (_super) { + tslib.__extends(StorageSharedKeyCredentialPolicy, _super); + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageSharedKeyCredential} factory + * @memberof StorageSharedKeyCredentialPolicy + */ + function StorageSharedKeyCredentialPolicy(nextPolicy, options, factory) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.factory = factory; + return _this; + } + /** + * Signs request. + * + * @protected + * @param {WebResource} request + * @returns {WebResource} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.signRequest = function (request) { + request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && typeof request.body === "string" && request.body.length > 0) { + request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + var stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, HeaderConstants.DATE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, HeaderConstants.RANGE) + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + var signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(HeaderConstants.AUTHORIZATION, "SharedKey " + this.factory.accountName + ":" + signature); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; + }; + /** + * Retrieve header value according to shared key sign rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @private + * @param {WebResource} request + * @param {string} headerName + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getHeaderValueToSign = function (request, headerName) { + var value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + }; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getCanonicalizedHeadersString = function (request) { + var headersArray = request.headers.headersArray().filter(function (value) { + return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort(function (a, b) { + return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter(function (value, index, array) { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + var canonicalizedHeadersStringToSign = ""; + headersArray.forEach(function (header) { + canonicalizedHeadersStringToSign += header.name + .toLowerCase() + .trimRight() + ":" + header.value.trimLeft() + "\n"; + }); + return canonicalizedHeadersStringToSign; + }; + /** + * Retrieves the webResource canonicalized resource string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + StorageSharedKeyCredentialPolicy.prototype.getCanonicalizedResourceString = function (request) { + var path = getURLPath(request.url) || "/"; + var canonicalizedResourceString = ""; + canonicalizedResourceString += "/" + this.factory.accountName + path; + var queries = getURLQueries(request.url); + var lowercaseQueries = {}; + if (queries) { + var queryKeys = []; + for (var key in queries) { + if (queries.hasOwnProperty(key)) { + var lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (var _i = 0, queryKeys_1 = queryKeys; _i < queryKeys_1.length; _i++) { + var key = queryKeys_1[_i]; + canonicalizedResourceString += "\n" + key + ":" + decodeURIComponent(lowercaseQueries[key]); + } + } + return canonicalizedResourceString; + }; + return StorageSharedKeyCredentialPolicy; +}(CredentialPolicy)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + * + * @export + * @class StorageSharedKeyCredential + * @extends {Credential} + */ +var StorageSharedKeyCredential = /** @class */ (function (_super) { + tslib.__extends(StorageSharedKeyCredential, _super); + /** + * Creates an instance of StorageSharedKeyCredential. + * @param {string} accountName + * @param {string} accountKey + * @memberof StorageSharedKeyCredential + */ + function StorageSharedKeyCredential(accountName, accountKey) { + var _this = _super.call(this) || this; + _this.accountName = accountName; + _this.accountKey = Buffer.from(accountKey, "base64"); + return _this; + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageSharedKeyCredentialPolicy} + * @memberof StorageSharedKeyCredential + */ + StorageSharedKeyCredential.prototype.create = function (nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + }; + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof StorageSharedKeyCredential + */ + StorageSharedKeyCredential.prototype.computeHMACSHA256 = function (stringToSign) { + return crypto.createHmac("sha256", this.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + }; + return StorageSharedKeyCredential; +}(Credential)); + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ +var packageName = "azure-storage-blob"; +var packageVersion = "12.3.0"; +var StorageClientContext = /** @class */ (function (_super) { + tslib.__extends(StorageClientContext, _super); + /** + * Initializes a new instance of the StorageClientContext class. + * @param url The URL of the service account, container, or blob that is the targe of the desired + * operation. + * @param [options] The parameter options + */ + function StorageClientContext(url, options) { + var _this = this; + if (url == undefined) { + throw new Error("'url' cannot be null."); + } + if (!options) { + options = {}; + } + if (!options.userAgent) { + var defaultUserAgent = coreHttp.getDefaultUserAgentValue(); + options.userAgent = packageName + "/" + packageVersion + " " + defaultUserAgent; + } + _this = _super.call(this, undefined, options) || this; + _this.version = "2020-02-10"; + _this.baseUri = "{url}"; + _this.requestContentType = "application/json; charset=utf-8"; + _this.url = url; + return _this; + } + return StorageClientContext; +}(coreHttp.ServiceClient)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +(function (BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; +})(exports.BlockBlobTier || (exports.BlockBlobTier = {})); +(function (PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; +})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {})); +function toAccessTier(tier) { + if (tier == undefined) { + return undefined; + } + return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). +} +function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) { + throw new RangeError("Customer-provided encryption key must be used over HTTPS."); + } + if (cpk && !cpk.encryptionAlgorithm) { + cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + } +} + +/** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response Model PageBlob Range response + */ +function rangeResponseFromModel(response) { + var pageRange = (response._response.parsedBody.pageRange || []).map(function (x) { return ({ + offset: x.start, + count: x.end - x.start + }); }); + var clearRange = (response._response.parsedBody.clearRange || []).map(function (x) { return ({ + offset: x.start, + count: x.end - x.start + }); }); + return tslib.__assign(tslib.__assign({}, response), { pageRange: pageRange, + clearRange: clearRange, _response: tslib.__assign(tslib.__assign({}, response._response), { parsedBody: { + pageRange: pageRange, + clearRange: clearRange + } }) }); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @ignore + */ +var BlobBeginCopyFromUrlPoller = /** @class */ (function (_super) { + tslib.__extends(BlobBeginCopyFromUrlPoller, _super); + function BlobBeginCopyFromUrlPoller(options) { + var _this = this; + var blobClient = options.blobClient, copySource = options.copySource, _a = options.intervalInMs, intervalInMs = _a === void 0 ? 15000 : _a, onProgress = options.onProgress, resumeFrom = options.resumeFrom, startCopyFromURLOptions = options.startCopyFromURLOptions; + var state; + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + var operation = makeBlobBeginCopyFromURLPollOperation(tslib.__assign(tslib.__assign({}, state), { blobClient: blobClient, + copySource: copySource, + startCopyFromURLOptions: startCopyFromURLOptions })); + _this = _super.call(this, operation) || this; + if (typeof onProgress === "function") { + _this.onProgress(onProgress); + } + _this.intervalInMs = intervalInMs; + return _this; + } + BlobBeginCopyFromUrlPoller.prototype.delay = function () { + return coreHttp.delay(this.intervalInMs); + }; + return BlobBeginCopyFromUrlPoller; +}(coreLro.Poller)); +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var cancel = function cancel(options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var state, copyId; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + state = this.state; + copyId = state.copyId; + if (state.isCompleted) { + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + if (!copyId) { + state.isCancelled = true; + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + return [4 /*yield*/, state.blobClient.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal + })]; + case 1: + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + _a.sent(); + state.isCancelled = true; + return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + }); + }); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var update = function update(options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var state, blobClient, copySource, startCopyFromURLOptions, result, result, copyStatus, copyProgress, prevCopyProgress, err_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + state = this.state; + blobClient = state.blobClient, copySource = state.copySource, startCopyFromURLOptions = state.startCopyFromURLOptions; + if (!!state.isStarted) return [3 /*break*/, 2]; + state.isStarted = true; + return [4 /*yield*/, blobClient.startCopyFromURL(copySource, startCopyFromURLOptions)]; + case 1: + result = _a.sent(); + // copyId is needed to abort + state.copyId = result.copyId; + if (result.copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + return [3 /*break*/, 6]; + case 2: + if (!!state.isCompleted) return [3 /*break*/, 6]; + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, state.blobClient.getProperties({ abortSignal: options.abortSignal })]; + case 4: + result = _a.sent(); + copyStatus = result.copyStatus, copyProgress = result.copyProgress; + prevCopyProgress = state.copyProgress; + if (copyProgress) { + state.copyProgress = copyProgress; + } + if (copyStatus === "pending" && + copyProgress !== prevCopyProgress && + typeof options.fireProgress === "function") { + // trigger in setTimeout, or swallow error? + options.fireProgress(state); + } + else if (copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + else if (copyStatus === "failed") { + state.error = new Error("Blob copy failed with reason: \"" + (result.copyStatusDescription || "unknown") + "\""); + state.isCompleted = true; + } + return [3 /*break*/, 6]; + case 5: + err_1 = _a.sent(); + state.error = err_1; + state.isCompleted = true; + return [3 /*break*/, 6]; + case 6: return [2 /*return*/, makeBlobBeginCopyFromURLPollOperation(state)]; + } + }); + }); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @ignore + */ +var toString = function toString() { + return JSON.stringify({ state: this.state }, function (key, value) { + // remove blobClient from serialized state since a client can't be hydrated from this info. + if (key === "blobClient") { + return undefined; + } + return value; + }); +}; +/** + * Creates a poll operation given the provided state. + * @ignore + */ +function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: tslib.__assign({}, state), + cancel: cancel, + toString: toString, + update: update + }; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @export + * @param {Range} iRange + * @returns {string} + */ +function rangeToString(iRange) { + if (iRange.offset < 0) { + throw new RangeError("Range.offset cannot be smaller than 0."); + } + if (iRange.count && iRange.count <= 0) { + throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end."); + } + return iRange.count + ? "bytes=" + iRange.offset + "-" + (iRange.offset + iRange.count - 1) + : "bytes=" + iRange.offset + "-"; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + * + * @export + * @class StorageClient + */ +var StorageClient = /** @class */ (function () { + /** + * Creates an instance of StorageClient. + * @param {string} url url to resource + * @param {Pipeline} pipeline request policy pipeline. + * @memberof StorageClient + */ + function StorageClient(url, pipeline) { + // URL should be encoded and only once, protocol layer shouldn't encode URL again + this.url = escapeURLPath(url); + this.accountName = getAccountNameFromUrl(url); + this.pipeline = pipeline; + this.storageClientContext = new StorageClientContext(this.url, pipeline.toServiceClientOptions()); + this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); + this.credential = new AnonymousCredential(); + for (var _i = 0, _a = this.pipeline.factories; _i < _a.length; _i++) { + var factory = _a[_i]; + if ((coreHttp.isNode && factory instanceof StorageSharedKeyCredential) || + factory instanceof AnonymousCredential || + coreHttp.isTokenCredential(factory)) { + this.credential = factory; + } + } + // Override protocol layer's default content-type + var storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = undefined; + } + return StorageClient; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * States for Batch. + * + * @enum {number} + */ +var BatchStates; +(function (BatchStates) { + BatchStates[BatchStates["Good"] = 0] = "Good"; + BatchStates[BatchStates["Error"] = 1] = "Error"; +})(BatchStates || (BatchStates = {})); +/** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + * + * @export + * @class Batch + */ +var Batch = /** @class */ (function () { + /** + * Creates an instance of Batch. + * @param {number} [concurrency=5] + * @memberof Batch + */ + function Batch(concurrency) { + if (concurrency === void 0) { concurrency = 5; } + /** + * Number of active operations under execution. + * + * @private + * @type {number} + * @memberof Batch + */ + this.actives = 0; + /** + * Number of completed operations under execution. + * + * @private + * @type {number} + * @memberof Batch + */ + this.completed = 0; + /** + * Offset of next operation to be executed. + * + * @private + * @type {number} + * @memberof Batch + */ + this.offset = 0; + /** + * Operation array to be executed. + * + * @private + * @type {Operation[]} + * @memberof Batch + */ + this.operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + * + * @private + * @type {BatchStates} + * @memberof Batch + */ + this.state = BatchStates.Good; + if (concurrency < 1) { + throw new RangeError("concurrency must be larger than 0"); + } + this.concurrency = concurrency; + this.emitter = new events.EventEmitter(); + } + /** + * Add a operation into queue. + * + * @param {Operation} operation + * @memberof Batch + */ + Batch.prototype.addOperation = function (operation) { + var _this = this; + this.operations.push(function () { return tslib.__awaiter(_this, void 0, void 0, function () { + var error_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + this.actives++; + return [4 /*yield*/, operation()]; + case 1: + _a.sent(); + this.actives--; + this.completed++; + this.parallelExecute(); + return [3 /*break*/, 3]; + case 2: + error_1 = _a.sent(); + this.emitter.emit("error", error_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }; + /** + * Start execute operations in the queue. + * + * @returns {Promise} + * @memberof Batch + */ + Batch.prototype.do = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + if (this.operations.length === 0) { + return [2 /*return*/, Promise.resolve()]; + } + this.parallelExecute(); + return [2 /*return*/, new Promise(function (resolve, reject) { + _this.emitter.on("finish", resolve); + _this.emitter.on("error", function (error) { + _this.state = BatchStates.Error; + reject(error); + }); + })]; + }); + }); + }; + /** + * Get next operation to be executed. Return null when reaching ends. + * + * @private + * @returns {(Operation | null)} + * @memberof Batch + */ + Batch.prototype.nextOperation = function () { + if (this.offset < this.operations.length) { + return this.operations[this.offset++]; + } + return null; + }; + /** + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. + * + * @private + * @returns {void} + * @memberof Batch + */ + Batch.prototype.parallelExecute = function () { + if (this.state === BatchStates.Error) { + return; + } + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + var operation = this.nextOperation(); + if (operation) { + operation(); + } + else { + return; + } + } + }; + return Batch; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * This class generates a readable stream from the data in an array of buffers. + * + * @export + * @class BuffersStream + */ +var BuffersStream = /** @class */ (function (_super) { + tslib.__extends(BuffersStream, _super); + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param {Buffer[]} buffers Array of buffers containing the data + * @param {number} byteLength The total length of data contained in the buffers + * @memberof BuffersStream + */ + function BuffersStream(buffers, byteLength, options) { + var _this = _super.call(this, options) || this; + _this.buffers = buffers; + _this.byteLength = byteLength; + _this.byteOffsetInCurrentBuffer = 0; + _this.bufferIndex = 0; + _this.pushedBytesLength = 0; + // check byteLength is no larger than buffers[] total length + var buffersLength = 0; + for (var _i = 0, _a = _this.buffers; _i < _a.length; _i++) { + var buf = _a[_i]; + buffersLength += buf.byteLength; + } + if (buffersLength < _this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + return _this; + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param {number} size Optional. The size of data to be read + * @memberof BuffersStream + */ + BuffersStream.prototype._read = function (size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + var outBuffers = []; + var i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + // The last buffer may be longer than the data it contains. + var remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + var remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + var remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + // chunkSize = size - i + var end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } + else { + // chunkSize = remaining + var end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + // this.buffers[this.bufferIndex] used up, shift to next one + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } + else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } + else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + }; + return BuffersStream; +}(stream.Readable)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * maxBufferLength is max size of each buffer in the pooled buffers. + */ +// Can't use import as Typescript doesn't recognize "buffer". +var maxBufferLength = require("buffer").constants.MAX_LENGTH; +/** + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". + * + * @export + * @class BufferScheduler + */ +var PooledBuffer = /** @class */ (function () { + function PooledBuffer(capacity, buffers, totalLength) { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + * + * @private + * @type {Buffer[]} + * @memberof PooledBuffer + */ + this.buffers = []; + this.capacity = capacity; + this._size = 0; + // allocate + var bufferNum = Math.ceil(capacity / maxBufferLength); + for (var i = 0; i < bufferNum; i++) { + var len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + Object.defineProperty(PooledBuffer.prototype, "size", { + /** + * The size of the data contained in the pooled buffers. + */ + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer + * @param {number} totalLength Total length of the data to be filled in. + * + * @returns {void} + * @memberof PooledBuffer + */ + PooledBuffer.prototype.fill = function (buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + var i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + var source = buffers[i]; + var target = this.buffers[j]; + var copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + // clear copied from source buffers + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + }; + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + * @returns {Readable} + * @memberof PooledBuffer + */ + PooledBuffer.prototype.getReadableStream = function () { + return new BuffersStream(this.buffers, this.size); + }; + return PooledBuffer; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. + * + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. + * + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS <= maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. + * @export + * @class BufferScheduler + */ +var BufferScheduler = /** @class */ (function () { + /** + * Creates an instance of BufferScheduler. + * + * @param {Readable} readable A Node.js Readable stream + * @param {number} bufferSize Buffer size of every maintained buffer + * @param {number} maxBuffers How many buffers can be allocated + * @param {OutgoingHandler} outgoingHandler An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param {number} concurrency Concurrency of executing outgoingHandlers (>0) + * @param {string} [encoding] [Optional] Encoding of Readable stream when it's a string stream + * @memberof BufferScheduler + */ + function BufferScheduler(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + /** + * An internal event emitter. + * + * @private + * @type {EventEmitter} + * @memberof BufferScheduler + */ + this.emitter = new events.EventEmitter(); + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.offset = 0; + /** + * An internal marker to track whether stream is end. + * + * @private + * @type {boolean} + * @memberof BufferScheduler + */ + this.isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + * + * @private + * @type {boolean} + * @memberof BufferScheduler + */ + this.isError = false; + /** + * How many handlers are executing. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.executingOutgoingHandlers = 0; + /** + * How many buffers have been allocated. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + * + * @private + * @type {Buffer[]} + * @memberof BufferScheduler + */ + this.unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + * + * @private + * @type {number} + * @memberof BufferScheduler + */ + this.unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + * + * @private + * @type {PooledBuffer[]} + * @memberof BufferScheduler + */ + this.incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + * + * @private + * @type {PooledBuffer[]} + * @memberof BufferScheduler + */ + this.outgoing = []; + if (bufferSize <= 0) { + throw new RangeError("bufferSize must be larger than 0, current is " + bufferSize); + } + if (maxBuffers <= 0) { + throw new RangeError("maxBuffers must be larger than 0, current is " + maxBuffers); + } + if (concurrency <= 0) { + throw new RangeError("concurrency must be larger than 0, current is " + concurrency); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + * @returns {Promise} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.do = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + _this.readable.on("data", function (data) { + data = typeof data === "string" ? Buffer.from(data, _this.encoding) : data; + _this.appendUnresolvedData(data); + if (!_this.resolveData()) { + _this.readable.pause(); + } + }); + _this.readable.on("error", function (err) { + _this.emitter.emit("error", err); + }); + _this.readable.on("end", function () { + _this.isStreamEnd = true; + _this.emitter.emit("checkEnd"); + }); + _this.emitter.on("error", function (err) { + _this.isError = true; + _this.readable.pause(); + reject(err); + }); + _this.emitter.on("checkEnd", function () { + if (_this.outgoing.length > 0) { + _this.triggerOutgoingHandlers(); + return; + } + if (_this.isStreamEnd && _this.executingOutgoingHandlers === 0) { + if (_this.unresolvedLength > 0 && _this.unresolvedLength < _this.bufferSize) { + var buffer_1 = _this.shiftBufferFromUnresolvedDataArray(); + _this.outgoingHandler(function () { return buffer_1.getReadableStream(); }, buffer_1.size, _this.offset) + .then(resolve) + .catch(reject); + } + else if (_this.unresolvedLength >= _this.bufferSize) { + return; + } + else { + resolve(); + } + } + }); + })]; + }); + }); + }; + /** + * Insert a new data into unresolved array. + * + * @private + * @param {Buffer} data + * @memberof BufferScheduler + */ + BufferScheduler.prototype.appendUnresolvedData = function (data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + }; + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + * @private + * @returns {PooledBuffer} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.shiftBufferFromUnresolvedDataArray = function (buffer) { + if (!buffer) { + buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } + else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + }; + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @private + * @returns {boolean} Return false when buffers in incoming are not enough, else true. + * @memberof BufferScheduler + */ + BufferScheduler.prototype.resolveData = function () { + while (this.unresolvedLength >= this.bufferSize) { + var buffer = void 0; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } + else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } + else { + // No available buffer, wait for buffer returned + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + }; + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + * + * @private + * @memberof BufferScheduler + */ + BufferScheduler.prototype.triggerOutgoingHandlers = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + var buffer; + return tslib.__generator(this, function (_a) { + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return [2 /*return*/]; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + return [2 /*return*/]; + }); + }); + }; + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @private + * @param {Buffer} buffer + * @returns {Promise} + * @memberof BufferScheduler + */ + BufferScheduler.prototype.triggerOutgoingHandler = function (buffer) { + return tslib.__awaiter(this, void 0, void 0, function () { + var bufferLength, err_1; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this.outgoingHandler(function () { return buffer.getReadableStream(); }, bufferLength, this.offset - bufferLength)]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + this.emitter.emit("error", err_1); + return [2 /*return*/]; + case 4: + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + return [2 /*return*/]; + } + }); + }); + }; + /** + * Return buffer used by outgoing handler into incoming. + * + * @private + * @param {Buffer} buffer + * @memberof BufferScheduler + */ + BufferScheduler.prototype.reuseBuffer = function (buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + }; + return BufferScheduler; +}()); + +// Copyright (c) Microsoft Corporation. +/** + * Creates a span using the global tracer. + * @param name The name of the operation being performed. + * @param tracingOptions The options for the underlying http request. + */ +function createSpan(operationName, tracingOptions) { + if (tracingOptions === void 0) { tracingOptions = {}; } + var tracer = coreTracing.getTracer(); + var spanOptions = tslib.__assign(tslib.__assign({}, tracingOptions.spanOptions), { kind: api.SpanKind.INTERNAL }); + var span = tracer.startSpan("Azure.Storage.Blob." + operationName, spanOptions); + span.setAttribute("az.namespace", "Microsoft.Storage"); + var newOptions = tracingOptions.spanOptions || {}; + if (span.isRecording()) { + newOptions = tslib.__assign(tslib.__assign({}, tracingOptions.spanOptions), { parent: span.context(), attributes: tslib.__assign(tslib.__assign({}, spanOptions.attributes), { "az.namespace": "Microsoft.Storage" }) }); + } + return { + span: span, + spanOptions: newOptions + }; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @export + * @param {NodeJS.ReadableStream} stream A Node.js Readable stream + * @param {Buffer} buffer Buffer to be filled, length must >= offset + * @param {number} offset From which position in the buffer to be filled, inclusive + * @param {number} end To which position in the buffer to be filled, exclusive + * @param {string} [encoding] Encoding of the Readable stream + * @returns {Promise} + */ +function streamToBuffer(stream, buffer, offset, end, encoding) { + return tslib.__awaiter(this, void 0, void 0, function () { + var pos, count; + return tslib.__generator(this, function (_a) { + pos = 0; + count = end - offset; + return [2 /*return*/, new Promise(function (resolve, reject) { + stream.on("readable", function () { + if (pos >= count) { + resolve(); + return; + } + var chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + // How much data needed in this chunk + var chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", function () { + if (pos < count) { + reject(new Error("Stream drains before getting enough data needed. Data read: " + pos + ", data need: " + count)); + } + resolve(); + }); + stream.on("error", reject); + })]; + }); + }); +} +/** + * Reads a readable stream into buffer entirely. + * + * @export + * @param {NodeJS.ReadableStream} stream A Node.js Readable stream + * @param {Buffer} buffer Buffer to be filled, length must >= offset + * @param {string} [encoding] Encoding of the Readable stream + * @returns {Promise} with the count of bytes read. + * @throws {RangeError} If buffer size is not big enough. + */ +function streamToBuffer2(stream, buffer, encoding) { + return tslib.__awaiter(this, void 0, void 0, function () { + var pos, bufferSize; + return tslib.__generator(this, function (_a) { + pos = 0; + bufferSize = buffer.length; + return [2 /*return*/, new Promise(function (resolve, reject) { + stream.on("readable", function () { + var chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error("Stream exceeds buffer size. Buffer size: " + bufferSize)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", function () { + resolve(pos); + }); + stream.on("error", reject); + })]; + }); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @export + * @param {NodeJS.ReadableStream} rs The read stream. + * @param {string} file Destination file path. + * @returns {Promise} + */ +function readStreamToLocalFile(rs, file) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + var ws = fs.createWriteStream(file); + rs.on("error", function (err) { + reject(err); + }); + ws.on("error", function (err) { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + })]; + }); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ +var fsStat = util.promisify(fs.stat); +var fsCreateReadStream = fs.createReadStream; + +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + * + * @export + * @class BlobClient + */ +var BlobClient = /** @class */ (function (_super) { + tslib.__extends(BlobClient, _super); + function BlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _a; + var _this = this; + options = options || {}; + var pipeline; + var url; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + (_a = _this.getBlobAndContainerNamesFromUrl(), _this._name = _a.blobName, _this._containerName = _a.containerName); + _this.blobContext = new Blob$1(_this.storageClientContext); + return _this; + } + Object.defineProperty(BlobClient.prototype, "name", { + /** + * The name of the blob. + */ + get: function () { + return this._name; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobClient.prototype, "containerName", { + /** + * The name of the storage container the blob is associated with. + */ + get: function () { + return this._containerName; + }, + enumerable: false, + configurable: true + }); + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp + * @memberof BlobClient + */ + BlobClient.prototype.withSnapshot = function (snapshot) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param {string} versionId The versionId. + * @returns {BlobClient} A new BlobClient object pointing to the version of this blob. + * @memberof BlobClient + */ + BlobClient.prototype.withVersion = function (versionId) { + return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); + }; + /** + * Creates a AppendBlobClient object. + * + * @returns {AppendBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getAppendBlobClient = function () { + return new AppendBlobClient(this.url, this.pipeline); + }; + /** + * Creates a BlockBlobClient object. + * + * @returns {BlockBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getBlockBlobClient = function () { + return new BlockBlobClient(this.url, this.pipeline); + }; + /** + * Creates a PageBlobClient object. + * + * @returns {PageBlobClient} + * @memberof BlobClient + */ + BlobClient.prototype.getPageBlobClient = function () { + return new PageBlobClient(this.url, this.pipeline); + }; + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation. + * @returns {Promise} + * @memberof BlobClient + * + * Example usage (Node.js): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); + * console.log("Downloaded blob content:", downloaded.toString()); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * Example usage (browser): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + * console.log( + * "Downloaded blob content", + * downloaded + * ); + * + * async function blobToString(blob: Blob): Promise { + * const fileReader = new FileReader(); + * return new Promise((resolve, reject) => { + * fileReader.onloadend = (ev: any) => { + * resolve(ev.target!.result); + * }; + * fileReader.onerror = reject; + * fileReader.readAsText(blob); + * }); + * } + * ``` + */ + BlobClient.prototype.download = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res_1, wrappedRes, e_1; + var _this = this; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + _b = createSpan("BlobClient-download", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, + range: offset === 0 && !count ? undefined : rangeToString({ offset: offset, count: count }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: + res_1 = _c.sent(); + wrappedRes = tslib.__assign(tslib.__assign({}, res_1), { _response: res_1._response, objectReplicationDestinationPolicyId: res_1.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res_1.objectReplicationRules) }); + // We support retrying when download stream unexpected ends in Node.js runtime + // Following code shouldn't be bundled into browser build, however some + // bundlers may try to bundle following code and "FileReadResponse.ts". + // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" + // The config is in package.json "browser" field + if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { + // TODO: Default value or make it a required parameter? + options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + } + if (res_1.contentLength === undefined) { + throw new RangeError("File download response doesn't contain valid content length header"); + } + if (!res_1.etag) { + throw new RangeError("File download response doesn't contain valid etag header"); + } + return [2 /*return*/, new BlobDownloadResponse(wrappedRes, function (start) { return tslib.__awaiter(_this, void 0, void 0, function () { + var updatedOptions; + var _a; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + updatedOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res_1.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions + }, + range: rangeToString({ + count: offset + res_1.contentLength - start, + offset: start + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey + }; + return [4 /*yield*/, this.blobContext.download(tslib.__assign({ abortSignal: options.abortSignal }, updatedOptions))]; + case 1: + // Debug purpose only + // console.log( + // `Read from internal stream, range: ${ + // updatedOptions.range + // }, options: ${JSON.stringify(updatedOptions)}` + // ); + return [2 /*return*/, (_b.sent()).readableStreamBody]; + } + }); + }); }, offset, res_1.contentLength, { + abortSignal: options.abortSignal, + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress + })]; + case 3: + e_1 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param {BlobExistsOptions} [options] options to Exists operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.exists = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_2; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-exists", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 2: + _b.sent(); + return [2 /*return*/, true]; + case 3: + e_2 = _b.sent(); + if (e_2.statusCode === 404) { + span.setStatus({ + code: api.CanonicalCode.NOT_FOUND, + message: "Expected exception when checking blob existence" + }); + return [2 /*return*/, false]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.getProperties = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res, e_3; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-getProperties", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + options.conditions = options.conditions || {}; + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: + res = _c.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) })]; + case 3: + e_3 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_3.message + }); + throw e_3; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.delete = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_4; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-delete", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.deleteMethod({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_4 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_4.message + }); + throw e_4; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.deleteIfExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_5; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("BlobClient-deleteIfExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.delete(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_5 = _d.sent(); + if (((_a = e_5.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { + span.setStatus({ + code: api.CanonicalCode.NOT_FOUND, + message: "Expected exception when deleting a blob or snapshot only if it exists." + }); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: false }, (_b = e_5.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_5.response })]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_5.message + }); + throw e_5; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * + * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.undelete = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_6; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-undelete", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.undelete({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_6 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_6.message + }); + throw e_6; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setHTTPHeaders = function (blobHTTPHeaders, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_7; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setHTTPHeaders", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.setHTTPHeaders({ + abortSignal: options.abortSignal, + blobHTTPHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_7 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_7.message + }); + throw e_7; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setMetadata = function (metadata, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_8; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setMetadata", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_8 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_8.message + }); + throw e_8; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param {Tags} tags + * @param {BlobSetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setTags = function (tags, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_9; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setTags", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.setTags({ + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions, + tags: toBlobTags(tags) + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_9 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_9.message + }); + throw e_9; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the tags associated with the underlying blob. + * + * @param {BlobGetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.getTags = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, response, wrappedResponse, e_10; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-getTags", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.getTags({ + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _c.sent(); + wrappedResponse = tslib.__assign(tslib.__assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_10 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_10.message + }); + throw e_10; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob. + * @memberof BlobClient + */ + BlobClient.prototype.getBlobLeaseClient = function (proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + }; + /** + * Creates a read-only snapshot of a blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * + * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.createSnapshot = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_11; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-createSnapshot", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_11 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_11.message + }); + throw e_11; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * Example using automatic polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using manual polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * while (!poller.isDone()) { + * await poller.poll(); + * } + * const result = copyPoller.getResult(); + * ``` + * + * Example using progress updates: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * } + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using a changing polling interval (default 15 seconds): + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * intervalInMs: 1000 // poll blob every 1 second for copy progress + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using copy cancellation: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // cancel operation after starting it. + * try { + * await copyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * await copyPoller.getResult(); + * } catch (err) { + * if (err.name === 'PollerCancelledError') { + * console.log('The copy was cancelled.'); + * } + * } + * ``` + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + */ + BlobClient.prototype.beginCopyFromURL = function (copySource, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var client, poller; + var _this = this; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + client = { + abortCopyFromURL: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.abortCopyFromURL.apply(_this, args); + }, + getProperties: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.getProperties.apply(_this, args); + }, + startCopyFromURL: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return _this.startCopyFromURL.apply(_this, args); + } + }; + poller = new BlobBeginCopyFromUrlPoller({ + blobClient: client, + copySource: copySource, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options + }); + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + return [4 /*yield*/, poller.poll()]; + case 1: + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + _a.sent(); + return [2 /*return*/, poller]; + } + }); + }); + }; + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * + * @param {string} copyId Id of the Copy From URL operation. + * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.abortCopyFromURL = function (copyId, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_12; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-abortCopyFromURL", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_12 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_12.message + }); + throw e_12; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * + * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param {BlobSyncCopyFromURLOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.syncCopyFromURL = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_13; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-syncCopyFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.copyFromURL(copySource, { + abortSignal: options.abortSignal, + metadata: options.metadata, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + sourceContentMD5: options.sourceContentMD5, + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_13 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_13.message + }); + throw e_13; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * + * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.setAccessTier = function (tier, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_14; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-setAccessTier", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.setTier(toAccessTier(tier), { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + rehydratePriority: options.rehydratePriority, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_14 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_14.message + }); + throw e_14; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BlobClient.prototype.downloadToBuffer = function (param1, param2, param3, param4) { + if (param4 === void 0) { param4 = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var buffer, offset, count, options, _a, span, spanOptions, response, transferProgress_1, batch, _loop_1, off, e_15; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + offset = 0; + count = 0; + options = param4; + if (param1 instanceof Buffer) { + buffer = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; + } + else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; + } + _a = createSpan("BlobClient-downloadToBuffer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + if (!options.blockSize) { + options.blockSize = 0; + } + if (options.blockSize < 0) { + throw new RangeError("blockSize option must be >= 0"); + } + if (options.blockSize === 0) { + options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + if (offset < 0) { + throw new RangeError("offset option must be >= 0"); + } + if (count && count <= 0) { + throw new RangeError("count option must be > 0"); + } + if (!options.conditions) { + options.conditions = {}; + } + if (!!count) return [3 /*break*/, 3]; + return [4 /*yield*/, this.getProperties(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + count = response.contentLength - offset; + if (count < 0) { + throw new RangeError("offset " + offset + " shouldn't be larger than blob size " + response.contentLength); + } + _b.label = 3; + case 3: + // Allocate the buffer of size = count if the buffer is not provided + if (!buffer) { + try { + buffer = Buffer.alloc(count); + } + catch (error) { + throw new Error("Unable to allocate the buffer of size: " + count + "(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\t " + error.message); + } + } + if (buffer.length < count) { + throw new RangeError("The buffer's size should be equal to or larger than the request count of bytes: " + count); + } + transferProgress_1 = 0; + batch = new Batch(options.concurrency); + _loop_1 = function (off) { + batch.addOperation(function () { return tslib.__awaiter(_this, void 0, void 0, function () { + var chunkEnd, response, stream; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + chunkEnd = offset + count; + if (off + options.blockSize < chunkEnd) { + chunkEnd = off + options.blockSize; + } + return [4 /*yield*/, this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + response = _a.sent(); + stream = response.readableStreamBody; + return [4 /*yield*/, streamToBuffer(stream, buffer, off - offset, chunkEnd - offset)]; + case 2: + _a.sent(); + // Update progress after block is downloaded, in case of block trying + // Could provide finer grained progress updating inside HTTP requests, + // only if convenience layer download try is enabled + transferProgress_1 += chunkEnd - off; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress_1 }); + } + return [2 /*return*/]; + } + }); + }); }); + }; + for (off = offset; off < offset + count; off = off + options.blockSize) { + _loop_1(off); + } + return [4 /*yield*/, batch.do()]; + case 4: + _b.sent(); + return [2 /*return*/, buffer]; + case 5: + e_15 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_15.message + }); + throw e_15; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param {string} filePath + * @param {number} [offset] From which position of the block blob to download. + * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined. + * @param {BlobDownloadOptions} [options] Options to Blob download options. + * @returns {Promise} The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + * @memberof BlobClient + */ + BlobClient.prototype.downloadToFile = function (filePath, offset, count, options) { + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, e_16; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobClient-downloadToFile", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + return [4 /*yield*/, this.download(offset, count, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + if (!response.readableStreamBody) return [3 /*break*/, 4]; + return [4 /*yield*/, readStreamToLocalFile(response.readableStreamBody, filePath)]; + case 3: + _b.sent(); + _b.label = 4; + case 4: + // The stream is no longer accessible so setting it to undefined. + response.blobDownloadStream = undefined; + return [2 /*return*/, response]; + case 5: + e_16 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_16.message + }); + throw e_16; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + BlobClient.prototype.getBlobAndContainerNamesFromUrl = function () { + var containerName; + var blobName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` + // http://localhost:10001/devstoreaccount1/containername/blob + var parsedUrl = coreHttp.URLBuilder.parse(this.url); + if (parsedUrl.getHost().split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername/blob". + // .getPath() -> /containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob + // .getPath() -> /devstoreaccount1/containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } + else { + // "https://customdomain.com/containername/blob". + // .getPath() -> /containername/blob + var pathComponents = parsedUrl.getPath().match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + // decode the encoded blobName, containerName - to get all the special characters that might be present in them + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + // Azure Storage Server will replace "\" with "/" in the blob names + // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName + blobName = blobName.replace(/\\/g, "/"); + if (!blobName) { + throw new Error("Provided blobName is invalid."); + } + else if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return { blobName: blobName, containerName: containerName }; + } + catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } + }; + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + BlobClient.prototype.startCopyFromURL = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_17; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlobClient-startCopyFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blobContext.startCopyFromURL(copySource, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions + }, + rehydratePriority: options.rehydratePriority, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + sealBlob: options.sealBlob, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_17 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_17.message + }); + throw e_17; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobClient; +}(StorageClient)); +/** + * AppendBlobClient defines a set of operations applicable to append blobs. + * + * @export + * @class AppendBlobClient + * @extends {BlobClient} + */ +var AppendBlobClient = /** @class */ (function (_super) { + tslib.__extends(AppendBlobClient, _super); + function AppendBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + // The second parameter is undefined. Use anonymous credential. + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.appendBlobContext = new AppendBlob(_this.storageClientContext); + return _this; + } + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.withSnapshot = function (snapshot) { + return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const appendBlobClient = containerClient.getAppendBlobClient(""); + * await appendBlobClient.create(); + * ``` + */ + AppendBlobClient.prototype.create = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_18; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-create", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_18 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_18.message + }); + throw e_18; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.createIfNotExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, conditions, res, e_19; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("AppendBlobClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + conditions = { ifNoneMatch: ETagAny }; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.create(tslib.__assign(tslib.__assign({}, options), { conditions: conditions, tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_19 = _d.sent(); + if (((_a = e_19.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { + span.setStatus({ + code: api.CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a blob only if it does not already exist." + }); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: false }, (_b = e_19.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_19.response })]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_19.message + }); + throw e_19; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Seals the append blob, making it read only. + * + * @param {AppendBlobSealOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.seal = function (options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_20; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-seal", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_20 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_20.message + }); + throw e_20; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * + * @param {HttpRequestBody} body Data to be appended. + * @param {number} contentLength Length of the body in bytes. + * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + AppendBlobClient.prototype.appendBlock = function (body, contentLength, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_21; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-appendBlock", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.appendBlock(body, contentLength, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_21 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_21.message + }); + throw e_21; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * + * @param {string} sourceURL + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param {number} sourceOffset Offset in source to be appended + * @param {number} count Number of bytes to be appended as a block + * @param {AppendBlobAppendBlockFromURLOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + AppendBlobClient.prototype.appendBlockFromURL = function (sourceURL, sourceOffset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_22; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("AppendBlobClient-appendBlockFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: rangeToString({ offset: sourceOffset, count: count }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_22 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_22.message + }); + throw e_22; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return AppendBlobClient; +}(BlobClient)); +/** + * BlockBlobClient defines a set of operations applicable to block blobs. + * + * @export + * @class BlockBlobClient + * @extends {BlobClient} + */ +var BlockBlobClient = /** @class */ (function (_super) { + tslib.__extends(BlockBlobClient, _super); + function BlockBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.blockBlobContext = new BlockBlob(_this.storageClientContext); + _this._blobContext = new Blob$1(_this.storageClientContext); + return _this; + } + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.withSnapshot = function (snapshot) { + return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); + * console.log("Query blob content:", downloaded); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param {string} query + * @param {BlockBlobQueryOptions} [options={}] + * @returns {Promise} + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.query = function (query, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, response, e_23; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + _b = createSpan("BlockBlobClient-query", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + expression: query, + inputSerialization: toQuerySerialization(options.inputTextConfiguration), + outputSerialization: toQuerySerialization(options.outputTextConfiguration) + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _c.sent(); + return [2 /*return*/, new BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError + })]; + case 3: + e_23 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_23.message + }); + throw e_23; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation. + * @returns {Promise} Response data for the Block Blob Upload operation. + * @memberof BlockBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + BlockBlobClient.prototype.upload = function (body, contentLength, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_24; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("BlockBlobClient-upload", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.upload(body, contentLength, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_24 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_24.message + }); + throw e_24; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {HttpRequestBody} body Data to upload to the staging area. + * @param {number} contentLength Number of bytes to upload. + * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation. + * @returns {Promise} Response data for the Block Blob Stage Block operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.stageBlock = function (blockId, body, contentLength, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_25; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-stageBlock", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.stageBlock(blockId, contentLength, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + onUploadProgress: options.onProgress, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_25 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_25.message + }); + throw e_25; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {string} sourceURL Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation. + * @returns {Promise} Response data for the Block Blob Stage Block From URL operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.stageBlockFromURL = function (blockId, sourceURL, offset, count, options) { + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_26; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-stageBlockFromURL", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset: offset, count: count }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_26 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_26.message + }); + throw e_26; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * + * @param {string[]} blocks Array of 64-byte value that is base64-encoded + * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation. + * @returns {Promise} Response data for the Block Blob Commit Block List operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.commitBlockList = function (blocks, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_27; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("BlockBlobClient-commitBlockList", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.blockBlobContext.commitBlockList({ latest: blocks }, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_27 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_27.message + }); + throw e_27; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * + * @param {BlockListType} listType Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation. + * @returns {Promise} Response data for the Block Blob Get Block List operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.getBlockList = function (listType, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, res, e_28; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("BlockBlobClient-getBlockList", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.blockBlobContext.getBlockList(listType, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + res = _c.sent(); + if (!res.committedBlocks) { + res.committedBlocks = []; + } + if (!res.uncommittedBlocks) { + res.uncommittedBlocks = []; + } + return [2 /*return*/, res]; + case 3: + e_28 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_28.message + }); + throw e_28; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + // High level functions + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @export + * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] + * @returns {Promise} + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadData = function (data, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, buffer_1, browserBlob_1; + return tslib.__generator(this, function (_b) { + _a = createSpan("BlockBlobClient-uploadData", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + try { + if (true) { + if (data instanceof Buffer) { + buffer_1 = data; + } + else if (data instanceof ArrayBuffer) { + buffer_1 = Buffer.from(data); + } + else { + data = data; + buffer_1 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return [2 /*return*/, this.uploadSeekableInternal(function (offset, size) { return buffer_1.slice(offset, offset + size); }, buffer_1.byteLength, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + } + else { + browserBlob_1 = new Blob([data]); + return [2 /*return*/, this.uploadSeekableInternal(function (offset, size) { return browserBlob_1.slice(offset, offset + size); }, browserBlob_1.size, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + } + } + catch (e) { + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e.message + }); + throw e; + } + finally { + span.end(); + } + return [2 /*return*/]; + }); + }); + }; + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * @deprecated Use {@link uploadData} instead. + * + * @export + * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadBrowserData = function (browserData, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, browserBlob_2, e_29; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-uploadBrowserData", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + browserBlob_2 = new Blob([browserData]); + return [4 /*yield*/, this.uploadSeekableInternal(function (offset, size) { return browserBlob_2.slice(offset, offset + size); }, browserBlob_2.size, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_29 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_29.message + }); + throw e_29; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory + * @param {number} size size of the data to upload. + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadSeekableInternal = function (bodyFactory, size, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, numBlocks_1, blockList_1, blockIDPrefix_1, transferProgress_2, batch, _loop_2, i, e_30; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.blockSize) { + options.blockSize = 0; + } + if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError("blockSize option must be >= 0 and <= " + BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES); + } + if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) { + options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + } + if (options.maxSingleShotSize < 0 || + options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError("maxSingleShotSize option must be >= 0 and <= " + BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES); + } + if (options.blockSize === 0) { + if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(size + " is too larger to upload to a block blob."); + } + if (size > options.maxSingleShotSize) { + options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); + if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + } + } + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("BlockBlobClient-uploadSeekableInternal", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 7]); + if (!(size <= options.maxSingleShotSize)) return [3 /*break*/, 3]; + return [4 /*yield*/, this.upload(bodyFactory(0, size), size, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + numBlocks_1 = Math.floor((size - 1) / options.blockSize) + 1; + if (numBlocks_1 > BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError("The buffer's size is too big or the BlockSize is too small;" + + ("the number of blocks must be <= " + BLOCK_BLOB_MAX_BLOCKS)); + } + blockList_1 = []; + blockIDPrefix_1 = coreHttp.generateUuid(); + transferProgress_2 = 0; + batch = new Batch(options.concurrency); + _loop_2 = function (i) { + batch.addOperation(function () { return tslib.__awaiter(_this, void 0, void 0, function () { + var blockID, start, end, contentLength; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + blockID = generateBlockID(blockIDPrefix_1, i); + start = options.blockSize * i; + end = i === numBlocks_1 - 1 ? size : start + options.blockSize; + contentLength = end - start; + blockList_1.push(blockID); + return [4 /*yield*/, this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + _a.sent(); + // Update progress after block is successfully uploaded to server, in case of block trying + // TODO: Hook with convenience layer progress event in finer level + transferProgress_2 += contentLength; + if (options.onProgress) { + options.onProgress({ + loadedBytes: transferProgress_2 + }); + } + return [2 /*return*/]; + } + }); + }); }); + }; + for (i = 0; i < numBlocks_1; i++) { + _loop_2(i); + } + return [4 /*yield*/, batch.do()]; + case 4: + _b.sent(); + return [2 /*return*/, this.commitBlockList(blockList_1, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 5: + e_30 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_30.message + }); + throw e_30; + case 6: + span.end(); + return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param {string} filePath Full path of local file + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {(Promise)} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadFile = function (filePath, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, size, e_31; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlockBlobClient-uploadFile", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + return [4 /*yield*/, fsStat(filePath)]; + case 2: + size = (_b.sent()).size; + return [4 /*yield*/, this.uploadSeekableInternal(function (offset, count) { + return function () { + return fsCreateReadStream(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset + }); + }; + }, size, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 3: return [2 /*return*/, _b.sent()]; + case 4: + e_31 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_31.message + }); + throw e_31; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param {Readable} stream Node.js Readable stream + * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + BlockBlobClient.prototype.uploadStream = function (stream, bufferSize, maxConcurrency, options) { + if (bufferSize === void 0) { bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES; } + if (maxConcurrency === void 0) { maxConcurrency = 5; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blockNum_1, blockIDPrefix_2, transferProgress_3, blockList_2, scheduler, e_32; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("BlockBlobClient-uploadStream", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + blockNum_1 = 0; + blockIDPrefix_2 = coreHttp.generateUuid(); + transferProgress_3 = 0; + blockList_2 = []; + scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, function (body, length) { return tslib.__awaiter(_this, void 0, void 0, function () { + var blockID; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + blockID = generateBlockID(blockIDPrefix_2, blockNum_1); + blockList_2.push(blockID); + blockNum_1++; + return [4 /*yield*/, this.stageBlock(blockID, body, length, { + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 1: + _a.sent(); + // Update progress after block is successfully uploaded to server, in case of block trying + transferProgress_3 += length; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress_3 }); + } + return [2 /*return*/]; + } + }); + }); }, + // concurrency should set a smaller value than maxConcurrency, which is helpful to + // reduce the possibility when a outgoing handler waits for stream data, in + // this situation, outgoing handlers are blocked. + // Outgoing queue shouldn't be empty. + Math.ceil((maxConcurrency / 4) * 3)); + return [4 /*yield*/, scheduler.do()]; + case 2: + _b.sent(); + return [4 /*yield*/, this.commitBlockList(blockList_2, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 3: return [2 /*return*/, _b.sent()]; + case 4: + e_32 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_32.message + }); + throw e_32; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + return BlockBlobClient; +}(BlobClient)); +/** + * PageBlobClient defines a set of operations applicable to page blobs. + * + * @export + * @class PageBlobClient + * @extends {BlobClient} + */ +var PageBlobClient = /** @class */ (function (_super) { + tslib.__extends(PageBlobClient, _super); + function PageBlobClient(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { + var _this = this; + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var blobName = blobNameOrOptions; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + _this = _super.call(this, url, pipeline) || this; + _this.pageBlobContext = new PageBlob(_this.storageClientContext); + return _this; + } + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.withSnapshot = function (snapshot) { + return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + }; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation. + * @returns {Promise} Response data for the Page Blob Create operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.create = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_33; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-create", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHTTPHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tier: toAccessTier(options.tier), + blobTagsString: toBlobTagsString(options.tags), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_33 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_33.message + }); + throw e_33; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof PageBlobClient + */ + PageBlobClient.prototype.createIfNotExists = function (size, options) { + var _a, _b; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, conditions, res, e_34; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("PageBlobClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + conditions = { ifNoneMatch: ETagAny }; + return [4 /*yield*/, this.create(size, tslib.__assign(tslib.__assign({}, options), { conditions: conditions, tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_34 = _d.sent(); + if (((_a = e_34.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { + span.setStatus({ + code: api.CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a blob only if it does not already exist." + }); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: false }, (_b = e_34.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_34.response })]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_34.message + }); + throw e_34; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {HttpRequestBody} body Data to upload + * @param {number} offset Offset of destination page blob + * @param {number} count Content length of the body, also number of bytes to be uploaded + * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation. + * @returns {Promise} Response data for the Page Blob Upload Pages operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.uploadPages = function (body, offset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_35; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-uploadPages", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.uploadPages(body, count, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + onUploadProgress: options.onProgress, + range: rangeToString({ offset: offset, count: count }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_35 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_35.message + }); + throw e_35; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * + * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param {number} destOffset Offset of destination page blob + * @param {number} count Number of bytes to be uploaded from source page blob + * @param {PageBlobUploadPagesFromURLOptions} [options={}] + * @returns {Promise} + * @memberof PageBlobClient + */ + PageBlobClient.prototype.uploadPagesFromURL = function (sourceURL, sourceOffset, destOffset, count, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_36; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + _b = createSpan("PageBlobClient-uploadPagesFromURL", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + return [4 /*yield*/, this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count: count }), 0, rangeToString({ offset: destOffset, count: count }), { + abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_36 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_36.message + }); + throw e_36; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Frees the specified pages from the page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {number} [offset] Starting byte position of the pages to clear. + * @param {number} [count] Number of bytes to clear. + * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation. + * @returns {Promise} Response data for the Page Blob Clear Pages operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.clearPages = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_37; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-clearPages", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.clearPages(0, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + range: rangeToString({ offset: offset, count: count }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_37 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_37.message + }); + throw e_37; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} [offset] Starting byte position of the page ranges. + * @param {number} [count] Number of bytes to get. + * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation. + * @returns {Promise} Response data for the Page Blob Get Ranges operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRanges = function (offset, count, options) { + var _a; + if (offset === void 0) { offset = 0; } + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_38; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-getPageRanges", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_38 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_38.message + }); + throw e_38; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRangesDiff = function (offset, count, prevSnapshot, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_39; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-getPageRangesDiff", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + prevsnapshot: prevSnapshot, + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_39 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_39.message + }); + throw e_39; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.getPageRangesDiffForManagedDisks = function (offset, count, prevSnapshotUrl, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_40; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext + .getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + prevSnapshotUrl: prevSnapshotUrl, + range: rangeToString({ offset: offset, count: count }), + spanOptions: spanOptions + }) + .then(rangeResponseFromModel)]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_40 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_40.message + }); + throw e_40; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param {number} size Target size + * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation. + * @returns {Promise} Response data for the Page Blob Resize operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.resize = function (size, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_41; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-resize", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + encryptionScope: options.encryptionScope, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_41 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_41.message + }); + throw e_41; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets a page blob's sequence number. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number. + * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update + * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation. + * @returns {Promise} Response data for the Page Blob Update Sequence Number operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.updateSequenceNumber = function (sequenceNumberAction, sequenceNumber, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_42; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _b = createSpan("PageBlobClient-updateSequenceNumber", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_42 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_42.message + }); + throw e_42; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * + * @param {string} copySource Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation. + * @returns {Promise} Response data for the Page Blob Copy Incremental operation. + * @memberof PageBlobClient + */ + PageBlobClient.prototype.startCopyIncremental = function (copySource, options) { + var _a; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _b, span, spanOptions, e_43; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + _b = createSpan("PageBlobClient-startCopyIncremental", options.tracingOptions), span = _b.span, spanOptions = _b.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.pageBlobContext.copyIncremental(copySource, { + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_43 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_43.message + }); + throw e_43; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return PageBlobClient; +}(BlobClient)); +/** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + * + * @export + * @class BlobLeaseClient + */ +var BlobLeaseClient = /** @class */ (function () { + /** + * Creates an instance of BlobLeaseClient. + * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests. + * @param {string} leaseId Initial proposed lease id. + * @memberof BlobLeaseClient + */ + function BlobLeaseClient(client, leaseId) { + var clientContext = new StorageClientContext(client.url, client.pipeline.toServiceClientOptions()); + this._url = client.url; + if (client instanceof ContainerClient) { + this._isContainer = true; + this._containerOrBlobOperation = new Container(clientContext); + } + else { + this._isContainer = false; + this._containerOrBlobOperation = new Blob$1(clientContext); + } + if (!leaseId) { + leaseId = coreHttp.generateUuid(); + } + this._leaseId = leaseId; + } + Object.defineProperty(BlobLeaseClient.prototype, "leaseId", { + /** + * Gets the lease Id. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get: function () { + return this._leaseId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(BlobLeaseClient.prototype, "url", { + /** + * Gets the url. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get: function () { + return this._url; + }, + enumerable: false, + configurable: true + }); + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1) + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for acquire lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.acquireLease = function (duration, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_44; + return tslib.__generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-acquireLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration: duration, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + proposedLeaseId: this._leaseId, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_44 = _h.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_44.message + }); + throw e_44; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To change the ID of the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {string} proposedLeaseId the proposed new lease Id. + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for change lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.changeLease = function (proposedLeaseId, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, response, e_45; + return tslib.__generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-changeLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: + response = _h.sent(); + this._leaseId = proposedLeaseId; + return [2 /*return*/, response]; + case 3: + e_45 = _h.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_45.message + }); + throw e_45; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for release lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.releaseLease = function (options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_46; + return tslib.__generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-releaseLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_46 = _h.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_46.message + }); + throw e_46; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To renew the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations. + * @returns {Promise} Response data for renew lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.renewLease = function (options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, e_47; + return tslib.__generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-renewLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_47 = _h.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_47.message + }); + throw e_47; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @static + * @param {number} breakPeriod Break period + * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations. + * @returns {Promise} Response data for break lease operation. + * @memberof BlobLeaseClient + */ + BlobLeaseClient.prototype.breakLease = function (breakPeriod, options) { + var _a, _b, _c, _d, _e, _f; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _g, span, spanOptions, operationOptions, e_48; + return tslib.__generator(this, function (_h) { + switch (_h.label) { + case 0: + _g = createSpan("BlobLeaseClient-breakLease", options.tracingOptions), span = _g.span, spanOptions = _g.spanOptions; + if (this._isContainer && + ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || + (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + _h.label = 1; + case 1: + _h.trys.push([1, 3, 4, 5]); + operationOptions = { + abortSignal: options.abortSignal, + breakPeriod: breakPeriod, + modifiedAccessConditions: tslib.__assign(tslib.__assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), + spanOptions: spanOptions + }; + return [4 /*yield*/, this._containerOrBlobOperation.breakLease(operationOptions)]; + case 2: return [2 /*return*/, _h.sent()]; + case 3: + e_48 = _h.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_48.message + }); + throw e_48; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobLeaseClient; +}()); +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + * + * @export + * @class ContainerClient + */ +var ContainerClient = /** @class */ (function (_super) { + tslib.__extends(ContainerClient, _super); + function ContainerClient(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { + var _this = this; + var pipeline; + var url; + options = options || {}; + if (credentialOrPipelineOrContainerName instanceof Pipeline) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + var containerName = credentialOrPipelineOrContainerName; + var extractedCreds = extractConnectionStringParts(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + pipeline = newPipeline(sharedKeyCredential, options); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + + "?" + + extractedCreds.accountSas; + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName parameter"); + } + _this = _super.call(this, url, pipeline) || this; + _this._containerName = _this.getContainerNameFromUrl(); + _this.containerContext = new Container(_this.storageClientContext); + return _this; + } + Object.defineProperty(ContainerClient.prototype, "containerName", { + /** + * The name of the container. + */ + get: function () { + return this._containerName; + }, + enumerable: false, + configurable: true + }); + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] Options to Container Create operation. + * @returns {Promise} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + ContainerClient.prototype.create = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_49; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-create", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.create(tslib.__assign(tslib.__assign({}, options), { spanOptions: spanOptions }))]; + case 2: + // Spread operator in destructuring assignments, + // this will filter out unwanted properties from the response object into result object + return [2 /*return*/, _b.sent()]; + case 3: + e_49 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_49.message + }); + throw e_49; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.createIfNotExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_50; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("ContainerClient-createIfNotExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.create(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_50 = _d.sent(); + if (((_a = e_50.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { + span.setStatus({ + code: api.CanonicalCode.ALREADY_EXISTS, + message: "Expected exception when creating a container only if it does not already exist." + }); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: false }, (_b = e_50.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_50.response })]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_50.message + }); + throw e_50; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param {ContainerExistsOptions} [options={}] + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.exists = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_51; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-exists", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) + })]; + case 2: + _b.sent(); + return [2 /*return*/, true]; + case 3: + e_51 = _b.sent(); + if (e_51.statusCode === 404) { + span.setStatus({ + code: api.CanonicalCode.NOT_FOUND, + message: "Expected exception when checking container existence" + }); + return [2 /*return*/, false]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_51.message + }); + throw e_51; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a {@link BlobClient} + * + * @param {string} blobName A blob name + * @returns {BlobClient} A new BlobClient object for the given blob name. + * @memberof ContainerClient + */ + ContainerClient.prototype.getBlobClient = function (blobName) { + return new BlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates an {@link AppendBlobClient} + * + * @param {string} blobName An append blob name + * @returns {AppendBlobClient} + * @memberof ContainerClient + */ + ContainerClient.prototype.getAppendBlobClient = function (blobName) { + return new AppendBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates a {@link BlockBlobClient} + * + * @param {string} blobName A block blob name + * @returns {BlockBlobClient} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * + * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + ContainerClient.prototype.getBlockBlobClient = function (blobName) { + return new BlockBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Creates a {@link PageBlobClient} + * + * @param {string} blobName A page blob name + * @returns {PageBlobClient} + * @memberof ContainerClient + */ + ContainerClient.prototype.getPageBlobClient = function (blobName) { + return new PageBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + }; + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.getProperties = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_52; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-getProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.getProperties(tslib.__assign(tslib.__assign({ abortSignal: options.abortSignal }, options.conditions), { spanOptions: spanOptions }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_52 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_52.message + }); + throw e_52; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.delete = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_53; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-delete", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.deleteMethod({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_53 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_53.message + }); + throw e_53; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.deleteIfExists = function (options) { + var _a, _b; + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _c, span, spanOptions, res, e_54; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _c = createSpan("ContainerClient-deleteIfExists", options.tracingOptions), span = _c.span, spanOptions = _c.spanOptions; + _d.label = 1; + case 1: + _d.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.delete(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + res = _d.sent(); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable + })]; + case 3: + e_54 = _d.sent(); + if (((_a = e_54.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { + span.setStatus({ + code: api.CanonicalCode.NOT_FOUND, + message: "Expected exception when deleting a container only if it exists." + }); + return [2 /*return*/, tslib.__assign(tslib.__assign({ succeeded: false }, (_b = e_54.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e_54.response })]; + } + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_54.message + }); + throw e_54; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.setMetadata = function (metadata, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_55; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + if (options.conditions.ifUnmodifiedSince) { + throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + } + _a = createSpan("ContainerClient-setMetadata", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: metadata, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_55 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_55.message + }); + throw e_55; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * + * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.getAccessPolicy = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, res, _i, response_1, identifier, accessPolicy, e_56; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!options.conditions) { + options.conditions = {}; + } + _a = createSpan("ContainerClient-getAccessPolicy", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: + response = _b.sent(); + res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version + }; + for (_i = 0, response_1 = response; _i < response_1.length; _i++) { + identifier = response_1[_i]; + accessPolicy = undefined; + if (identifier.accessPolicy) { + accessPolicy = { + permissions: identifier.accessPolicy.permissions + }; + if (identifier.accessPolicy.expiresOn) { + accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + } + if (identifier.accessPolicy.startsOn) { + accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + } + res.signedIdentifiers.push({ + accessPolicy: accessPolicy, + id: identifier.id + }); + } + return [2 /*return*/, res]; + case 3: + e_56 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_56.message + }); + throw e_56; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * + * @param {PublicAccessType} [access] The level of public access to data in the container. + * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy. + * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.setAccessPolicy = function (access, containerAcl, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, acl, _i, _b, identifier, e_57; + return tslib.__generator(this, function (_c) { + switch (_c.label) { + case 0: + options.conditions = options.conditions || {}; + _a = createSpan("ContainerClient-setAccessPolicy", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _c.label = 1; + case 1: + _c.trys.push([1, 3, 4, 5]); + acl = []; + for (_i = 0, _b = containerAcl || []; _i < _b.length; _i++) { + identifier = _b[_i]; + acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn + ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) + : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn + ? truncatedISO8061Date(identifier.accessPolicy.startsOn) + : "" + }, + id: identifier.id + }); + } + return [4 /*yield*/, this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access: access, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _c.sent()]; + case 3: + e_57 = _c.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_57.message + }); + throw e_57; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container. + * @memberof ContainerClient + */ + ContainerClient.prototype.getBlobLeaseClient = function (proposeLeaseId) { + return new BlobLeaseClient(this, proposeLeaseId); + }; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {string} blobName Name of the block blob to create or update. + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation. + * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance. + * @memberof ContainerClient + */ + ContainerClient.prototype.uploadBlockBlob = function (blobName, body, contentLength, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blockBlobClient, response, e_58; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-uploadBlockBlob", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + blockBlobClient = this.getBlockBlobClient(blobName); + return [4 /*yield*/, blockBlobClient.upload(body, contentLength, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + response = _b.sent(); + return [2 /*return*/, { + blockBlobClient: blockBlobClient, + response: response + }]; + case 3: + e_58 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_58.message + }); + throw e_58; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {string} blobName + * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation. + * @returns {Promise} Block blob deletion response data. + * @memberof ContainerClient + */ + ContainerClient.prototype.deleteBlob = function (blobName, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, blobClient, e_59; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-deleteBlob", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + blobClient = this.getBlobClient(blobName); + if (options.versionId) { + blobClient = blobClient.withVersion(options.versionId); + } + return [4 /*yield*/, blobClient.delete(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_59 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_59.message + }); + throw e_59; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobFlatSegment = function (marker, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, wrappedResponse, e_60; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-listBlobFlatSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.listBlobFlatSegment(tslib.__assign(tslib.__assign({ marker: marker }, options), { spanOptions: spanOptions }))]; + case 2: + response = _b.sent(); + wrappedResponse = tslib.__assign(tslib.__assign({}, response), { _response: response._response, segment: tslib.__assign(tslib.__assign({}, response.segment), { blobItems: response.segment.blobItems.map(function (blobItemInteral) { + var blobItem = tslib.__assign(tslib.__assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); + return blobItem; + }) }) }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_60 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_60.message + }); + throw e_60; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobHierarchySegment = function (delimiter, marker, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, wrappedResponse, e_61; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("ContainerClient-listBlobHierarchySegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.containerContext.listBlobHierarchySegment(delimiter, tslib.__assign(tslib.__assign({ marker: marker }, options), { spanOptions: spanOptions }))]; + case 2: + response = _b.sent(); + wrappedResponse = tslib.__assign(tslib.__assign({}, response), { _response: response._response, segment: tslib.__assign(tslib.__assign({}, response.segment), { blobItems: response.segment.blobItems.map(function (blobItemInteral) { + var blobItem = tslib.__assign(tslib.__assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); + return blobItem; + }) }) }); + return [2 /*return*/, wrappedResponse]; + case 3: + e_61 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_61.message + }); + throw e_61; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listSegments = function (marker, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listSegments_1() { + var listBlobsFlatSegmentResponse; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, tslib.__await(this.listBlobFlatSegment(marker, options))]; + case 2: + listBlobsFlatSegmentResponse = _a.sent(); + marker = listBlobsFlatSegmentResponse.continuationToken; + return [4 /*yield*/, tslib.__await(listBlobsFlatSegmentResponse)]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @private + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listItems = function (options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listItems_1() { + var marker, _a, _b, listBlobsFlatSegmentResponse, e_62_1; + var e_62, _c; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = tslib.__asyncValues(this.listSegments(marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, tslib.__await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + listBlobsFlatSegmentResponse = _b.value; + return [5 /*yield**/, tslib.__values(tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)))]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_62_1 = _d.sent(); + e_62 = { error: e_62_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, tslib.__await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_62) throw e_62.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * // Get the containerClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("");` + * let i = 1; + * for await (const blob of containerClient.listBlobsFlat()) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = containerClient.listBlobsFlat(); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobsFlat = function (options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + var include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + var updatedOptions = tslib.__assign(tslib.__assign({}, options), (include.length > 0 ? { include: include } : {})); + // AsyncIterableIterator to iterate over blobs + var iter = this.listItems(updatedOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listSegments(settings.continuationToken, tslib.__assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + }, + _a; + }; + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + ContainerClient.prototype.listHierarchySegments = function (delimiter, marker, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listHierarchySegments_1() { + var listBlobsHierarchySegmentResponse; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options))]; + case 2: + listBlobsHierarchySegmentResponse = _a.sent(); + marker = listBlobsHierarchySegmentResponse.continuationToken; + return [4 /*yield*/, tslib.__await(listBlobsHierarchySegmentResponse)]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator<{ kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem>} + * @memberof ContainerClient + */ + ContainerClient.prototype.listItemsByHierarchy = function (delimiter, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listItemsByHierarchy_1() { + var marker, _a, _b, listBlobsHierarchySegmentResponse, segment, _i, _c, prefix, _d, _e, blob, e_63_1; + var e_63, _f; + return tslib.__generator(this, function (_g) { + switch (_g.label) { + case 0: + _g.trys.push([0, 14, 15, 20]); + _a = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)); + _g.label = 1; + case 1: return [4 /*yield*/, tslib.__await(_a.next())]; + case 2: + if (!(_b = _g.sent(), !_b.done)) return [3 /*break*/, 13]; + listBlobsHierarchySegmentResponse = _b.value; + segment = listBlobsHierarchySegmentResponse.segment; + if (!segment.blobPrefixes) return [3 /*break*/, 7]; + _i = 0, _c = segment.blobPrefixes; + _g.label = 3; + case 3: + if (!(_i < _c.length)) return [3 /*break*/, 7]; + prefix = _c[_i]; + return [4 /*yield*/, tslib.__await(tslib.__assign({ kind: "prefix" }, prefix))]; + case 4: return [4 /*yield*/, _g.sent()]; + case 5: + _g.sent(); + _g.label = 6; + case 6: + _i++; + return [3 /*break*/, 3]; + case 7: + _d = 0, _e = segment.blobItems; + _g.label = 8; + case 8: + if (!(_d < _e.length)) return [3 /*break*/, 12]; + blob = _e[_d]; + return [4 /*yield*/, tslib.__await(tslib.__assign({ kind: "blob" }, blob))]; + case 9: return [4 /*yield*/, _g.sent()]; + case 10: + _g.sent(); + _g.label = 11; + case 11: + _d++; + return [3 /*break*/, 8]; + case 12: return [3 /*break*/, 1]; + case 13: return [3 /*break*/, 20]; + case 14: + e_63_1 = _g.sent(); + e_63 = { error: e_63_1 }; + return [3 /*break*/, 20]; + case 15: + _g.trys.push([15, , 18, 19]); + if (!(_b && !_b.done && (_f = _a.return))) return [3 /*break*/, 17]; + return [4 /*yield*/, tslib.__await(_f.call(_a))]; + case 16: + _g.sent(); + _g.label = 17; + case 17: return [3 /*break*/, 19]; + case 18: + if (e_63) throw e_63.error; + return [7 /*endfinally*/]; + case 19: return [7 /*endfinally*/]; + case 20: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * Example using `for await` syntax: + * + * ```js + * for await (const item of containerClient.listBlobsByHierarchy("/")) { + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); + * let entity = await iter.next(); + * while (!entity.done) { + * let item = entity.value; + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * entity = await iter.next(); + * } + * ```js + * + * Example using `byPage()`: + * + * ```js + * console.log("Listing blobs by hierarchy by page"); + * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { + * const segment = response.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * Example using paging with a max page size: + * + * ```js + * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * + * let i = 1; + * for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { + * console.log(`Page ${i++}`); + * const segment = response.segment; + * + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation. + * @returns {(PagedAsyncIterableIterator< + * { kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem, + * ContainerListBlobHierarchySegmentResponse + * >)} + * @memberof ContainerClient + */ + ContainerClient.prototype.listBlobsByHierarchy = function (delimiter, options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + if (delimiter === "") { + throw new RangeError("delimiter should contain one or more characters"); + } + var include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + var updatedOptions = tslib.__assign(tslib.__assign({}, options), (include.length > 0 ? { include: include } : {})); + // AsyncIterableIterator to iterate over blob prefixes and blobs + var iter = this.listItemsByHierarchy(delimiter, updatedOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + return [2 /*return*/, iter.next()]; + }); + }); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listHierarchySegments(delimiter, settings.continuationToken, tslib.__assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + }, + _a; + }; + ContainerClient.prototype.getContainerNameFromUrl = function () { + var containerName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` + // http://localhost:10001/devstoreaccount1/containername + var parsedUrl = coreHttp.URLBuilder.parse(this.url); + if (parsedUrl.getHost().split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername". + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.getPath().split("/")[1]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername + // .getPath() -> /devstoreaccount1/containername + containerName = parsedUrl.getPath().split("/")[2]; + } + else { + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.getPath().split("/")[1]; + } + // decode the encoded containerName - to get all the special characters that might be present in it + containerName = decodeURIComponent(containerName); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return containerName; + } + catch (error) { + throw new Error("Unable to extract containerName with provided information."); + } + }; + return ContainerClient; +}(StorageClient)); + +function getBodyAsText(batchResponse) { + return tslib.__awaiter(this, void 0, void 0, function () { + var buffer, responseLength; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); + return [4 /*yield*/, streamToBuffer2(batchResponse.readableStreamBody, buffer)]; + case 1: + responseLength = _a.sent(); + // Slice the buffer to trim the empty ending. + buffer = buffer.slice(0, responseLength); + return [2 /*return*/, buffer.toString()]; + } + }); + }); +} +function utf8ByteLength(str) { + return Buffer.byteLength(str); +} + +var HTTP_HEADER_DELIMITER = ": "; +var SPACE_DELIMITER = " "; +var NOT_FOUND = -1; +/** + * Util class for parsing batch response. + */ +var BatchResponseParser = /** @class */ (function () { + function BatchResponseParser(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) { + // In special case(reported), server may return invalid content-type which could not be parsed. + throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); + } + if (!subRequests || subRequests.size === 0) { + // This should be prevent during coding. + throw new RangeError("Invalid state: subRequests is not provided or size is 0."); + } + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = "--" + this.responseBatchBoundary + HTTP_LINE_ENDING; + this.batchResponseEnding = "--" + this.responseBatchBoundary + "--"; + } + // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + BatchResponseParser.prototype.parseBatchResponse = function () { + return tslib.__awaiter(this, void 0, void 0, function () { + var responseBodyAsText, subResponses, subResponseCount, deserializedSubResponses, subResponsesSucceededCount, subResponsesFailedCount, index, subResponse, deserializedSubResponse, responseLines, subRespHeaderStartFound, subRespHeaderEndFound, subRespFailed, contentId, _i, responseLines_1, responseLine, tokens, tokens; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse + // sub request's response. + if (this.batchResponse._response.status != HTTPURLConnection.HTTP_ACCEPTED) { + throw new Error("Invalid state: batch request failed with status: '" + this.batchResponse._response.status + "'."); + } + return [4 /*yield*/, getBodyAsText(this.batchResponse)]; + case 1: + responseBodyAsText = _a.sent(); + subResponses = responseBodyAsText + .split(this.batchResponseEnding)[0] // string after ending is useless + .split(this.perResponsePrefix) + .slice(1); + subResponseCount = subResponses.length; + // Defensive coding in case of potential error parsing. + // Note: subResponseCount == 1 is special case where sub request is invalid. + // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. + // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. + if (subResponseCount != this.subRequests.size && subResponseCount != 1) { + throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); + } + deserializedSubResponses = new Array(subResponseCount); + subResponsesSucceededCount = 0; + subResponsesFailedCount = 0; + // Parse sub subResponses. + for (index = 0; index < subResponseCount; index++) { + subResponse = subResponses[index]; + deserializedSubResponses[index] = {}; + deserializedSubResponse = deserializedSubResponses[index]; + deserializedSubResponse.headers = new coreHttp.HttpHeaders(); + responseLines = subResponse.split("" + HTTP_LINE_ENDING); + subRespHeaderStartFound = false; + subRespHeaderEndFound = false; + subRespFailed = false; + contentId = NOT_FOUND; + for (_i = 0, responseLines_1 = responseLines; _i < responseLines_1.length; _i++) { + responseLine = responseLines_1[_i]; + if (!subRespHeaderStartFound) { + // Convention line to indicate content ID + if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + } + // Http version line with status code indicates the start of sub request's response. + // Example: HTTP/1.1 202 Accepted + if (responseLine.startsWith(HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * + } + if (responseLine.trim() === "") { + // Sub response's header start line already found, and the first empty line indicates header end line found. + if (!subRespHeaderEndFound) { + subRespHeaderEndFound = true; + } + continue; // Skip empty line + } + // Note: when code reach here, it indicates subRespHeaderStartFound == true + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { + // Defensive coding to prevent from missing valuable lines. + throw new Error("Invalid state: find non-empty line '" + responseLine + "' without HTTP header delimiter '" + HTTP_HEADER_DELIMITER + "'."); + } + tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } + else { + // Assemble body of sub response. + if (!deserializedSubResponse.bodyAsText) { + deserializedSubResponse.bodyAsText = ""; + } + deserializedSubResponse.bodyAsText += responseLine; + } + } // Inner for end + if (contentId != NOT_FOUND) { + deserializedSubResponse._request = this.subRequests.get(contentId); + } + if (subRespFailed) { + subResponsesFailedCount++; + } + else { + subResponsesSucceededCount++; + } + } + return [2 /*return*/, { + subResponses: deserializedSubResponses, + subResponsesSucceededCount: subResponsesSucceededCount, + subResponsesFailedCount: subResponsesFailedCount + }]; + } + }); + }); + }; + return BatchResponseParser; +}()); + +var MutexLockStatus; +(function (MutexLockStatus) { + MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; +})(MutexLockStatus || (MutexLockStatus = {})); +/** + * An async mutex lock. + * + * @export + * @class Mutex + */ +var Mutex = /** @class */ (function () { + function Mutex() { + } + /** + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. + * + * @static + * @param {string} key lock key + * @returns {Promise} + * @memberof Mutex + */ + Mutex.lock = function (key) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve) { + if (_this.keys[key] === undefined || _this.keys[key] === MutexLockStatus.UNLOCKED) { + _this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } + else { + _this.onUnlockEvent(key, function () { + _this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + } + })]; + }); + }); + }; + /** + * Unlock a key. + * + * @static + * @param {string} key + * @returns {Promise} + * @memberof Mutex + */ + Mutex.unlock = function (key) { + return tslib.__awaiter(this, void 0, void 0, function () { + var _this = this; + return tslib.__generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve) { + if (_this.keys[key] === MutexLockStatus.LOCKED) { + _this.emitUnlockEvent(key); + } + delete _this.keys[key]; + resolve(); + })]; + }); + }); + }; + Mutex.onUnlockEvent = function (key, handler) { + if (this.listeners[key] === undefined) { + this.listeners[key] = [handler]; + } + else { + this.listeners[key].push(handler); + } + }; + Mutex.emitUnlockEvent = function (key) { + var _this = this; + if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { + var handler_1 = this.listeners[key].shift(); + setImmediate(function () { + handler_1.call(_this); + }); + } + }; + Mutex.keys = {}; + Mutex.listeners = {}; + return Mutex; +}()); + +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + * + * @export + * @class BlobBatch + */ +var BlobBatch = /** @class */ (function () { + function BlobBatch() { + this.batch = "batch"; + this.batchRequest = new InnerBatchRequest(); + } + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + BlobBatch.prototype.getMultiPartContentType = function () { + return this.batchRequest.getMultipartContentType(); + }; + /** + * Get assembled HTTP request body for sub requests. + */ + BlobBatch.prototype.getHttpRequestBody = function () { + return this.batchRequest.getHttpRequestBody(); + }; + /** + * Get sub requests that are added into the batch request. + */ + BlobBatch.prototype.getSubRequests = function () { + return this.batchRequest.getSubRequests(); + }; + BlobBatch.prototype.addSubRequestInternal = function (subRequest, assembleSubRequestFunc) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Mutex.lock(this.batch)]; + case 1: + _a.sent(); + _a.label = 2; + case 2: + _a.trys.push([2, , 4, 6]); + this.batchRequest.preAddSubRequest(subRequest); + return [4 /*yield*/, assembleSubRequestFunc()]; + case 3: + _a.sent(); + this.batchRequest.postAddSubRequest(subRequest); + return [3 /*break*/, 6]; + case 4: return [4 /*yield*/, Mutex.unlock(this.batch)]; + case 5: + _a.sent(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + BlobBatch.prototype.setBatchType = function (batchType) { + if (!this.batchType) { + this.batchType = batchType; + } + if (this.batchType !== batchType) { + throw new RangeError("BlobBatch only supports one operation type per batch and it already is being used for " + this.batchType + " operations."); + } + }; + BlobBatch.prototype.deleteBlob = function (urlOrBlobClient, credentialOrOptions, options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var url, credential, _a, span, spanOptions, e_1; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (typeof urlOrBlobClient === "string" && + ((coreHttp.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) || + credentialOrOptions instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrOptions))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrOptions; + } + else if (urlOrBlobClient instanceof BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + _a = createSpan("BatchDeleteRequest-addSubRequest", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + this.setBatchType("delete"); + return [4 /*yield*/, this.addSubRequestInternal({ + url: url, + credential: credential + }, function () { return tslib.__awaiter(_this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); })]; + case 2: + _b.sent(); + return [3 /*break*/, 5]; + case 3: + e_1 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + BlobBatch.prototype.setBlobAccessTier = function (urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var url, credential, tier, _a, span, spanOptions, e_2; + var _this = this; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (typeof urlOrBlobClient === "string" && + ((coreHttp.isNode && credentialOrTier instanceof StorageSharedKeyCredential) || + credentialOrTier instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrTier))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrTier; + tier = tierOrOptions; + } + else if (urlOrBlobClient instanceof BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier = credentialOrTier; + options = tierOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + _a = createSpan("BatchSetTierRequest-addSubRequest", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + this.setBatchType("setAccessTier"); + return [4 /*yield*/, this.addSubRequestInternal({ + url: url, + credential: credential + }, function () { return tslib.__awaiter(_this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); })]; + case 2: + _b.sent(); + return [3 /*break*/, 5]; + case 3: + e_2 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + return BlobBatch; +}()); +/** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ +var InnerBatchRequest = /** @class */ (function () { + function InnerBatchRequest() { + this.operationCount = 0; + this.body = ""; + var tempGuid = coreHttp.generateUuid(); + // batch_{batchid} + this.boundary = "batch_" + tempGuid; + // --batch_{batchid} + // Content-Type: application/http + // Content-Transfer-Encoding: binary + this.subRequestPrefix = "--" + this.boundary + HTTP_LINE_ENDING + HeaderConstants.CONTENT_TYPE + ": application/http" + HTTP_LINE_ENDING + HeaderConstants.CONTENT_TRANSFER_ENCODING + ": binary"; + // multipart/mixed; boundary=batch_{batchid} + this.multipartContentType = "multipart/mixed; boundary=" + this.boundary; + // --batch_{batchid}-- + this.batchRequestEnding = "--" + this.boundary + "--"; + this.subRequests = new Map(); + } + /** + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + InnerBatchRequest.prototype.createPipeline = function (credential) { + var isAnonymousCreds = credential instanceof AnonymousCredential; + var policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory] + var factories = new Array(policyFactoryLength); + factories[0] = coreHttp.deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer + factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers + if (!isAnonymousCreds) { + factories[2] = coreHttp.isTokenCredential(credential) + ? coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes) + : credential; + } + factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire + return new Pipeline(factories, {}); + }; + InnerBatchRequest.prototype.appendSubRequestToBody = function (request) { + // Start to assemble sub request + this.body += [ + this.subRequestPrefix, + HeaderConstants.CONTENT_ID + ": " + this.operationCount, + "", + request.method.toString() + " " + getURLPathAndQuery(request.url) + " " + HTTP_VERSION_1_1 + HTTP_LINE_ENDING // sub request start line with method + ].join(HTTP_LINE_ENDING); + for (var _i = 0, _a = request.headers.headersArray(); _i < _a.length; _i++) { + var header = _a[_i]; + this.body += header.name + ": " + header.value + HTTP_LINE_ENDING; + } + this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line + // No body to assemble for current batch request support + // End to assemble sub request + }; + InnerBatchRequest.prototype.preAddSubRequest = function (subRequest) { + if (this.operationCount >= BATCH_MAX_REQUEST) { + throw new RangeError("Cannot exceed " + BATCH_MAX_REQUEST + " sub requests in a single batch"); + } + // Fast fail if url for sub request is invalid + var path = getURLPath(subRequest.url); + if (!path || path == "") { + throw new RangeError("Invalid url for sub request: '" + subRequest.url + "'"); + } + }; + InnerBatchRequest.prototype.postAddSubRequest = function (subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + }; + // Return the http request body with assembling the ending line to the sub request body. + InnerBatchRequest.prototype.getHttpRequestBody = function () { + return "" + this.body + this.batchRequestEnding + HTTP_LINE_ENDING; + }; + InnerBatchRequest.prototype.getMultipartContentType = function () { + return this.multipartContentType; + }; + InnerBatchRequest.prototype.getSubRequests = function () { + return this.subRequests; + }; + return InnerBatchRequest; +}()); +var BatchRequestAssemblePolicy = /** @class */ (function (_super) { + tslib.__extends(BatchRequestAssemblePolicy, _super); + function BatchRequestAssemblePolicy(batchRequest, nextPolicy, options) { + var _this = _super.call(this, nextPolicy, options) || this; + _this.dummyResponse = { + request: new coreHttp.WebResource(), + status: 200, + headers: new coreHttp.HttpHeaders() + }; + _this.batchRequest = batchRequest; + return _this; + } + BatchRequestAssemblePolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.batchRequest.appendSubRequestToBody(request)]; + case 1: + _a.sent(); + return [2 /*return*/, this.dummyResponse]; // Intercept request from going to wire + } + }); + }); + }; + return BatchRequestAssemblePolicy; +}(coreHttp.BaseRequestPolicy)); +var BatchRequestAssemblePolicyFactory = /** @class */ (function () { + function BatchRequestAssemblePolicyFactory(batchRequest) { + this.batchRequest = batchRequest; + } + BatchRequestAssemblePolicyFactory.prototype.create = function (nextPolicy, options) { + return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options); + }; + return BatchRequestAssemblePolicyFactory; +}()); +var BatchHeaderFilterPolicy = /** @class */ (function (_super) { + tslib.__extends(BatchHeaderFilterPolicy, _super); + function BatchHeaderFilterPolicy(nextPolicy, options) { + return _super.call(this, nextPolicy, options) || this; + } + BatchHeaderFilterPolicy.prototype.sendRequest = function (request) { + return tslib.__awaiter(this, void 0, void 0, function () { + var xMsHeaderName, _i, _a, header; + return tslib.__generator(this, function (_b) { + xMsHeaderName = ""; + for (_i = 0, _a = request.headers.headersArray(); _i < _a.length; _i++) { + header = _a[_i]; + if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) { + xMsHeaderName = header.name; + } + } + if (xMsHeaderName !== "") { + request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header. + } + return [2 /*return*/, this._nextPolicy.sendRequest(request)]; + }); + }); + }; + return BatchHeaderFilterPolicy; +}(coreHttp.BaseRequestPolicy)); +var BatchHeaderFilterPolicyFactory = /** @class */ (function () { + function BatchHeaderFilterPolicyFactory() { + } + BatchHeaderFilterPolicyFactory.prototype.create = function (nextPolicy, options) { + return new BatchHeaderFilterPolicy(nextPolicy, options); + }; + return BatchHeaderFilterPolicyFactory; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + */ +var BlobBatchClient = /** @class */ (function () { + function BlobBatchClient(url, credentialOrPipeline, options) { + var pipeline; + if (credentialOrPipeline instanceof Pipeline) { + pipeline = credentialOrPipeline; + } + else if (!credentialOrPipeline) { + // no credential provided + pipeline = newPipeline(new AnonymousCredential(), options); + } + else { + pipeline = newPipeline(credentialOrPipeline, options); + } + var storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions()); + this._serviceContext = new Service(storageClientContext); + } + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + BlobBatchClient.prototype.createBatch = function () { + return new BlobBatch(); + }; + BlobBatchClient.prototype.deleteBlobs = function (urlsOrBlobClients, credentialOrOptions, options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var batch, _i, urlsOrBlobClients_1, urlOrBlobClient; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + batch = new BlobBatch(); + _i = 0, urlsOrBlobClients_1 = urlsOrBlobClients; + _a.label = 1; + case 1: + if (!(_i < urlsOrBlobClients_1.length)) return [3 /*break*/, 6]; + urlOrBlobClient = urlsOrBlobClients_1[_i]; + if (!(typeof urlOrBlobClient === "string")) return [3 /*break*/, 3]; + return [4 /*yield*/, batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options)]; + case 2: + _a.sent(); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, batch.deleteBlob(urlOrBlobClient, credentialOrOptions)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + _i++; + return [3 /*break*/, 1]; + case 6: return [2 /*return*/, this.submitBatch(batch)]; + } + }); + }); + }; + BlobBatchClient.prototype.setBlobsAccessTier = function (urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { + return tslib.__awaiter(this, void 0, void 0, function () { + var batch, _i, urlsOrBlobClients_2, urlOrBlobClient; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + batch = new BlobBatch(); + _i = 0, urlsOrBlobClients_2 = urlsOrBlobClients; + _a.label = 1; + case 1: + if (!(_i < urlsOrBlobClients_2.length)) return [3 /*break*/, 6]; + urlOrBlobClient = urlsOrBlobClients_2[_i]; + if (!(typeof urlOrBlobClient === "string")) return [3 /*break*/, 3]; + return [4 /*yield*/, batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options)]; + case 2: + _a.sent(); + return [3 /*break*/, 5]; + case 3: return [4 /*yield*/, batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions)]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + _i++; + return [3 /*break*/, 1]; + case 6: return [2 /*return*/, this.submitBatch(batch)]; + } + }); + }); + }; + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob(urlInString0, credential0); + * await batchRequest.deleteBlob(urlInString1, credential1, { + * deleteSnapshots: "include" + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); + * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { + * conditions: { leaseId: leaseId } + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @param {BlobBatch} batchRequest A set of Delete or SetTier operations. + * @param {BlobBatchSubmitBatchOptionalParams} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + BlobBatchClient.prototype.submitBatch = function (batchRequest, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, batchRequestBody, rawBatchResponse, batchResponseParser, responseSummary, res, e_1; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!batchRequest || batchRequest.getSubRequests().size == 0) { + throw new RangeError("Batch request should contain one or more sub requests."); + } + _a = createSpan("BlobBatchClient-submitBatch", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 4, 5, 6]); + batchRequestBody = batchRequest.getHttpRequestBody(); + return [4 /*yield*/, this._serviceContext.submitBatch(batchRequestBody, utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), tslib.__assign(tslib.__assign({}, options), { spanOptions: spanOptions }))]; + case 2: + rawBatchResponse = _b.sent(); + batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + return [4 /*yield*/, batchResponseParser.parseBatchResponse()]; + case 3: + responseSummary = _b.sent(); + res = { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount + }; + return [2 /*return*/, res]; + case 4: + e_1 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 5: + span.end(); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + return BlobBatchClient; +}()); + +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + * + * @export + * @class BlobServiceClient + */ +var BlobServiceClient = /** @class */ (function (_super) { + tslib.__extends(BlobServiceClient, _super); + function BlobServiceClient(url, credentialOrPipeline, options) { + var _this = this; + var pipeline; + if (credentialOrPipeline instanceof Pipeline) { + pipeline = credentialOrPipeline; + } + else if ((coreHttp.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) || + credentialOrPipeline instanceof AnonymousCredential || + coreHttp.isTokenCredential(credentialOrPipeline)) { + pipeline = newPipeline(credentialOrPipeline, options); + } + else { + // The second parameter is undefined. Use anonymous credential + pipeline = newPipeline(new AnonymousCredential(), options); + } + _this = _super.call(this, url, pipeline) || this; + _this.serviceContext = new Service(_this.storageClientContext); + return _this; + } + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + */ + BlobServiceClient.fromConnectionString = function (connectionString, options) { + options = options || {}; + var extractedCreds = extractConnectionStringParts(connectionString); + if (extractedCreds.kind === "AccountConnString") { + { + var sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); + var pipeline = newPipeline(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } + } + else if (extractedCreds.kind === "SASConnString") { + var pipeline = newPipeline(new AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + }; + /** + * Creates a {@link ContainerClient} object + * + * @param {string} containerName A container name + * @returns {ContainerClient} A new ContainerClient object for the given container name. + * @memberof BlobServiceClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + BlobServiceClient.prototype.getContainerClient = function (containerName) { + return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + }; + /** + * Create a Blob container. + * + * @param {string} containerName Name of the container to create. + * @param {ContainerCreateOptions} [options] Options to configure Container Create operation. + * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.createContainer = function (containerName, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, containerCreateResponse, e_1; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-createContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(containerName); + return [4 /*yield*/, containerClient.create(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + containerCreateResponse = _b.sent(); + return [2 /*return*/, { + containerClient: containerClient, + containerCreateResponse: containerCreateResponse + }]; + case 3: + e_1 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_1.message + }); + throw e_1; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Deletes a Blob container. + * + * @param {string} containerName Name of the container to delete. + * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.deleteContainer = function (containerName, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, e_2; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-deleteContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(containerName); + return [4 /*yield*/, containerClient.delete(tslib.__assign(tslib.__assign({}, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_2 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_2.message + }); + throw e_2; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param {string} deletedContainerName Name of the previously deleted container. + * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.undeleteContainer = function (deletedContainerName, deletedContainerVersion, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, containerClient, containerContext, containerUndeleteResponse, e_3; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-undeleteContainer", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); + containerContext = new Container(containerClient["storageClientContext"]); + return [4 /*yield*/, containerContext.restore(tslib.__assign(tslib.__assign({ deletedContainerName: deletedContainerName, + deletedContainerVersion: deletedContainerVersion }, options), { tracingOptions: tslib.__assign(tslib.__assign({}, options.tracingOptions), { spanOptions: spanOptions }) }))]; + case 2: + containerUndeleteResponse = _b.sent(); + return [2 /*return*/, { containerClient: containerClient, containerUndeleteResponse: containerUndeleteResponse }]; + case 3: + e_3 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_3.message + }); + throw e_3; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation. + * @returns {Promise} Response data for the Service Get Properties operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getProperties = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_4; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_4 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_4.message + }); + throw e_4; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties} + * + * @param {BlobServiceProperties} properties + * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation. + * @returns {Promise} Response data for the Service Set Properties operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.setProperties = function (properties, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_5; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-setProperties", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_5 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_5.message + }); + throw e_5; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats} + * + * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation. + * @returns {Promise} Response data for the Service Get Statistics operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getStatistics = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_6; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getStatistics", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_6 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_6.message + }); + throw e_6; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation. + * @returns {Promise} Response data for the Service Get Account Info operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getAccountInfo = function (options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_7; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getAccountInfo", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_7 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_7.message + }); + throw e_7; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns a list of the containers under the specified account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation. + * @returns {Promise} Response data for the Service List Container Segment operation. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listContainersSegment = function (marker, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_8; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-listContainersSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.listContainersSegment(tslib.__assign(tslib.__assign({ abortSignal: options.abortSignal, marker: marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, spanOptions: spanOptions }))]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_8 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_8.message + }); + throw e_8; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {Promise} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsSegment = function (tagFilterSqlExpression, marker, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, e_9; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-findBlobsByTagsSegment", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker: marker, + maxPageSize: options.maxPageSize, + spanOptions: spanOptions + })]; + case 2: return [2 /*return*/, _b.sent()]; + case 3: + e_9 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_9.message + }); + throw e_9; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsSegments = function (tagFilterSqlExpression, marker, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function findBlobsByTagsSegments_1() { + var response; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 6]; + _a.label = 1; + case 1: return [4 /*yield*/, tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options))]; + case 2: + response = _a.sent(); + response.blobs = response.blobs || []; + marker = response.continuationToken; + return [4 /*yield*/, tslib.__await(response)]; + case 3: return [4 /*yield*/, _a.sent()]; + case 4: + _a.sent(); + _a.label = 5; + case 5: + if (marker) return [3 /*break*/, 1]; + _a.label = 6; + case 6: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTagsItems = function (tagFilterSqlExpression, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function findBlobsByTagsItems_1() { + var marker, _a, _b, segment, e_10_1; + var e_10, _c; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, tslib.__await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + segment = _b.value; + return [5 /*yield**/, tslib.__values(tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)))]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_10_1 = _d.sent(); + e_10 = { error: e_10_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, tslib.__await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_10) throw e_10.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags. + * @returns {PagedAsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.findBlobsByTags = function (tagFilterSqlExpression, options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + // AsyncIterableIterator to iterate over blobs + var listSegmentOptions = tslib.__assign({}, options); + var iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, tslib.__assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + }, + _a; + }; + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listSegments = function (marker, options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listSegments_1() { + var listContainersSegmentResponse; + return tslib.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(!!marker || marker === undefined)) return [3 /*break*/, 7]; + _a.label = 1; + case 1: return [4 /*yield*/, tslib.__await(this.listContainersSegment(marker, options))]; + case 2: + listContainersSegmentResponse = _a.sent(); + listContainersSegmentResponse.containerItems = + listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + return [4 /*yield*/, tslib.__await(listContainersSegmentResponse)]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_a.sent()])]; + case 4: return [4 /*yield*/, _a.sent()]; + case 5: + _a.sent(); + _a.label = 6; + case 6: + if (marker) return [3 /*break*/, 1]; + _a.label = 7; + case 7: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an AsyncIterableIterator for Container Items + * + * @private + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listItems = function (options) { + if (options === void 0) { options = {}; } + return tslib.__asyncGenerator(this, arguments, function listItems_1() { + var marker, _a, _b, segment, e_11_1; + var e_11, _c; + return tslib.__generator(this, function (_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 7, 8, 13]); + _a = tslib.__asyncValues(this.listSegments(marker, options)); + _d.label = 1; + case 1: return [4 /*yield*/, tslib.__await(_a.next())]; + case 2: + if (!(_b = _d.sent(), !_b.done)) return [3 /*break*/, 6]; + segment = _b.value; + return [5 /*yield**/, tslib.__values(tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)))]; + case 3: return [4 /*yield*/, tslib.__await.apply(void 0, [_d.sent()])]; + case 4: + _d.sent(); + _d.label = 5; + case 5: return [3 /*break*/, 1]; + case 6: return [3 /*break*/, 13]; + case 7: + e_11_1 = _d.sent(); + e_11 = { error: e_11_1 }; + return [3 /*break*/, 13]; + case 8: + _d.trys.push([8, , 11, 12]); + if (!(_b && !_b.done && (_c = _a.return))) return [3 /*break*/, 10]; + return [4 /*yield*/, tslib.__await(_c.call(_a))]; + case 9: + _d.sent(); + _d.label = 10; + case 10: return [3 /*break*/, 12]; + case 11: + if (e_11) throw e_11.error; + return [7 /*endfinally*/]; + case 12: return [7 /*endfinally*/]; + case 13: return [2 /*return*/]; + } + }); + }); + }; + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.listContainers(); + * let containerItem = await iter.next(); + * while (!containerItem.done) { + * console.log(`Container ${i++}: ${containerItem.value.name}`); + * containerItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param {ServiceListContainersOptions} [options={}] Options to list containers. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.listContainers = function (options) { + var _a; + var _this = this; + if (options === void 0) { options = {}; } + if (options.prefix === "") { + options.prefix = undefined; + } + var include = []; + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + // AsyncIterableIterator to iterate over containers + var listSegmentOptions = tslib.__assign(tslib.__assign({}, options), (include.length > 0 ? { include: include } : {})); + var iter = this.listItems(listSegmentOptions); + return _a = { + /** + * @member {Promise} [next] The next method, part of the iteration protocol + */ + next: function () { + return iter.next(); + } + }, + /** + * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol + */ + _a[Symbol.asyncIterator] = function () { + return this; + }, + /** + * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time + */ + _a.byPage = function (settings) { + if (settings === void 0) { settings = {}; } + return _this.listSegments(settings.continuationToken, tslib.__assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + }, + _a; + }; + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * + * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time + * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time + * @returns {Promise} + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getUserDelegationKey = function (startsOn, expiresOn, options) { + if (options === void 0) { options = {}; } + return tslib.__awaiter(this, void 0, void 0, function () { + var _a, span, spanOptions, response, userDelegationKey, res, e_12; + return tslib.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = createSpan("BlobServiceClient-getUserDelegationKey", options.tracingOptions), span = _a.span, spanOptions = _a.spanOptions; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 5]); + return [4 /*yield*/, this.serviceContext.getUserDelegationKey({ + startsOn: truncatedISO8061Date(startsOn, false), + expiresOn: truncatedISO8061Date(expiresOn, false) + }, { + abortSignal: options.abortSignal, + spanOptions: spanOptions + })]; + case 2: + response = _b.sent(); + userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value + }; + res = tslib.__assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + return [2 /*return*/, res]; + case 3: + e_12 = _b.sent(); + span.setStatus({ + code: api.CanonicalCode.UNKNOWN, + message: e_12.message + }); + throw e_12; + case 4: + span.end(); + return [7 /*endfinally*/]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns {BlobBatchClient} A new BlobBatchClient object for this service. + * @memberof BlobServiceClient + */ + BlobServiceClient.prototype.getBlobBatchClient = function () { + return new BlobBatchClient(this.url, this.pipeline); + }; + return BlobServiceClient; +}(StorageClient)); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class AccountSASPermissions + */ +var AccountSASPermissions = /** @class */ (function () { + function AccountSASPermissions() { + /** + * Permission to read resources and list queues and tables granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.read = false; + /** + * Permission to write resources granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.write = false; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.delete = false; + /** + * Permission to delete versions granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.add = false; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.create = false; + /** + * Permissions to update messages and table entities granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.update = false; + /** + * Permission to get and delete messages granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.process = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.tag = false; + /** + * Permission to filter blobs. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + this.filter = false; + } + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @static + * @param {string} permissions + * @returns {AccountSASPermissions} + * @memberof AccountSASPermissions + */ + AccountSASPermissions.parse = function (permissions) { + var accountSASPermissions = new AccountSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var c = permissions_1[_i]; + switch (c) { + case "r": + accountSASPermissions.read = true; + break; + case "w": + accountSASPermissions.write = true; + break; + case "d": + accountSASPermissions.delete = true; + break; + case "x": + accountSASPermissions.deleteVersion = true; + break; + case "l": + accountSASPermissions.list = true; + break; + case "a": + accountSASPermissions.add = true; + break; + case "c": + accountSASPermissions.create = true; + break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + default: + throw new RangeError("Invalid permission character: " + c); + } + } + return accountSASPermissions; + }; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASPermissions + */ + AccountSASPermissions.prototype.toString = function () { + // The order of the characters should be as specified here to ensure correctness: + // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + // Use a string array instead of string concatenating += operator for performance + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.filter) { + permissions.push("f"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.list) { + permissions.push("l"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.update) { + permissions.push("u"); + } + if (this.process) { + permissions.push("p"); + } + return permissions.join(""); + }; + return AccountSASPermissions; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + * + * @export + * @class AccountSASResourceTypes + */ +var AccountSASResourceTypes = /** @class */ (function () { + function AccountSASResourceTypes() { + /** + * Permission to access service level APIs granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + this.object = false; + } + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @static + * @param {string} resourceTypes + * @returns {AccountSASResourceTypes} + * @memberof AccountSASResourceTypes + */ + AccountSASResourceTypes.parse = function (resourceTypes) { + var accountSASResourceTypes = new AccountSASResourceTypes(); + for (var _i = 0, resourceTypes_1 = resourceTypes; _i < resourceTypes_1.length; _i++) { + var c = resourceTypes_1[_i]; + switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: + throw new RangeError("Invalid resource type: " + c); + } + } + return accountSASResourceTypes; + }; + /** + * Converts the given resource types to a string. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASResourceTypes + */ + AccountSASResourceTypes.prototype.toString = function () { + var resourceTypes = []; + if (this.service) { + resourceTypes.push("s"); + } + if (this.container) { + resourceTypes.push("c"); + } + if (this.object) { + resourceTypes.push("o"); + } + return resourceTypes.join(""); + }; + return AccountSASResourceTypes; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + * + * @export + * @class AccountSASServices + */ +var AccountSASServices = /** @class */ (function () { + function AccountSASServices() { + /** + * Permission to access blob resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.blob = false; + /** + * Permission to access file resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.file = false; + /** + * Permission to access queue resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.queue = false; + /** + * Permission to access table resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + this.table = false; + } + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @static + * @param {string} services + * @returns {AccountSASServices} + * @memberof AccountSASServices + */ + AccountSASServices.parse = function (services) { + var accountSASServices = new AccountSASServices(); + for (var _i = 0, services_1 = services; _i < services_1.length; _i++) { + var c = services_1[_i]; + switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: + throw new RangeError("Invalid service character: " + c); + } + } + return accountSASServices; + }; + /** + * Converts the given services to a string. + * + * @returns {string} + * @memberof AccountSASServices + */ + AccountSASServices.prototype.toString = function () { + var services = []; + if (this.blob) { + services.push("b"); + } + if (this.table) { + services.push("t"); + } + if (this.queue) { + services.push("q"); + } + if (this.file) { + services.push("f"); + } + return services.join(""); + }; + return AccountSASServices; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @export + * @param {SasIPRange} ipRange + * @returns {string} + */ +function ipRangeToString(ipRange) { + return ipRange.end ? ipRange.start + "-" + ipRange.end : ipRange.start; +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +(function (SASProtocol) { + /** + * Protocol that allows HTTPS only + */ + SASProtocol["Https"] = "https"; + /** + * Protocol that allows both HTTPS and HTTP + */ + SASProtocol["HttpsAndHttp"] = "https,http"; +})(exports.SASProtocol || (exports.SASProtocol = {})); +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + * + * @export + * @class SASQueryParameters + */ +var SASQueryParameters = /** @class */ (function () { + function SASQueryParameters(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) { + this.version = version; + this.signature = signature; + if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { + // SASQueryParametersOptions + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } + } + else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } + } + } + Object.defineProperty(SASQueryParameters.prototype, "ipRange", { + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + * @type {(SasIPRange | undefined)} + * @memberof SASQueryParameters + */ + get: function () { + if (this.ipRangeInner) { + return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start + }; + } + return undefined; + }, + enumerable: false, + configurable: true + }); + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + * @returns {string} + * @memberof SASQueryParameters + */ + SASQueryParameters.prototype.toString = function () { + var params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "skoid", + "sktid", + "skt", + "ske", + "sks", + "skv", + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid" + ]; + var queries = []; + for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { + var param = params_1[_i]; + switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "skoid": // Signed object ID + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": // Signed tenant ID + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": // Signed key start time + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined); + break; + case "ske": // Signed key expiry time + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined); + break; + case "sks": // Signed key service + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": // Signed key version + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + } + } + return queries.join("&"); + }; + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @private + * @param {string[]} queries + * @param {string} key + * @param {string} [value] + * @returns {void} + * @memberof SASQueryParameters + */ + SASQueryParameters.prototype.tryAppendQueryParameter = function (queries, key, value) { + if (!value) { + return; + } + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) { + queries.push(key + "=" + value); + } + }; + return SASQueryParameters; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @param {AccountSASSignatureValues} accountSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + * @memberof AccountSASSignatureValues + */ +function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + var version = accountSASSignatureValues.version + ? accountSASSignatureValues.version + : SERVICE_VERSION; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.filter && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + var parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + var parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); + var parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + var stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) + : "", + truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + "" // Account SAS requires an additional newline character + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange); +} + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class BlobSASPermissions + */ +var BlobSASPermissions = /** @class */ (function () { + function BlobSASPermissions() { + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.read = false; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.add = false; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.create = false; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.write = false; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.delete = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.deleteVersion = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.tag = false; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.move = false; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + this.execute = false; + } + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {BlobSASPermissions} + * @memberof BlobSASPermissions + */ + BlobSASPermissions.parse = function (permissions) { + var blobSASPermissions = new BlobSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var char = permissions_1[_i]; + switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + default: + throw new RangeError("Invalid permission: " + char); + } + } + return blobSASPermissions; + }; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns {string} A string which represents the BlobSASPermissions + * @memberof BlobSASPermissions + */ + BlobSASPermissions.prototype.toString = function () { + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + return permissions.join(""); + }; + return BlobSASPermissions; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class ContainerSASPermissions + */ +var ContainerSASPermissions = /** @class */ (function () { + function ContainerSASPermissions() { + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.read = false; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.add = false; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.create = false; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.write = false; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.delete = false; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.deleteVersion = false; + /** + * Specifies List access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.list = false; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.tag = false; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.move = false; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + this.execute = false; + } + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {ContainerSASPermissions} + * @memberof ContainerSASPermissions + */ + ContainerSASPermissions.parse = function (permissions) { + var containerSASPermissions = new ContainerSASPermissions(); + for (var _i = 0, permissions_1 = permissions; _i < permissions_1.length; _i++) { + var char = permissions_1[_i]; + switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + default: + throw new RangeError("Invalid permission " + char); + } + } + return containerSASPermissions; + }; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @returns {string} + * @memberof ContainerSASPermissions + */ + ContainerSASPermissions.prototype.toString = function () { + var permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.list) { + permissions.push("l"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + return permissions.join(""); + }; + return ContainerSASPermissions; +}()); + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas + * + * @export + * @class UserDelegationKeyCredential + */ +var UserDelegationKeyCredential = /** @class */ (function () { + /** + * Creates an instance of UserDelegationKeyCredential. + * @param {string} accountName + * @param {UserDelegationKey} userDelegationKey + * @memberof UserDelegationKeyCredential + */ + function UserDelegationKeyCredential(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof UserDelegationKeyCredential + */ + UserDelegationKeyCredential.prototype.computeHMACSHA256 = function (stringToSign) { + // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); + return crypto.createHmac("sha256", this.key) + .update(stringToSign, "utf8") + .digest("base64"); + }; + return UserDelegationKeyCredential; +}()); + +// Copyright (c) Microsoft Corporation. All rights reserved. +function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + var version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + var sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential + ? sharedKeyCredentialOrUserDelegationKey + : undefined; + var userDelegationKeyCredential; + if (sharedKeyCredential === undefined && accountName !== undefined) { + userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + } + if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { + throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); + } + // Version 2019-12-12 adds support for the blob tags permission. + // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. + // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string + if (version >= "2018-11-09") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + } + else { + // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. + if (version >= "2020-02-10") { + return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + } + else { + return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + if (version >= "2015-04-05") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + } + else { + throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + } + } + throw new RangeError("'version' must be >= '2015-04-05'."); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + var resource = "c"; + if (blobSASSignatureValues.blobName) { + resource = "b"; + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !blobSASSignatureValues.permissions && + !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" + ].join("\n"); + var signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKeyCredential} userDelegationKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + var signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKeyCredential} userDelegationKeyCredential + * @returns {SASQueryParameters} + */ +function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + var resource = "c"; + var timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + var verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + var stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + var signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId); +} +function getCanonicalName(accountName, containerName, blobName) { + // Container: "/blob/account/containerName" + // Blob: "/blob/account/containerName/blobName" + var elements = ["/blob/" + accountName + "/" + containerName]; + if (blobName) { + elements.push("/" + blobName); + } + return elements.join(""); +} +function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + var version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { + throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { + throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when providing 'versionId'."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + } + if (version < "2020-02-10" && + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + } + if (version < "2020-02-10" && + (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + } + blobSASSignatureValues.version = version; + return blobSASSignatureValues; +} + +Object.defineProperty(exports, 'BaseRequestPolicy', { + enumerable: true, + get: function () { + return coreHttp.BaseRequestPolicy; + } +}); +Object.defineProperty(exports, 'HttpHeaders', { + enumerable: true, + get: function () { + return coreHttp.HttpHeaders; + } +}); +Object.defineProperty(exports, 'RequestPolicyOptions', { + enumerable: true, + get: function () { + return coreHttp.RequestPolicyOptions; + } +}); +Object.defineProperty(exports, 'RestError', { + enumerable: true, + get: function () { + return coreHttp.RestError; + } +}); +Object.defineProperty(exports, 'WebResource', { + enumerable: true, + get: function () { + return coreHttp.WebResource; + } +}); +Object.defineProperty(exports, 'deserializationPolicy', { + enumerable: true, + get: function () { + return coreHttp.deserializationPolicy; + } +}); +exports.AccountSASPermissions = AccountSASPermissions; +exports.AccountSASResourceTypes = AccountSASResourceTypes; +exports.AccountSASServices = AccountSASServices; +exports.AnonymousCredential = AnonymousCredential; +exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +exports.AppendBlobClient = AppendBlobClient; +exports.BlobBatch = BlobBatch; +exports.BlobBatchClient = BlobBatchClient; +exports.BlobClient = BlobClient; +exports.BlobLeaseClient = BlobLeaseClient; +exports.BlobSASPermissions = BlobSASPermissions; +exports.BlobServiceClient = BlobServiceClient; +exports.BlockBlobClient = BlockBlobClient; +exports.ContainerClient = ContainerClient; +exports.ContainerSASPermissions = ContainerSASPermissions; +exports.Credential = Credential; +exports.CredentialPolicy = CredentialPolicy; +exports.PageBlobClient = PageBlobClient; +exports.Pipeline = Pipeline; +exports.SASQueryParameters = SASQueryParameters; +exports.StorageBrowserPolicy = StorageBrowserPolicy; +exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +exports.StorageOAuthScopes = StorageOAuthScopes; +exports.StorageRetryPolicy = StorageRetryPolicy; +exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; +exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; +exports.logger = logger; +exports.newPipeline = newPipeline; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@azure/storage-blob/dist/index.js.map b/node_modules/@azure/storage-blob/dist/index.js.map new file mode 100644 index 000000000..78befab7d --- /dev/null +++ b/node_modules/@azure/storage-blob/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/generated/src/models/mappers.ts","../src/generated/src/models/serviceMappers.ts","../src/generated/src/models/parameters.ts","../src/generated/src/operations/service.ts","../src/generated/src/models/containerMappers.ts","../src/generated/src/operations/container.ts","../src/generated/src/models/blobMappers.ts","../src/generated/src/operations/blob.ts","../src/generated/src/models/pageBlobMappers.ts","../src/generated/src/operations/pageBlob.ts","../src/generated/src/models/appendBlobMappers.ts","../src/generated/src/operations/appendBlob.ts","../src/generated/src/models/blockBlobMappers.ts","../src/generated/src/operations/blockBlob.ts","../src/log.ts","../src/utils/constants.ts","../src/utils/utils.common.ts","../src/policies/StorageBrowserPolicy.ts","../src/StorageBrowserPolicyFactory.ts","../src/policies/StorageRetryPolicy.ts","../src/StorageRetryPolicyFactory.ts","../src/policies/CredentialPolicy.ts","../src/policies/AnonymousCredentialPolicy.ts","../src/credentials/Credential.ts","../src/credentials/AnonymousCredential.ts","../src/policies/TelemetryPolicy.ts","../src/TelemetryPolicyFactory.ts","../src/utils/cache.ts","../src/Pipeline.ts","../src/utils/RetriableReadableStream.ts","../src/BlobDownloadResponse.ts","../../storage-internal-avro/src/AvroConstants.ts","../../storage-internal-avro/src/utils/utils.common.ts","../../storage-internal-avro/src/AvroParser.ts","../../storage-internal-avro/src/AvroReader.ts","../../storage-internal-avro/src/AvroReadable.ts","../../storage-internal-avro/src/AvroReadableFromStream.ts","../src/utils/BlobQuickQueryStream.ts","../src/BlobQueryResponse.ts","../src/policies/StorageSharedKeyCredentialPolicy.ts","../src/credentials/StorageSharedKeyCredential.ts","../src/generated/src/storageClientContext.ts","../src/models.ts","../src/PageBlobRangeResponse.ts","../src/pollers/BlobStartCopyFromUrlPoller.ts","../src/Range.ts","../src/StorageClient.ts","../src/utils/Batch.ts","../../storage-common/src/BuffersStream.ts","../../storage-common/src/PooledBuffer.ts","../../storage-common/src/BufferScheduler.ts","../src/utils/tracing.ts","../src/utils/utils.node.ts","../src/Clients.ts","../src/BatchUtils.ts","../src/BatchResponseParser.ts","../src/utils/Mutex.ts","../src/BlobBatch.ts","../src/BlobBatchClient.ts","../src/BlobServiceClient.ts","../src/sas/AccountSASPermissions.ts","../src/sas/AccountSASResourceTypes.ts","../src/sas/AccountSASServices.ts","../src/sas/SasIPRange.ts","../src/sas/SASQueryParameters.ts","../src/sas/AccountSASSignatureValues.ts","../src/sas/BlobSASPermissions.ts","../src/sas/ContainerSASPermissions.ts","../src/credentials/UserDelegationKeyCredential.ts","../src/sas/BlobSASSignatureValues.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\n\nexport const KeyInfo: coreHttp.CompositeMapper = {\n serializedName: \"KeyInfo\",\n type: {\n name: \"Composite\",\n className: \"KeyInfo\",\n modelProperties: {\n startsOn: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry\",\n required: true,\n serializedName: \"Expiry\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const UserDelegationKey: coreHttp.CompositeMapper = {\n serializedName: \"UserDelegationKey\",\n type: {\n name: \"Composite\",\n className: \"UserDelegationKey\",\n modelProperties: {\n signedObjectId: {\n xmlName: \"SignedOid\",\n required: true,\n serializedName: \"SignedOid\",\n type: {\n name: \"String\"\n }\n },\n signedTenantId: {\n xmlName: \"SignedTid\",\n required: true,\n serializedName: \"SignedTid\",\n type: {\n name: \"String\"\n }\n },\n signedStartsOn: {\n xmlName: \"SignedStart\",\n required: true,\n serializedName: \"SignedStart\",\n type: {\n name: \"String\"\n }\n },\n signedExpiresOn: {\n xmlName: \"SignedExpiry\",\n required: true,\n serializedName: \"SignedExpiry\",\n type: {\n name: \"String\"\n }\n },\n signedService: {\n xmlName: \"SignedService\",\n required: true,\n serializedName: \"SignedService\",\n type: {\n name: \"String\"\n }\n },\n signedVersion: {\n xmlName: \"SignedVersion\",\n required: true,\n serializedName: \"SignedVersion\",\n type: {\n name: \"String\"\n }\n },\n value: {\n xmlName: \"Value\",\n required: true,\n serializedName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const StorageError: coreHttp.CompositeMapper = {\n serializedName: \"StorageError\",\n type: {\n name: \"Composite\",\n className: \"StorageError\",\n modelProperties: {\n message: {\n xmlName: \"Message\",\n serializedName: \"Message\",\n type: {\n name: \"String\"\n }\n },\n code: {\n xmlName: \"Code\",\n serializedName: \"Code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DataLakeStorageErrorError: coreHttp.CompositeMapper = {\n serializedName: \"DataLakeStorageError_error\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageErrorError\",\n modelProperties: {\n code: {\n xmlName: \"Code\",\n serializedName: \"Code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n xmlName: \"Message\",\n serializedName: \"Message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DataLakeStorageError: coreHttp.CompositeMapper = {\n serializedName: \"DataLakeStorageError\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageError\",\n modelProperties: {\n dataLakeStorageErrorDetails: {\n xmlName: \"error\",\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"DataLakeStorageErrorError\"\n }\n }\n }\n }\n};\n\nexport const AccessPolicy: coreHttp.CompositeMapper = {\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\",\n modelProperties: {\n startsOn: {\n xmlName: \"Start\",\n serializedName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry\",\n serializedName: \"Expiry\",\n type: {\n name: \"String\"\n }\n },\n permissions: {\n xmlName: \"Permission\",\n serializedName: \"Permission\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobPropertiesInternal: coreHttp.CompositeMapper = {\n xmlName: \"Properties\",\n serializedName: \"BlobPropertiesInternal\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\",\n modelProperties: {\n createdOn: {\n xmlName: \"Creation-Time\",\n serializedName: \"Creation-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n lastModified: {\n xmlName: \"Last-Modified\",\n required: true,\n serializedName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n xmlName: \"Etag\",\n required: true,\n serializedName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n xmlName: \"Content-Length\",\n serializedName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n xmlName: \"Content-Type\",\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n xmlName: \"Content-Encoding\",\n serializedName: \"Content-Encoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n xmlName: \"Content-Language\",\n serializedName: \"Content-Language\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n xmlName: \"Content-MD5\",\n serializedName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentDisposition: {\n xmlName: \"Content-Disposition\",\n serializedName: \"Content-Disposition\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n xmlName: \"Cache-Control\",\n serializedName: \"Cache-Control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n xmlName: \"x-ms-blob-sequence-number\",\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n xmlName: \"BlobType\",\n serializedName: \"BlobType\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n leaseStatus: {\n xmlName: \"LeaseStatus\",\n serializedName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n leaseState: {\n xmlName: \"LeaseState\",\n serializedName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n xmlName: \"LeaseDuration\",\n serializedName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n copyId: {\n xmlName: \"CopyId\",\n serializedName: \"CopyId\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n xmlName: \"CopyStatus\",\n serializedName: \"CopyStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n copySource: {\n xmlName: \"CopySource\",\n serializedName: \"CopySource\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n xmlName: \"CopyProgress\",\n serializedName: \"CopyProgress\",\n type: {\n name: \"String\"\n }\n },\n copyCompletedOn: {\n xmlName: \"CopyCompletionTime\",\n serializedName: \"CopyCompletionTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n xmlName: \"CopyStatusDescription\",\n serializedName: \"CopyStatusDescription\",\n type: {\n name: \"String\"\n }\n },\n serverEncrypted: {\n xmlName: \"ServerEncrypted\",\n serializedName: \"ServerEncrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n incrementalCopy: {\n xmlName: \"IncrementalCopy\",\n serializedName: \"IncrementalCopy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n xmlName: \"DestinationSnapshot\",\n serializedName: \"DestinationSnapshot\",\n type: {\n name: \"String\"\n }\n },\n deletedOn: {\n xmlName: \"DeletedTime\",\n serializedName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n xmlName: \"RemainingRetentionDays\",\n serializedName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n accessTier: {\n xmlName: \"AccessTier\",\n serializedName: \"AccessTier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n xmlName: \"AccessTierInferred\",\n serializedName: \"AccessTierInferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n xmlName: \"ArchiveStatus\",\n serializedName: \"ArchiveStatus\",\n type: {\n name: \"String\"\n }\n },\n customerProvidedKeySha256: {\n xmlName: \"CustomerProvidedKeySha256\",\n serializedName: \"CustomerProvidedKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n xmlName: \"EncryptionScope\",\n serializedName: \"EncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n xmlName: \"AccessTierChangeTime\",\n serializedName: \"AccessTierChangeTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n tagCount: {\n xmlName: \"TagCount\",\n serializedName: \"TagCount\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n xmlName: \"Expiry-Time\",\n serializedName: \"Expiry-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n xmlName: \"Sealed\",\n serializedName: \"Sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n xmlName: \"RehydratePriority\",\n serializedName: \"RehydratePriority\",\n type: {\n name: \"String\"\n }\n },\n lastAccessedOn: {\n xmlName: \"LastAccessTime\",\n serializedName: \"LastAccessTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const BlobTag: coreHttp.CompositeMapper = {\n xmlName: \"Tag\",\n serializedName: \"BlobTag\",\n type: {\n name: \"Composite\",\n className: \"BlobTag\",\n modelProperties: {\n key: {\n xmlName: \"Key\",\n required: true,\n serializedName: \"Key\",\n type: {\n name: \"String\"\n }\n },\n value: {\n xmlName: \"Value\",\n required: true,\n serializedName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobTags: coreHttp.CompositeMapper = {\n xmlName: \"Tags\",\n serializedName: \"BlobTags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\",\n modelProperties: {\n blobTagSet: {\n xmlIsWrapped: true,\n xmlName: \"TagSet\",\n xmlElementName: \"Tag\",\n required: true,\n serializedName: \"BlobTagSet\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobTag\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlobItemInternal: coreHttp.CompositeMapper = {\n xmlName: \"Blob\",\n serializedName: \"BlobItemInternal\",\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n xmlName: \"Deleted\",\n required: true,\n serializedName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n snapshot: {\n xmlName: \"Snapshot\",\n required: true,\n serializedName: \"Snapshot\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n xmlName: \"VersionId\",\n serializedName: \"VersionId\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n xmlName: \"IsCurrentVersion\",\n serializedName: \"IsCurrentVersion\",\n type: {\n name: \"Boolean\"\n }\n },\n properties: {\n xmlName: \"Properties\",\n required: true,\n serializedName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\"\n }\n },\n metadata: {\n xmlName: \"Metadata\",\n serializedName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n blobTags: {\n xmlName: \"Tags\",\n serializedName: \"BlobTags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n },\n objectReplicationMetadata: {\n xmlName: \"OrMetadata\",\n serializedName: \"ObjectReplicationMetadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlobFlatListSegment: coreHttp.CompositeMapper = {\n xmlName: \"Blobs\",\n serializedName: \"BlobFlatListSegment\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\",\n modelProperties: {\n blobItems: {\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"BlobItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListBlobsFlatSegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListBlobsFlatSegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsFlatSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlIsAttribute: true,\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n segment: {\n xmlName: \"Blobs\",\n required: true,\n serializedName: \"Segment\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\"\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobPrefix: coreHttp.CompositeMapper = {\n serializedName: \"BlobPrefix\",\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobHierarchyListSegment: coreHttp.CompositeMapper = {\n xmlName: \"Blobs\",\n serializedName: \"BlobHierarchyListSegment\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\",\n modelProperties: {\n blobPrefixes: {\n xmlName: \"BlobPrefixes\",\n xmlElementName: \"BlobPrefix\",\n serializedName: \"BlobPrefixes\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\"\n }\n }\n }\n },\n blobItems: {\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"BlobItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListBlobsHierarchySegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListBlobsHierarchySegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsHierarchySegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlIsAttribute: true,\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n delimiter: {\n xmlName: \"Delimiter\",\n serializedName: \"Delimiter\",\n type: {\n name: \"String\"\n }\n },\n segment: {\n xmlName: \"Blobs\",\n required: true,\n serializedName: \"Segment\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\"\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const Block: coreHttp.CompositeMapper = {\n serializedName: \"Block\",\n type: {\n name: \"Composite\",\n className: \"Block\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n size: {\n xmlName: \"Size\",\n required: true,\n serializedName: \"Size\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const BlockList: coreHttp.CompositeMapper = {\n serializedName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockList\",\n modelProperties: {\n committedBlocks: {\n xmlIsWrapped: true,\n xmlName: \"CommittedBlocks\",\n xmlElementName: \"Block\",\n serializedName: \"CommittedBlocks\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n },\n uncommittedBlocks: {\n xmlIsWrapped: true,\n xmlName: \"UncommittedBlocks\",\n xmlElementName: \"Block\",\n serializedName: \"UncommittedBlocks\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const BlockLookupList: coreHttp.CompositeMapper = {\n xmlName: \"BlockList\",\n serializedName: \"BlockLookupList\",\n type: {\n name: \"Composite\",\n className: \"BlockLookupList\",\n modelProperties: {\n committed: {\n xmlName: \"Committed\",\n xmlElementName: \"Committed\",\n serializedName: \"Committed\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n uncommitted: {\n xmlName: \"Uncommitted\",\n xmlElementName: \"Uncommitted\",\n serializedName: \"Uncommitted\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n latest: {\n xmlName: \"Latest\",\n xmlElementName: \"Latest\",\n serializedName: \"Latest\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ContainerProperties: coreHttp.CompositeMapper = {\n serializedName: \"ContainerProperties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\",\n modelProperties: {\n lastModified: {\n xmlName: \"Last-Modified\",\n required: true,\n serializedName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n xmlName: \"Etag\",\n required: true,\n serializedName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n leaseStatus: {\n xmlName: \"LeaseStatus\",\n serializedName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n leaseState: {\n xmlName: \"LeaseState\",\n serializedName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n xmlName: \"LeaseDuration\",\n serializedName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n publicAccess: {\n xmlName: \"PublicAccess\",\n serializedName: \"PublicAccess\",\n type: {\n name: \"String\"\n }\n },\n hasImmutabilityPolicy: {\n xmlName: \"HasImmutabilityPolicy\",\n serializedName: \"HasImmutabilityPolicy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n xmlName: \"HasLegalHold\",\n serializedName: \"HasLegalHold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n xmlName: \"DefaultEncryptionScope\",\n serializedName: \"DefaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n xmlName: \"DenyEncryptionScopeOverride\",\n serializedName: \"DenyEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n },\n deletedOn: {\n xmlName: \"DeletedTime\",\n serializedName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n xmlName: \"RemainingRetentionDays\",\n serializedName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ContainerItem: coreHttp.CompositeMapper = {\n xmlName: \"Container\",\n serializedName: \"ContainerItem\",\n type: {\n name: \"Composite\",\n className: \"ContainerItem\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n xmlName: \"Deleted\",\n serializedName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n version: {\n xmlName: \"Version\",\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n properties: {\n xmlName: \"Properties\",\n required: true,\n serializedName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\"\n }\n },\n metadata: {\n xmlName: \"Metadata\",\n serializedName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const DelimitedTextConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\",\n modelProperties: {\n columnSeparator: {\n xmlName: \"ColumnSeparator\",\n required: true,\n serializedName: \"ColumnSeparator\",\n type: {\n name: \"String\"\n }\n },\n fieldQuote: {\n xmlName: \"FieldQuote\",\n required: true,\n serializedName: \"FieldQuote\",\n type: {\n name: \"String\"\n }\n },\n recordSeparator: {\n xmlName: \"RecordSeparator\",\n required: true,\n serializedName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n },\n escapeChar: {\n xmlName: \"EscapeChar\",\n required: true,\n serializedName: \"EscapeChar\",\n type: {\n name: \"String\"\n }\n },\n headersPresent: {\n xmlName: \"HasHeaders\",\n required: true,\n serializedName: \"HeadersPresent\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const JsonTextConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\",\n modelProperties: {\n recordSeparator: {\n xmlName: \"RecordSeparator\",\n required: true,\n serializedName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ArrowField: coreHttp.CompositeMapper = {\n xmlName: \"Field\",\n serializedName: \"ArrowField\",\n type: {\n name: \"Composite\",\n className: \"ArrowField\",\n modelProperties: {\n type: {\n xmlName: \"Type\",\n required: true,\n serializedName: \"Type\",\n type: {\n name: \"String\"\n }\n },\n name: {\n xmlName: \"Name\",\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n precision: {\n xmlName: \"Precision\",\n serializedName: \"Precision\",\n type: {\n name: \"Number\"\n }\n },\n scale: {\n xmlName: \"Scale\",\n serializedName: \"Scale\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ArrowConfiguration: coreHttp.CompositeMapper = {\n serializedName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\",\n modelProperties: {\n schema: {\n xmlIsWrapped: true,\n xmlName: \"Schema\",\n xmlElementName: \"Field\",\n required: true,\n serializedName: \"Schema\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ArrowField\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const ListContainersSegmentResponse: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"ListContainersSegmentResponse\",\n type: {\n name: \"Composite\",\n className: \"ListContainersSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n prefix: {\n xmlName: \"Prefix\",\n serializedName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n xmlName: \"Marker\",\n serializedName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n xmlName: \"MaxResults\",\n serializedName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n containerItems: {\n xmlIsWrapped: true,\n xmlName: \"Containers\",\n xmlElementName: \"Container\",\n required: true,\n serializedName: \"ContainerItems\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ContainerItem\"\n }\n }\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CorsRule: coreHttp.CompositeMapper = {\n serializedName: \"CorsRule\",\n type: {\n name: \"Composite\",\n className: \"CorsRule\",\n modelProperties: {\n allowedOrigins: {\n xmlName: \"AllowedOrigins\",\n required: true,\n serializedName: \"AllowedOrigins\",\n type: {\n name: \"String\"\n }\n },\n allowedMethods: {\n xmlName: \"AllowedMethods\",\n required: true,\n serializedName: \"AllowedMethods\",\n type: {\n name: \"String\"\n }\n },\n allowedHeaders: {\n xmlName: \"AllowedHeaders\",\n required: true,\n serializedName: \"AllowedHeaders\",\n type: {\n name: \"String\"\n }\n },\n exposedHeaders: {\n xmlName: \"ExposedHeaders\",\n required: true,\n serializedName: \"ExposedHeaders\",\n type: {\n name: \"String\"\n }\n },\n maxAgeInSeconds: {\n xmlName: \"MaxAgeInSeconds\",\n required: true,\n serializedName: \"MaxAgeInSeconds\",\n constraints: {\n InclusiveMinimum: 0\n },\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const FilterBlobItem: coreHttp.CompositeMapper = {\n xmlName: \"Blob\",\n serializedName: \"FilterBlobItem\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\",\n modelProperties: {\n name: {\n xmlName: \"Name\",\n required: true,\n serializedName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n xmlName: \"ContainerName\",\n required: true,\n serializedName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n tagValue: {\n xmlName: \"TagValue\",\n required: true,\n serializedName: \"TagValue\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const FilterBlobSegment: coreHttp.CompositeMapper = {\n xmlName: \"EnumerationResults\",\n serializedName: \"FilterBlobSegment\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobSegment\",\n modelProperties: {\n serviceEndpoint: {\n xmlIsAttribute: true,\n xmlName: \"ServiceEndpoint\",\n required: true,\n serializedName: \"ServiceEndpoint\",\n type: {\n name: \"String\"\n }\n },\n where: {\n xmlName: \"Where\",\n required: true,\n serializedName: \"Where\",\n type: {\n name: \"String\"\n }\n },\n blobs: {\n xmlIsWrapped: true,\n xmlName: \"Blobs\",\n xmlElementName: \"Blob\",\n required: true,\n serializedName: \"Blobs\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\"\n }\n }\n }\n },\n continuationToken: {\n xmlName: \"NextMarker\",\n serializedName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const GeoReplication: coreHttp.CompositeMapper = {\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\",\n modelProperties: {\n status: {\n xmlName: \"Status\",\n required: true,\n serializedName: \"Status\",\n type: {\n name: \"String\"\n }\n },\n lastSyncOn: {\n xmlName: \"LastSyncTime\",\n required: true,\n serializedName: \"LastSyncTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const RetentionPolicy: coreHttp.CompositeMapper = {\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\",\n modelProperties: {\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n days: {\n xmlName: \"Days\",\n serializedName: \"Days\",\n constraints: {\n InclusiveMinimum: 1\n },\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const Logging: coreHttp.CompositeMapper = {\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\",\n modelProperties: {\n version: {\n xmlName: \"Version\",\n required: true,\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n deleteProperty: {\n xmlName: \"Delete\",\n required: true,\n serializedName: \"Delete\",\n type: {\n name: \"Boolean\"\n }\n },\n read: {\n xmlName: \"Read\",\n required: true,\n serializedName: \"Read\",\n type: {\n name: \"Boolean\"\n }\n },\n write: {\n xmlName: \"Write\",\n required: true,\n serializedName: \"Write\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n xmlName: \"RetentionPolicy\",\n required: true,\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\n\nexport const Metrics: coreHttp.CompositeMapper = {\n serializedName: \"Metrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\",\n modelProperties: {\n version: {\n xmlName: \"Version\",\n serializedName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n includeAPIs: {\n xmlName: \"IncludeAPIs\",\n serializedName: \"IncludeAPIs\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n xmlName: \"RetentionPolicy\",\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\n\nexport const PageRange: coreHttp.CompositeMapper = {\n serializedName: \"PageRange\",\n type: {\n name: \"Composite\",\n className: \"PageRange\",\n modelProperties: {\n start: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n xmlName: \"End\",\n required: true,\n serializedName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ClearRange: coreHttp.CompositeMapper = {\n serializedName: \"ClearRange\",\n type: {\n name: \"Composite\",\n className: \"ClearRange\",\n modelProperties: {\n start: {\n xmlName: \"Start\",\n required: true,\n serializedName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n xmlName: \"End\",\n required: true,\n serializedName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const PageList: coreHttp.CompositeMapper = {\n serializedName: \"PageList\",\n type: {\n name: \"Composite\",\n className: \"PageList\",\n modelProperties: {\n pageRange: {\n xmlName: \"PageRange\",\n xmlElementName: \"PageRange\",\n serializedName: \"PageRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"PageRange\"\n }\n }\n }\n },\n clearRange: {\n xmlName: \"ClearRange\",\n xmlElementName: \"ClearRange\",\n serializedName: \"ClearRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ClearRange\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const QueryFormat: coreHttp.CompositeMapper = {\n serializedName: \"QueryFormat\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\",\n modelProperties: {\n type: {\n xmlName: \"Type\",\n serializedName: \"Type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"delimited\",\n \"json\",\n \"arrow\"\n ]\n }\n },\n delimitedTextConfiguration: {\n xmlName: \"DelimitedTextConfiguration\",\n serializedName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\"\n }\n },\n jsonTextConfiguration: {\n xmlName: \"JsonTextConfiguration\",\n serializedName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\"\n }\n },\n arrowConfiguration: {\n xmlName: \"ArrowConfiguration\",\n serializedName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\"\n }\n }\n }\n }\n};\n\nexport const QuerySerialization: coreHttp.CompositeMapper = {\n serializedName: \"QuerySerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\",\n modelProperties: {\n format: {\n xmlName: \"Format\",\n required: true,\n serializedName: \"Format\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\"\n }\n }\n }\n }\n};\n\nexport const QueryRequest: coreHttp.CompositeMapper = {\n serializedName: \"QueryRequest\",\n type: {\n name: \"Composite\",\n className: \"QueryRequest\",\n modelProperties: {\n queryType: {\n xmlName: \"QueryType\",\n required: true,\n isConstant: true,\n serializedName: \"QueryType\",\n defaultValue: 'SQL',\n type: {\n name: \"String\"\n }\n },\n expression: {\n xmlName: \"Expression\",\n required: true,\n serializedName: \"Expression\",\n type: {\n name: \"String\"\n }\n },\n inputSerialization: {\n xmlName: \"InputSerialization\",\n serializedName: \"InputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n },\n outputSerialization: {\n xmlName: \"OutputSerialization\",\n serializedName: \"OutputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n }\n }\n }\n};\n\nexport const SignedIdentifier: coreHttp.CompositeMapper = {\n serializedName: \"SignedIdentifier\",\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\",\n modelProperties: {\n id: {\n xmlName: \"Id\",\n required: true,\n serializedName: \"Id\",\n type: {\n name: \"String\"\n }\n },\n accessPolicy: {\n xmlName: \"AccessPolicy\",\n required: true,\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\"\n }\n }\n }\n }\n};\n\nexport const StaticWebsite: coreHttp.CompositeMapper = {\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\",\n modelProperties: {\n enabled: {\n xmlName: \"Enabled\",\n required: true,\n serializedName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n indexDocument: {\n xmlName: \"IndexDocument\",\n serializedName: \"IndexDocument\",\n type: {\n name: \"String\"\n }\n },\n errorDocument404Path: {\n xmlName: \"ErrorDocument404Path\",\n serializedName: \"ErrorDocument404Path\",\n type: {\n name: \"String\"\n }\n },\n defaultIndexDocumentPath: {\n xmlName: \"DefaultIndexDocumentPath\",\n serializedName: \"DefaultIndexDocumentPath\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobServiceProperties: coreHttp.CompositeMapper = {\n xmlName: \"StorageServiceProperties\",\n serializedName: \"BlobServiceProperties\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceProperties\",\n modelProperties: {\n blobAnalyticsLogging: {\n xmlName: \"Logging\",\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\"\n }\n },\n hourMetrics: {\n xmlName: \"HourMetrics\",\n serializedName: \"HourMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n minuteMetrics: {\n xmlName: \"MinuteMetrics\",\n serializedName: \"MinuteMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n cors: {\n xmlIsWrapped: true,\n xmlName: \"Cors\",\n xmlElementName: \"CorsRule\",\n serializedName: \"Cors\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CorsRule\"\n }\n }\n }\n },\n defaultServiceVersion: {\n xmlName: \"DefaultServiceVersion\",\n serializedName: \"DefaultServiceVersion\",\n type: {\n name: \"String\"\n }\n },\n deleteRetentionPolicy: {\n xmlName: \"DeleteRetentionPolicy\",\n serializedName: \"DeleteRetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n },\n staticWebsite: {\n xmlName: \"StaticWebsite\",\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\"\n }\n }\n }\n }\n};\n\nexport const BlobServiceStatistics: coreHttp.CompositeMapper = {\n xmlName: \"StorageServiceStats\",\n serializedName: \"BlobServiceStatistics\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceStatistics\",\n modelProperties: {\n geoReplication: {\n xmlName: \"GeoReplication\",\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\"\n }\n }\n }\n }\n};\n\nexport const ContainerEncryptionScope: coreHttp.CompositeMapper = {\n xmlName: \"container-encryption-scope\",\n type: {\n name: \"Composite\",\n className: \"ContainerEncryptionScope\",\n modelProperties: {\n defaultEncryptionScope: {\n xmlName: \"defaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n xmlName: \"preventEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const LeaseAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"lease-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"LeaseAccessConditions\",\n modelProperties: {\n leaseId: {\n xmlName: \"leaseId\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ModifiedAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"modified-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"ModifiedAccessConditions\",\n modelProperties: {\n ifModifiedSince: {\n xmlName: \"ifModifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n ifUnmodifiedSince: {\n xmlName: \"ifUnmodifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n ifMatch: {\n xmlName: \"ifMatch\",\n type: {\n name: \"String\"\n }\n },\n ifNoneMatch: {\n xmlName: \"ifNoneMatch\",\n type: {\n name: \"String\"\n }\n },\n ifTags: {\n xmlName: \"ifTags\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryHttpHeaders: coreHttp.CompositeMapper = {\n xmlName: \"directory-http-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryHttpHeaders\",\n modelProperties: {\n cacheControl: {\n xmlName: \"cacheControl\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n xmlName: \"contentType\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n xmlName: \"contentEncoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n xmlName: \"contentLanguage\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n xmlName: \"contentDisposition\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SourceModifiedAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"source-modified-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"SourceModifiedAccessConditions\",\n modelProperties: {\n sourceIfModifiedSince: {\n xmlName: \"sourceIfModifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n sourceIfUnmodifiedSince: {\n xmlName: \"sourceIfUnmodifiedSince\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n sourceIfMatch: {\n xmlName: \"sourceIfMatch\",\n type: {\n name: \"String\"\n }\n },\n sourceIfNoneMatch: {\n xmlName: \"sourceIfNoneMatch\",\n type: {\n name: \"String\"\n }\n },\n sourceIfTags: {\n xmlName: \"sourceIfTags\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CpkInfo: coreHttp.CompositeMapper = {\n xmlName: \"cpk-info\",\n type: {\n name: \"Composite\",\n className: \"CpkInfo\",\n modelProperties: {\n encryptionKey: {\n xmlName: \"encryptionKey\",\n type: {\n name: \"String\"\n }\n },\n encryptionKeySha256: {\n xmlName: \"encryptionKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionAlgorithm: {\n xmlName: \"encryptionAlgorithm\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"AES256\"\n ]\n }\n }\n }\n }\n};\n\nexport const BlobHTTPHeaders: coreHttp.CompositeMapper = {\n xmlName: \"blob-HTTP-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobHTTPHeaders\",\n modelProperties: {\n blobCacheControl: {\n xmlName: \"blobCacheControl\",\n type: {\n name: \"String\"\n }\n },\n blobContentType: {\n xmlName: \"blobContentType\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n xmlName: \"blobContentMD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobContentEncoding: {\n xmlName: \"blobContentEncoding\",\n type: {\n name: \"String\"\n }\n },\n blobContentLanguage: {\n xmlName: \"blobContentLanguage\",\n type: {\n name: \"String\"\n }\n },\n blobContentDisposition: {\n xmlName: \"blobContentDisposition\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SequenceNumberAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"sequence-number-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"SequenceNumberAccessConditions\",\n modelProperties: {\n ifSequenceNumberLessThanOrEqualTo: {\n xmlName: \"ifSequenceNumberLessThanOrEqualTo\",\n type: {\n name: \"Number\"\n }\n },\n ifSequenceNumberLessThan: {\n xmlName: \"ifSequenceNumberLessThan\",\n type: {\n name: \"Number\"\n }\n },\n ifSequenceNumberEqualTo: {\n xmlName: \"ifSequenceNumberEqualTo\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const AppendPositionAccessConditions: coreHttp.CompositeMapper = {\n xmlName: \"append-position-access-conditions\",\n type: {\n name: \"Composite\",\n className: \"AppendPositionAccessConditions\",\n modelProperties: {\n maxSize: {\n xmlName: \"maxSize\",\n type: {\n name: \"Number\"\n }\n },\n appendPosition: {\n xmlName: \"appendPosition\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\n\nexport const ServiceSetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-setproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetStatisticsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getstatistics-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceListContainersSegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-listcontainerssegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetUserDelegationKeyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getuserdelegationkey-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceSubmitBatchHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-submitbatch-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ServiceFilterBlobsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"service-filterblobs-headers\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-create-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesHeaders\",\n modelProperties: {\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"x-ms-has-immutability-policy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"x-ms-has-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n denyEncryptionScopeOverride: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerSetMetadataHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-setmetadata-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetAccessPolicyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getaccesspolicy-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyHeaders\",\n modelProperties: {\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerSetAccessPolicyHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-setaccesspolicy-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerRestoreHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-restore-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerAcquireLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-acquirelease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerReleaseLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-releaselease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerRenewLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-renewlease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerBreakLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-breaklease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerChangeLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-changelease-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerListBlobFlatSegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-listblobflatsegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerListBlobHierarchySegmentHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-listblobhierarchysegment-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ContainerGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"container-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-create-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectoryRenameHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-rename-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryRenameHeaders\",\n modelProperties: {\n marker: {\n serializedName: \"x-ms-continuation\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectoryDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryDeleteHeaders\",\n modelProperties: {\n marker: {\n serializedName: \"x-ms-continuation\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const DirectorySetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-setaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectorySetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DirectoryGetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"directory-getaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"DirectoryGetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsOwner: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n },\n xMsGroup: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n },\n xMsPermissions: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n },\n xMsAcl: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobDownloadHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-download-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getproperties-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n createdOn: {\n serializedName: \"x-ms-creation-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n isIncrementalCopy: {\n serializedName: \"x-ms-incremental-copy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"x-ms-copy-destination-snapshot\",\n type: {\n name: \"String\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n accessTier: {\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n serializedName: \"x-ms-access-tier-inferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"x-ms-archive-status\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"x-ms-access-tier-change-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"x-ms-expiry-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"String\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobDeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-delete-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetAccessControlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getaccesscontrol-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccessControlHeaders\",\n modelProperties: {\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsOwner: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n },\n xMsGroup: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n },\n xMsPermissions: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n },\n xMsAcl: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobRenameHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-rename-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobRenameHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\n\nexport const PageBlobCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-create-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobCreateHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-create-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobUploadHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-upload-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobUndeleteHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-undelete-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetExpiryHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setexpiry-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetHTTPHeadersHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-sethttpheaders-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHTTPHeadersHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetMetadataHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-setmetadata-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobAcquireLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-acquirelease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobReleaseLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-releaselease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobRenewLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-renewlease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobChangeLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-changelease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobBreakLeaseHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-breaklease-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobCreateSnapshotHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-createsnapshot-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotHeaders\",\n modelProperties: {\n snapshot: {\n serializedName: \"x-ms-snapshot\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobStartCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-startcopyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-copyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"success\"\n ]\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobAbortCopyFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-abortcopyfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetTierHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-settier-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetAccountInfoHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-getaccountinfo-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobStageBlockHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-stageblock-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobStageBlockFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-stageblockfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobCommitBlockListHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-commitblocklist-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlockBlobGetBlockListHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blockblob-getblocklist-headers\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUploadPagesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-uploadpages-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobClearPagesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-clearpages-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUploadPagesFromURLHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-uploadpagesfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobGetPageRangesHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-getpageranges-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobGetPageRangesDiffHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-getpagerangesdiff-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobResizeHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-resize-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobUpdateSequenceNumberHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-updatesequencenumber-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PageBlobCopyIncrementalHeaders: coreHttp.CompositeMapper = {\n serializedName: \"pageblob-copyincremental-headers\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobAppendBlockHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-appendblock-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobAppendBlockFromUrlHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-appendblockfromurl-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AppendBlobSealHeaders: coreHttp.CompositeMapper = {\n serializedName: \"appendblob-seal-headers\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobQueryHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-query-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"BlockBlob\",\n \"PageBlob\",\n \"AppendBlob\"\n ]\n }\n },\n copyCompletionTime: {\n serializedName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"pending\",\n \"success\",\n \"aborted\",\n \"failed\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"infinite\",\n \"fixed\"\n ]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"locked\",\n \"unlocked\"\n ]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobGetTagsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-gettags-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const BlobSetTagsHeaders: coreHttp.CompositeMapper = {\n serializedName: \"blob-settags-headers\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n BlobServiceProperties,\n BlobServiceStatistics,\n ContainerItem,\n ContainerProperties,\n CorsRule,\n FilterBlobItem,\n FilterBlobSegment,\n GeoReplication,\n KeyInfo,\n ListContainersSegmentResponse,\n Logging,\n Metrics,\n RetentionPolicy,\n ServiceFilterBlobsHeaders,\n ServiceGetAccountInfoHeaders,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n ServiceGetUserDelegationKeyHeaders,\n ServiceListContainersSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ServiceSubmitBatchHeaders,\n StaticWebsite,\n StorageError,\n UserDelegationKey\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\nexport const access: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"access\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-public-access\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const action0: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'acquire',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action1: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'release',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action2: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'renew',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action3: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'break',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action4: coreHttp.OperationParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n defaultValue: 'change',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action5: coreHttp.OperationQueryParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"action\",\n defaultValue: 'setAccessControl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const action6: coreHttp.OperationQueryParameter = {\n parameterPath: \"action\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"action\",\n defaultValue: 'getAccessControl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const appendPosition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"appendPosition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-appendpos\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobCacheControl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobCacheControl\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentDisposition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentDisposition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentEncoding: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentEncoding\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentLanguage: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentLanguage\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobContentLength: coreHttp.OperationParameter = {\n parameterPath: \"blobContentLength\",\n mapper: {\n required: true,\n serializedName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const blobContentType: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobHTTPHeaders\",\n \"blobContentType\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobSequenceNumber: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobSequenceNumber\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-sequence-number\",\n defaultValue: 0,\n type: {\n name: \"Number\"\n }\n }\n};\nexport const blobTagsString: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"blobTagsString\"\n ],\n mapper: {\n serializedName: \"x-ms-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType0: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'PageBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType1: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'AppendBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blobType2: coreHttp.OperationParameter = {\n parameterPath: \"blobType\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n defaultValue: 'BlockBlob',\n type: {\n name: \"String\"\n }\n }\n};\nexport const blockId: coreHttp.OperationQueryParameter = {\n parameterPath: \"blockId\",\n mapper: {\n required: true,\n serializedName: \"blockid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const breakPeriod: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"breakPeriod\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-break-period\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const cacheControl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"cacheControl\"\n ],\n mapper: {\n serializedName: \"x-ms-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp0: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'properties',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp1: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'stats',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp10: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'expiry',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp11: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'snapshot',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp12: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'copy',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp13: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'tier',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp14: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'query',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp15: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'tags',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp16: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'page',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp17: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'pagelist',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp18: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'incrementalcopy',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp19: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'appendblock',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp2: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'list',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp20: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'seal',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp21: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'block',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp22: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'blocklist',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp3: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'userdelegationkey',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp4: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'batch',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp5: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'blobs',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp6: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'metadata',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp7: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'acl',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp8: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'undelete',\n type: {\n name: \"String\"\n }\n }\n};\nexport const comp9: coreHttp.OperationQueryParameter = {\n parameterPath: \"comp\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"comp\",\n defaultValue: 'lease',\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentDisposition: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentDisposition\"\n ],\n mapper: {\n serializedName: \"x-ms-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentEncoding: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentEncoding\"\n ],\n mapper: {\n serializedName: \"x-ms-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentLanguage: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentLanguage\"\n ],\n mapper: {\n serializedName: \"x-ms-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const contentLength: coreHttp.OperationParameter = {\n parameterPath: \"contentLength\",\n mapper: {\n required: true,\n serializedName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const contentType: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryHttpHeaders\",\n \"contentType\"\n ],\n mapper: {\n serializedName: \"x-ms-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const copyActionAbortConstant: coreHttp.OperationParameter = {\n parameterPath: \"copyActionAbortConstant\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-copy-action\",\n defaultValue: 'abort',\n type: {\n name: \"String\"\n }\n }\n};\nexport const copyId: coreHttp.OperationQueryParameter = {\n parameterPath: \"copyId\",\n mapper: {\n required: true,\n serializedName: \"copyid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const copySource: coreHttp.OperationParameter = {\n parameterPath: \"copySource\",\n mapper: {\n required: true,\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const defaultEncryptionScope: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"defaultEncryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deletedContainerName: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deletedContainerName\"\n ],\n mapper: {\n serializedName: \"x-ms-deleted-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deletedContainerVersion: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deletedContainerVersion\"\n ],\n mapper: {\n serializedName: \"x-ms-deleted-container-version\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const deleteSnapshots: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"deleteSnapshots\"\n ],\n mapper: {\n serializedName: \"x-ms-delete-snapshots\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"include\",\n \"only\"\n ]\n }\n }\n};\nexport const delimiter: coreHttp.OperationQueryParameter = {\n parameterPath: \"delimiter\",\n mapper: {\n required: true,\n serializedName: \"delimiter\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const directoryProperties: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"directoryProperties\"\n ],\n mapper: {\n serializedName: \"x-ms-properties\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const duration: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"duration\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-duration\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const encryptionAlgorithm: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionAlgorithm\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-algorithm\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"AES256\"\n ]\n }\n }\n};\nexport const encryptionKey: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionKey\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-key\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const encryptionKeySha256: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"cpkInfo\",\n \"encryptionKeySha256\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const encryptionScope: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"encryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const expiresOn: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"expiresOn\"\n ],\n mapper: {\n serializedName: \"x-ms-expiry-time\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const expiryOptions: coreHttp.OperationParameter = {\n parameterPath: \"expiryOptions\",\n mapper: {\n required: true,\n serializedName: \"x-ms-expiry-option\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const group: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"group\"\n ],\n mapper: {\n serializedName: \"x-ms-group\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifMatch\"\n ],\n mapper: {\n serializedName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifModifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifModifiedSince\"\n ],\n mapper: {\n serializedName: \"If-Modified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const ifNoneMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifNoneMatch\"\n ],\n mapper: {\n serializedName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifSequenceNumberEqualTo: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-eq\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifSequenceNumberLessThan: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThan\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-lt\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifSequenceNumberLessThanOrEqualTo: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThanOrEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-le\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const ifTags: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifTags\"\n ],\n mapper: {\n serializedName: \"x-ms-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const ifUnmodifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"modifiedAccessConditions\",\n \"ifUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"If-Unmodified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const include0: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"include\"\n ],\n mapper: {\n serializedName: \"include\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"metadata\",\n \"deleted\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nexport const include1: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"include\"\n ],\n mapper: {\n serializedName: \"include\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"copy\",\n \"deleted\",\n \"metadata\",\n \"snapshots\",\n \"uncommittedblobs\",\n \"versions\",\n \"tags\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nexport const leaseId0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"leaseAccessConditions\",\n \"leaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const leaseId1: coreHttp.OperationParameter = {\n parameterPath: \"leaseId\",\n mapper: {\n required: true,\n serializedName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const listType: coreHttp.OperationQueryParameter = {\n parameterPath: \"listType\",\n mapper: {\n required: true,\n serializedName: \"blocklisttype\",\n defaultValue: 'committed',\n type: {\n name: \"Enum\",\n allowedValues: [\n \"committed\",\n \"uncommitted\",\n \"all\"\n ]\n }\n }\n};\nexport const marker0: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"marker\"\n ],\n mapper: {\n serializedName: \"marker\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const marker1: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"marker\"\n ],\n mapper: {\n serializedName: \"continuation\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const maxPageSize: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"maxPageSize\"\n ],\n mapper: {\n serializedName: \"maxresults\",\n constraints: {\n InclusiveMinimum: 1\n },\n type: {\n name: \"Number\"\n }\n }\n};\nexport const maxSize: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"maxSize\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-maxsize\",\n type: {\n name: \"Number\"\n }\n }\n};\nexport const metadata: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"metadata\"\n ],\n mapper: {\n serializedName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: {\n type: {\n name: \"String\"\n }\n }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n }\n};\nexport const multipartContentType: coreHttp.OperationParameter = {\n parameterPath: \"multipartContentType\",\n mapper: {\n required: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const owner: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"owner\"\n ],\n mapper: {\n serializedName: \"x-ms-owner\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const pageWrite0: coreHttp.OperationParameter = {\n parameterPath: \"pageWrite\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n defaultValue: 'update',\n type: {\n name: \"String\"\n }\n }\n};\nexport const pageWrite1: coreHttp.OperationParameter = {\n parameterPath: \"pageWrite\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n defaultValue: 'clear',\n type: {\n name: \"String\"\n }\n }\n};\nexport const pathRenameMode: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"pathRenameMode\"\n ],\n mapper: {\n serializedName: \"mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"legacy\",\n \"posix\"\n ]\n }\n }\n};\nexport const posixAcl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixAcl\"\n ],\n mapper: {\n serializedName: \"x-ms-acl\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const posixPermissions: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixPermissions\"\n ],\n mapper: {\n serializedName: \"x-ms-permissions\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const posixUmask: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"posixUmask\"\n ],\n mapper: {\n serializedName: \"x-ms-umask\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const prefix: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"prefix\"\n ],\n mapper: {\n serializedName: \"prefix\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const preventEncryptionScopeOverride: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"preventEncryptionScopeOverride\"\n ],\n mapper: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const prevsnapshot: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"prevsnapshot\"\n ],\n mapper: {\n serializedName: \"prevsnapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const prevSnapshotUrl: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"prevSnapshotUrl\"\n ],\n mapper: {\n serializedName: \"x-ms-previous-snapshot-url\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const proposedLeaseId0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"proposedLeaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const proposedLeaseId1: coreHttp.OperationParameter = {\n parameterPath: \"proposedLeaseId\",\n mapper: {\n required: true,\n serializedName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const range0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"range\"\n ],\n mapper: {\n serializedName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const range1: coreHttp.OperationParameter = {\n parameterPath: \"range\",\n mapper: {\n required: true,\n serializedName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const rangeGetContentCRC64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rangeGetContentCRC64\"\n ],\n mapper: {\n serializedName: \"x-ms-range-get-content-crc64\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const rangeGetContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rangeGetContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-range-get-content-md5\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const recursiveDirectoryDelete: coreHttp.OperationQueryParameter = {\n parameterPath: \"recursiveDirectoryDelete\",\n mapper: {\n required: true,\n serializedName: \"recursive\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const rehydratePriority: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"rehydratePriority\"\n ],\n mapper: {\n serializedName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const renameSource: coreHttp.OperationParameter = {\n parameterPath: \"renameSource\",\n mapper: {\n required: true,\n serializedName: \"x-ms-rename-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const requestId: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"requestId\"\n ],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const resource: coreHttp.OperationQueryParameter = {\n parameterPath: \"resource\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"resource\",\n defaultValue: 'directory',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype0: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'service',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype1: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'account',\n type: {\n name: \"String\"\n }\n }\n};\nexport const restype2: coreHttp.OperationQueryParameter = {\n parameterPath: \"restype\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"restype\",\n defaultValue: 'container',\n type: {\n name: \"String\"\n }\n }\n};\nexport const sealBlob: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sealBlob\"\n ],\n mapper: {\n serializedName: \"x-ms-seal-blob\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const sequenceNumberAction: coreHttp.OperationParameter = {\n parameterPath: \"sequenceNumberAction\",\n mapper: {\n required: true,\n serializedName: \"x-ms-sequence-number-action\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"max\",\n \"update\",\n \"increment\"\n ]\n }\n }\n};\nexport const snapshot: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"snapshot\"\n ],\n mapper: {\n serializedName: \"snapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceContentCrc64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceContentCrc64\"\n ],\n mapper: {\n serializedName: \"x-ms-source-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const sourceContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceContentMD5\"\n ],\n mapper: {\n serializedName: \"x-ms-source-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const sourceIfMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfModifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfModifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-modified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const sourceIfNoneMatch: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfNoneMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-none-match\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfTags: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfTags\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceIfUnmodifiedSince: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-unmodified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nexport const sourceLeaseId: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceLeaseId\"\n ],\n mapper: {\n serializedName: \"x-ms-source-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceRange0: coreHttp.OperationParameter = {\n parameterPath: \"sourceRange\",\n mapper: {\n required: true,\n serializedName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceRange1: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"sourceRange\"\n ],\n mapper: {\n serializedName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const sourceUrl: coreHttp.OperationParameter = {\n parameterPath: \"sourceUrl\",\n mapper: {\n required: true,\n serializedName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const tier0: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"tier\"\n ],\n mapper: {\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const tier1: coreHttp.OperationParameter = {\n parameterPath: \"tier\",\n mapper: {\n required: true,\n serializedName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const timeoutInSeconds: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"timeoutInSeconds\"\n ],\n mapper: {\n serializedName: \"timeout\",\n constraints: {\n InclusiveMinimum: 0\n },\n type: {\n name: \"Number\"\n }\n }\n};\nexport const transactionalContentCrc64: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"transactionalContentCrc64\"\n ],\n mapper: {\n serializedName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const transactionalContentMD5: coreHttp.OperationParameter = {\n parameterPath: [\n \"options\",\n \"transactionalContentMD5\"\n ],\n mapper: {\n serializedName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nexport const upn: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"upn\"\n ],\n mapper: {\n serializedName: \"upn\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nexport const url: coreHttp.OperationURLParameter = {\n parameterPath: \"url\",\n mapper: {\n required: true,\n serializedName: \"url\",\n defaultValue: '',\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nexport const version: coreHttp.OperationParameter = {\n parameterPath: \"version\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-version\",\n defaultValue: '2020-02-10',\n type: {\n name: \"String\"\n }\n }\n};\nexport const versionId: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"versionId\"\n ],\n mapper: {\n serializedName: \"versionid\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const where: coreHttp.OperationQueryParameter = {\n parameterPath: [\n \"options\",\n \"where\"\n ],\n mapper: {\n serializedName: \"where\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const xMsRequiresSync: coreHttp.OperationParameter = {\n parameterPath: \"xMsRequiresSync\",\n mapper: {\n required: true,\n isConstant: true,\n serializedName: \"x-ms-requires-sync\",\n defaultValue: 'true',\n type: {\n name: \"String\"\n }\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/serviceMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Service. */\nexport class Service {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Service.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * Sets properties for a storage account's Blob service endpoint, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules\n * @param blobServiceProperties The StorageService properties.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams): Promise;\n /**\n * @param blobServiceProperties The StorageService properties.\n * @param callback The callback\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blobServiceProperties The StorageService properties.\n * @param options The optional parameters\n * @param callback The callback\n */\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options: Models.ServiceSetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n setProperties(blobServiceProperties: Models.BlobServiceProperties, options?: Models.ServiceSetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blobServiceProperties,\n options\n },\n setPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * gets the properties of a storage account's Blob service, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.ServiceGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.ServiceGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.ServiceGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only available on the\n * secondary location endpoint when read-access geo-redundant replication is enabled for the\n * storage account.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getStatistics(options?: Models.ServiceGetStatisticsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getStatistics(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getStatistics(options: Models.ServiceGetStatisticsOptionalParams, callback: coreHttp.ServiceCallback): void;\n getStatistics(options?: Models.ServiceGetStatisticsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getStatisticsOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The List Containers Segment operation returns a list of the containers under the specified\n * account\n * @param [options] The optional parameters\n * @returns Promise\n */\n listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n listContainersSegment(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n listContainersSegment(options: Models.ServiceListContainersSegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listContainersSegment(options?: Models.ServiceListContainersSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n listContainersSegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n * @param keyInfo\n * @param [options] The optional parameters\n * @returns Promise\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, options?: Models.ServiceGetUserDelegationKeyOptionalParams): Promise;\n /**\n * @param keyInfo\n * @param callback The callback\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, callback: coreHttp.ServiceCallback): void;\n /**\n * @param keyInfo\n * @param options The optional parameters\n * @param callback The callback\n */\n getUserDelegationKey(keyInfo: Models.KeyInfo, options: Models.ServiceGetUserDelegationKeyOptionalParams, callback: coreHttp.ServiceCallback): void;\n getUserDelegationKey(keyInfo: Models.KeyInfo, options?: Models.ServiceGetUserDelegationKeyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n keyInfo,\n options\n },\n getUserDelegationKeyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param [options] The optional parameters\n * @returns Promise\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options?: Models.ServiceSubmitBatchOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param callback The callback\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a\n * batch boundary. Example header value: multipart/mixed; boundary=batch_\n * @param options The optional parameters\n * @param callback The callback\n */\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options: Models.ServiceSubmitBatchOptionalParams, callback: coreHttp.ServiceCallback): void;\n submitBatch(body: coreHttp.HttpRequestBody, contentLength: number, multipartContentType: string, options?: Models.ServiceSubmitBatchOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n multipartContentType,\n options\n },\n submitBatchOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags match\n * a given search expression. Filter blobs searches across all containers within a storage account\n * but can be scoped within the expression to a single container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n filterBlobs(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n filterBlobs(options: Models.ServiceFilterBlobsOptionalParams, callback: coreHttp.ServiceCallback): void;\n filterBlobs(options?: Models.ServiceFilterBlobsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n filterBlobsOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst setPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"blobServiceProperties\",\n mapper: {\n ...Mappers.BlobServiceProperties,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 202: {\n headersMapper: Mappers.ServiceSetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceSetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobServiceProperties,\n headersMapper: Mappers.ServiceGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getStatisticsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp1\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobServiceStatistics,\n headersMapper: Mappers.ServiceGetStatisticsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetStatisticsHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listContainersSegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include0,\n Parameters.timeoutInSeconds,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListContainersSegmentResponse,\n headersMapper: Mappers.ServiceListContainersSegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceListContainersSegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getUserDelegationKeyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype0,\n Parameters.comp3\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"keyInfo\",\n mapper: {\n ...Mappers.KeyInfo,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n bodyMapper: Mappers.UserDelegationKey,\n headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ServiceGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst submitBatchOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp4\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.multipartContentType,\n Parameters.version,\n Parameters.requestId\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 202: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.ServiceSubmitBatchHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceSubmitBatchHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst filterBlobsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.where,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.comp5\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.FilterBlobSegment,\n headersMapper: Mappers.ServiceFilterBlobsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ServiceFilterBlobsHeaders\n }\n },\n isXML: true,\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n AccessPolicy,\n BlobFlatListSegment,\n BlobHierarchyListSegment,\n BlobItemInternal,\n BlobPrefix,\n BlobPropertiesInternal,\n BlobTag,\n BlobTags,\n ContainerAcquireLeaseHeaders,\n ContainerBreakLeaseHeaders,\n ContainerChangeLeaseHeaders,\n ContainerCreateHeaders,\n ContainerDeleteHeaders,\n ContainerGetAccessPolicyHeaders,\n ContainerGetAccountInfoHeaders,\n ContainerGetPropertiesHeaders,\n ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobHierarchySegmentHeaders,\n ContainerReleaseLeaseHeaders,\n ContainerRenewLeaseHeaders,\n ContainerRestoreHeaders,\n ContainerSetAccessPolicyHeaders,\n ContainerSetMetadataHeaders,\n ListBlobsFlatSegmentResponse,\n ListBlobsHierarchySegmentResponse,\n SignedIdentifier,\n StorageError\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/containerMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Container. */\nexport class Container {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Container.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * creates a new container under the specified account. If the container with the same name already\n * exists, the operation fails\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(options?: Models.ContainerCreateOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n create(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n create(options: Models.ContainerCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(options?: Models.ContainerCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * returns all user-defined metadata and system properties for the specified container. The data\n * returned does not include the container's list of blobs\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.ContainerGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.ContainerGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.ContainerGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * operation marks the specified container for deletion. The container and any blobs contained\n * within it are later deleted during garbage collection\n * @param [options] The optional parameters\n * @returns Promise\n */\n deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n deleteMethod(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n deleteMethod(options: Models.ContainerDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void;\n deleteMethod(options?: Models.ContainerDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n deleteMethodOperationSpec,\n callback) as Promise;\n }\n\n /**\n * operation sets one or more user-defined name-value pairs for the specified container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setMetadata(options?: Models.ContainerSetMetadataOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setMetadata(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setMetadata(options: Models.ContainerSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void;\n setMetadata(options?: Models.ContainerSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setMetadataOperationSpec,\n callback) as Promise;\n }\n\n /**\n * gets the permissions for the specified container. The permissions indicate whether container\n * data may be accessed publicly.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getAccessPolicy(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccessPolicy(options: Models.ContainerGetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void;\n getAccessPolicy(options?: Models.ContainerGetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccessPolicyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * sets the permissions for the specified container. The permissions indicate whether blobs in a\n * container may be accessed publicly.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setAccessPolicy(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setAccessPolicy(options: Models.ContainerSetAccessPolicyOptionalParams, callback: coreHttp.ServiceCallback): void;\n setAccessPolicy(options?: Models.ContainerSetAccessPolicyOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setAccessPolicyOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Restores a previously-deleted container.\n * @param [options] The optional parameters\n * @returns Promise\n */\n restore(options?: Models.ContainerRestoreOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n restore(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n restore(options: Models.ContainerRestoreOptionalParams, callback: coreHttp.ServiceCallback): void;\n restore(options?: Models.ContainerRestoreOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n restoreOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param [options] The optional parameters\n * @returns Promise\n */\n acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n acquireLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n acquireLease(options: Models.ContainerAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n acquireLease(options?: Models.ContainerAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n acquireLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n releaseLease(leaseId: string, options: Models.ContainerReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n releaseLease(leaseId: string, options?: Models.ContainerReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n releaseLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n renewLease(leaseId: string, options: Models.ContainerRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n renewLease(leaseId: string, options?: Models.ContainerRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n renewLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param [options] The optional parameters\n * @returns Promise\n */\n breakLease(options?: Models.ContainerBreakLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n breakLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n breakLease(options: Models.ContainerBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n breakLease(options?: Models.ContainerBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n breakLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration\n * can be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param [options] The optional parameters\n * @returns Promise\n */\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The optional parameters\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, options: Models.ContainerChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.ContainerChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n proposedLeaseId,\n options\n },\n changeLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param [options] The optional parameters\n * @returns Promise\n */\n listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n listBlobFlatSegment(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n listBlobFlatSegment(options: Models.ContainerListBlobFlatSegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listBlobFlatSegment(options?: Models.ContainerListBlobFlatSegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n listBlobFlatSegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param [options] The optional parameters\n * @returns Promise\n */\n listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams): Promise;\n /**\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param callback The callback\n */\n listBlobHierarchySegment(delimiter: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param options The optional parameters\n * @param callback The callback\n */\n listBlobHierarchySegment(delimiter: string, options: Models.ContainerListBlobHierarchySegmentOptionalParams, callback: coreHttp.ServiceCallback): void;\n listBlobHierarchySegment(delimiter: string, options?: Models.ContainerListBlobHierarchySegmentOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n delimiter,\n options\n },\n listBlobHierarchySegmentOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.access,\n Parameters.version,\n Parameters.requestId,\n Parameters.defaultEncryptionScope,\n Parameters.preventEncryptionScopeOverride\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst deleteMethodOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"DELETE\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 202: {\n headersMapper: Mappers.ContainerDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerDeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setMetadataOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp6\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerSetMetadataHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerSetMetadataHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccessPolicyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp7\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0\n ],\n responses: {\n 200: {\n bodyMapper: {\n xmlElementName: \"SignedIdentifier\",\n serializedName: \"parsedResponse\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n },\n headersMapper: Mappers.ContainerGetAccessPolicyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetAccessPolicyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setAccessPolicyOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp7\n ],\n headerParameters: [\n Parameters.access,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"containerAcl\"\n ],\n mapper: {\n xmlName: \"SignedIdentifiers\",\n xmlElementName: \"SignedIdentifier\",\n serializedName: \"containerAcl\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n headersMapper: Mappers.ContainerSetAccessPolicyHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerSetAccessPolicyHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst restoreOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp8\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.deletedContainerName,\n Parameters.deletedContainerVersion\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerRestoreHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerRestoreHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst acquireLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.duration,\n Parameters.proposedLeaseId0,\n Parameters.version,\n Parameters.requestId,\n Parameters.action0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 201: {\n headersMapper: Mappers.ContainerAcquireLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerAcquireLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst releaseLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action1,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerReleaseLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerReleaseLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renewLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action2,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerRenewLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerRenewLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst breakLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.breakPeriod,\n Parameters.version,\n Parameters.requestId,\n Parameters.action3,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 202: {\n headersMapper: Mappers.ContainerBreakLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerBreakLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst changeLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9,\n Parameters.restype2\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.proposedLeaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action4,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerChangeLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerChangeLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listBlobFlatSegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include1,\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListBlobsFlatSegmentResponse,\n headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst listBlobHierarchySegmentOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.prefix,\n Parameters.delimiter,\n Parameters.marker0,\n Parameters.maxPageSize,\n Parameters.include1,\n Parameters.timeoutInSeconds,\n Parameters.restype2,\n Parameters.comp2\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.ListBlobsHierarchySegmentResponse,\n headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.ContainerGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.ContainerGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n ArrowConfiguration,\n ArrowField,\n BlobAbortCopyFromURLHeaders,\n BlobAcquireLeaseHeaders,\n BlobBreakLeaseHeaders,\n BlobChangeLeaseHeaders,\n BlobCopyFromURLHeaders,\n BlobCreateSnapshotHeaders,\n BlobDeleteHeaders,\n BlobDownloadHeaders,\n BlobGetAccessControlHeaders,\n BlobGetAccountInfoHeaders,\n BlobGetPropertiesHeaders,\n BlobGetTagsHeaders,\n BlobQueryHeaders,\n BlobReleaseLeaseHeaders,\n BlobRenameHeaders,\n BlobRenewLeaseHeaders,\n BlobSetAccessControlHeaders,\n BlobSetExpiryHeaders,\n BlobSetHTTPHeadersHeaders,\n BlobSetMetadataHeaders,\n BlobSetTagsHeaders,\n BlobSetTierHeaders,\n BlobStartCopyFromURLHeaders,\n BlobTag,\n BlobTags,\n BlobUndeleteHeaders,\n DataLakeStorageError,\n DataLakeStorageErrorError,\n DelimitedTextConfiguration,\n JsonTextConfiguration,\n QueryFormat,\n QueryRequest,\n QuerySerialization,\n StorageError\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/blobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a Blob. */\nexport class Blob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a Blob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Download operation reads or downloads a blob from the system, including its metadata and\n * properties. You can also call Download to read a snapshot.\n * @param [options] The optional parameters\n * @returns Promise\n */\n download(options?: Models.BlobDownloadOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n download(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n download(options: Models.BlobDownloadOptionalParams, callback: coreHttp.ServiceCallback): void;\n download(options?: Models.BlobDownloadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n downloadOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and\n * system properties for the blob. It does not return the content of the blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getProperties(options?: Models.BlobGetPropertiesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getProperties(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getProperties(options: Models.BlobGetPropertiesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getProperties(options?: Models.BlobGetPropertiesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPropertiesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is\n * permanently removed from the storage account. If the storage account's soft delete feature is\n * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible\n * immediately. However, the blob service retains the blob or snapshot for the number of days\n * specified by the DeleteRetentionPolicy section of [Storage service properties]\n * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data\n * is permanently removed from the storage account. Note that you continue to be charged for the\n * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify\n * the \"include=deleted\" query parameter to discover which blobs and snapshots have been soft\n * deleted. You can then use the Undelete Blob API to restore a soft-deleted blob. All other\n * operations on a soft-deleted blob or snapshot causes the service to return an HTTP status code\n * of 404 (ResourceNotFound).\n * @param [options] The optional parameters\n * @returns Promise\n */\n deleteMethod(options?: Models.BlobDeleteMethodOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n deleteMethod(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n deleteMethod(options: Models.BlobDeleteMethodOptionalParams, callback: coreHttp.ServiceCallback): void;\n deleteMethod(options?: Models.BlobDeleteMethodOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n deleteMethodOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Set the owner, group, permissions, or access control list for a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setAccessControl(options?: Models.BlobSetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setAccessControl(options: Models.BlobSetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n setAccessControl(options?: Models.BlobSetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setAccessControlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Get the owner, group, permissions, or access control list for a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccessControl(options?: Models.BlobGetAccessControlOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getAccessControl(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccessControl(options: Models.BlobGetAccessControlOptionalParams, callback: coreHttp.ServiceCallback): void;\n getAccessControl(options?: Models.BlobGetAccessControlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccessControlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Rename a blob/file. By default, the destination is overwritten and if the destination already\n * exists and has a lease the lease is broken. This operation supports conditional HTTP requests.\n * For more information, see [Specifying Conditional Headers for Blob Service\n * Operations](https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations).\n * To fail if the destination already exists, use a conditional request with If-None-Match: \"*\".\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param [options] The optional parameters\n * @returns Promise\n */\n rename(renameSource: string, options?: Models.BlobRenameOptionalParams): Promise;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param callback The callback\n */\n rename(renameSource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param renameSource The file or directory to be renamed. The value must have the following\n * format: \"/{filesysystem}/{path}\". If \"x-ms-properties\" is specified, the properties will\n * overwrite the existing properties; otherwise, the existing properties will be preserved.\n * @param options The optional parameters\n * @param callback The callback\n */\n rename(renameSource: string, options: Models.BlobRenameOptionalParams, callback: coreHttp.ServiceCallback): void;\n rename(renameSource: string, options?: Models.BlobRenameOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n renameSource,\n options\n },\n renameOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Undelete a blob that was previously soft deleted\n * @param [options] The optional parameters\n * @returns Promise\n */\n undelete(options?: Models.BlobUndeleteOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n undelete(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n undelete(options: Models.BlobUndeleteOptionalParams, callback: coreHttp.ServiceCallback): void;\n undelete(options?: Models.BlobUndeleteOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n undeleteOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Sets the time a blob will expire and be deleted.\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param [options] The optional parameters\n * @returns Promise\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams): Promise;\n /**\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param callback The callback\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, callback: coreHttp.ServiceCallback): void;\n /**\n * @param expiryOptions Required. Indicates mode of the expiry time. Possible values include:\n * 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'\n * @param options The optional parameters\n * @param callback The callback\n */\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options: Models.BlobSetExpiryOptionalParams, callback: coreHttp.ServiceCallback): void;\n setExpiry(expiryOptions: Models.BlobExpiryOptions, options?: Models.BlobSetExpiryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n expiryOptions,\n options\n },\n setExpiryOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set HTTP Headers operation sets system properties on the blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setHTTPHeaders(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setHTTPHeaders(options: Models.BlobSetHTTPHeadersOptionalParams, callback: coreHttp.ServiceCallback): void;\n setHTTPHeaders(options?: Models.BlobSetHTTPHeadersOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setHTTPHeadersOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more\n * name-value pairs\n * @param [options] The optional parameters\n * @returns Promise\n */\n setMetadata(options?: Models.BlobSetMetadataOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setMetadata(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setMetadata(options: Models.BlobSetMetadataOptionalParams, callback: coreHttp.ServiceCallback): void;\n setMetadata(options?: Models.BlobSetMetadataOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setMetadataOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param [options] The optional parameters\n * @returns Promise\n */\n acquireLease(options?: Models.BlobAcquireLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n acquireLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n acquireLease(options: Models.BlobAcquireLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n acquireLease(options?: Models.BlobAcquireLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n acquireLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n releaseLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n releaseLease(leaseId: string, options: Models.BlobReleaseLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n releaseLease(leaseId: string, options?: Models.BlobReleaseLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n releaseLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param [options] The optional parameters\n * @returns Promise\n */\n renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param callback The callback\n */\n renewLease(leaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The optional parameters\n * @param callback The callback\n */\n renewLease(leaseId: string, options: Models.BlobRenewLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n renewLease(leaseId: string, options?: Models.BlobRenewLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n options\n },\n renewLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param [options] The optional parameters\n * @returns Promise\n */\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams): Promise;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The optional parameters\n * @param callback The callback\n */\n changeLease(leaseId: string, proposedLeaseId: string, options: Models.BlobChangeLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n changeLease(leaseId: string, proposedLeaseId: string, options?: Models.BlobChangeLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n leaseId,\n proposedLeaseId,\n options\n },\n changeLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param [options] The optional parameters\n * @returns Promise\n */\n breakLease(options?: Models.BlobBreakLeaseOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n breakLease(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n breakLease(options: Models.BlobBreakLeaseOptionalParams, callback: coreHttp.ServiceCallback): void;\n breakLease(options?: Models.BlobBreakLeaseOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n breakLeaseOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Create Snapshot operation creates a read-only snapshot of a blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n createSnapshot(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n createSnapshot(options: Models.BlobCreateSnapshotOptionalParams, callback: coreHttp.ServiceCallback): void;\n createSnapshot(options?: Models.BlobCreateSnapshotOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n createSnapshotOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Start Copy From URL operation copies a blob or an internet resource to a new blob.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n startCopyFromURL(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n startCopyFromURL(copySource: string, options: Models.BlobStartCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n startCopyFromURL(copySource: string, options?: Models.BlobStartCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n startCopyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n copyFromURL(copySource: string, options?: Models.BlobCopyFromURLOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n copyFromURL(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n copyFromURL(copySource: string, options: Models.BlobCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n copyFromURL(copySource: string, options?: Models.BlobCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n copyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a\n * destination blob with zero length and full metadata.\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param [options] The optional parameters\n * @returns Promise\n */\n abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams): Promise;\n /**\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param callback The callback\n */\n abortCopyFromURL(copyId: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param options The optional parameters\n * @param callback The callback\n */\n abortCopyFromURL(copyId: string, options: Models.BlobAbortCopyFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n abortCopyFromURL(copyId: string, options?: Models.BlobAbortCopyFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copyId,\n options\n },\n abortCopyFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a\n * premium storage account and on a block blob in a blob storage account (locally redundant storage\n * only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob.\n * A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the\n * blob's ETag.\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param [options] The optional parameters\n * @returns Promise\n */\n setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams): Promise;\n /**\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param callback The callback\n */\n setTier(tier: Models.AccessTier, callback: coreHttp.ServiceCallback): void;\n /**\n * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6',\n * 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', 'P80', 'Hot', 'Cool', 'Archive'\n * @param options The optional parameters\n * @param callback The callback\n */\n setTier(tier: Models.AccessTier, options: Models.BlobSetTierOptionalParams, callback: coreHttp.ServiceCallback): void;\n setTier(tier: Models.AccessTier, options?: Models.BlobSetTierOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n tier,\n options\n },\n setTierOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Returns the sku name and account kind\n * @param [options] The optional parameters\n * @returns Promise\n */\n getAccountInfo(options?: coreHttp.RequestOptionsBase): Promise;\n /**\n * @param callback The callback\n */\n getAccountInfo(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getAccountInfo(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback): void;\n getAccountInfo(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getAccountInfoOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Query operation enables users to select/project on blob data by providing simple query\n * expressions.\n * @param [options] The optional parameters\n * @returns Promise\n */\n query(options?: Models.BlobQueryOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n query(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n query(options: Models.BlobQueryOptionalParams, callback: coreHttp.ServiceCallback): void;\n query(options?: Models.BlobQueryOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n queryOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Tags operation enables users to get the tags associated with a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getTags(options?: Models.BlobGetTagsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getTags(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getTags(options: Models.BlobGetTagsOptionalParams, callback: coreHttp.ServiceCallback): void;\n getTags(options?: Models.BlobGetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getTagsOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Set Tags operation enables users to set tags on a blob.\n * @param [options] The optional parameters\n * @returns Promise\n */\n setTags(options?: Models.BlobSetTagsOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n setTags(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n setTags(options: Models.BlobSetTagsOptionalParams, callback: coreHttp.ServiceCallback): void;\n setTags(options?: Models.BlobSetTagsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n setTagsOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst downloadOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.range0,\n Parameters.rangeGetContentMD5,\n Parameters.rangeGetContentCRC64,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobDownloadHeaders\n },\n 206: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobDownloadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobDownloadHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPropertiesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"HEAD\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetPropertiesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetPropertiesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst deleteMethodOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"DELETE\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.deleteSnapshots,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobDeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PATCH\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.action5\n ],\n headerParameters: [\n Parameters.owner,\n Parameters.group,\n Parameters.posixPermissions,\n Parameters.posixAcl,\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobSetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccessControlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"HEAD\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.upn,\n Parameters.action6\n ],\n headerParameters: [\n Parameters.requestId,\n Parameters.version,\n Parameters.leaseId0,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetAccessControlHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobGetAccessControlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renameOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{filesystem}/{path}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.pathRenameMode\n ],\n headerParameters: [\n Parameters.renameSource,\n Parameters.directoryProperties,\n Parameters.posixPermissions,\n Parameters.posixUmask,\n Parameters.sourceLeaseId,\n Parameters.version,\n Parameters.requestId,\n Parameters.cacheControl,\n Parameters.contentType,\n Parameters.contentEncoding,\n Parameters.contentLanguage,\n Parameters.contentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobRenameHeaders\n },\n default: {\n bodyMapper: Mappers.DataLakeStorageError,\n headersMapper: Mappers.BlobRenameHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst undeleteOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp8\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobUndeleteHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobUndeleteHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setExpiryOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp10\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.expiryOptions,\n Parameters.expiresOn\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetExpiryHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetExpiryHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setHTTPHeadersOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentMD5,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetHTTPHeadersHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetHTTPHeadersHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setMetadataOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp6\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetMetadataHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetMetadataHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst acquireLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.duration,\n Parameters.proposedLeaseId0,\n Parameters.version,\n Parameters.requestId,\n Parameters.action0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobAcquireLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobAcquireLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst releaseLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action1,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobReleaseLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobReleaseLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst renewLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action2,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobRenewLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobRenewLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst changeLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.leaseId1,\n Parameters.proposedLeaseId1,\n Parameters.version,\n Parameters.requestId,\n Parameters.action4,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobChangeLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobChangeLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst breakLeaseOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp9\n ],\n headerParameters: [\n Parameters.breakPeriod,\n Parameters.version,\n Parameters.requestId,\n Parameters.action3,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobBreakLeaseHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobBreakLeaseHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst createSnapshotOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp11\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlobCreateSnapshotHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobCreateSnapshotHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst startCopyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.tier0,\n Parameters.rehydratePriority,\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.sealBlob,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.sourceIfTags,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobStartCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobStartCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst copyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.metadata,\n Parameters.tier0,\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.sourceContentMD5,\n Parameters.blobTagsString,\n Parameters.xMsRequiresSync,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.leaseId0\n ],\n responses: {\n 202: {\n headersMapper: Mappers.BlobCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst abortCopyFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.copyId,\n Parameters.timeoutInSeconds,\n Parameters.comp12\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.copyActionAbortConstant,\n Parameters.leaseId0\n ],\n responses: {\n 204: {\n headersMapper: Mappers.BlobAbortCopyFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobAbortCopyFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setTierOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.timeoutInSeconds,\n Parameters.comp13\n ],\n headerParameters: [\n Parameters.tier1,\n Parameters.rehydratePriority,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobSetTierHeaders\n },\n 202: {\n headersMapper: Mappers.BlobSetTierHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetTierHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getAccountInfoOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.restype1,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.version\n ],\n responses: {\n 200: {\n headersMapper: Mappers.BlobGetAccountInfoHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetAccountInfoHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst queryOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"POST\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.comp14\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"queryRequest\"\n ],\n mapper: Mappers.QueryRequest\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 200: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobQueryHeaders\n },\n 206: {\n bodyMapper: {\n serializedName: \"parsedResponse\",\n type: {\n name: \"Stream\"\n }\n },\n headersMapper: Mappers.BlobQueryHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobQueryHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getTagsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.snapshot,\n Parameters.versionId,\n Parameters.comp15\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlobTags,\n headersMapper: Mappers.BlobGetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobGetTagsHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst setTagsOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.versionId,\n Parameters.comp15\n ],\n headerParameters: [\n Parameters.version,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.requestId,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: [\n \"options\",\n \"tags\"\n ],\n mapper: Mappers.BlobTags\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 204: {\n headersMapper: Mappers.BlobSetTagsHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlobSetTagsHeaders\n }\n },\n isXML: true,\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n ClearRange,\n PageBlobClearPagesHeaders,\n PageBlobCopyIncrementalHeaders,\n PageBlobCreateHeaders,\n PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesHeaders,\n PageBlobResizeHeaders,\n PageBlobUpdateSequenceNumberHeaders,\n PageBlobUploadPagesFromURLHeaders,\n PageBlobUploadPagesHeaders,\n PageList,\n PageRange,\n StorageError\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/pageBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a PageBlob. */\nexport class PageBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a PageBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Create operation creates a new page blob.\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param callback The callback\n */\n create(contentLength: number, blobContentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param options The optional parameters\n * @param callback The callback\n */\n create(contentLength: number, blobContentLength: number, options: Models.PageBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(contentLength: number, blobContentLength: number, options?: Models.PageBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n blobContentLength,\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.PageBlobUploadPagesOptionalParams, callback: coreHttp.ServiceCallback): void;\n uploadPages(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.PageBlobUploadPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n uploadPagesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Clear Pages operation clears a set of pages from a page blob\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n clearPages(contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n clearPages(contentLength: number, options: Models.PageBlobClearPagesOptionalParams, callback: coreHttp.ServiceCallback): void;\n clearPages(contentLength: number, options?: Models.PageBlobClearPagesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n options\n },\n clearPagesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the contents are read\n * from a URL\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param [options] The optional parameters\n * @returns Promise\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options?: Models.PageBlobUploadPagesFromURLOptionalParams): Promise;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param callback The callback\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be\n * 512 aligned and range-end is required.\n * @param options The optional parameters\n * @param callback The callback\n */\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options: Models.PageBlobUploadPagesFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n uploadPagesFromURL(sourceUrl: string, sourceRange: string, contentLength: number, range: string, options?: Models.PageBlobUploadPagesFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sourceUrl,\n sourceRange,\n contentLength,\n range,\n options\n },\n uploadPagesFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot\n * of a page blob\n * @param [options] The optional parameters\n * @returns Promise\n */\n getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getPageRanges(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getPageRanges(options: Models.PageBlobGetPageRangesOptionalParams, callback: coreHttp.ServiceCallback): void;\n getPageRanges(options?: Models.PageBlobGetPageRangesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPageRangesOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that\n * were changed between target blob and previous snapshot.\n * @param [options] The optional parameters\n * @returns Promise\n */\n getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n getPageRangesDiff(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n getPageRangesDiff(options: Models.PageBlobGetPageRangesDiffOptionalParams, callback: coreHttp.ServiceCallback): void;\n getPageRangesDiff(options?: Models.PageBlobGetPageRangesDiffOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n getPageRangesDiffOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Resize the Blob\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param [options] The optional parameters\n * @returns Promise\n */\n resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams): Promise;\n /**\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param callback The callback\n */\n resize(blobContentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB.\n * The page blob size must be aligned to a 512-byte boundary.\n * @param options The optional parameters\n * @param callback The callback\n */\n resize(blobContentLength: number, options: Models.PageBlobResizeOptionalParams, callback: coreHttp.ServiceCallback): void;\n resize(blobContentLength: number, options?: Models.PageBlobResizeOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blobContentLength,\n options\n },\n resizeOperationSpec,\n callback) as Promise;\n }\n\n /**\n * Update the sequence number of the blob\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param [options] The optional parameters\n * @returns Promise\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams): Promise;\n /**\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param callback The callback\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the\n * request. This property applies to page blobs only. This property indicates how the service\n * should modify the blob's sequence number. Possible values include: 'max', 'update', 'increment'\n * @param options The optional parameters\n * @param callback The callback\n */\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options: Models.PageBlobUpdateSequenceNumberOptionalParams, callback: coreHttp.ServiceCallback): void;\n updateSequenceNumber(sequenceNumberAction: Models.SequenceNumberActionType, options?: Models.PageBlobUpdateSequenceNumberOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sequenceNumberAction,\n options\n },\n updateSequenceNumberOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Copy Incremental operation copies a snapshot of the source page blob to a destination page\n * blob. The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination. The copied snapshots are complete copies of\n * the original snapshot and can be read or copied from as usual. This API is supported since REST\n * version 2016-05-31.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param [options] The optional parameters\n * @returns Promise\n */\n copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams): Promise;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param callback The callback\n */\n copyIncremental(copySource: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up\n * to 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it\n * would appear in a request URI. The source blob must either be public or must be authenticated\n * via a shared access signature.\n * @param options The optional parameters\n * @param callback The callback\n */\n copyIncremental(copySource: string, options: Models.PageBlobCopyIncrementalOptionalParams, callback: coreHttp.ServiceCallback): void;\n copyIncremental(copySource: string, options?: Models.PageBlobCopyIncrementalOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n copySource,\n options\n },\n copyIncrementalOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.tier0,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.blobContentLength,\n Parameters.blobSequenceNumber,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType0,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst uploadPagesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.range0,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite0,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobUploadPagesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUploadPagesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst clearPagesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.range0,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite1,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobClearPagesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobClearPagesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst uploadPagesFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp16\n ],\n headerParameters: [\n Parameters.sourceUrl,\n Parameters.sourceRange0,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.contentLength,\n Parameters.range1,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.pageWrite0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.ifSequenceNumberLessThanOrEqualTo,\n Parameters.ifSequenceNumberLessThan,\n Parameters.ifSequenceNumberEqualTo,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPageRangesOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.comp17\n ],\n headerParameters: [\n Parameters.range0,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.PageList,\n headersMapper: Mappers.PageBlobGetPageRangesHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobGetPageRangesHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getPageRangesDiffOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.timeoutInSeconds,\n Parameters.prevsnapshot,\n Parameters.comp17\n ],\n headerParameters: [\n Parameters.prevSnapshotUrl,\n Parameters.range0,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.PageList,\n headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst resizeOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.encryptionScope,\n Parameters.blobContentLength,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.PageBlobResizeHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobResizeHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst updateSequenceNumberOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp0\n ],\n headerParameters: [\n Parameters.sequenceNumberAction,\n Parameters.blobSequenceNumber,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst copyIncrementalOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp18\n ],\n headerParameters: [\n Parameters.copySource,\n Parameters.version,\n Parameters.requestId,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 202: {\n headersMapper: Mappers.PageBlobCopyIncrementalHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.PageBlobCopyIncrementalHeaders\n }\n },\n isXML: true,\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n AppendBlobAppendBlockFromUrlHeaders,\n AppendBlobAppendBlockHeaders,\n AppendBlobCreateHeaders,\n AppendBlobSealHeaders,\n StorageError\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/appendBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a AppendBlob. */\nexport class AppendBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a AppendBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Create Append Blob operation creates a new append blob.\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams): Promise;\n /**\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n create(contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n create(contentLength: number, options: Models.AppendBlobCreateOptionalParams, callback: coreHttp.ServiceCallback): void;\n create(contentLength: number, options?: Models.AppendBlobCreateOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n contentLength,\n options\n },\n createOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob.\n * The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to\n * AppendBlob. Append Block is supported only on version 2015-02-21 version or later.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.AppendBlobAppendBlockOptionalParams, callback: coreHttp.ServiceCallback): void;\n appendBlock(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.AppendBlobAppendBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n appendBlockOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url. The Append Block operation is permitted only if\n * the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on\n * version 2015-02-21 version or later.\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options?: Models.AppendBlobAppendBlockFromUrlOptionalParams): Promise;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options: Models.AppendBlobAppendBlockFromUrlOptionalParams, callback: coreHttp.ServiceCallback): void;\n appendBlockFromUrl(sourceUrl: string, contentLength: number, options?: Models.AppendBlobAppendBlockFromUrlOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n sourceUrl,\n contentLength,\n options\n },\n appendBlockFromUrlOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version\n * 2019-12-12 version or later.\n * @param [options] The optional parameters\n * @returns Promise\n */\n seal(options?: Models.AppendBlobSealOptionalParams): Promise;\n /**\n * @param callback The callback\n */\n seal(callback: coreHttp.ServiceCallback): void;\n /**\n * @param options The optional parameters\n * @param callback The callback\n */\n seal(options: Models.AppendBlobSealOptionalParams, callback: coreHttp.ServiceCallback): void;\n seal(options?: Models.AppendBlobSealOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n options\n },\n sealOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst createOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType1,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobCreateHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobCreateHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst appendBlockOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp19\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.maxSize,\n Parameters.appendPosition,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobAppendBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobAppendBlockHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst appendBlockFromUrlOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp19\n ],\n headerParameters: [\n Parameters.sourceUrl,\n Parameters.sourceRange1,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.maxSize,\n Parameters.appendPosition,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst sealOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp20\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.appendPosition\n ],\n responses: {\n 200: {\n headersMapper: Mappers.AppendBlobSealHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.AppendBlobSealHeaders\n }\n },\n isXML: true,\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport {\n Block,\n BlockBlobCommitBlockListHeaders,\n BlockBlobGetBlockListHeaders,\n BlockBlobStageBlockFromURLHeaders,\n BlockBlobStageBlockHeaders,\n BlockBlobUploadHeaders,\n BlockList,\n BlockLookupList,\n StorageError\n} from \"../models/mappers\";\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Models from \"../models\";\nimport * as Mappers from \"../models/blockBlobMappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { StorageClientContext } from \"../storageClientContext\";\n\n/** Class representing a BlockBlob. */\nexport class BlockBlob {\n private readonly client: StorageClientContext;\n\n /**\n * Create a BlockBlob.\n * @param {StorageClientContext} client Reference to the service client.\n */\n constructor(client: StorageClientContext) {\n this.client = client;\n }\n\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an\n * existing block blob overwrites any existing metadata on the blob. Partial updates are not\n * supported with Put Blob; the content of the existing blob is overwritten with the content of the\n * new blob. To perform a partial update of the content of a block blob, use the Put Block List\n * operation.\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param [options] The optional parameters\n * @returns Promise\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams): Promise;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param callback The callback\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, callback: coreHttp.ServiceCallback): void;\n /**\n * @param body Initial data\n * @param contentLength The length of the request.\n * @param options The optional parameters\n * @param callback The callback\n */\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options: Models.BlockBlobUploadOptionalParams, callback: coreHttp.ServiceCallback): void;\n upload(body: coreHttp.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n body,\n contentLength,\n options\n },\n uploadOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param [options] The optional parameters\n * @returns Promise\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams): Promise;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param callback The callback\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The optional parameters\n * @param callback The callback\n */\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options: Models.BlockBlobStageBlockOptionalParams, callback: coreHttp.ServiceCallback): void;\n stageBlock(blockId: string, contentLength: number, body: coreHttp.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blockId,\n contentLength,\n body,\n options\n },\n stageBlockOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the\n * contents are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param [options] The optional parameters\n * @returns Promise\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams): Promise;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param callback The callback\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the\n * string must be less than or equal to 64 bytes in size. For a given blob, the length of the value\n * specified for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The optional parameters\n * @param callback The callback\n */\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options: Models.BlockBlobStageBlockFromURLOptionalParams, callback: coreHttp.ServiceCallback): void;\n stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blockId,\n contentLength,\n sourceUrl,\n options\n },\n stageBlockFromURLOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up\n * the blob. In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior Put Block operation. You can call Put Block List to update a blob by\n * uploading only those blocks that have changed, then committing the new and existing blocks\n * together. You can do this by specifying whether to commit a block from the committed block list\n * or from the uncommitted block list, or to commit the most recently uploaded version of the\n * block, whichever list it may belong to.\n * @param blocks\n * @param [options] The optional parameters\n * @returns Promise\n */\n commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams): Promise;\n /**\n * @param blocks\n * @param callback The callback\n */\n commitBlockList(blocks: Models.BlockLookupList, callback: coreHttp.ServiceCallback): void;\n /**\n * @param blocks\n * @param options The optional parameters\n * @param callback The callback\n */\n commitBlockList(blocks: Models.BlockLookupList, options: Models.BlockBlobCommitBlockListOptionalParams, callback: coreHttp.ServiceCallback): void;\n commitBlockList(blocks: Models.BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n blocks,\n options\n },\n commitBlockListOperationSpec,\n callback) as Promise;\n }\n\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a\n * block blob\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param [options] The optional parameters\n * @returns Promise\n */\n getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams): Promise;\n /**\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param callback The callback\n */\n getBlockList(listType: Models.BlockListType, callback: coreHttp.ServiceCallback): void;\n /**\n * @param listType Specifies whether to return the list of committed blocks, the list of\n * uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted',\n * 'all'\n * @param options The optional parameters\n * @param callback The callback\n */\n getBlockList(listType: Models.BlockListType, options: Models.BlockBlobGetBlockListOptionalParams, callback: coreHttp.ServiceCallback): void;\n getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise {\n return this.client.sendOperationRequest(\n {\n listType,\n options\n },\n getBlockListOperationSpec,\n callback) as Promise;\n }\n}\n\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, true);\nconst uploadOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds\n ],\n headerParameters: [\n Parameters.transactionalContentMD5,\n Parameters.contentLength,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.tier0,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobType2,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobCacheControl,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobUploadHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst stageBlockOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.blockId,\n Parameters.timeoutInSeconds,\n Parameters.comp21\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm\n ],\n requestBody: {\n parameterPath: \"body\",\n mapper: {\n required: true,\n serializedName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n },\n contentType: \"application/octet-stream\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst stageBlockFromURLOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.blockId,\n Parameters.timeoutInSeconds,\n Parameters.comp21\n ],\n headerParameters: [\n Parameters.contentLength,\n Parameters.sourceUrl,\n Parameters.sourceRange1,\n Parameters.sourceContentMD5,\n Parameters.sourceContentCrc64,\n Parameters.encryptionScope,\n Parameters.version,\n Parameters.requestId,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.leaseId0,\n Parameters.sourceIfModifiedSince,\n Parameters.sourceIfUnmodifiedSince,\n Parameters.sourceIfMatch,\n Parameters.sourceIfNoneMatch\n ],\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst commitBlockListOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"PUT\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.timeoutInSeconds,\n Parameters.comp22\n ],\n headerParameters: [\n Parameters.transactionalContentMD5,\n Parameters.transactionalContentCrc64,\n Parameters.metadata,\n Parameters.encryptionScope,\n Parameters.tier0,\n Parameters.version,\n Parameters.requestId,\n Parameters.blobTagsString,\n Parameters.blobCacheControl,\n Parameters.blobContentType,\n Parameters.blobContentEncoding,\n Parameters.blobContentLanguage,\n Parameters.blobContentMD5,\n Parameters.blobContentDisposition,\n Parameters.leaseId0,\n Parameters.encryptionKey,\n Parameters.encryptionKeySha256,\n Parameters.encryptionAlgorithm,\n Parameters.ifModifiedSince,\n Parameters.ifUnmodifiedSince,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.ifTags\n ],\n requestBody: {\n parameterPath: \"blocks\",\n mapper: {\n ...Mappers.BlockLookupList,\n required: true\n }\n },\n contentType: \"application/xml; charset=utf-8\",\n responses: {\n 201: {\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobCommitBlockListHeaders\n }\n },\n isXML: true,\n serializer\n};\n\nconst getBlockListOperationSpec: coreHttp.OperationSpec = {\n httpMethod: \"GET\",\n path: \"{containerName}/{blob}\",\n urlParameters: [\n Parameters.url\n ],\n queryParameters: [\n Parameters.snapshot,\n Parameters.listType,\n Parameters.timeoutInSeconds,\n Parameters.comp22\n ],\n headerParameters: [\n Parameters.version,\n Parameters.requestId,\n Parameters.leaseId0,\n Parameters.ifTags\n ],\n responses: {\n 200: {\n bodyMapper: Mappers.BlockList,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: Mappers.StorageError,\n headersMapper: Mappers.BlockBlobGetBlockListHeaders\n }\n },\n isXML: true,\n serializer\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The @azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"storage-blob\");\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.3.0\";\nexport const SERVICE_VERSION: string = \"2020-02-10\";\n\nexport const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB\nexport const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 4000 * 1024 * 1024; // 4000MB\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const DEFAULT_BLOCK_BUFFER_SIZE_BYTES: number = 8 * 1024 * 1024; // 8MB\nexport const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\"\n }\n};\n\nexport const HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\"\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\n\nexport const SIZE_1_MB = 1 * 1024 * 1024;\nexport const BATCH_MAX_REQUEST = 256;\nexport const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nexport const HTTP_LINE_ENDING = \"\\r\\n\";\nexport const HTTP_VERSION_1_1 = \"HTTP/1.1\";\n\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\nexport const StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\"\n];\n\nexport const StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\"\n];\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpHeaders, isNode, URLBuilder } from \"@azure/core-http\";\n\nimport {\n BlobQueryArrowConfiguration,\n BlobQueryCsvTextConfiguration,\n BlobQueryJsonTextConfiguration\n} from \"../Clients\";\nimport { QuerySerialization, BlobTags } from \"../generated/src/models\";\nimport { DevelopmentConnectionString, HeaderConstants, URLConstants } from \"./constants\";\nimport {\n Tags,\n ObjectReplicationPolicy,\n ObjectReplicationRule,\n ObjectReplicationStatus\n} from \"../models\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @export\n * @param {string} url\n * @returns {string}\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n proxyUri?: string; // Development Connection String may contain proxyUri\n}\n\nfunction getProxyUriFromDevConnString(connectionString: string): string {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")![1];\n }\n }\n }\n return proxyUri;\n}\n\nexport function getValueInConnString(\n connectionString: string,\n argument:\n | \"BlobEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\"\n) {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @export\n * @param {string} connectionString Connection string.\n * @returns {ConnectionString} String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n let proxyUri = \"\";\n\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\"\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri\n };\n } else {\n // SAS connection string\n\n let accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n let accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param {string} text\n * @returns {string}\n */\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} name String to be appended to URL\n * @returns {string} An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} name Parameter name\n * @param {string} [value] Parameter value\n * @returns {string} An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @export\n * @param {string} url\n * @param {string} name\n * @returns {(string | string[] | undefined)}\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n\n/**\n * Set URL host.\n *\n * @export\n * @param {string} url Source URL string\n * @param {string} host New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLPath(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n\n/**\n * Get URL scheme from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLScheme(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n\n/**\n * Get URL path and query from an URL string.\n *\n * @export\n * @param {string} url Source URL string\n * @returns {(string | undefined)}\n */\nexport function getURLPathAndQuery(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString != \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n\n return `${pathString}${queryString}`;\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @export\n * @param {string} url\n * @returns {{[key: string]: string}}\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @export\n * @param {Date} date\n * @param {boolean} [withMilliseconds=true] If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns {string} Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @export\n * @param {string} content\n * @returns {string}\n */\nexport function base64encode(content: string): string {\n return !isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @export\n * @param {string} encodedString\n * @returns {string}\n */\nexport function base64decode(encodedString: string): string {\n return !isNode ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @export\n * @param {number} blockIndex\n * @returns {string}\n */\nexport function generateBlockID(blockIDPrefix: string, blockIndex: number): string {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res =\n blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n\n/**\n * Delay specified time interval.\n *\n * @export\n * @param {number} timeInMs\n * @param {AbortSignalLike} [aborter]\n * @param {Error} [abortError]\n */\nexport async function delay(timeInMs: number, aborter?: AbortSignalLike, abortError?: Error) {\n return new Promise((resolve, reject) => {\n let timeout: any;\n\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\n/**\n * String.prototype.padStart()\n *\n * @export\n * @param {string} currentString\n * @param {number} targetLength\n * @param {string} [padString=\" \"]\n * @returns {string}\n */\nexport function padStart(\n currentString: string,\n targetLength: number,\n padString: string = \" \"\n): string {\n // TS doesn't know this code needs to run downlevel sometimes.\n // @ts-expect-error\n if (String.prototype.padStart) {\n return currentString.padStart(targetLength, padString);\n }\n\n padString = padString || \" \";\n if (currentString.length > targetLength) {\n return currentString;\n } else {\n targetLength = targetLength - currentString.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + currentString;\n }\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, URLConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, URLConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = new HttpHeaders();\n for (const header of originalHeader.headersArray()) {\n if (header.name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(header.name, \"*****\");\n } else if (header.name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(header.name, sanitizeURL(header.value));\n } else {\n headers.set(header.name, header.value);\n }\n }\n\n return headers;\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @export\n * @param {string} str1\n * @param {string} str2\n * @returns {boolean}\n */\nexport function iEqual(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n\n/**\n * Extracts account name from the url\n * @param {string} url url to extract the account name from\n * @returns {string} with the account name\n */\nexport function getAccountNameFromUrl(url: string): string {\n const parsedUrl: URLBuilder = URLBuilder.parse(url);\n let accountName;\n try {\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost()!.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath()!.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n } catch (error) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URLBuilder): boolean {\n if (parsedUrl.getHost() == undefined) {\n return false;\n }\n\n const host =\n parsedUrl.getHost()! + (parsedUrl.getPort() == undefined ? \"\" : \":\" + parsedUrl.getPort());\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n 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(\n host\n );\n}\n\n/**\n * Convert Tags to encoded string.\n *\n * @export\n * @param {Tags} tags\n * @returns {string | undefined}\n */\nexport function toBlobTagsString(tags?: Tags): string | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const tagPairs = [];\n for (const key in tags) {\n if (tags.hasOwnProperty(key)) {\n const value = tags[key];\n tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n }\n }\n\n return tagPairs.join(\"&\");\n}\n\n/**\n * Convert Tags type to BlobTags.\n *\n * @export\n * @param {Tags} [tags]\n * @returns {(BlobTags | undefined)}\n */\nexport function toBlobTags(tags?: Tags): BlobTags | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const res: BlobTags = {\n blobTagSet: []\n };\n\n for (const key in tags) {\n if (tags.hasOwnProperty(key)) {\n const value = tags[key];\n res.blobTagSet.push({\n key,\n value\n });\n }\n }\n return res;\n}\n\n/**\n * Covert BlobTags to Tags type.\n *\n * @export\n * @param {BlobTags} [tags]\n * @returns {(Tags | undefined)}\n */\nexport function toTags(tags?: BlobTags): Tags | undefined {\n if (tags === undefined) {\n return undefined;\n }\n\n const res: Tags = {};\n for (const blobTag of tags.blobTagSet) {\n res[blobTag.key] = blobTag.value;\n }\n return res;\n}\n\n/**\n * Convert BlobQueryTextConfiguration to QuerySerialization type.\n *\n * @export\n * @param {(BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration)} [textConfiguration]\n * @returns {(QuerySerialization | undefined)}\n */\nexport function toQuerySerialization(\n textConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryArrowConfiguration\n): QuerySerialization | undefined {\n if (textConfiguration === undefined) {\n return undefined;\n }\n\n switch (textConfiguration.kind) {\n case \"csv\":\n return {\n format: {\n type: \"delimited\",\n delimitedTextConfiguration: {\n columnSeparator: textConfiguration.columnSeparator || \",\",\n fieldQuote: textConfiguration.fieldQuote || \"\",\n recordSeparator: textConfiguration.recordSeparator,\n escapeChar: textConfiguration.escapeCharacter || \"\",\n headersPresent: textConfiguration.hasHeaders || false\n }\n }\n };\n case \"json\":\n return {\n format: {\n type: \"json\",\n jsonTextConfiguration: {\n recordSeparator: textConfiguration.recordSeparator\n }\n }\n };\n case \"arrow\":\n return {\n format: {\n type: \"arrow\",\n arrowConfiguration: {\n schema: textConfiguration.schema\n }\n }\n };\n\n default:\n throw Error(\"Invalid BlobQueryTextConfiguration.\");\n }\n}\n\nexport function parseObjectReplicationRecord(\n objectReplicationRecord?: Record\n): ObjectReplicationPolicy[] | undefined {\n if (!objectReplicationRecord) {\n return undefined;\n }\n\n if (\"policy-id\" in objectReplicationRecord) {\n // If the dictionary contains a key with policy id, we are not required to do any parsing since\n // the policy id should already be stored in the ObjectReplicationDestinationPolicyId.\n return undefined;\n }\n\n let orProperties: ObjectReplicationPolicy[] = [];\n for (const key in objectReplicationRecord) {\n const ids = key.split(\"_\");\n const policyPrefix = \"or-\";\n if (ids[0].startsWith(policyPrefix)) {\n ids[0] = ids[0].substring(policyPrefix.length);\n }\n const rule: ObjectReplicationRule = {\n ruleId: ids[1],\n replicationStatus: objectReplicationRecord[key] as ObjectReplicationStatus\n };\n const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);\n if (policyIndex > -1) {\n orProperties[policyIndex].rules.push(rule);\n } else {\n orProperties.push({\n policyId: ids[0],\n rules: [rule]\n });\n }\n }\n return orProperties;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n HttpOperationResponse,\n isNode,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource\n} from \"@azure/core-http\";\n\nimport { HeaderConstants, URLConstants } from \"../utils/constants\";\nimport { setURLParameter } from \"../utils/utils.common\";\n\n/**\n * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:\n *\n * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.\n * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL\n * thus avoid the browser cache.\n *\n * 2. Remove cookie header for security\n *\n * 3. Remove content-length header to avoid browsers warning\n *\n * @class StorageBrowserPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class StorageBrowserPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of StorageBrowserPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @memberof StorageBrowserPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof StorageBrowserPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n if (isNode) {\n return this._nextPolicy.sendRequest(request);\n }\n\n if (request.method.toUpperCase() === \"GET\" || request.method.toUpperCase() === \"HEAD\") {\n request.url = setURLParameter(\n request.url,\n URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,\n new Date().getTime().toString()\n );\n }\n\n request.headers.remove(HeaderConstants.COOKIE);\n\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.remove(HeaderConstants.CONTENT_LENGTH);\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { StorageBrowserPolicy } from \"./policies/StorageBrowserPolicy\";\nexport { StorageBrowserPolicy };\n\n/**\n * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.\n *\n * @export\n * @class StorageBrowserPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class StorageBrowserPolicyFactory implements RequestPolicyFactory {\n /**\n * Creates a StorageBrowserPolicyFactory object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageBrowserPolicy}\n * @memberof StorageBrowserPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy {\n return new StorageBrowserPolicy(nextPolicy, options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AbortError } from \"@azure/abort-controller\";\n\nimport {\n AbortSignalLike,\n BaseRequestPolicy,\n HttpOperationResponse,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n RestError,\n WebResource\n} from \"@azure/core-http\";\n\nimport { StorageRetryOptions } from \"../StorageRetryPolicyFactory\";\nimport { URLConstants } from \"../utils/constants\";\nimport { delay, setURLHost, setURLParameter } from \"../utils/utils.common\";\nimport { logger } from \"../log\";\n\n/**\n * A factory method used to generated a RetryPolicy factory.\n *\n * @export\n * @param {StorageRetryOptions} retryOptions\n * @returns\n */\nexport function NewRetryPolicyFactory(retryOptions?: StorageRetryOptions): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy => {\n return new StorageRetryPolicy(nextPolicy, options, retryOptions);\n }\n };\n}\n\n/**\n * RetryPolicy types.\n *\n * @export\n * @enum {number}\n */\nexport enum StorageRetryPolicyType {\n /**\n * Exponential retry. Retry time delay grows exponentially.\n */\n EXPONENTIAL,\n /**\n * Linear retry. Retry time delay grows linearly.\n */\n FIXED\n}\n\n// Default values of StorageRetryOptions\nconst DEFAULT_RETRY_OPTIONS: StorageRetryOptions = {\n maxRetryDelayInMs: 120 * 1000,\n maxTries: 4,\n retryDelayInMs: 4 * 1000,\n retryPolicyType: StorageRetryPolicyType.EXPONENTIAL,\n secondaryHost: \"\",\n tryTimeoutInMs: undefined // Use server side default timeout strategy\n};\n\nconst RETRY_ABORT_ERROR = new AbortError(\"The operation was aborted.\");\n\n/**\n * Retry policy with exponential retry and linear retry implemented.\n *\n * @class RetryPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class StorageRetryPolicy extends BaseRequestPolicy {\n /**\n * RetryOptions.\n *\n * @private\n * @type {StorageRetryOptions}\n * @memberof StorageRetryPolicy\n */\n private readonly retryOptions: StorageRetryOptions;\n\n /**\n * Creates an instance of RetryPolicy.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS]\n * @memberof StorageRetryPolicy\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n retryOptions: StorageRetryOptions = DEFAULT_RETRY_OPTIONS\n ) {\n super(nextPolicy, options);\n\n // Initialize retry options\n this.retryOptions = {\n retryPolicyType: retryOptions.retryPolicyType\n ? retryOptions.retryPolicyType\n : DEFAULT_RETRY_OPTIONS.retryPolicyType,\n\n maxTries:\n retryOptions.maxTries && retryOptions.maxTries >= 1\n ? Math.floor(retryOptions.maxTries)\n : DEFAULT_RETRY_OPTIONS.maxTries,\n\n tryTimeoutInMs:\n retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0\n ? retryOptions.tryTimeoutInMs\n : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs,\n\n retryDelayInMs:\n retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0\n ? Math.min(\n retryOptions.retryDelayInMs,\n retryOptions.maxRetryDelayInMs\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs!\n )\n : DEFAULT_RETRY_OPTIONS.retryDelayInMs,\n\n maxRetryDelayInMs:\n retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,\n\n secondaryHost: retryOptions.secondaryHost\n ? retryOptions.secondaryHost\n : DEFAULT_RETRY_OPTIONS.secondaryHost\n };\n }\n\n /**\n * Sends request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof StorageRetryPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n return this.attemptSendRequest(request, false, 1);\n }\n\n /**\n * Decide and perform next retry. Won't mutate request parameter.\n *\n * @protected\n * @param {WebResource} request\n * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then\n * the resource was not found. This may be due to replication delay. So, in this\n * case, we'll never try the secondary again for this operation.\n * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes\n * the attempt will be performed by this method call.\n * @returns {Promise}\n * @memberof StorageRetryPolicy\n */\n protected async attemptSendRequest(\n request: WebResource,\n secondaryHas404: boolean,\n attempt: number\n ): Promise {\n const newRequest: WebResource = request.clone();\n\n const isPrimaryRetry =\n secondaryHas404 ||\n !this.retryOptions.secondaryHost ||\n !(request.method === \"GET\" || request.method === \"HEAD\" || request.method === \"OPTIONS\") ||\n attempt % 2 === 1;\n\n if (!isPrimaryRetry) {\n newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost!);\n }\n\n // Set the server-side timeout query parameter \"timeout=[seconds]\"\n if (this.retryOptions.tryTimeoutInMs) {\n newRequest.url = setURLParameter(\n newRequest.url,\n URLConstants.Parameters.TIMEOUT,\n Math.floor(this.retryOptions.tryTimeoutInMs! / 1000).toString()\n );\n }\n\n let response: HttpOperationResponse | undefined;\n try {\n logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? \"Primary\" : \"Secondary\"}`);\n response = await this._nextPolicy.sendRequest(newRequest);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {\n return response;\n }\n\n secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);\n } catch (err) {\n logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {\n throw err;\n }\n }\n\n await this.delay(isPrimaryRetry, attempt, request.abortSignal);\n return await this.attemptSendRequest(request, secondaryHas404, ++attempt);\n }\n\n /**\n * Decide whether to retry according to last HTTP response and retry counters.\n *\n * @protected\n * @param {boolean} isPrimaryRetry\n * @param {number} attempt\n * @param {HttpOperationResponse} [response]\n * @param {RestError} [err]\n * @returns {boolean}\n * @memberof StorageRetryPolicy\n */\n protected shouldRetry(\n isPrimaryRetry: boolean,\n attempt: number,\n response?: HttpOperationResponse,\n err?: RestError\n ): boolean {\n if (attempt >= this.retryOptions.maxTries!) {\n logger.info(\n `RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions\n .maxTries!}, no further try.`\n );\n return false;\n }\n\n // Handle network failures, you may need to customize the list when you implement\n // your own http client\n const retriableErrors = [\n \"ETIMEDOUT\",\n \"ESOCKETTIMEDOUT\",\n \"ECONNREFUSED\",\n \"ECONNRESET\",\n \"ENOENT\",\n \"ENOTFOUND\",\n \"TIMEOUT\",\n \"EPIPE\",\n \"REQUEST_SEND_ERROR\" // For default xhr based http client provided in ms-rest-js\n ];\n if (err) {\n for (const retriableError of retriableErrors) {\n if (\n err.name.toUpperCase().includes(retriableError) ||\n err.message.toUpperCase().includes(retriableError) ||\n (err.code &&\n err.code\n .toString()\n .toUpperCase()\n .includes(retriableError))\n ) {\n logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);\n return true;\n }\n }\n }\n\n // If attempt was against the secondary & it returned a StatusNotFound (404), then\n // the resource was not found. This may be due to replication delay. So, in this\n // case, we'll never try the secondary again for this operation.\n if (response || err) {\n const statusCode = response ? response.status : err ? err.statusCode : 0;\n if (!isPrimaryRetry && statusCode === 404) {\n logger.info(`RetryPolicy: Secondary access with 404, will retry.`);\n return true;\n }\n\n // Server internal error or server timeout\n if (statusCode === 503 || statusCode === 500) {\n logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Delay a calculated time between retries.\n *\n * @private\n * @param {boolean} isPrimaryRetry\n * @param {number} attempt\n * @param {AbortSignalLike} [abortSignal]\n * @memberof StorageRetryPolicy\n */\n private async delay(isPrimaryRetry: boolean, attempt: number, abortSignal?: AbortSignalLike) {\n let delayTimeInMs: number = 0;\n\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min(\n (Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs!,\n this.retryOptions.maxRetryDelayInMs!\n );\n break;\n case StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs!;\n break;\n }\n } else {\n delayTimeInMs = Math.random() * 1000;\n }\n\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { StorageRetryPolicy, StorageRetryPolicyType } from \"./policies/StorageRetryPolicy\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n *\n * @export\n * @interface StorageRetryOptions\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n *\n * @type {StorageRetryPolicyType}\n * @memberof StorageRetryOptions\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n *\n * @type {number}\n * @memberof StorageRetryOptions\n */\n readonly maxRetryDelayInMs?: number;\n\n /**\n * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined\n * (the default) then operations are not retried against another host.\n *\n * NOTE: Before setting this field, make sure you understand the issues around\n * reading stale and potentially-inconsistent data at\n * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}\n *\n * @type {string}\n * @memberof StorageRetryOptions\n */\n readonly secondaryHost?: string;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n *\n * @export\n * @class StorageRetryPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param {StorageRetryOptions} [retryOptions]\n * @memberof StorageRetryPolicyFactory\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageRetryPolicy}\n * @memberof StorageRetryPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { BaseRequestPolicy, HttpOperationResponse, WebResource } from \"@azure/core-http\";\n\n/**\n * Credential policy used to sign HTTP(S) requests before sending. This is an\n * abstract class.\n *\n * @export\n * @abstract\n * @class CredentialPolicy\n * @extends {BaseRequestPolicy}\n */\nexport abstract class CredentialPolicy extends BaseRequestPolicy {\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof CredentialPolicy\n */\n public sendRequest(request: WebResource): Promise {\n return this._nextPolicy.sendRequest(this.signRequest(request));\n }\n\n /**\n * Child classes must implement this method with request signing. This method\n * will be executed in {@link sendRequest}.\n *\n * @protected\n * @abstract\n * @param {WebResource} request\n * @returns {WebResource}\n * @memberof CredentialPolicy\n */\n protected signRequest(request: WebResource): WebResource {\n // Child classes must override this method with request signing. This method\n // will be executed in sendRequest().\n return request;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { CredentialPolicy } from \"./CredentialPolicy\";\n\n/**\n * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources\n * or for use with Shared Access Signatures (SAS).\n *\n * @export\n * @class AnonymousCredentialPolicy\n * @extends {CredentialPolicy}\n */\nexport class AnonymousCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of AnonymousCredentialPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @memberof AnonymousCredentialPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyFactory, RequestPolicyOptions } from \"@azure/core-http\";\nimport { CredentialPolicy } from \"../policies/CredentialPolicy\";\n\n/**\n * Credential is an abstract class for Azure Storage HTTP requests signing. This\n * class will host an credentialPolicyCreator factory which generates CredentialPolicy.\n *\n * @export\n * @abstract\n * @class Credential\n */\nexport abstract class Credential implements RequestPolicyFactory {\n /**\n * Creates a RequestPolicy object.\n *\n * @param {RequestPolicy} _nextPolicy\n * @param {RequestPolicyOptions} _options\n * @returns {RequestPolicy}\n * @memberof Credential\n */\n public create(\n // tslint:disable-next-line:variable-name\n _nextPolicy: RequestPolicy,\n // tslint:disable-next-line:variable-name\n _options: RequestPolicyOptions\n ): RequestPolicy {\n throw new Error(\"Method should be implemented in children classes.\");\n }\n}\n\n/**\n * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.\n */\nexport type CredentialPolicyCreator = (\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n) => CredentialPolicy;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { AnonymousCredentialPolicy } from \"../policies/AnonymousCredentialPolicy\";\nimport { Credential } from \"./Credential\";\n\n/**\n * AnonymousCredential provides a credentialPolicyCreator member used to create\n * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with\n * HTTP(S) requests that read public resources or for use with Shared Access\n * Signatures (SAS).\n *\n * @export\n * @class AnonymousCredential\n * @extends {Credential}\n */\nexport class AnonymousCredential extends Credential {\n /**\n * Creates an {@link AnonymousCredentialPolicy} object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {AnonymousCredentialPolicy}\n * @memberof AnonymousCredential\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): AnonymousCredentialPolicy {\n return new AnonymousCredentialPolicy(nextPolicy, options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n HttpHeaders,\n HttpOperationResponse,\n isNode,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource\n} from \"@azure/core-http\";\n\nimport { HeaderConstants } from \"../utils/constants\";\n\n/**\n * TelemetryPolicy is a policy used to tag user-agent header for every requests.\n *\n * @class TelemetryPolicy\n * @extends {BaseRequestPolicy}\n */\nexport class TelemetryPolicy extends BaseRequestPolicy {\n /**\n * Telemetry string.\n *\n * @type {string}\n * @memberof TelemetryPolicy\n */\n public readonly telemetry: string;\n\n /**\n * Creates an instance of TelemetryPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {string} telemetry\n * @memberof TelemetryPolicy\n */\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, telemetry: string) {\n super(nextPolicy, options);\n this.telemetry = telemetry;\n }\n\n /**\n * Sends out request.\n *\n * @param {WebResource} request\n * @returns {Promise}\n * @memberof TelemetryPolicy\n */\n public async sendRequest(request: WebResource): Promise {\n if (isNode) {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n if (!request.headers.get(HeaderConstants.USER_AGENT)) {\n request.headers.set(HeaderConstants.USER_AGENT, this.telemetry);\n }\n }\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n isNode,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n UserAgentOptions\n} from \"@azure/core-http\";\nimport * as os from \"os\";\n\nimport { TelemetryPolicy } from \"./policies/TelemetryPolicy\";\nimport { SDK_VERSION } from \"./utils/constants\";\n\n/**\n * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects.\n *\n * @export\n * @class TelemetryPolicyFactory\n * @implements {RequestPolicyFactory}\n */\nexport class TelemetryPolicyFactory implements RequestPolicyFactory {\n /**\n * @internal\n * @ignore\n */\n public readonly telemetryString: string;\n\n /**\n * Creates an instance of TelemetryPolicyFactory.\n * @param {UserAgentOptions} [telemetry]\n * @memberof TelemetryPolicyFactory\n */\n constructor(telemetry?: UserAgentOptions) {\n const userAgentInfo: string[] = [];\n\n if (isNode) {\n if (telemetry) {\n // FIXME: replace() only replaces the first space. And we have no idea why we need to replace spaces in the first place.\n // But fixing this would be a breaking change. Logged an issue here: https://github.com/Azure/azure-sdk-for-js/issues/10793\n const telemetryString = (telemetry.userAgentPrefix || \"\").replace(\" \", \"\");\n if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {\n userAgentInfo.push(telemetryString);\n }\n }\n\n // e.g. azsdk-js-storageblob/10.0.0\n const libInfo = `azsdk-js-storageblob/${SDK_VERSION}`;\n if (userAgentInfo.indexOf(libInfo) === -1) {\n userAgentInfo.push(libInfo);\n }\n\n // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)\n const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;\n if (userAgentInfo.indexOf(runtimeInfo) === -1) {\n userAgentInfo.push(runtimeInfo);\n }\n }\n\n this.telemetryString = userAgentInfo.join(\" \");\n }\n\n /**\n * Creates a TelemetryPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {TelemetryPolicy}\n * @memberof TelemetryPolicyFactory\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): TelemetryPolicy {\n return new TelemetryPolicy(nextPolicy, options, this.telemetryString);\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DefaultHttpClient } from \"@azure/core-http\";\nimport { IHttpClient } from \"../Pipeline\";\n\nconst _defaultHttpClient = new DefaultHttpClient();\n\nexport function getCachedDefaultHttpClient(): IHttpClient {\n return _defaultHttpClient;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n BaseRequestPolicy,\n deserializationPolicy,\n disableResponseDecompressionPolicy,\n HttpClient as IHttpClient,\n HttpHeaders,\n HttpOperationResponse,\n HttpRequestBody,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n ServiceClientOptions,\n WebResource,\n proxyPolicy,\n isNode,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n tracingPolicy,\n logPolicy,\n ProxyOptions,\n keepAlivePolicy,\n KeepAliveOptions,\n generateClientRequestIdPolicy,\n UserAgentOptions\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory\";\nimport { StorageRetryOptions, StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters\n} from \"./utils/constants\";\nimport { TelemetryPolicyFactory } from \"./TelemetryPolicyFactory\";\nimport { getCachedDefaultHttpClient } from \"./utils/cache\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n BaseRequestPolicy,\n StorageOAuthScopes,\n deserializationPolicy,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions\n};\n\n/**\n * Option interface for Pipeline constructor.\n *\n * @export\n * @interface PipelineOptions\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n *\n * @type {IHttpClient}\n * @memberof PipelineOptions\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n *\n * @export\n * @class Pipeline\n */\nexport class Pipeline {\n /**\n * A list of chained request policy factories.\n *\n * @type {RequestPolicyFactory[]}\n * @memberof Pipeline\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n *\n * @type {PipelineOptions}\n * @memberof Pipeline\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param {RequestPolicyFactory[]} factories\n * @param {PipelineOptions} [options={}]\n * @memberof Pipeline\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = {\n ...options,\n httpClient: options.httpClient || getCachedDefaultHttpClient()\n };\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline.\n * @memberof Pipeline\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n *\n * @export\n * @interface StoragePipelineOptions\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n *\n * @type {UserAgentOptions}\n * @memberof StoragePipelineOptions\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n *\n * @type {StorageRetryOptions}\n * @memberof StoragePipelineOptions\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n *\n * @type {KeepAliveOptions}\n * @memberof StoragePipelineOptions\n */\n keepAliveOptions?: KeepAliveOptions;\n\n /**\n * Configures the HTTP client to send requests and receive responses.\n *\n * @type {IHttpClient}\n * @memberof StoragePipelineOptions\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @export\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options.\n * @returns {Pipeline} A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {}\n): Pipeline {\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories: RequestPolicyFactory[] = [\n tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n deserializationPolicy(), // Default deserializationPolicy is provided by protocol layer\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions),\n logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters\n })\n ];\n\n if (isNode) {\n // policies only available in Node.js runtime, not in browsers\n factories.push(proxyPolicy(pipelineOptions.proxyOptions));\n factories.push(disableResponseDecompressionPolicy());\n }\n factories.push(\n isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential\n );\n\n return new Pipeline(factories, pipelineOptions);\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { TransferProgressEvent } from \"@azure/core-http\";\nimport { Readable } from \"stream\";\n\nimport { AbortSignal, AbortSignalLike, AbortError } from \"@azure/abort-controller\";\n\nexport type ReadableStreamGetter = (offset: number) => Promise;\n\nexport interface RetriableReadableStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof RetriableReadableStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Max retry count (>=0), undefined or invalid value means no retry\n *\n * @type {number}\n * @memberof RetriableReadableStreamOptions\n */\n maxRetryRequests?: number;\n\n /**\n * Read progress event handler\n *\n * @memberof RetriableReadableStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Debug purpose only. Used to inject an unexpected end to existing internal stream,\n * to test stream retry works well or not.\n *\n * When assign it to true, for next incoming \"data\" event of internal stream,\n * RetriableReadableStream will try to emit an \"end\" event to existing internal\n * stream to force it end and start retry from the breaking point.\n * The value will then update to \"undefined\", once the injection works.\n *\n * @type {boolean}\n * @memberof RetriableReadableStreamOptions\n */\n doInjectErrorOnce?: boolean;\n}\n\nconst ABORT_ERROR = new AbortError(\"The operation was aborted.\");\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n *\n * @class RetriableReadableStream\n * @extends {Readable}\n */\nexport class RetriableReadableStream extends Readable {\n private aborter: AbortSignalLike;\n private start: number;\n private offset: number;\n private end: number;\n private getter: ReadableStreamGetter;\n private source: NodeJS.ReadableStream;\n private retries: number = 0;\n private maxRetryRequests: number;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private options: RetriableReadableStreamOptions;\n private abortHandler = () => {\n this.source.pause();\n this.emit(\"error\", ABORT_ERROR);\n };\n\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter\n * @param {ReadableStreamGetter} getter A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param {number} offset Offset position in original data source to read\n * @param {number} count How much data in original data source to read\n * @param {RetriableReadableStreamOptions} [options={}]\n * @memberof RetriableReadableStream\n */\n public constructor(\n source: NodeJS.ReadableStream,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n super();\n this.aborter = options.abortSignal || AbortSignal.none;\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n\n this.aborter.addEventListener(\"abort\", this.abortHandler);\n\n this.setSourceDataHandler();\n this.setSourceEndHandler();\n this.setSourceErrorHandler();\n }\n\n public _read() {\n if (!this.aborter.aborted) {\n this.source.resume();\n }\n }\n\n private setSourceDataHandler() {\n this.source.on(\"data\", (data: Buffer) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n });\n }\n\n private setSourceEndHandler() {\n this.source.on(\"end\", () => {\n // console.log(\n // `Source stream emits end, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n if (this.offset - 1 === this.end) {\n this.aborter.removeEventListener(\"abort\", this.abortHandler);\n this.push(null);\n } else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceDataHandler();\n this.setSourceEndHandler();\n this.setSourceErrorHandler();\n })\n .catch((error) => {\n this.emit(\"error\", error);\n });\n } else {\n this.emit(\n \"error\",\n new Error(\n // tslint:disable-next-line:max-line-length\n `Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this\n .offset - 1}, data needed offset: ${this.end}, retries: ${\n this.retries\n }, max retries: ${this.maxRetryRequests}`\n )\n );\n }\n } else {\n this.emit(\n \"error\",\n new Error(\n `Data corruption failure: Received more data than original request, data needed offset is ${\n this.end\n }, received offset: ${this.offset - 1}`\n )\n );\n }\n });\n }\n\n private setSourceErrorHandler() {\n this.source.on(\"error\", (error) => {\n this.emit(\"error\", error);\n });\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { HttpResponse, isNode } from \"@azure/core-http\";\n\nimport {\n BlobDownloadHeaders,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType\n} from \"./generatedModels\";\nimport { BlobDownloadResponseParsed, Metadata, ObjectReplicationPolicy } from \"./models\";\nimport {\n ReadableStreamGetter,\n RetriableReadableStream,\n RetriableReadableStreamOptions\n} from \"./utils/RetriableReadableStream\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will\n * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot\n * trigger retries defined in pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js\n * Readable stream.\n *\n * @export\n * @class BlobDownloadResponse\n * @implements {BlobDownloadResponseParsed}\n */\nexport class BlobDownloadResponse implements BlobDownloadResponseParsed {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n * @type {(BlobType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyCompletedOn(): Date | undefined {\n return this.originalResponse.copyCompletedOn;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n * @type {(CopyStatusType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n * @type {(LeaseDurationType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n * @type {(LeaseStateType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n * @type {(LeaseStatusType | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The number of tags associated with the blob\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get tagCount(): number | undefined {\n return this.originalResponse.tagCount;\n }\n\n /**\n * The error code.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * Returns the UTC date and time generated by the service that indicates the time at which the blob was\n * last read or written to.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get lastAccessed(): Date | undefined {\n return this.originalResponse.lastAccessed;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n * @type {(Metadata | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the Blob service used\n * to execute the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * Indicates the versionId of the downloaded blob version.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get versionId(): string | undefined {\n return this.originalResponse.versionId;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n *\n * @type {(Uint8Array | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @readonly\n * @type {(string| undefined)}\n * @memberof BlobDownloadResponse\n */\n public get objectReplicationDestinationPolicyId(): string | undefined {\n return this.originalResponse.objectReplicationDestinationPolicyId;\n }\n\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @readonly\n * @type {(ObjectReplicationPolicy[] | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get objectReplicationSourceProperties(): ObjectReplicationPolicy[] | undefined {\n return this.originalResponse.objectReplicationSourceProperties;\n }\n\n /**\n * If this blob has been sealed.\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get isSealed(): boolean | undefined {\n return this.originalResponse.isSealed;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n * @type {(Promise | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get contentAsBlob(): Promise | undefined {\n return this.originalResponse.blobBody;\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will automatically retry when internal read stream unexpected ends.\n *\n * @readonly\n * @type {(NodeJS.ReadableStream | undefined)}\n * @memberof BlobDownloadResponse\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return isNode ? this.blobDownloadStream : undefined;\n }\n\n /**\n * The HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobDownloadResponse\n */\n public get _response(): HttpResponse & {\n parsedHeaders: BlobDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobDownloadResponseParsed;\n private blobDownloadStream?: RetriableReadableStream;\n\n /**\n * Creates an instance of BlobDownloadResponse.\n *\n * @param {BlobDownloadResponseParsed} originalResponse\n * @param {ReadableStreamGetter} getter\n * @param {number} offset\n * @param {number} count\n * @param {RetriableReadableStreamOptions} [options={}]\n * @memberof BlobDownloadResponse\n */\n public constructor(\n originalResponse: BlobDownloadResponseParsed,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new RetriableReadableStream(\n this.originalResponse.readableStreamBody!,\n getter,\n offset,\n count,\n options\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const AVRO_SYNC_MARKER_SIZE: number = 16;\nexport const AVRO_INIT_BYTES: Uint8Array = new Uint8Array([79, 98, 106, 1]);\nexport const AVRO_CODEC_KEY: string = \"avro.codec\";\nexport const AVRO_SCHEMA_KEY: string = \"avro.schema\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface KeyValuePair {\n key: string;\n value: T;\n}\n\nexport function arraysEqual(a: Uint8Array, b: Uint8Array): boolean {\n if (a === b) return true;\n if (a == null || b == null) return false;\n if (a.length != b.length) return false;\n\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable } from \"./AvroReadable\";\nimport { KeyValuePair } from \"./utils/utils.common\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the AvroParser read methods.\n * See {@link AvroParser.readFixedBytes}, {@link AvroParser.readMap} and etc.\n *\n * @export\n * @interface AvroParserReadOptions\n */\ninterface AvroParserReadOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroParserReadOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport class AvroParser {\n /**\n * Reads a fixed number of bytes from the stream.\n *\n * @static\n * @param {AvroReadable} [stream]\n * @param {number} [length]\n * @param {AvroParserReadOptions} [options={}]\n * @returns {Promise}\n * @memberof AvroParser\n */\n public static async readFixedBytes(\n stream: AvroReadable,\n length: number,\n options: AvroParserReadOptions = {}\n ): Promise {\n const bytes = await stream.read(length, { abortSignal: options.abortSignal });\n if (bytes.length != length) {\n throw new Error(\"Hit stream end.\");\n }\n return bytes;\n }\n\n /**\n * Reads a single byte from the stream.\n *\n * @static\n * @param {AvroReadable} [stream]\n * @param {AvroParserReadOptions} [options={}]\n * @returns {Promise}\n * @memberof AvroParser\n */\n private static async readByte(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const buf = await AvroParser.readFixedBytes(stream, 1, options);\n return buf[0];\n }\n\n // int and long are stored in variable-length zig-zag coding.\n // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt\n // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types\n private static async readZigZagLong(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n let zigZagEncoded = 0;\n let significanceInBit = 0;\n let byte, haveMoreByte, significanceInFloat;\n\n do {\n byte = await AvroParser.readByte(stream, options);\n haveMoreByte = byte & 0x80;\n zigZagEncoded |= (byte & 0x7f) << significanceInBit;\n significanceInBit += 7;\n } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers\n\n if (haveMoreByte) {\n // Switch to float arithmetic\n zigZagEncoded = zigZagEncoded;\n significanceInFloat = 268435456; // 2 ** 28.\n do {\n byte = await AvroParser.readByte(stream, options);\n zigZagEncoded += (byte & 0x7f) * significanceInFloat;\n significanceInFloat *= 128; // 2 ** 7\n } while (byte & 0x80);\n\n const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;\n if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {\n throw new Error(\"Integer overflow.\");\n }\n return res;\n }\n\n return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);\n }\n\n public static async readLong(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n return AvroParser.readZigZagLong(stream, options);\n }\n\n public static async readInt(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n return AvroParser.readZigZagLong(stream, options);\n }\n\n public static async readNull(): Promise {\n return null;\n }\n\n public static async readBoolean(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const b = await AvroParser.readByte(stream, options);\n if (b == 1) {\n return true;\n } else if (b == 0) {\n return false;\n } else {\n throw new Error(\"Byte was not a boolean.\");\n }\n }\n\n public static async readFloat(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readFixedBytes(stream, 4, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat32(0, true); // littleEndian = true\n }\n\n public static async readDouble(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readFixedBytes(stream, 8, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat64(0, true); // littleEndian = true\n }\n\n public static async readBytes(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const size = await AvroParser.readLong(stream, options);\n if (size < 0) {\n throw new Error(\"Bytes size was negative.\");\n }\n\n return await stream.read(size, { abortSignal: options.abortSignal });\n }\n\n public static async readString(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const u8arr = await AvroParser.readBytes(stream, options);\n\n // polyfill TextDecoder to be backward compatible with older\n // nodejs that doesn't expose TextDecoder as a global variable\n if (typeof TextDecoder === \"undefined\" && typeof require !== \"undefined\") {\n (global as any).TextDecoder = require(\"util\").TextDecoder;\n }\n\n // FUTURE: need TextDecoder polyfill for IE\n let utf8decoder = new TextDecoder();\n return utf8decoder.decode(u8arr);\n }\n\n private static async readMapPair(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise> {\n const key = await AvroParser.readString(stream, options);\n // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.\n const value = await readItemMethod(stream, options);\n return { key, value };\n }\n\n public static async readMap(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise> {\n const readPairMethod = async (\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise> => {\n return await AvroParser.readMapPair(stream, readItemMethod, options);\n };\n\n const pairs: KeyValuePair[] = await AvroParser.readArray(stream, readPairMethod, options);\n\n let dict: Record = {};\n for (const pair of pairs) {\n dict[pair.key] = pair.value;\n }\n return dict;\n }\n\n private static async readArray(\n stream: AvroReadable,\n readItemMethod: (s: AvroReadable, options?: AvroParserReadOptions) => Promise,\n options: AvroParserReadOptions = {}\n ): Promise {\n let items: T[] = [];\n for (\n let count = await AvroParser.readLong(stream, options);\n count != 0;\n count = await AvroParser.readLong(stream, options)\n ) {\n if (count < 0) {\n // Ignore block sizes\n await AvroParser.readLong(stream, options);\n count = -count;\n }\n\n while (count--) {\n const item: T = await readItemMethod(stream, options);\n items.push(item);\n }\n }\n return items;\n }\n}\n\ninterface RecordField {\n name: string;\n type: string | ObjectSchema | (string | ObjectSchema)[]; // Unions may not immediately contain other unions.\n}\n\nenum AvroComplex {\n RECORD = \"record\",\n ENUM = \"enum\",\n ARRAY = \"array\",\n MAP = \"map\",\n UNION = \"union\",\n FIXED = \"fixed\"\n}\n\ninterface ObjectSchema {\n type: Exclude;\n name?: string;\n aliases?: string;\n fields?: RecordField[];\n symbols?: string[];\n values?: string;\n size?: number;\n}\n\nexport abstract class AvroType {\n /**\n * Reads an object from the stream.\n *\n * @param stream\n */\n public abstract read(\n stream: AvroReadable,\n options?: AvroParserReadOptions\n ): Promise;\n\n /**\n * Determines the AvroType from the Avro Schema.\n */\n public static fromSchema(schema: string | Object): AvroType {\n if (typeof schema == \"string\") {\n return AvroType.fromStringSchema(schema);\n } else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n } else {\n return AvroType.fromObjectSchema(schema as ObjectSchema);\n }\n }\n\n private static fromStringSchema(schema: string): AvroType {\n switch (schema) {\n case AvroPrimitive.NULL:\n case AvroPrimitive.BOOLEAN:\n case AvroPrimitive.INT:\n case AvroPrimitive.LONG:\n case AvroPrimitive.FLOAT:\n case AvroPrimitive.DOUBLE:\n case AvroPrimitive.BYTES:\n case AvroPrimitive.STRING:\n return new AvroPrimitiveType(schema as AvroPrimitive);\n default:\n throw new Error(`Unexpected Avro type ${schema}`);\n }\n }\n\n private static fromArraySchema(schema: any[]): AvroType {\n return new AvroUnionType(schema.map(AvroType.fromSchema));\n }\n\n private static fromObjectSchema(schema: ObjectSchema): AvroType {\n const type = schema.type;\n // Primitives can be defined as strings or objects\n try {\n return AvroType.fromStringSchema(type);\n } catch (err) {}\n\n switch (type) {\n case AvroComplex.RECORD:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.name) {\n throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);\n }\n\n let fields: Record = {};\n if (!schema.fields) {\n throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);\n }\n for (const field of schema.fields) {\n fields[field.name] = AvroType.fromSchema(field.type);\n }\n return new AvroRecordType(fields, schema.name);\n case AvroComplex.ENUM:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.symbols) {\n throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);\n }\n return new AvroEnumType(schema.symbols);\n case AvroComplex.MAP:\n if (!schema.values) {\n throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);\n }\n return new AvroMapType(AvroType.fromSchema(schema.values));\n case AvroComplex.ARRAY: // Unused today\n case AvroComplex.FIXED: // Unused today\n default:\n throw new Error(`Unexpected Avro type ${type} in ${schema}`);\n }\n }\n}\n\nenum AvroPrimitive {\n NULL = \"null\",\n BOOLEAN = \"boolean\",\n INT = \"int\",\n LONG = \"long\",\n FLOAT = \"float\",\n DOUBLE = \"double\",\n BYTES = \"bytes\",\n STRING = \"string\"\n}\n\nclass AvroPrimitiveType extends AvroType {\n private _primitive: AvroPrimitive;\n\n constructor(primitive: AvroPrimitive) {\n super();\n this._primitive = primitive;\n }\n\n public async read(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n switch (this._primitive) {\n case AvroPrimitive.NULL:\n return await AvroParser.readNull();\n case AvroPrimitive.BOOLEAN:\n return await AvroParser.readBoolean(stream, options);\n case AvroPrimitive.INT:\n return await AvroParser.readInt(stream, options);\n case AvroPrimitive.LONG:\n return await AvroParser.readLong(stream, options);\n case AvroPrimitive.FLOAT:\n return await AvroParser.readFloat(stream, options);\n case AvroPrimitive.DOUBLE:\n return await AvroParser.readDouble(stream, options);\n case AvroPrimitive.BYTES:\n return await AvroParser.readBytes(stream, options);\n case AvroPrimitive.STRING:\n return await AvroParser.readString(stream, options);\n default:\n throw new Error(\"Unknown Avro Primitive\");\n }\n }\n}\n\nclass AvroEnumType extends AvroType {\n private readonly _symbols: string[];\n\n constructor(symbols: string[]) {\n super();\n this._symbols = symbols;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n const value = await AvroParser.readInt(stream, options);\n return this._symbols[value];\n }\n}\n\nclass AvroUnionType extends AvroType {\n private readonly _types: AvroType[];\n\n constructor(types: AvroType[]) {\n super();\n this._types = types;\n }\n\n public async read(\n stream: AvroReadable,\n options: AvroParserReadOptions = {}\n ): Promise {\n const typeIndex = await AvroParser.readInt(stream, options);\n return await this._types[typeIndex].read(stream, options);\n }\n}\n\nclass AvroMapType extends AvroType {\n private readonly _itemType: AvroType;\n\n constructor(itemType: AvroType) {\n super();\n this._itemType = itemType;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n const readItemMethod = async (\n s: AvroReadable,\n options?: AvroParserReadOptions\n ): Promise => {\n return await this._itemType.read(s, options);\n };\n return await AvroParser.readMap(stream, readItemMethod, options);\n }\n}\n\nclass AvroRecordType extends AvroType {\n private readonly _name: string;\n private readonly _fields: Record;\n\n constructor(fields: Record, name: string) {\n super();\n this._fields = fields;\n this._name = name;\n }\n\n public async read(stream: AvroReadable, options: AvroParserReadOptions = {}): Promise {\n let record: Record = {};\n record[\"$schema\"] = this._name;\n for (const key in this._fields) {\n if (this._fields.hasOwnProperty(key)) {\n record[key] = await this._fields[key].read(stream, options);\n }\n }\n return record;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable } from \"./AvroReadable\";\nimport {\n AVRO_SYNC_MARKER_SIZE,\n AVRO_INIT_BYTES,\n AVRO_CODEC_KEY,\n AVRO_SCHEMA_KEY\n} from \"./AvroConstants\";\nimport { arraysEqual } from \"./utils/utils.common\";\nimport { AvroType, AvroParser } from \"./AvroParser\";\nimport \"@azure/core-paging\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the {@link AvroReader.parseObjects} operation.\n *\n * @export\n * @interface AvroParseOptions\n */\nexport interface AvroParseOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroParseOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport class AvroReader {\n private readonly _dataStream: AvroReadable;\n\n private readonly _headerStream: AvroReadable;\n\n private _syncMarker?: Uint8Array;\n\n private _metadata?: Record;\n\n private _itemType?: AvroType;\n\n private _itemsRemainingInBlock?: number;\n\n // Remembers where we started if partial data stream was provided.\n private readonly _initialBlockOffset: number;\n\n /// The byte offset within the Avro file (both header and data)\n /// of the start of the current block.\n private _blockOffset: number;\n public get blockOffset(): number {\n return this._blockOffset;\n }\n\n private _objectIndex: number;\n public get objectIndex(): number {\n return this._objectIndex;\n }\n\n private _initialized: boolean;\n\n constructor(dataStream: AvroReadable);\n\n constructor(\n dataStream: AvroReadable,\n headerStream: AvroReadable,\n currentBlockOffset: number,\n indexWithinCurrentBlock: number\n );\n\n constructor(\n dataStream: AvroReadable,\n headerStream?: AvroReadable,\n currentBlockOffset?: number,\n indexWithinCurrentBlock?: number\n ) {\n this._dataStream = dataStream;\n this._headerStream = headerStream || dataStream;\n this._initialized = false;\n this._blockOffset = currentBlockOffset || 0;\n this._objectIndex = indexWithinCurrentBlock || 0;\n this._initialBlockOffset = currentBlockOffset || 0;\n }\n\n private async initialize(options: AvroParseOptions = {}) {\n const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {\n abortSignal: options.abortSignal\n });\n if (!arraysEqual(header, AVRO_INIT_BYTES)) {\n throw new Error(\"Stream is not an Avro file.\");\n }\n\n // File metadata is written as if defined by the following map schema:\n // { \"type\": \"map\", \"values\": \"bytes\"}\n this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {\n abortSignal: options.abortSignal\n });\n\n // Validate codec\n const codec = this._metadata![AVRO_CODEC_KEY];\n if (!(codec == undefined || codec == \"null\")) {\n throw new Error(\"Codecs are not supported\");\n }\n\n // The 16-byte, randomly-generated sync marker for this file.\n this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal\n });\n\n // Parse the schema\n const schema = JSON.parse(this._metadata![AVRO_SCHEMA_KEY]);\n this._itemType = AvroType.fromSchema(schema);\n\n if (this._blockOffset == 0) {\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n }\n\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal\n });\n // skip block length\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n\n this._initialized = true;\n if (this._objectIndex && this._objectIndex > 0) {\n for (let i = 0; i < this._objectIndex; i++) {\n await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });\n this._itemsRemainingInBlock!--;\n }\n }\n }\n\n public hasNext(): boolean {\n return !this._initialized || this._itemsRemainingInBlock! > 0;\n }\n\n public async *parseObjects(\n options: AvroParseOptions = {}\n ): AsyncIterableIterator | null> {\n if (!this._initialized) {\n await this.initialize(options);\n }\n\n while (this.hasNext()) {\n const result = await this._itemType!.read(this._dataStream, {\n abortSignal: options.abortSignal\n });\n\n this._itemsRemainingInBlock!--;\n this._objectIndex!++;\n\n if (this._itemsRemainingInBlock == 0) {\n const marker = await AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal\n });\n\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n this._objectIndex = 0;\n\n if (!arraysEqual(this._syncMarker!, marker)) {\n throw new Error(\"Stream is not a valid Avro file.\");\n }\n\n try {\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal\n });\n } catch (err) {\n // We hit the end of the stream.\n this._itemsRemainingInBlock = 0;\n }\n\n if (this._itemsRemainingInBlock! > 0) {\n // Ignore block size\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n }\n }\n yield result;\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options to configure the {@link AvroReadable.read} operation.\n *\n * @export\n * @interface AvroReadableReadOptions\n */\nexport interface AvroReadableReadOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AvroReadableReadOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\nexport abstract class AvroReadable {\n public abstract get position(): number;\n public abstract async read(size: number, options?: AvroReadableReadOptions): Promise;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AvroReadable, AvroReadableReadOptions } from \"./AvroReadable\";\nimport { AbortError } from \"@azure/abort-controller\";\n\nconst ABORT_ERROR = new AbortError(\"Reading from the avro stream was aborted.\");\n\nexport class AvroReadableFromStream extends AvroReadable {\n private _position: number;\n private _readable: NodeJS.ReadableStream;\n\n private toUint8Array(data: string | Buffer): Uint8Array {\n if (typeof data === \"string\") {\n return Buffer.from(data);\n }\n return data;\n }\n\n constructor(readable: NodeJS.ReadableStream) {\n super();\n this._readable = readable;\n this._position = 0;\n }\n public get position(): number {\n return this._position;\n }\n public async read(size: number, options: AvroReadableReadOptions = {}): Promise {\n if (options.abortSignal?.aborted) {\n throw ABORT_ERROR;\n }\n\n if (size < 0) {\n throw new Error(`size parameter should be positive: ${size}`);\n }\n\n if (size === 0) {\n return new Uint8Array();\n }\n\n if (!this._readable.readable) {\n throw new Error(\"Stream no longer readable.\");\n }\n // See if there is already enough data.\n let chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n // chunk.length maybe less than desired size if the stream ends.\n return this.toUint8Array(chunk);\n } else {\n // register callback to wait for enough data to read\n return new Promise((resolve, reject) => {\n const cleanUp = () => {\n this._readable.removeListener(\"readable\", readableCallback);\n this._readable.removeListener(\"error\", rejectCallback);\n this._readable.removeListener(\"end\", rejectCallback);\n this._readable.removeListener(\"close\", rejectCallback);\n\n if (options.abortSignal) {\n options.abortSignal!.removeEventListener(\"abort\", abortHandler);\n }\n };\n\n const readableCallback = () => {\n let chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n cleanUp();\n // chunk.length maybe less than desired size if the stream ends.\n resolve(this.toUint8Array(chunk));\n }\n };\n\n const rejectCallback = () => {\n cleanUp();\n reject();\n };\n\n const abortHandler = () => {\n cleanUp();\n reject(ABORT_ERROR);\n };\n\n this._readable.on(\"readable\", readableCallback);\n this._readable.once(\"error\", rejectCallback);\n this._readable.once(\"end\", rejectCallback);\n this._readable.once(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal!.addEventListener(\"abort\", abortHandler);\n }\n });\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Readable } from \"stream\";\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-http\";\n\nimport { AvroReadableFromStream, AvroReader } from \"../../../storage-internal-avro/src\";\nimport { BlobQueryError } from \"../Clients\";\n\nexport interface BlobQuickQueryStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobQuickQueryStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Read progress event handler\n *\n * @memberof BlobQuickQueryStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback to receive error events during the query operaiton.\n *\n * @memberof BlockBlobQueryOptions\n */\n onError?: (error: BlobQueryError) => void;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n *\n * @class BlobQuickQueryStream\n * @extends {Readable}\n */\nexport class BlobQuickQueryStream extends Readable {\n private source: NodeJS.ReadableStream;\n private avroReader: AvroReader;\n private avroIter: AsyncIterableIterator;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private onError?: (error: BlobQueryError) => void;\n\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param {NodeJS.ReadableStream} source The current ReadableStream returned from getter\n * @param {BlobQuickQueryStreamOptions} [options={}]\n * @memberof BlobQuickQueryStream\n */\n public constructor(source: NodeJS.ReadableStream, options: BlobQuickQueryStreamOptions = {}) {\n super();\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n\n public _read() {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n\n private async readInternal() {\n for await (const obj of this.avroIter) {\n const schema = (obj as any).$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n\n let exit = false;\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n const data = (obj as any).data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n exit = true;\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n const bytesScanned = (obj as any).bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = (obj as any).totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = (obj as any).fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = (obj as any).name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = (obj as any).description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = (obj as any).position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n\n if (exit) {\n break;\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { HttpResponse, isNode } from \"@azure/core-http\";\n\nimport {\n BlobDownloadResponseModel,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n BlobDownloadHeaders,\n BlobQueryResponseModel\n} from \"./generatedModels\";\nimport { Metadata } from \"./models\";\nimport { BlobQuickQueryStream, BlobQuickQueryStreamOptions } from \"./utils/BlobQuickQueryStream\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will\n * parse avor data returned by blob query.\n *\n * @export\n * @class BlobQueryResponse\n * @implements {BlobDownloadResponseModel}\n */\nexport class BlobQueryResponse implements BlobDownloadResponseModel {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n * @type {(BlobType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyCompletedOn(): Date | undefined {\n return undefined;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n * @type {(CopyStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n * @type {(LeaseDurationType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n * @type {(LeaseStateType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n * @type {(LeaseStatusType | undefined)}\n * @memberof BlobQueryResponse\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n * @type {(number | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The error code.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n * @type {(boolean | undefined)}\n * @memberof BlobQueryResponse\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n * @type {(Date | undefined)}\n * @memberof BlobQueryResponse\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n * @type {(Metadata | undefined)}\n * @memberof BlobQueryResponse\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the File service used\n * to execute the request.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n * @type {(string | undefined)}\n * @memberof BlobQueryResponse\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n *\n * @type {(Uint8Array | undefined)}\n * @memberof BlobQueryResponse\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n * @type {(Promise | undefined)}\n * @memberof BlobQueryResponse\n */\n public get blobBody(): Promise | undefined {\n return undefined;\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will parse avor data returned by blob query.\n *\n * @readonly\n * @type {(NodeJS.ReadableStream | undefined)}\n * @memberof BlobQueryResponse\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return isNode ? this.blobDownloadStream : undefined;\n }\n\n /**\n * The HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobQueryResponse\n */\n public get _response(): HttpResponse & {\n parsedHeaders: BlobDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobQueryResponseModel;\n private blobDownloadStream?: BlobQuickQueryStream;\n\n /**\n * Creates an instance of BlobQueryResponse.\n *\n * @param {BlobQueryResponseModel} originalResponse\n * @param {BlobQuickQueryStreamOptions} [options={}]\n * @memberof BlobQueryResponse\n */\n public constructor(\n originalResponse: BlobQueryResponseModel,\n options: BlobQuickQueryStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new BlobQuickQueryStream(\n this.originalResponse.readableStreamBody!,\n options\n );\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { RequestPolicy, RequestPolicyOptions, WebResource } from \"@azure/core-http\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { HeaderConstants } from \"../utils/constants\";\nimport { getURLPath, getURLQueries } from \"../utils/utils.common\";\nimport { CredentialPolicy } from \"./CredentialPolicy\";\n\n/**\n * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.\n *\n * @export\n * @class StorageSharedKeyCredentialPolicy\n * @extends {CredentialPolicy}\n */\nexport class StorageSharedKeyCredentialPolicy extends CredentialPolicy {\n /**\n * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy\n *\n * @type {StorageSharedKeyCredential}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private readonly factory: StorageSharedKeyCredential;\n\n /**\n * Creates an instance of StorageSharedKeyCredentialPolicy.\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @param {StorageSharedKeyCredential} factory\n * @memberof StorageSharedKeyCredentialPolicy\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n factory: StorageSharedKeyCredential\n ) {\n super(nextPolicy, options);\n this.factory = factory;\n }\n\n /**\n * Signs request.\n *\n * @protected\n * @param {WebResource} request\n * @returns {WebResource}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n protected signRequest(request: WebResource): WebResource {\n request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());\n\n if (request.body && typeof request.body === \"string\" && request.body.length > 0) {\n request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));\n }\n\n const stringToSign: string =\n [\n request.method.toUpperCase(),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),\n this.getHeaderValueToSign(request, HeaderConstants.DATE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.RANGE)\n ].join(\"\\n\") +\n \"\\n\" +\n this.getCanonicalizedHeadersString(request) +\n this.getCanonicalizedResourceString(request);\n\n const signature: string = this.factory.computeHMACSHA256(stringToSign);\n request.headers.set(\n HeaderConstants.AUTHORIZATION,\n `SharedKey ${this.factory.accountName}:${signature}`\n );\n\n // console.log(`[URL]:${request.url}`);\n // console.log(`[HEADERS]:${request.headers.toString()}`);\n // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);\n // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);\n return request;\n }\n\n /**\n * Retrieve header value according to shared key sign rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n *\n * @private\n * @param {WebResource} request\n * @param {string} headerName\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getHeaderValueToSign(request: WebResource, headerName: string): string {\n const value = request.headers.get(headerName);\n\n if (!value) {\n return \"\";\n }\n\n // When using version 2015-02-21 or later, if Content-Length is zero, then\n // set the Content-Length part of the StringToSign to an empty string.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n if (headerName === HeaderConstants.CONTENT_LENGTH && value === \"0\") {\n return \"\";\n }\n\n return value;\n }\n\n /**\n * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:\n * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.\n * 2. Convert each HTTP header name to lowercase.\n * 3. Sort the headers lexicographically by header name, in ascending order.\n * Each header may appear only once in the string.\n * 4. Replace any linear whitespace in the header value with a single space.\n * 5. Trim any whitespace around the colon in the header.\n * 6. Finally, append a new-line character to each canonicalized header in the resulting list.\n * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.\n *\n * @private\n * @param {WebResource} request\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getCanonicalizedHeadersString(request: WebResource): string {\n let headersArray = request.headers.headersArray().filter((value) => {\n return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);\n });\n\n headersArray.sort((a, b): number => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n\n // Remove duplicate headers\n headersArray = headersArray.filter((value, index, array) => {\n if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {\n return false;\n }\n return true;\n });\n\n let canonicalizedHeadersStringToSign: string = \"\";\n headersArray.forEach((header) => {\n canonicalizedHeadersStringToSign += `${header.name\n .toLowerCase()\n .trimRight()}:${header.value.trimLeft()}\\n`;\n });\n\n return canonicalizedHeadersStringToSign;\n }\n\n /**\n * Retrieves the webResource canonicalized resource string.\n *\n * @private\n * @param {WebResource} request\n * @returns {string}\n * @memberof StorageSharedKeyCredentialPolicy\n */\n private getCanonicalizedResourceString(request: WebResource): string {\n const path = getURLPath(request.url) || \"/\";\n\n let canonicalizedResourceString: string = \"\";\n canonicalizedResourceString += `/${this.factory.accountName}${path}`;\n\n const queries = getURLQueries(request.url);\n const lowercaseQueries: { [key: string]: string } = {};\n if (queries) {\n const queryKeys: string[] = [];\n for (const key in queries) {\n if (queries.hasOwnProperty(key)) {\n const lowercaseKey = key.toLowerCase();\n lowercaseQueries[lowercaseKey] = queries[key];\n queryKeys.push(lowercaseKey);\n }\n }\n\n queryKeys.sort();\n for (const key of queryKeys) {\n canonicalizedResourceString += `\\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;\n }\n }\n\n return canonicalizedResourceString;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"crypto\";\nimport { RequestPolicy, RequestPolicyOptions } from \"@azure/core-http\";\n\nimport { StorageSharedKeyCredentialPolicy } from \"../policies/StorageSharedKeyCredentialPolicy\";\nimport { Credential } from \"./Credential\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n *\n * @export\n * @class StorageSharedKeyCredential\n * @extends {Credential}\n */\nexport class StorageSharedKeyCredential extends Credential {\n /**\n * Azure Storage account name; readonly.\n *\n * @type {string}\n * @memberof StorageSharedKeyCredential\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage account key; readonly.\n *\n * @type {Buffer}\n * @memberof StorageSharedKeyCredential\n */\n private readonly accountKey: Buffer;\n\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param {string} accountName\n * @param {string} accountKey\n * @memberof StorageSharedKeyCredential\n */\n constructor(accountName: string, accountKey: string) {\n super();\n this.accountName = accountName;\n this.accountKey = Buffer.from(accountKey, \"base64\");\n }\n\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param {RequestPolicy} nextPolicy\n * @param {RequestPolicyOptions} options\n * @returns {StorageSharedKeyCredentialPolicy}\n * @memberof StorageSharedKeyCredential\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): StorageSharedKeyCredentialPolicy {\n return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param {string} stringToSign\n * @returns {string}\n * @memberof StorageSharedKeyCredential\n */\n public computeHMACSHA256(stringToSign: string): string {\n return createHmac(\"sha256\", this.accountKey)\n .update(stringToSign, \"utf8\")\n .digest(\"base64\");\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\n\nconst packageName = \"azure-storage-blob\";\nconst packageVersion = \"12.3.0\";\n\nexport class StorageClientContext extends coreHttp.ServiceClient {\n url: string;\n version: string;\n\n /**\n * Initializes a new instance of the StorageClientContext class.\n * @param url The URL of the service account, container, or blob that is the targe of the desired\n * operation.\n * @param [options] The parameter options\n */\n constructor(url: string, options?: coreHttp.ServiceClientOptions) {\n if (url == undefined) {\n throw new Error(\"'url' cannot be null.\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (!options.userAgent) {\n const defaultUserAgent = coreHttp.getDefaultUserAgentValue();\n options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;\n }\n\n super(undefined, options);\n\n this.version = \"2020-02-10\";\n this.baseUri = \"{url}\";\n this.requestContentType = \"application/json; charset=utf-8\";\n this.url = url;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n LeaseAccessConditions,\n SequenceNumberAccessConditions,\n AppendPositionAccessConditions,\n AccessTier,\n CpkInfo,\n BlobDownloadResponseModel\n} from \"./generatedModels\";\nimport { EncryptionAlgorithmAES25 } from \"./utils/constants\";\n\n/**\n * Blob tags.\n */\nexport type Tags = Record;\n\n/**\n * A map of name-value pairs to associate with the resource.\n */\nexport interface Metadata {\n /**\n * A name-value pair.\n */\n [propertyName: string]: string;\n}\n\n/**\n * standard HTTP conditional headers and tags condition.\n */\nexport interface ModifiedAccessConditions\n extends MatchConditions,\n ModificationConditions,\n TagConditions {}\n\n/**\n * standard HTTP conditional headers, tags condition and lease condition\n */\nexport interface BlobRequestConditions extends ModifiedAccessConditions, LeaseAccessConditions {}\n\n/**\n * Conditions to add to the creation of this page blob.\n */\nexport interface PageBlobRequestConditions\n extends BlobRequestConditions,\n SequenceNumberAccessConditions {}\n\n/**\n * Conditions to add to the creation of this append blob.\n */\nexport interface AppendBlobRequestConditions\n extends BlobRequestConditions,\n AppendPositionAccessConditions {}\n\n/**\n * Specifies HTTP options for conditional requests based on modification time.\n */\nexport interface ModificationConditions {\n /**\n * Specify this header value to operate only on a blob if it has been modified since the\n * specified date/time.\n */\n ifModifiedSince?: Date;\n /**\n * Specify this header value to operate only on a blob if it has not been modified since the\n * specified date/time.\n */\n ifUnmodifiedSince?: Date;\n}\n\n/**\n * Specifies HTTP options for conditional requests based on ETag matching.\n */\nexport interface MatchConditions {\n /**\n * Specify an ETag value to operate only on blobs with a matching value.\n */\n ifMatch?: string;\n /**\n * Specify an ETag value to operate only on blobs without a matching value.\n */\n ifNoneMatch?: string;\n}\n\n/**\n * Specifies HTTP options for conditional requests based on blob tags.\n */\nexport interface TagConditions {\n /**\n * Optional SQL statement to apply to the tags of the blob.\n */\n tagConditions?: string;\n}\n\n/**\n * Conditions to meet for the container.\n */\nexport interface ContainerRequestConditions extends LeaseAccessConditions, ModificationConditions {}\n\n/**\n * Represents the access tier on a blob.\n * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}\n */\nexport enum BlockBlobTier {\n /**\n * Optimized for storing data that is accessed frequently.\n */\n Hot = \"Hot\",\n /**\n * Optimized for storing data that is infrequently accessed and stored for at least 30 days.\n */\n Cool = \"Cool\",\n /**\n * Optimized for storing data that is rarely accessed and stored for at least 180 days\n * with flexible latency requirements (on the order of hours).\n */\n Archive = \"Archive\"\n}\n\n/**\n * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.\n * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}\n * for detailed information on the corresponding IOPS and throughput per PageBlobTier.\n */\nexport enum PremiumPageBlobTier {\n /**\n * P4 Tier.\n */\n P4 = \"P4\",\n /**\n * P6 Tier.\n */\n P6 = \"P6\",\n /**\n * P10 Tier.\n */\n P10 = \"P10\",\n /**\n * P15 Tier.\n */\n P15 = \"P15\",\n /**\n * P20 Tier.\n */\n P20 = \"P20\",\n /**\n * P30 Tier.\n */\n P30 = \"P30\",\n /**\n * P40 Tier.\n */\n P40 = \"P40\",\n /**\n * P50 Tier.\n */\n P50 = \"P50\",\n /**\n * P60 Tier.\n */\n P60 = \"P60\",\n /**\n * P70 Tier.\n */\n P70 = \"P70\",\n /**\n * P80 Tier.\n */\n P80 = \"P80\"\n}\n\nexport function toAccessTier(\n tier: BlockBlobTier | PremiumPageBlobTier | string | undefined\n): AccessTier | undefined {\n if (tier == undefined) {\n return undefined;\n }\n\n return tier as AccessTier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service).\n}\n\nexport function ensureCpkIfSpecified(cpk: CpkInfo | undefined, isHttps: boolean) {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n\n/**\n * Specifies the Replication Status of a blob. This is used when a storage account has\n * Object Replication Policy(s) applied. See {@link ObjectReplicationPolicy} and {@link ObjectReplicationRule}.\n */\nexport type ObjectReplicationStatus = \"complete\" | \"failed\";\n\n/**\n * Contains the Object Replication Rule ID and {@link ObjectReplicationStatus} of a blob.\n * There can be more than one {@link ObjectReplicationRule} under a {@link ObjectReplicationPolicy}.\n */\nexport interface ObjectReplicationRule {\n /**\n * The Object Replication Rule ID.\n *\n * @type {string}\n * @memberof ObjectReplicationRule\n */\n ruleId: string;\n\n /**\n * The Replication Status\n *\n * @type {ObjectReplicationStatus}\n * @memberof ObjectReplicationRule\n */\n replicationStatus: ObjectReplicationStatus;\n}\n\n/**\n * Contains Object Replication Policy ID and the respective list of {@link ObjectReplicationRule}.\n * This is used when retrieving the Object Replication Properties on the source blob. The policy id for the\n * destination blob is set in ObjectReplicationDestinationPolicyId of the respective method responses\n * (e.g. {@link BlobProperties.ObjectReplicationDestinationPolicyId}.\n *\n * @export\n * @interface ObjectReplicationPolicy\n */\nexport interface ObjectReplicationPolicy {\n /**\n * The Object Replication Policy ID.\n *\n * @type {string}\n * @memberof ObjectReplicationPolicy\n */\n policyId: string;\n\n /**\n * The Rule ID(s) and respective Replication Status(s) that are under the Policy ID.\n *\n * @type {ObjectReplicationRule[]}\n * @memberof ObjectReplicationPolicy\n */\n rules: ObjectReplicationRule[];\n}\n\n/**\n * Contains response data for the {@link BlobClient.download} operation.\n *\n * @export\n * @interface BlobDownloadResponseParsed\n */\nexport interface BlobDownloadResponseParsed extends BlobDownloadResponseModel {\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @type {ObjectReplicationPolicy[]}\n * @memberof BlobDownloadResponseParsed\n */\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @type {string}\n * @memberof BlobDownloadResponseParsed\n */\n objectReplicationDestinationPolicyId?: string;\n}\n\n/**\n * The type of a {@link BlobQueryArrowField}.\n */\nexport type BlobQueryArrowFieldType =\n | \"int64\"\n | \"bool\"\n | \"timestamp[ms]\"\n | \"string\"\n | \"double\"\n | \"decimal\";\n\n/**\n * Describe a field in {@link BlobQueryArrowConfiguration}.\n *\n * @export\n * @interface BlobQueryArrowField\n */\nexport interface BlobQueryArrowField {\n /**\n * The type of the field.\n *\n * @type {BlobQueryArrowFieldType}\n * @memberof BlobQueryArrowField\n */\n type: BlobQueryArrowFieldType;\n\n /**\n * The name of the field.\n *\n * @type {string}\n * @memberof BlobQueryArrowField\n */\n name?: string;\n\n /**\n * The precision of the field. Required if type is \"decimal\".\n *\n * @type {number}\n * @memberof BlobQueryArrowField\n */\n precision?: number;\n\n /**\n * The scale of the field. Required if type is is \"decimal\".\n *\n * @type {number}\n * @memberof BlobQueryArrowField\n */\n scale?: number;\n}\n","import { HttpResponse } from \"@azure/core-http\";\nimport {\n PageBlobGetPageRangesHeaders,\n PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesResponse as PageBlobGetPageRangesResponseModel,\n PageBlobGetPageRangesDiffResponse as PageBlobGetPageRangesDiffResponseModel\n} from \"./generatedModels\";\nimport { Range } from \"./Range\";\n\n/**\n * List of page ranges for a blob.\n */\nexport interface PageList {\n /**\n * Valid non-overlapping page ranges.\n */\n pageRange?: Range[];\n /**\n * Present if the prevSnapshot parameter was specified and there were cleared\n * pages between the previous snapshot and the target snapshot.\n */\n clearRange?: Range[];\n}\n\n/**\n * Contains response data for the {@link BlobClient.getPageRanges} operation.\n */\nexport interface PageBlobGetPageRangesResponse extends PageList, PageBlobGetPageRangesHeaders {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n}\n\n/**\n * Contains response data for the {@link BlobClient.getPageRangesDiff} operation.\n */\nexport interface PageBlobGetPageRangesDiffResponse\n extends PageList,\n PageBlobGetPageRangesDiffHeaders {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: PageBlobGetPageRangesDiffHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: PageList;\n };\n}\n\n/**\n * Function that converts PageRange and ClearRange to a common Range object.\n * PageRange and ClearRange have start and end while Range offset and count\n * this function normalizes to Range.\n * @param response Model PageBlob Range response\n */\nexport function rangeResponseFromModel(\n response: PageBlobGetPageRangesResponseModel | PageBlobGetPageRangesDiffResponseModel\n): PageBlobGetPageRangesResponse | PageBlobGetPageRangesDiffResponse {\n const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start\n }));\n\n const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start\n }));\n\n return {\n ...response,\n pageRange,\n clearRange,\n _response: {\n ...response._response,\n parsedBody: {\n pageRange,\n clearRange\n }\n }\n };\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { delay } from \"@azure/core-http\";\nimport { PollOperation, PollOperationState, Poller } from \"@azure/core-lro\";\nimport { BlobClient, BlobStartCopyFromURLOptions, BlobBeginCopyFromURLResponse } from \"../Clients\";\n\n/**\n * Defines the operations from a {@link BlobClient} that are needed for the poller\n * returned by {@link BlobClient.beginCopyFromURL} to work.\n */\nexport type CopyPollerBlobClient = Pick & {\n startCopyFromURL(\n copySource: string,\n options?: BlobStartCopyFromURLOptions\n ): Promise;\n};\n\n/**\n * The state used by the poller returned from {@link BlobClient.beginCopyFromURL}.\n *\n * This state is passed into the user-specified `onProgress` callback\n * whenever copy progress is detected.\n */\nexport interface BlobBeginCopyFromUrlPollState\n extends PollOperationState {\n /**\n * The instance of {@link BlobClient} that was used when calling {@link BlobClient.beginCopyFromURL}.\n */\n readonly blobClient: CopyPollerBlobClient;\n /**\n * The copyId that identifies the in-progress blob copy.\n */\n copyId?: string;\n /**\n * the progress of the blob copy as reported by the service.\n */\n copyProgress?: string;\n /**\n * The source URL provided in {@link BlobClient.beginCopyFromURL}.\n */\n copySource: string;\n /**\n * The options that were passed to the initial {@link BlobClient.beginCopyFromURL} call.\n * This is exposed for the poller and should not be modified directly.\n */\n readonly startCopyFromURLOptions?: BlobStartCopyFromURLOptions;\n}\n\n/**\n * The PollOperation responsible for:\n * - performing the initial startCopyFromURL\n * - checking the copy status via getProperties\n * - cancellation via abortCopyFromURL\n * @ignore\n */\nexport interface BlobBeginCopyFromURLPollOperation\n extends PollOperation {}\n\n/**\n * The set of options used to configure the poller.\n * This is an internal interface populated by {@link BlobClient.beginCopyFromURL}.\n *\n * @ignore\n */\nexport interface BlobBeginCopyFromUrlPollerOptions {\n blobClient: CopyPollerBlobClient;\n copySource: string;\n intervalInMs?: number;\n onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;\n resumeFrom?: string;\n startCopyFromURLOptions?: BlobStartCopyFromURLOptions;\n}\n\n/**\n * This is the poller returned by {@link BlobClient.beginCopyFromURL}.\n * This can not be instantiated directly outside of this package.\n *\n * @ignore\n */\nexport class BlobBeginCopyFromUrlPoller extends Poller<\n BlobBeginCopyFromUrlPollState,\n BlobBeginCopyFromURLResponse\n> {\n public intervalInMs: number;\n\n constructor(options: BlobBeginCopyFromUrlPollerOptions) {\n const {\n blobClient,\n copySource,\n intervalInMs = 15000,\n onProgress,\n resumeFrom,\n startCopyFromURLOptions\n } = options;\n\n let state: BlobBeginCopyFromUrlPollState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = makeBlobBeginCopyFromURLPollOperation({\n ...state,\n blobClient,\n copySource,\n startCopyFromURLOptions\n });\n\n super(operation);\n\n if (typeof onProgress === \"function\") {\n this.onProgress(onProgress);\n }\n\n this.intervalInMs = intervalInMs;\n }\n\n public delay(): Promise {\n return delay(this.intervalInMs);\n }\n}\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst cancel: BlobBeginCopyFromURLPollOperation[\"cancel\"] = async function cancel(\n this: BlobBeginCopyFromURLPollOperation,\n options = {}\n) {\n const state = this.state;\n const { copyId } = state;\n if (state.isCompleted) {\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n\n if (!copyId) {\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n\n // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call\n await state.blobClient.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal\n });\n state.isCancelled = true;\n\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst update: BlobBeginCopyFromURLPollOperation[\"update\"] = async function update(\n this: BlobBeginCopyFromURLPollOperation,\n options = {}\n): Promise {\n const state = this.state;\n const { blobClient, copySource, startCopyFromURLOptions } = state;\n\n if (!state.isStarted) {\n state.isStarted = true;\n const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions);\n\n // copyId is needed to abort\n state.copyId = result.copyId;\n if (result.copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n } else if (!state.isCompleted) {\n try {\n const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal });\n const { copyStatus, copyProgress } = result;\n const prevCopyProgress = state.copyProgress;\n if (copyProgress) {\n state.copyProgress = copyProgress;\n }\n if (\n copyStatus === \"pending\" &&\n copyProgress !== prevCopyProgress &&\n typeof options.fireProgress === \"function\"\n ) {\n // trigger in setTimeout, or swallow error?\n options.fireProgress(state);\n } else if (copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n } else if (copyStatus === \"failed\") {\n state.error = new Error(\n `Blob copy failed with reason: \"${result.copyStatusDescription || \"unknown\"}\"`\n );\n state.isCompleted = true;\n }\n } catch (err) {\n state.error = err;\n state.isCompleted = true;\n }\n }\n\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @ignore\n */\nconst toString: BlobBeginCopyFromURLPollOperation[\"toString\"] = function toString(\n this: BlobBeginCopyFromURLPollOperation\n) {\n return JSON.stringify({ state: this.state }, (key, value) => {\n // remove blobClient from serialized state since a client can't be hydrated from this info.\n if (key === \"blobClient\") {\n return undefined;\n }\n return value;\n });\n};\n\n/**\n * Creates a poll operation given the provided state.\n * @ignore\n */\nfunction makeBlobBeginCopyFromURLPollOperation(\n state: BlobBeginCopyFromUrlPollState\n): BlobBeginCopyFromURLPollOperation {\n return {\n state: { ...state },\n cancel,\n toString,\n update\n };\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// tslint:disable:max-line-length\n/**\n * Range for Blob Service Operations.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations\n *\n * @export\n * @interface Range\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n *\n * @type {string}\n * @memberof Range\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n *\n * @type {string}\n * @memberof Range\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @export\n * @param {Range} iRange\n * @returns {string}\n */\nexport function rangeToString(iRange: Range): string {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`\n );\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { StorageClientContext } from \"./generated/src/storageClientContext\";\nimport { Pipeline } from \"./Pipeline\";\nimport { escapeURLPath, getURLScheme, iEqual, getAccountNameFromUrl } from \"./utils/utils.common\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { TokenCredential, isTokenCredential, isNode } from \"@azure/core-http\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n *\n * @export\n * @class StorageClient\n */\nexport abstract class StorageClient {\n /**\n * Encoded URL string value.\n *\n * @type {string}\n * @memberof StorageClient\n */\n public readonly url: string;\n public readonly accountName: string;\n /**\n * Request policy pipeline.\n *\n * @internal\n * @ignore\n * @type {Pipeline}\n * @memberof StorageClient\n */\n protected readonly pipeline: Pipeline;\n /**\n * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n *\n * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential}\n * @memberof StorageClient\n */\n public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n *\n * @protected\n * @type {StorageClientContext}\n * @memberof StorageClient\n */\n protected readonly storageClientContext: StorageClientContext;\n /**\n * @protected\n * @type {boolean}\n * @memberof StorageClient\n */\n protected readonly isHttps: boolean;\n\n /**\n * Creates an instance of StorageClient.\n * @param {string} url url to resource\n * @param {Pipeline} pipeline request policy pipeline.\n * @memberof StorageClient\n */\n protected constructor(url: string, pipeline: Pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageClientContext(\n this.url,\n pipeline.toServiceClientOptions()\n );\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = new AnonymousCredential();\n for (const factory of this.pipeline.factories) {\n if (\n (isNode && factory instanceof StorageSharedKeyCredential) ||\n factory instanceof AnonymousCredential ||\n isTokenCredential(factory)\n ) {\n this.credential = factory;\n }\n }\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n// In browser, during webpack or browserify bundling, this module will be replaced by 'events'\n// https://github.com/Gozala/events\nimport { EventEmitter } from \"events\";\n\n/**\n * Operation is an async function to be executed and managed by Batch.\n */\nexport declare type Operation = () => Promise;\n\n/**\n * States for Batch.\n *\n * @enum {number}\n */\nenum BatchStates {\n Good,\n Error\n}\n\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n *\n * @export\n * @class Batch\n */\nexport class Batch {\n /**\n * Concurrency. Must be lager than 0.\n *\n * @type {number}\n * @memberof Batch\n */\n private concurrency: number;\n\n /**\n * Number of active operations under execution.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private actives: number = 0;\n\n /**\n * Number of completed operations under execution.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private completed: number = 0;\n\n /**\n * Offset of next operation to be executed.\n *\n * @private\n * @type {number}\n * @memberof Batch\n */\n private offset: number = 0;\n\n /**\n * Operation array to be executed.\n *\n * @private\n * @type {Operation[]}\n * @memberof Batch\n */\n private operations: Operation[] = [];\n\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n *\n * @private\n * @type {BatchStates}\n * @memberof Batch\n */\n private state: BatchStates = BatchStates.Good;\n\n /**\n * A private emitter used to pass events inside this class.\n *\n * @private\n * @type {EventEmitter}\n * @memberof Batch\n */\n private emitter: EventEmitter;\n\n /**\n * Creates an instance of Batch.\n * @param {number} [concurrency=5]\n * @memberof Batch\n */\n public constructor(concurrency: number = 5) {\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new EventEmitter();\n }\n\n /**\n * Add a operation into queue.\n *\n * @param {Operation} operation\n * @memberof Batch\n */\n public addOperation(operation: Operation): void {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n } catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n\n /**\n * Start execute operations in the queue.\n *\n * @returns {Promise}\n * @memberof Batch\n */\n public async do(): Promise {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n\n this.parallelExecute();\n\n return new Promise((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n * @private\n * @returns {(Operation | null)}\n * @memberof Batch\n */\n private nextOperation(): Operation | null {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n * @private\n * @returns {void}\n * @memberof Batch\n */\n private parallelExecute(): void {\n if (this.state === BatchStates.Error) {\n return;\n }\n\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n } else {\n return;\n }\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { Readable, ReadableOptions } from \"stream\";\n\n/**\n * Options to configure the BuffersStream.\n */\nexport interface BuffersStreamOptions extends ReadableOptions {}\n\n/**\n * This class generates a readable stream from the data in an array of buffers.\n *\n * @export\n * @class BuffersStream\n */\nexport class BuffersStream extends Readable {\n /**\n * The offset of data to be read in the current buffer.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private byteOffsetInCurrentBuffer: number;\n\n /**\n * The index of buffer to be read in the array of buffers.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private bufferIndex: number;\n\n /**\n * The total length of data already read.\n *\n * @private\n * @type {number}\n * @memberof BuffersStream\n */\n private pushedBytesLength: number;\n\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param {Buffer[]} buffers Array of buffers containing the data\n * @param {number} byteLength The total length of data contained in the buffers\n * @memberof BuffersStream\n */\n constructor(\n private buffers: Buffer[],\n private byteLength: number,\n options?: BuffersStreamOptions\n ) {\n super(options);\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param {number} size Optional. The size of data to be read\n * @memberof BuffersStream\n */\n public _read(size?: number) {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n\n if (!size) {\n size = this.readableHighWaterMark;\n }\n\n const outBuffers: Buffer[] = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer =\n this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n } else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n } else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n } else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { BuffersStream } from \"./BuffersStream\";\nimport { Readable } from \"stream\";\n\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n// Can't use import as Typescript doesn't recognize \"buffer\".\nconst maxBufferLength = require(\"buffer\").constants.MAX_LENGTH;\n\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n *\n * @export\n * @class BufferScheduler\n */\nexport class PooledBuffer {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n *\n * @private\n * @type {Buffer[]}\n * @memberof PooledBuffer\n */\n private buffers: Buffer[] = [];\n\n /**\n * The total size of internal buffers.\n *\n * @private\n * @type {number}\n * @memberof PooledBuffer\n */\n private readonly capacity: number;\n\n /**\n * The total size of data contained in internal buffers.\n *\n * @private\n * @type {number}\n * @memberof PooledBuffer\n */\n private _size: number;\n\n /**\n * The size of the data contained in the pooled buffers.\n */\n public get size(): number {\n return this._size;\n }\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated but contains no data.\n * Users may call the {@link PooledBuffer.fill} method to fill this\n * pooled buffer with data.\n *\n * @param {number} capacity Total capacity of the internal buffers\n * @memberof PooledBuffer\n */\n constructor(capacity: number);\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated and filled with data in the input buffers serially\n * with respect to the total length.\n *\n * @param {number} capacity Total capacity of the internal buffers\n * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer\n * @param {number} totalLength Total length of the data to be filled in.\n * @memberof PooledBuffer\n */\n constructor(capacity: number, buffers: Buffer[], totalLength: number);\n constructor(capacity: number, buffers?: Buffer[], totalLength?: number) {\n this.capacity = capacity;\n this._size = 0;\n\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n\n if (buffers) {\n this.fill(buffers, totalLength!);\n }\n }\n\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param {Buffer[]} buffers Input buffers containing the data to be filled in the pooled buffer\n * @param {number} totalLength Total length of the data to be filled in.\n *\n * @returns {void}\n * @memberof PooledBuffer\n */\n public fill(buffers: Buffer[], totalLength: number) {\n this._size = Math.min(this.capacity, totalLength);\n\n let i = 0,\n j = 0,\n targetOffset = 0,\n sourceOffset = 0,\n totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n * @returns {Readable}\n * @memberof PooledBuffer\n */\n public getReadableStream(): Readable {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { EventEmitter } from \"events\";\nimport { Readable } from \"stream\";\nimport { PooledBuffer } from \"./PooledBuffer\";\n\n/**\n * OutgoingHandler is an async function triggered by BufferScheduler.\n */\nexport declare type OutgoingHandler = (\n body: () => NodeJS.ReadableStream,\n length: number,\n offset?: number\n) => Promise;\n\n/**\n * This class accepts a Node.js Readable stream as input, and keeps reading data\n * from the stream into the internal buffer structure, until it reaches maxBuffers.\n * Every available buffer will try to trigger outgoingHandler.\n *\n * The internal buffer structure includes an incoming buffer array, and a outgoing\n * buffer array. The incoming buffer array includes the \"empty\" buffers can be filled\n * with new incoming data. The outgoing array includes the filled buffers to be\n * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.\n *\n * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING\n *\n * NUM_OF_ALL_BUFFERS <= maxBuffers\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * 1. Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n * 2. concurrency should set a smaller value than maxBuffers, which is helpful to\n * reduce the possibility when a outgoing handler waits for the stream data.\n * in this situation, outgoing handlers are blocked.\n * Outgoing queue shouldn't be empty.\n * @export\n * @class BufferScheduler\n */\nexport class BufferScheduler {\n /**\n * Size of buffers in incoming and outgoing queues. This class will try to align\n * data read from Readable stream into buffer chunks with bufferSize defined.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly bufferSize: number;\n\n /**\n * How many buffers can be created or maintained.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly maxBuffers: number;\n\n /**\n * A Node.js Readable stream.\n *\n * @private\n * @type {Readable}\n * @memberof BufferScheduler\n */\n private readonly readable: Readable;\n\n /**\n * OutgoingHandler is an async function triggered by BufferScheduler when there\n * are available buffers in outgoing array.\n *\n * @private\n * @type {OutgoingHandler}\n * @memberof BufferScheduler\n */\n private readonly outgoingHandler: OutgoingHandler;\n\n /**\n * An internal event emitter.\n *\n * @private\n * @type {EventEmitter}\n * @memberof BufferScheduler\n */\n private readonly emitter: EventEmitter = new EventEmitter();\n\n /**\n * Concurrency of executing outgoingHandlers. (0 < concurrency <= maxBuffers)\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private readonly concurrency: number;\n\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private offset: number = 0;\n\n /**\n * An internal marker to track whether stream is end.\n *\n * @private\n * @type {boolean}\n * @memberof BufferScheduler\n */\n private isStreamEnd: boolean = false;\n\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n *\n * @private\n * @type {boolean}\n * @memberof BufferScheduler\n */\n private isError: boolean = false;\n\n /**\n * How many handlers are executing.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private executingOutgoingHandlers: number = 0;\n\n /**\n * Encoding of the input Readable stream which has string data type instead of Buffer.\n *\n * @private\n * @type {string}\n * @memberof BufferScheduler\n */\n private encoding?: string;\n\n /**\n * How many buffers have been allocated.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private numBuffers: number = 0;\n\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n *\n * @private\n * @type {Buffer[]}\n * @memberof BufferScheduler\n */\n private unresolvedDataArray: Buffer[] = [];\n\n /**\n * How much data consisted in unresolvedDataArray.\n *\n * @private\n * @type {number}\n * @memberof BufferScheduler\n */\n private unresolvedLength: number = 0;\n\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n *\n * @private\n * @type {PooledBuffer[]}\n * @memberof BufferScheduler\n */\n private incoming: PooledBuffer[] = [];\n\n /**\n * The array (queue) includes all the buffers filled from stream data.\n *\n * @private\n * @type {PooledBuffer[]}\n * @memberof BufferScheduler\n */\n private outgoing: PooledBuffer[] = [];\n\n /**\n * Creates an instance of BufferScheduler.\n *\n * @param {Readable} readable A Node.js Readable stream\n * @param {number} bufferSize Buffer size of every maintained buffer\n * @param {number} maxBuffers How many buffers can be allocated\n * @param {OutgoingHandler} outgoingHandler An async function scheduled to be\n * triggered when a buffer fully filled\n * with stream data\n * @param {number} concurrency Concurrency of executing outgoingHandlers (>0)\n * @param {string} [encoding] [Optional] Encoding of Readable stream when it's a string stream\n * @memberof BufferScheduler\n */\n constructor(\n readable: Readable,\n bufferSize: number,\n maxBuffers: number,\n outgoingHandler: OutgoingHandler,\n concurrency: number,\n encoding?: string\n ) {\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }\n\n /**\n * Start the scheduler, will return error when stream of any of the outgoingHandlers\n * returns error.\n *\n * @returns {Promise}\n * @memberof BufferScheduler\n */\n public async do(): Promise {\n return new Promise((resolve, reject) => {\n this.readable.on(\"data\", (data) => {\n data = typeof data === \"string\" ? Buffer.from(data, this.encoding) : data;\n this.appendUnresolvedData(data);\n\n if (!this.resolveData()) {\n this.readable.pause();\n }\n });\n\n this.readable.on(\"error\", (err) => {\n this.emitter.emit(\"error\", err);\n });\n\n this.readable.on(\"end\", () => {\n this.isStreamEnd = true;\n this.emitter.emit(\"checkEnd\");\n });\n\n this.emitter.on(\"error\", (err) => {\n this.isError = true;\n this.readable.pause();\n reject(err);\n });\n\n this.emitter.on(\"checkEnd\", () => {\n if (this.outgoing.length > 0) {\n this.triggerOutgoingHandlers();\n return;\n }\n\n if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {\n if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {\n const buffer = this.shiftBufferFromUnresolvedDataArray();\n this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)\n .then(resolve)\n .catch(reject);\n } else if (this.unresolvedLength >= this.bufferSize) {\n return;\n } else {\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Insert a new data into unresolved array.\n *\n * @private\n * @param {Buffer} data\n * @memberof BufferScheduler\n */\n private appendUnresolvedData(data: Buffer) {\n this.unresolvedDataArray.push(data);\n this.unresolvedLength += data.length;\n }\n\n /**\n * Try to shift a buffer with size in blockSize. The buffer returned may be less\n * than blockSize when data in unresolvedDataArray is less than bufferSize.\n *\n * @private\n * @returns {PooledBuffer}\n * @memberof BufferScheduler\n */\n private shiftBufferFromUnresolvedDataArray(buffer?: PooledBuffer): PooledBuffer {\n if (!buffer) {\n buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);\n } else {\n buffer.fill(this.unresolvedDataArray, this.unresolvedLength);\n }\n\n this.unresolvedLength -= buffer.size;\n return buffer;\n }\n\n /**\n * Resolve data in unresolvedDataArray. For every buffer with size in blockSize\n * shifted, it will try to get (or allocate a buffer) from incoming, and fill it,\n * then push it into outgoing to be handled by outgoing handler.\n *\n * Return false when available buffers in incoming are not enough, else true.\n *\n * @private\n * @returns {boolean} Return false when buffers in incoming are not enough, else true.\n * @memberof BufferScheduler\n */\n private resolveData(): boolean {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer: PooledBuffer;\n\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift()!;\n this.shiftBufferFromUnresolvedDataArray(buffer);\n } else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n } else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }\n\n /**\n * Try to trigger a outgoing handler for every buffer in outgoing. Stop when\n * concurrency reaches.\n *\n * @private\n * @memberof BufferScheduler\n */\n private async triggerOutgoingHandlers() {\n let buffer: PooledBuffer | undefined;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }\n\n /**\n * Trigger a outgoing handler for a buffer shifted from outgoing.\n *\n * @private\n * @param {Buffer} buffer\n * @returns {Promise}\n * @memberof BufferScheduler\n */\n private async triggerOutgoingHandler(buffer: PooledBuffer): Promise {\n const bufferLength = buffer.size;\n\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n\n try {\n await this.outgoingHandler(\n () => buffer.getReadableStream(),\n bufferLength,\n this.offset - bufferLength\n );\n } catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }\n\n /**\n * Return buffer used by outgoing handler into incoming.\n *\n * @private\n * @param {Buffer} buffer\n * @memberof BufferScheduler\n */\n private reuseBuffer(buffer: PooledBuffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getTracer, OperationTracingOptions, SpanOptions } from \"@azure/core-tracing\";\nimport { Span, SpanOptions as OTSpanOptions, SpanKind } from \"@opentelemetry/api\";\n\n/**\n * Creates a span using the global tracer.\n * @param name The name of the operation being performed.\n * @param tracingOptions The options for the underlying http request.\n */\nexport function createSpan(\n operationName: string,\n tracingOptions: OperationTracingOptions = {}\n): { span: Span; spanOptions: SpanOptions } {\n const tracer = getTracer();\n const spanOptions: OTSpanOptions = {\n ...tracingOptions.spanOptions,\n kind: SpanKind.INTERNAL\n };\n\n const span = tracer.startSpan(`Azure.Storage.Blob.${operationName}`, spanOptions);\n span.setAttribute(\"az.namespace\", \"Microsoft.Storage\");\n\n let newOptions = tracingOptions.spanOptions || {};\n if (span.isRecording()) {\n newOptions = {\n ...tracingOptions.spanOptions,\n parent: span.context(),\n attributes: {\n ...spanOptions.attributes,\n \"az.namespace\": \"Microsoft.Storage\"\n }\n };\n }\n\n return {\n span,\n spanOptions: newOptions\n };\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport * as fs from \"fs\";\nimport * as util from \"util\";\n\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {Buffer} buffer Buffer to be filled, length must >= offset\n * @param {number} offset From which position in the buffer to be filled, inclusive\n * @param {number} end To which position in the buffer to be filled, exclusive\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise}\n */\nexport async function streamToBuffer(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n offset: number,\n end: number,\n encoding?: string\n): Promise {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n if (pos >= count) {\n resolve();\n return;\n }\n\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n\n stream.on(\"end\", () => {\n if (pos < count) {\n reject(\n new Error(\n `Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`\n )\n );\n }\n resolve();\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {Buffer} buffer Buffer to be filled, length must >= offset\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise} with the count of bytes read.\n * @throws {RangeError} If buffer size is not big enough.\n */\nexport async function streamToBuffer2(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n encoding?: string\n): Promise {\n let pos = 0; // Position in stream\n let bufferSize = buffer.length;\n\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n });\n\n stream.on(\"end\", () => {\n resolve(pos);\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into a buffer.\n *\n * @export\n * @param {NodeJS.ReadableStream} stream A Node.js Readable stream\n * @param {string} [encoding] Encoding of the Readable stream\n * @returns {Promise} with the count of bytes read.\n */\nexport async function streamToBuffer3(\n readableStream: NodeJS.ReadableStream,\n encoding?: string\n): Promise {\n return new Promise((resolve, reject) => {\n const chunks: Buffer[] = [];\n readableStream.on(\"data\", (data: Buffer | string) => {\n chunks.push(data instanceof Buffer ? data : Buffer.from(data, encoding));\n });\n readableStream.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n });\n readableStream.on(\"error\", reject);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.\n *\n * @export\n * @param {NodeJS.ReadableStream} rs The read stream.\n * @param {string} file Destination file path.\n * @returns {Promise}\n */\nexport async function readStreamToLocalFile(\n rs: NodeJS.ReadableStream,\n file: string\n): Promise {\n return new Promise((resolve, reject) => {\n const ws = fs.createWriteStream(file);\n\n rs.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"close\", resolve);\n\n rs.pipe(ws);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nexport const fsStat = util.promisify(fs.stat);\n\nexport const fsCreateReadStream = fs.createReadStream;\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n generateUuid,\n getDefaultProxySettings,\n HttpRequestBody,\n HttpResponse,\n isNode,\n isTokenCredential,\n TokenCredential,\n TransferProgressEvent,\n URLBuilder\n} from \"@azure/core-http\";\nimport { PollerLike, PollOperationState } from \"@azure/core-lro\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { Readable } from \"stream\";\n\nimport { BlobDownloadResponse } from \"./BlobDownloadResponse\";\nimport { BlobQueryResponse } from \"./BlobQueryResponse\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport {\n AppendBlob,\n Blob as StorageBlob,\n BlockBlob,\n Container,\n PageBlob\n} from \"./generated/src/operations\";\nimport { StorageClientContext } from \"./generated/src/storageClient\";\nimport {\n AppendBlobAppendBlockFromUrlResponse,\n AppendBlobAppendBlockResponse,\n AppendBlobCreateResponse,\n BlobAbortCopyFromURLResponse,\n BlobCopyFromURLResponse,\n BlobCreateSnapshotResponse,\n BlobDeleteResponse,\n BlobDownloadOptionalParams,\n BlobDownloadResponseModel,\n BlobGetPropertiesResponseModel,\n BlobGetTagsHeaders,\n BlobHTTPHeaders,\n BlobPrefix,\n BlobProperties,\n BlobSetHTTPHeadersResponse,\n BlobSetMetadataResponse,\n BlobSetTagsResponse,\n BlobSetTierResponse,\n BlobStartCopyFromURLResponse,\n BlobTags,\n BlobUndeleteResponse,\n BlockBlobCommitBlockListResponse,\n BlockBlobGetBlockListResponse,\n BlockBlobStageBlockFromURLResponse,\n BlockBlobStageBlockResponse,\n BlockBlobUploadHeaders,\n BlockBlobUploadResponse,\n BlockListType,\n ContainerBreakLeaseOptionalParams,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ContainerEncryptionScope,\n ContainerGetAccessPolicyHeaders,\n ContainerGetPropertiesResponse,\n ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobHierarchySegmentHeaders,\n ContainerSetAccessPolicyResponse,\n ContainerSetMetadataResponse,\n CpkInfo,\n DeleteSnapshotsOptionType,\n LeaseAccessConditions,\n ListBlobsFlatSegmentResponseModel,\n ListBlobsHierarchySegmentResponseModel,\n ListBlobsIncludeItem,\n PageBlobClearPagesResponse,\n PageBlobCopyIncrementalResponse,\n PageBlobCreateResponse,\n PageBlobResizeResponse,\n PageBlobUpdateSequenceNumberResponse,\n PageBlobUploadPagesFromURLResponse,\n PageBlobUploadPagesResponse,\n PublicAccessType,\n RehydratePriority,\n SequenceNumberActionType,\n SignedIdentifierModel\n} from \"./generatedModels\";\nimport {\n AppendBlobRequestConditions,\n BlobDownloadResponseParsed,\n BlobRequestConditions,\n BlockBlobTier,\n ensureCpkIfSpecified,\n Metadata,\n ObjectReplicationPolicy,\n PageBlobRequestConditions,\n PremiumPageBlobTier,\n Tags,\n toAccessTier,\n ContainerRequestConditions,\n TagConditions,\n MatchConditions,\n ModificationConditions,\n ModifiedAccessConditions,\n BlobQueryArrowField\n} from \"./models\";\nimport {\n PageBlobGetPageRangesDiffResponse,\n PageBlobGetPageRangesResponse,\n rangeResponseFromModel\n} from \"./PageBlobRangeResponse\";\nimport { newPipeline, Pipeline, StoragePipelineOptions } from \"./Pipeline\";\nimport {\n BlobBeginCopyFromUrlPoller,\n BlobBeginCopyFromUrlPollState,\n CopyPollerBlobClient\n} from \"./pollers/BlobStartCopyFromUrlPoller\";\nimport { Range, rangeToString } from \"./Range\";\nimport { CommonOptions, StorageClient } from \"./StorageClient\";\nimport { Batch } from \"./utils/Batch\";\nimport { BufferScheduler } from \"../../storage-common/src\";\nimport {\n BLOCK_BLOB_MAX_BLOCKS,\n BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES,\n BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES,\n DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES,\n DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS,\n ETagAny,\n ETagNone,\n URLConstants\n} from \"./utils/constants\";\nimport { createSpan } from \"./utils/tracing\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n generateBlockID,\n isIpEndpointStyle,\n parseObjectReplicationRecord,\n setURLParameter,\n toBlobTags,\n toBlobTagsString,\n toQuerySerialization,\n toTags,\n truncatedISO8061Date\n} from \"./utils/utils.common\";\nimport {\n fsCreateReadStream,\n fsStat,\n readStreamToLocalFile,\n streamToBuffer\n} from \"./utils/utils.node\";\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobBeginCopyFromURLOptions\n */\nexport interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions {\n /**\n * The amount of time in milliseconds the poller should wait between\n * calls to the service to determine the status of the Blob copy.\n * Defaults to 15 seconds.\n *\n * @type {number}\n * @memberof BlobBeginCopyFromURLOptions\n */\n intervalInMs?: number;\n /**\n * Callback to receive the state of the copy progress.\n *\n * @memberof BlobBeginCopyFromURLOptions\n */\n onProgress?: (state: BlobBeginCopyFromUrlPollState) => void;\n /**\n * Serialized poller state that can be used to resume polling from.\n * This may be useful when starting a copy on one process or thread\n * and you wish to continue polling on another process or thread.\n *\n * To get serialized poller state, call `poller.toString()` on an existing\n * poller.\n *\n * @memberof BlobBeginCopyFromURLOptions\n */\n resumeFrom?: string;\n}\n\n/**\n * Contains response data for the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobBeginCopyFromURLResponse\n */\nexport interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse {}\n\n/**\n * Options to configure the {@link BlobClient.download} operation.\n *\n * @export\n * @interface BlobDownloadOptions\n */\nexport interface BlobDownloadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDownloadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve.\n *\n * @type {string}\n * @memberof BlobDownloadOptions\n */\n snapshot?: string;\n /**\n * When this is set to true and download range of blob, the service returns the MD5 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n *\n * @type {boolean}\n * @memberof BlobDownloadOptions\n */\n rangeGetContentMD5?: boolean;\n /**\n * When this is set to true and download range of blob, the service returns the CRC64 hash for the range,\n * as long as the range is less than or equal to 4 MB in size.\n *\n * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time.\n *\n * @type {boolean}\n * @memberof BlobDownloadOptions\n */\n rangeGetContentCrc64?: boolean;\n /**\n * Conditions to meet when downloading blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDownloadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Call back to receive events on the progress of download operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlobDownloadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original body download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional `FileClient.download()` request will be made\n * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached.\n *\n * Default value is 5, please set a larger value when loading large files in poor network.\n *\n * @type {number}\n * @memberof BlobDownloadOptions\n */\n maxRetryRequests?: number;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDownloadOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.exists} operation.\n *\n * @export\n * @interface BlobExistsOptions\n */\nexport interface BlobExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Conditions to meet.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobExistsOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getProperties} operation.\n *\n * @export\n * @interface BlobGetPropertiesOptions\n */\nexport interface BlobGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting blob properties.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobGetPropertiesOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobGetPropertiesOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.delete} operation.\n *\n * @export\n * @interface BlobDeleteOptions\n */\nexport interface BlobDeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDeleteOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when deleting blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDeleteOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Specifies options to delete blobs that have associated snapshots.\n * - `include`: Delete the base blob and all of its snapshots.\n * - `only`: Delete only the blob's snapshots and not the blob itself.\n *\n * @type {DeleteSnapshotsOptionType}\n * @memberof BlobDeleteOptions\n */\n deleteSnapshots?: DeleteSnapshotsOptionType;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDeleteOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.undelete} operation.\n *\n * @export\n * @interface BlobUndeleteOptions\n */\nexport interface BlobUndeleteOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobUndeleteOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobUndeleteOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setHTTPHeaders} operation.\n *\n * @export\n * @interface BlobSetHTTPHeadersOptions\n */\nexport interface BlobSetHTTPHeadersOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetHTTPHeadersOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob HTTP headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSetHTTPHeadersOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobSetHTTPHeadersOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure the {@link BlobClient.setMetadata} operation.\n *\n * @export\n * @interface BlobSetMetadataOptions\n */\nexport interface BlobSetMetadataOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetMetadataOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting blob metadata.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSetMetadataOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobSetMetadataOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlobSetMetadataOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.setTags} operation.\n *\n * @export\n * @interface BlobSetTagsOptions\n */\nexport interface BlobSetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetTagsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n *\n * @type {TagConditions}\n * @memberof BlobSetTagsOptions\n */\n conditions?: TagConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.getTags} operation.\n *\n * @export\n * @interface BlobGetTagsOptions\n */\nexport interface BlobGetTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobGetTagsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet for the blob to perform this operation.\n *\n * @type {TagConditions}\n * @memberof BlobGetTagsOptions\n */\n conditions?: TagConditions;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.getTags} operation.\n */\nexport type BlobGetTagsResponse = { tags: Tags } & BlobGetTagsHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: BlobGetTagsHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: BlobTags;\n };\n };\n\n/**\n * Options to configure Blob - Acquire Lease operation.\n *\n * @export\n * @interface BlobAcquireLeaseOptions\n */\nexport interface BlobAcquireLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobAcquireLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when acquiring the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobAcquireLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Release Lease operation.\n *\n * @export\n * @interface BlobReleaseLeaseOptions\n */\nexport interface BlobReleaseLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobReleaseLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when releasing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobReleaseLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Renew Lease operation.\n *\n * @export\n * @interface BlobRenewLeaseOptions\n */\nexport interface BlobRenewLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobRenewLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when renewing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobRenewLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Change Lease operation.\n *\n * @export\n * @interface BlobChangeLeaseOptions\n */\nexport interface BlobChangeLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobChangeLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobChangeLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Blob - Break Lease operation.\n *\n * @export\n * @interface BlobBreakLeaseOptions\n */\nexport interface BlobBreakLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobBreakLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when breaking the lease of a blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobBreakLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.createSnapshot} operation.\n *\n * @export\n * @interface BlobCreateSnapshotOptions\n */\nexport interface BlobCreateSnapshotOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobCreateSnapshotOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n *\n * @type {Metadata}\n * @memberof BlobCreateSnapshotOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet when creating blob snapshots.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobCreateSnapshotOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobCreateSnapshotOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlobCreateSnapshotOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link BlobClient.beginCopyFromURL} operation.\n *\n * @export\n * @interface BlobStartCopyFromURLOptions\n */\nexport interface BlobStartCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobStartCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the blob that are being copied.\n *\n * @type {Metadata}\n * @memberof BlobStartCopyFromURLOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobStartCopyFromURLOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {ModifiedAccessConditions}\n * @memberof BlobStartCopyFromURLOptions\n */\n sourceConditions?: ModifiedAccessConditions;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | PremiumPageBlobTier | string}\n * @memberof BlobStartCopyFromURLOptions\n */\n tier?: BlockBlobTier | PremiumPageBlobTier | string;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n *\n * @type {RehydratePriority}\n * @memberof BlobStartCopyFromURLOptions\n */\n rehydratePriority?: RehydratePriority;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlobStartCopyFromURLOptions\n */\n tags?: Tags;\n /**\n * Overrides the sealed state of the destination blob. Default true.\n *\n * @type {boolean}\n * @memberof BlobStartCopyFromURLOptions\n */\n sealBlob?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobClient.abortCopyFromURL} operation.\n *\n * @export\n * @interface BlobAbortCopyFromURLOptions\n */\nexport interface BlobAbortCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobAbortCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlobAbortCopyFromURLOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure the {@link BlobClient.syncCopyFromURL} operation.\n *\n * @export\n * @interface BlobSyncCopyFromURLOptions\n */\nexport interface BlobSyncCopyFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSyncCopyFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the snapshot.\n *\n * @type {Metadata}\n * @memberof BlobSyncCopyFromURLOptions\n */\n metadata?: Metadata;\n /**\n * Conditions to meet for the destination blob when copying from a URL to the blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobSyncCopyFromURLOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof BlobSyncCopyFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * Specify the md5 calculated for the range of bytes that must be read from the copy source.\n *\n * @type {Uint8Array}\n * @memberof BlobSyncCopyFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlobSyncCopyFromURLOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure the {@link BlobClient.setAccessTier} operation.\n *\n * @export\n * @interface BlobSetTierOptions\n */\nexport interface BlobSetTierOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobSetTierOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions & TagConditions}\n * @memberof BlobSetTierOptions\n */\n conditions?: LeaseAccessConditions & TagConditions;\n /**\n * Rehydrate Priority - possible values include 'High', 'Standard'.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier\n *\n * @type {RehydratePriority}\n * @memberof BlobSetTierOptions\n */\n rehydratePriority?: RehydratePriority;\n}\n\n/**\n * Option interface for the {@link BlobClient.downloadToBuffer} operation.\n *\n * @export\n * @interface BlobDownloadToBufferOptions\n */\nexport interface BlobDownloadToBufferOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobDownloadToBufferOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * blockSize is the data every request trying to download.\n * Must be >= 0, if set to 0 or undefined, blockSize will automatically calculated according\n * to the blob size.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n blockSize?: number;\n\n /**\n * Optional. ONLY AVAILABLE IN NODE.JS.\n *\n * How many retries will perform when original block download stream unexpected ends.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors.\n *\n * With this option, every additional retry means an additional FileClient.download() request will be made\n * from the broken point, until the requested block has been successfully downloaded or\n * maxRetryRequestsPerBlock is reached.\n *\n * Default value is 5, please set a larger value when in poor network.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n maxRetryRequestsPerBlock?: number;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlobDownloadToBufferOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlobDownloadToBufferOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel download.\n *\n * @type {number}\n * @memberof BlobDownloadToBufferOptions\n */\n concurrency?: number;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlobDownloadToBufferOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Contains response data for the {@link BlobClient.deleteIfExists} operation.\n *\n * @export\n * @interface BlobDeleteIfExistsResponse\n */\nexport interface BlobDeleteIfExistsResponse extends BlobDeleteResponse {\n /**\n * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place.\n *\n * @type {boolean}\n * @memberof BlobDeleteIfExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link BlobClient.getProperties} operation.\n *\n * @export\n * @interface BlobGetPropertiesResponse\n */\nexport interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel {\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @type {ObjectReplicationPolicy[]}\n * @memberof BlobGetPropertiesResponse\n */\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @type {string}\n * @memberof BlobGetPropertiesResponse\n */\n objectReplicationDestinationPolicyId?: string;\n}\n\n/**\n * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,\n * append blob, or page blob.\n *\n * @export\n * @class BlobClient\n */\nexport class BlobClient extends StorageClient {\n /**\n * blobContext provided by protocol layer.\n *\n * @private\n * @type {Blobs}\n * @memberof BlobClient\n */\n private blobContext: StorageBlob;\n\n private _name: string;\n private _containerName: string;\n\n /**\n * The name of the blob.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * The name of the storage container the blob is associated with.\n */\n public get containerName(): string {\n return this._containerName;\n }\n\n /**\n *\n * Creates an instance of BlobClient from connection string.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n options = options || {};\n let pipeline: Pipeline;\n let url: string;\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n\n super(url, pipeline);\n ({\n blobName: this._name,\n containerName: this._containerName\n } = this.getBlobAndContainerNamesFromUrl());\n this.blobContext = new StorageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp\n * @memberof BlobClient\n */\n public withSnapshot(snapshot: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a new BlobClient object pointing to a version of this blob.\n * Provide \"\" will remove the versionId and return a Client to the base blob.\n *\n * @param {string} versionId The versionId.\n * @returns {BlobClient} A new BlobClient object pointing to the version of this blob.\n * @memberof BlobClient\n */\n public withVersion(versionId: string): BlobClient {\n return new BlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.VERSIONID,\n versionId.length === 0 ? undefined : versionId\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a AppendBlobClient object.\n *\n * @returns {AppendBlobClient}\n * @memberof BlobClient\n */\n public getAppendBlobClient(): AppendBlobClient {\n return new AppendBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a BlockBlobClient object.\n *\n * @returns {BlockBlobClient}\n * @memberof BlobClient\n */\n public getBlockBlobClient(): BlockBlobClient {\n return new BlockBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Creates a PageBlobClient object.\n *\n * @returns {PageBlobClient}\n * @memberof BlobClient\n */\n public getPageBlobClient(): PageBlobClient {\n return new PageBlobClient(this.url, this.pipeline);\n }\n\n /**\n * Reads or downloads a blob from the system, including its metadata and properties.\n * You can also call Get Blob to read a snapshot.\n *\n * * In Node.js, data returns in a Readable stream readableStreamBody\n * * In browsers, data returns in a promise blobBody\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob\n *\n * @param {number} [offset] From which position of the blob to download, >= 0\n * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined\n * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation.\n * @returns {Promise}\n * @memberof BlobClient\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);\n * console.log(\"Downloaded blob content:\", downloaded.toString());\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * Example usage (browser):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);\n * console.log(\n * \"Downloaded blob content\",\n * downloaded\n * );\n *\n * async function blobToString(blob: Blob): Promise {\n * const fileReader = new FileReader();\n * return new Promise((resolve, reject) => {\n * fileReader.onloadend = (ev: any) => {\n * resolve(ev.target!.result);\n * };\n * fileReader.onerror = reject;\n * fileReader.readAsText(blob);\n * });\n * }\n * ```\n */\n public async download(\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, spanOptions } = createSpan(\"BlobClient-download\", options.tracingOptions);\n\n try {\n const res = await this.blobContext.download({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onDownloadProgress: isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream\n range: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n\n const wrappedRes = {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules)\n };\n // Return browser response immediately\n if (!isNode) {\n return wrappedRes;\n }\n\n // We support retrying when download stream unexpected ends in Node.js runtime\n // Following code shouldn't be bundled into browser build, however some\n // bundlers may try to bundle following code and \"FileReadResponse.ts\".\n // In this case, \"FileDownloadResponse.browser.ts\" will be used as a shim of \"FileDownloadResponse.ts\"\n // The config is in package.json \"browser\" field\n if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {\n // TODO: Default value or make it a required parameter?\n options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;\n }\n\n if (res.contentLength === undefined) {\n throw new RangeError(`File download response doesn't contain valid content length header`);\n }\n\n if (!res.etag) {\n throw new RangeError(`File download response doesn't contain valid etag header`);\n }\n\n return new BlobDownloadResponse(\n wrappedRes,\n async (start: number): Promise => {\n const updatedOptions: BlobDownloadOptionalParams = {\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ifMatch: options.conditions!.ifMatch || res.etag,\n ifModifiedSince: options.conditions!.ifModifiedSince,\n ifNoneMatch: options.conditions!.ifNoneMatch,\n ifUnmodifiedSince: options.conditions!.ifUnmodifiedSince,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({\n count: offset + res.contentLength! - start,\n offset: start\n }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey\n };\n\n // Debug purpose only\n // console.log(\n // `Read from internal stream, range: ${\n // updatedOptions.range\n // }, options: ${JSON.stringify(updatedOptions)}`\n // );\n\n return (\n await this.blobContext.download({\n abortSignal: options.abortSignal,\n ...updatedOptions\n })\n ).readableStreamBody!;\n },\n offset,\n res.contentLength!,\n {\n abortSignal: options.abortSignal,\n maxRetryRequests: options.maxRetryRequests,\n onProgress: options.onProgress\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the Azure blob resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing blob might be deleted by other clients or\n * applications. Vice versa new blobs might be added by other clients or applications after this\n * function completes.\n *\n * @param {BlobExistsOptions} [options] options to Exists operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async exists(options: BlobExistsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-exists\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n await this.getProperties({\n abortSignal: options.abortSignal,\n customerProvidedKey: options.customerProvidedKey,\n conditions: options.conditions,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n return true;\n } catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when checking blob existence\"\n });\n return false;\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns all user-defined metadata, standard HTTP properties, and system properties\n * for the blob. It does not return the content of the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async getProperties(\n options: BlobGetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-getProperties\", options.tracingOptions);\n try {\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const res = await this.blobContext.getProperties({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n\n return {\n ...res,\n _response: res._response, // _response is made non-enumerable\n objectReplicationDestinationPolicyId: res.objectReplicationPolicyId,\n objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules)\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async delete(options: BlobDeleteOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-delete\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n return await this.blobContext.deleteMethod({\n abortSignal: options.abortSignal,\n deleteSnapshots: options.deleteSnapshots,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async deleteIfExists(\n options: BlobDeleteOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-deleteIfExists\", options.tracingOptions);\n try {\n const res = await this.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobNotFound\") {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when deleting a blob or snapshot only if it exists.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Restores the contents and metadata of soft deleted blob and any associated\n * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29\n * or later.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async undelete(options: BlobUndeleteOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-undelete\", options.tracingOptions);\n try {\n return await this.blobContext.undelete({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets system properties on the blob.\n *\n * If no value provided, or no value provided for the specified blob HTTP headers,\n * these blob HTTP headers without a value will be cleared.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for\n * the specified blob HTTP headers, these blob HTTP\n * headers without a value will be cleared.\n * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setHTTPHeaders(\n blobHTTPHeaders?: BlobHTTPHeaders,\n options: BlobSetHTTPHeadersOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setHTTPHeaders\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setHTTPHeaders({\n abortSignal: options.abortSignal,\n blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n *\n * If no option provided, or no metadata defined in the parameter, the blob\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata\n *\n * @param {Metadata} [metadata] Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setMetadata(\n metadata?: Metadata,\n options: BlobSetMetadataOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setMetadata\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setMetadata({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets tags on the underlying blob.\n * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.\n * Valid tag key and value characters include lower and upper case letters, digits (0-9),\n * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').\n *\n * @param {Tags} tags\n * @param {BlobSetTagsOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setTags(tags: Tags, options: BlobSetTagsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setTags\", options.tracingOptions);\n try {\n return await this.blobContext.setTags({\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions,\n tags: toBlobTags(tags)\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the tags associated with the underlying blob.\n *\n * @param {BlobGetTagsOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async getTags(options: BlobGetTagsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-getTags\", options.tracingOptions);\n try {\n const response = await this.blobContext.getTags({\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n const wrappedResponse: BlobGetTagsResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n tags: toTags({ blobTagSet: response.blobTagSet }) || {}\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the blob.\n *\n * @param {string} [proposeLeaseId] Initial proposed lease Id.\n * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob.\n * @memberof BlobClient\n */\n public getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n\n /**\n * Creates a read-only snapshot of a blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob\n *\n * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async createSnapshot(\n options: BlobCreateSnapshotOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-createSnapshot\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.createSnapshot({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * This method returns a long running operation poller that allows you to wait\n * indefinitely until the copy is completed.\n * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.\n * Note that the onProgress callback will not be invoked if the operation completes in the first\n * request, and attempting to cancel a completed copy will result in an error being thrown.\n *\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * Example using automatic polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using manual polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * while (!poller.isDone()) {\n * await poller.poll();\n * }\n * const result = copyPoller.getResult();\n * ```\n *\n * Example using progress updates:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * onProgress(state) {\n * console.log(`Progress: ${state.copyProgress}`);\n * }\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using a changing polling interval (default 15 seconds):\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * intervalInMs: 1000 // poll blob every 1 second for copy progress\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using copy cancellation:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * // cancel operation after starting it.\n * try {\n * await copyPoller.cancelOperation();\n * // calls to get the result now throw PollerCancelledError\n * await copyPoller.getResult();\n * } catch (err) {\n * if (err.name === 'PollerCancelledError') {\n * console.log('The copy was cancelled.');\n * }\n * }\n * ```\n *\n * @param {string} copySource url to the source Azure Blob/File.\n * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation.\n */\n public async beginCopyFromURL(\n copySource: string,\n options: BlobBeginCopyFromURLOptions = {}\n ): Promise<\n PollerLike, BlobBeginCopyFromURLResponse>\n > {\n const client: CopyPollerBlobClient = {\n abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),\n getProperties: (...args) => this.getProperties(...args),\n startCopyFromURL: (...args) => this.startCopyFromURL(...args)\n };\n const poller = new BlobBeginCopyFromUrlPoller({\n blobClient: client,\n copySource,\n intervalInMs: options.intervalInMs,\n onProgress: options.onProgress,\n resumeFrom: options.resumeFrom,\n startCopyFromURLOptions: options\n });\n\n // Trigger the startCopyFromURL call by calling poll.\n // Any errors from this method should be surfaced to the user.\n await poller.poll();\n\n return poller;\n }\n\n /**\n * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero\n * length and full metadata. Version 2012-02-12 and newer.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob\n *\n * @param {string} copyId Id of the Copy From URL operation.\n * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async abortCopyFromURL(\n copyId: string,\n options: BlobAbortCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-abortCopyFromURL\", options.tracingOptions);\n try {\n return await this.blobContext.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url\n *\n * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication\n * @param {BlobSyncCopyFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async syncCopyFromURL(\n copySource: string,\n options: BlobSyncCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-syncCopyFromURL\", options.tracingOptions);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.copyFromURL(copySource, {\n abortSignal: options.abortSignal,\n metadata: options.metadata,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n sourceContentMD5: options.sourceContentMD5,\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier\n *\n * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive.\n * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n public async setAccessTier(\n tier: BlockBlobTier | PremiumPageBlobTier | string,\n options: BlobSetTierOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-setAccessTier\", options.tracingOptions);\n try {\n return await this.blobContext.setTier(toAccessTier(tier)!, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n rehydratePriority: options.rehydratePriority,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level function\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @export\n * @param {number} offset From which position of the block blob to download(in bytes)\n * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions\n * @returns {Promise}\n */\n public async downloadToBuffer(\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise;\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob in parallel to a buffer.\n * Offset and count are optional, downloads the entire blob if they are not provided.\n *\n * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two\n * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size,\n * consider {@link downloadToFile}.\n *\n * @export\n * @param {Buffer} buffer Buffer to be fill, must have length larger than count\n * @param {number} offset From which position of the block blob to download(in bytes)\n * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined\n * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions\n * @returns {Promise}\n */\n public async downloadToBuffer(\n buffer: Buffer,\n offset?: number,\n count?: number,\n options?: BlobDownloadToBufferOptions\n ): Promise;\n\n public async downloadToBuffer(\n param1?: Buffer | number,\n param2?: number,\n param3?: BlobDownloadToBufferOptions | number,\n param4: BlobDownloadToBufferOptions = {}\n ) {\n let buffer: Buffer | undefined;\n let offset = 0;\n let count = 0;\n let options = param4;\n if (param1 instanceof Buffer) {\n buffer = param1;\n offset = param2 || 0;\n count = typeof param3 === \"number\" ? param3 : 0;\n } else {\n offset = typeof param1 === \"number\" ? param1 : 0;\n count = typeof param2 === \"number\" ? param2 : 0;\n options = (param3 as BlobDownloadToBufferOptions) || {};\n }\n const { span, spanOptions } = createSpan(\"BlobClient-downloadToBuffer\", options.tracingOptions);\n\n try {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0) {\n throw new RangeError(\"blockSize option must be >= 0\");\n }\n if (options.blockSize === 0) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n\n if (offset < 0) {\n throw new RangeError(\"offset option must be >= 0\");\n }\n\n if (count && count <= 0) {\n throw new RangeError(\"count option must be > 0\");\n }\n\n if (!options.conditions) {\n options.conditions = {};\n }\n\n // Customer doesn't specify length, get it\n if (!count) {\n const response = await this.getProperties({\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n count = response.contentLength! - offset;\n if (count < 0) {\n throw new RangeError(\n `offset ${offset} shouldn't be larger than blob size ${response.contentLength!}`\n );\n }\n }\n\n // Allocate the buffer of size = count if the buffer is not provided\n if (!buffer) {\n try {\n buffer = Buffer.alloc(count);\n } catch (error) {\n throw new Error(\n `Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\\t ${error.message}`\n );\n }\n }\n\n if (buffer.length < count) {\n throw new RangeError(\n `The buffer's size should be equal to or larger than the request count of bytes: ${count}`\n );\n }\n\n let transferProgress: number = 0;\n const batch = new Batch(options.concurrency);\n for (let off = offset; off < offset + count; off = off + options.blockSize) {\n batch.addOperation(async () => {\n // Exclusive chunk end position\n let chunkEnd = offset + count!;\n if (off + options.blockSize! < chunkEnd) {\n chunkEnd = off + options.blockSize!;\n }\n const response = await this.download(off, chunkEnd - off, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n maxRetryRequests: options.maxRetryRequestsPerBlock,\n customerProvidedKey: options.customerProvidedKey,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n const stream = response.readableStreamBody!;\n await streamToBuffer(stream, buffer!, off - offset, chunkEnd - offset);\n // Update progress after block is downloaded, in case of block trying\n // Could provide finer grained progress updating inside HTTP requests,\n // only if convenience layer download try is enabled\n transferProgress += chunkEnd - off;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n });\n }\n await batch.do();\n return buffer;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob to a local file.\n * Fails if the the given file path already exits.\n * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.\n *\n * @param {string} filePath\n * @param {number} [offset] From which position of the block blob to download.\n * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined.\n * @param {BlobDownloadOptions} [options] Options to Blob download options.\n * @returns {Promise} The response data for blob download operation,\n * but with readableStreamBody set to undefined since its\n * content is already read and written into a local file\n * at the specified path.\n * @memberof BlobClient\n */\n public async downloadToFile(\n filePath: string,\n offset: number = 0,\n count?: number,\n options: BlobDownloadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-downloadToFile\", options.tracingOptions);\n try {\n const response = await this.download(offset, count, {\n ...options,\n tracingOptions: {\n ...options.tracingOptions,\n spanOptions\n }\n });\n if (response.readableStreamBody) {\n await readStreamToLocalFile(response.readableStreamBody, filePath);\n }\n\n // The stream is no longer accessible so setting it to undefined.\n (response as any).blobDownloadStream = undefined;\n return response;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private getBlobAndContainerNamesFromUrl(): { blobName: string; containerName: string } {\n let containerName;\n let blobName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`\n // http://localhost:10001/devstoreaccount1/containername/blob\n\n const parsedUrl = URLBuilder.parse(this.url);\n\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob\n // .getPath() -> /devstoreaccount1/containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)/([^/]*)(/(.*))?\");\n containerName = pathComponents![2];\n blobName = pathComponents![4];\n } else {\n // \"https://customdomain.com/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath()!.match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents![1];\n blobName = pathComponents![3];\n }\n\n // decode the encoded blobName, containerName - to get all the special characters that might be present in them\n containerName = decodeURIComponent(containerName);\n blobName = decodeURIComponent(blobName);\n\n // Azure Storage Server will replace \"\\\" with \"/\" in the blob names\n // doing the same in the SDK side so that the user doesn't have to replace \"\\\" instances in the blobName\n blobName = blobName.replace(/\\\\/g, \"/\");\n\n if (!blobName) {\n throw new Error(\"Provided blobName is invalid.\");\n } else if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n\n return { blobName, containerName };\n } catch (error) {\n throw new Error(\"Unable to extract blobName and containerName with provided information.\");\n }\n }\n\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * @param {string} copySource url to the source Azure Blob/File.\n * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation.\n * @returns {Promise}\n * @memberof BlobClient\n */\n private async startCopyFromURL(\n copySource: string,\n options: BlobStartCopyFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobClient-startCopyFromURL\", options.tracingOptions);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n\n try {\n return await this.blobContext.startCopyFromURL(copySource, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions.tagConditions\n },\n rehydratePriority: options.rehydratePriority,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n sealBlob: options.sealBlob,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link AppendBlobClient.create} operation.\n *\n * @export\n * @interface AppendBlobCreateOptions\n */\nexport interface AppendBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobCreateOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Conditions to meet when creating append blobs.\n *\n * @type {BlobRequestConditions}\n * @memberof AppendBlobCreateOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when creating append blobs.\n *\n * @type {BlobHTTPHeaders}\n * @memberof AppendBlobCreateOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof AppendBlobCreateOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobCreateOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobCreateOptions\n */\n encryptionScope?: string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof AppendBlobCreateOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface AppendBlobCreateIfNotExistsOptions\n */\nexport interface AppendBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * HTTP headers to set when creating append blobs.\n *\n * @type {BlobHTTPHeaders}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobCreateIfNotExistsOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link AppendBlobClient.seal} operation.\n *\n * @export\n * @interface AppendBlobSealOptions\n * @extends {CommonOptions}\n */\nexport interface AppendBlobSealOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockOptions\n */\n conditions?: AppendBlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlock} operation.\n *\n * @export\n * @interface AppendBlobAppendBlockOptions\n */\nexport interface AppendBlobAppendBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockOptions\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Callback to receive events on the progress of append block operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof AppendBlobAppendBlockOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockOptions\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobAppendBlockOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobAppendBlockOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation.\n *\n * @export\n * @interface AppendBlobAppendBlockFromURLOptions\n */\nexport interface AppendBlobAppendBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when appending append blob blocks.\n *\n * @type {AppendBlobRequestConditions}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n conditions?: AppendBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the append block content from the URI.\n * This hash is used to verify the integrity of the append block during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof AppendBlobAppendBlockFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Contains response data for the {@link appendBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface AppendBlobCreateIfNotExistsResponse\n */\nexport interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof AppendBlobCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * AppendBlobClient defines a set of operations applicable to append blobs.\n *\n * @export\n * @class AppendBlobClient\n * @extends {BlobClient}\n */\nexport class AppendBlobClient extends BlobClient {\n /**\n * appendBlobsContext provided by protocol layer.\n *\n * @private\n * @type {AppendBlob}\n * @memberof AppendBlobClient\n */\n private appendBlobContext: AppendBlob;\n\n /**\n *\n * Creates an instance of AppendBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof AppendBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof AppendBlobClient\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of AppendBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to an append blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage append blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof AppendBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.appendBlobContext = new AppendBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new AppendBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof AppendBlobClient\n */\n public withSnapshot(snapshot: string): AppendBlobClient {\n return new AppendBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation.\n * @returns {Promise}\n * @memberof AppendBlobClient\n *\n * Example usage:\n *\n * ```js\n * const appendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await appendBlobClient.create();\n * ```\n */\n public async create(options: AppendBlobCreateOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"AppendBlobClient-create\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.create(0, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * If the blob with the same name already exists, the content of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {AppendBlobCreateIfNotExistsOptions} [options]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async createIfNotExists(\n options: AppendBlobCreateIfNotExistsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-createIfNotExists\",\n options.tracingOptions\n );\n const conditions = { ifNoneMatch: ETagAny };\n try {\n const res = await this.create({\n ...options,\n conditions,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a blob only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Seals the append blob, making it read only.\n *\n * @param {AppendBlobSealOptions} [options={}]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async seal(options: AppendBlobSealOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"AppendBlobClient-seal\", options.tracingOptions);\n options.conditions = options.conditions || {};\n try {\n return await this.appendBlobContext.seal({\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Commits a new block of data to the end of the existing append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/append-block\n *\n * @param {HttpRequestBody} body Data to be appended.\n * @param {number} contentLength Length of the body in bytes.\n * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation.\n * @returns {Promise}\n * @memberof AppendBlobClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello World!\";\n *\n * // Create a new append blob and append data to the blob.\n * const newAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await newAppendBlobClient.create();\n * await newAppendBlobClient.appendBlock(content, content.length);\n *\n * // Append data to an existing append blob.\n * const existingAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await existingAppendBlobClient.appendBlock(content, content.length);\n * ```\n */\n public async appendBlock(\n body: HttpRequestBody,\n contentLength: number,\n options: AppendBlobAppendBlockOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-appendBlock\",\n options.tracingOptions\n );\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlock(body, contentLength, {\n abortSignal: options.abortSignal,\n appendPositionAccessConditions: options.conditions,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url\n *\n * @param {string} sourceURL\n * The url to the blob that will be the source of the copy. A source blob in the same storage account can\n * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob\n * must either be public or must be authenticated via a shared access signature. If the source blob is\n * public, no authentication is required to perform the operation.\n * @param {number} sourceOffset Offset in source to be appended\n * @param {number} count Number of bytes to be appended as a block\n * @param {AppendBlobAppendBlockFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof AppendBlobClient\n */\n public async appendBlockFromURL(\n sourceURL: string,\n sourceOffset: number,\n count: number,\n options: AppendBlobAppendBlockFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"AppendBlobClient-appendBlockFromURL\",\n options.tracingOptions\n );\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, {\n abortSignal: options.abortSignal,\n sourceRange: rangeToString({ offset: sourceOffset, count }),\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n appendPositionAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link BlockBlobClient.upload} operation.\n *\n * @export\n * @interface BlockBlobUploadOptions\n */\nexport interface BlockBlobUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading to the block blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when uploading to a block blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobUploadOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when uploading to a block blob.\n *\n * @type {Metadata}\n * @memberof BlockBlobUploadOptions\n */\n metadata?: Metadata;\n /**\n * Callback to receive events on the progress of upload operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobUploadOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobUploadOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobUploadOptions\n */\n tier?: BlockBlobTier | string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobUploadOptions\n */\n tags?: Tags;\n}\n\n/**\n * Blob query error type.\n *\n * @export\n * @interface BlobQueryError\n */\nexport interface BlobQueryError {\n /**\n * Whether error is fatal. Fatal error will stop query.\n *\n * @type {boolean}\n * @memberof BlobQueryError\n */\n isFatal: boolean;\n /**\n * Error name.\n *\n * @type {string}\n * @memberof BlobQueryError\n */\n name: string;\n /**\n * Position in bytes of the query.\n *\n * @type {number}\n * @memberof BlobQueryError\n */\n position: number;\n /**\n * Error description.\n *\n * @type {string}\n * @memberof BlobQueryError\n */\n description: string;\n}\n\n/**\n * Options to query blob with JSON format.\n *\n * @export\n * @interface BlobQueryJsonTextConfiguration\n */\nexport interface BlobQueryJsonTextConfiguration {\n /**\n * Record separator.\n *\n * @type {string}\n * @memberof BlobQueryJsonTextConfiguration\n */\n recordSeparator: string;\n /**\n * Query for a JSON format blob.\n *\n * @type {\"json\"}\n * @memberof BlobQueryJsonTextConfiguration\n */\n kind: \"json\";\n}\n\n/**\n * Options to query blob with CSV format.\n *\n * @export\n * @interface BlobQueryCsvTextConfiguration\n */\nexport interface BlobQueryCsvTextConfiguration {\n /**\n * Record separator.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n recordSeparator: string;\n /**\n * Query for a CSV format blob.\n *\n * @type {\"csv\"}\n * @memberof BlobQueryCsvTextConfiguration\n */\n kind: \"csv\";\n /**\n * Column separator. Default is \",\".\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n columnSeparator?: string;\n /**\n * Field quote.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n fieldQuote?: string;\n /**\n * Escape character.\n *\n * @type {string}\n * @memberof BlobQueryCsvTextConfiguration\n */\n escapeCharacter?: string;\n /**\n * Has headers. Default is false.\n *\n * @type {boolean}\n * @memberof BlobQueryCsvTextConfiguration\n */\n hasHeaders?: boolean;\n}\n\n/**\n * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}.\n *\n * @export\n * @interface BlobQueryArrowConfiguration\n */\nexport interface BlobQueryArrowConfiguration {\n /**\n * Kind.\n *\n * @type {\"arrow\"}\n * @memberof BlobQueryArrowConfiguration\n */\n kind: \"arrow\";\n\n /**\n * List of {@link BlobQueryArrowField} describing the schema of the data.\n *\n * @type {BlobQueryArrowField[]}\n * @memberof BlobQueryArrowConfiguration\n */\n schema: BlobQueryArrowField[];\n}\n\n/**\n * Options to configure {@link BlockBlobClient.query} operation.\n *\n * @export\n * @interface BlockBlobQueryOptions\n */\nexport interface BlockBlobQueryOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Configurations for the query input.\n *\n * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration}\n * @memberof BlockBlobQueryOptions\n */\n inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration;\n /**\n * Configurations for the query output.\n *\n * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration| BlobQueryArrowConfiguration}\n * @memberof BlockBlobQueryOptions\n */\n outputTextConfiguration?:\n | BlobQueryJsonTextConfiguration\n | BlobQueryCsvTextConfiguration\n | BlobQueryArrowConfiguration;\n /**\n * Callback to receive events on the progress of query operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Callback to receive error events during the query operaiton.\n *\n * @memberof BlockBlobQueryOptions\n */\n onError?: (error: BlobQueryError) => void;\n /**\n * Conditions to meet when uploading to the block blob.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobUploadOptions\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlock} operation.\n *\n * @export\n * @interface BlockBlobStageBlockOptions\n */\nexport interface BlockBlobStageBlockOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobStageBlockOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlockBlobStageBlockOptions\n */\n conditions?: LeaseAccessConditions;\n /**\n * Callback to receive events on the progress of stage block operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobStageBlockOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockOptions\n */\n transactionalContentMD5?: Uint8Array;\n\n /**\n * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobStageBlockOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobStageBlockOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation.\n *\n * @export\n * @interface BlockBlobStageBlockFromURLOptions\n */\nexport interface BlockBlobStageBlockFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Specifies the bytes of the source Blob/File to upload.\n * If not specified, the entire content is uploaded as a single block.\n *\n * @type {Range}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n range?: Range;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n conditions?: LeaseAccessConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n * @type {Uint8Array}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobStageBlockFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.commitBlockList} operation.\n *\n * @export\n * @interface BlockBlobCommitBlockListOptions\n */\nexport interface BlockBlobCommitBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobCommitBlockListOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when committing the block list.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobCommitBlockListOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * HTTP headers to set when committing block list.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobCommitBlockListOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when committing block list.\n *\n * @type {Metadata}\n * @memberof BlockBlobCommitBlockListOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof BlockBlobCommitBlockListOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobCommitBlockListOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobCommitBlockListOptions\n */\n tier?: BlockBlobTier | string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobCommitBlockListOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure {@link BlockBlobClient.getBlockList} operation.\n *\n * @export\n * @interface BlockBlobGetBlockListOptions\n */\nexport interface BlockBlobGetBlockListOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobGetBlockListOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions & TagConditions}\n * @memberof BlockBlobGetBlockListOptions\n */\n conditions?: LeaseAccessConditions & TagConditions;\n}\n\n/**\n * Option interface for the {@link BlockBlobClient.uploadStream} operation.\n *\n * @export\n * @interface BlockBlobUploadStreamOptions\n */\nexport interface BlockBlobUploadStreamOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobUploadStreamOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Blob HTTP Headers.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobUploadStreamOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n *\n * @type {{ [propertyName: string]: string }}\n * @memberof BlockBlobUploadStreamOptions\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobUploadStreamOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobUploadStreamOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobUploadStreamOptions\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobUploadStreamOptions\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobUploadStreamOptions\n */\n tier?: BlockBlobTier | string;\n}\n/**\n * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}.\n *\n * @export\n * @interface BlockBlobParallelUploadOptions\n */\nexport interface BlockBlobParallelUploadOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlockBlobParallelUploadOptions\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Destination block blob size in bytes.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n blockSize?: number;\n\n /**\n * Blob size threshold in bytes to start concurrency uploading.\n * Default value is 256MB, blob size less than this option will\n * be uploaded via one I/O operation without concurrency.\n * You can customize a value less equal than the default value.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n maxSingleShotSize?: number;\n\n /**\n * Progress updater.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof BlockBlobParallelUploadOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Blob HTTP Headers.\n *\n * @type {BlobHTTPHeaders}\n * @memberof BlockBlobParallelUploadOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n\n /**\n * Metadata of block blob.\n *\n * @type {{ [propertyName: string]: string }}\n * @memberof BlockBlobParallelUploadOptions\n */\n metadata?: { [propertyName: string]: string };\n\n /**\n * Access conditions headers.\n *\n * @type {BlobRequestConditions}\n * @memberof BlockBlobParallelUploadOptions\n */\n conditions?: BlobRequestConditions;\n\n /**\n * Concurrency of parallel uploading. Must be >= 0.\n *\n * @type {number}\n * @memberof BlockBlobParallelUploadOptions\n */\n concurrency?: number;\n\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof BlockBlobParallelUploadOptions\n */\n encryptionScope?: string;\n\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof BlockBlobParallelUploadOptions\n */\n tags?: Tags;\n\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {BlockBlobTier | string}\n * @memberof BlockBlobParallelUploadOptions\n */\n tier?: BlockBlobTier | string;\n}\n\n/**\n * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and\n * {@link BlockBlobClient.uploadBrowserDate}.\n *\n * @export\n */\nexport type BlobUploadCommonResponse = BlockBlobUploadHeaders & {\n /**\n * The underlying HTTP response.\n *\n * @type {HttpResponse}\n * @memberof BlobUploadCommonResponse\n */\n _response: HttpResponse;\n};\n\n/**\n * BlockBlobClient defines a set of operations applicable to block blobs.\n *\n * @export\n * @class BlockBlobClient\n * @extends {BlobClient}\n */\nexport class BlockBlobClient extends BlobClient {\n /**\n * blobContext provided by protocol layer.\n *\n * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API\n * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient.\n *\n * @private\n * @type {Blobs}\n * @memberof BlobClient\n */\n private _blobContext: StorageBlob;\n\n /**\n * blockBlobContext provided by protocol layer.\n *\n * @private\n * @type {BlockBlobs}\n * @memberof BlockBlobClient\n */\n private blockBlobContext: BlockBlob;\n\n /**\n *\n * Creates an instance of BlockBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlockBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlockBlobClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlockBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a block blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage block blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlockBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.blockBlobContext = new BlockBlob(this.storageClientContext);\n this._blobContext = new StorageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new BlockBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a URL to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof BlockBlobClient\n */\n public withSnapshot(snapshot: string): BlockBlobClient {\n return new BlockBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Quick query for a JSON or CSV formatted blob.\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Query and convert a blob to a string\n * const queryBlockBlobResponse = await blockBlobClient.query(\"select * from BlobStorage\");\n * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();\n * console.log(\"Query blob content:\", downloaded);\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * @param {string} query\n * @param {BlockBlobQueryOptions} [options={}]\n * @returns {Promise}\n * @memberof BlockBlobClient\n */\n public async query(\n query: string,\n options: BlockBlobQueryOptions = {}\n ): Promise {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n\n const { span, spanOptions } = createSpan(\"BlockBlobClient-query\", options.tracingOptions);\n\n try {\n if (!isNode) {\n throw new Error(\"This operation currently is only supported in Node.js.\");\n }\n\n const response = await this._blobContext.query({\n abortSignal: options.abortSignal,\n queryRequest: {\n expression: query,\n inputSerialization: toQuerySerialization(options.inputTextConfiguration),\n outputSerialization: toQuerySerialization(options.outputTextConfiguration)\n },\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n return new BlobQueryResponse(response, {\n abortSignal: options.abortSignal,\n onProgress: options.onProgress,\n onError: options.onError\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link stageBlock} and {@link commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link uploadFile},\n * {@link uploadStream} or {@link uploadBrowserData} for better performance\n * with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation.\n * @returns {Promise} Response data for the Block Blob Upload operation.\n * @memberof BlockBlobClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n public async upload(\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobUploadOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"BlockBlobClient-upload\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.upload(body, contentLength, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Uploads the specified block to the block blob's \"staging area\" to be later\n * committed by a call to commitBlockList.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block\n *\n * @param {string} blockId A 64-byte value that is base64-encoded\n * @param {HttpRequestBody} body Data to upload to the staging area.\n * @param {number} contentLength Number of bytes to upload.\n * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation.\n * @returns {Promise} Response data for the Block Blob Stage Block operation.\n * @memberof BlockBlobClient\n */\n public async stageBlock(\n blockId: string,\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobStageBlockOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-stageBlock\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlock(blockId, contentLength, body, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n onUploadProgress: options.onProgress,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Stage Block From URL operation creates a new block to be committed as part\n * of a blob where the contents are read from a URL.\n * This API is available starting in version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url\n *\n * @param {string} blockId A 64-byte value that is base64-encoded\n * @param {string} sourceURL Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param {number} [offset] From which position of the blob to download, >= 0\n * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined\n * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation.\n * @returns {Promise} Response data for the Block Blob Stage Block From URL operation.\n * @memberof BlockBlobClient\n */\n public async stageBlockFromURL(\n blockId: string,\n sourceURL: string,\n offset: number = 0,\n count?: number,\n options: BlockBlobStageBlockFromURLOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-stageBlockFromURL\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }),\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes a blob by specifying the list of block IDs that make up the blob.\n * In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to\n * update a blob by uploading only those blocks that have changed, then committing the new and existing\n * blocks together. Any blocks not specified in the block list and permanently deleted.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list\n *\n * @param {string[]} blocks Array of 64-byte value that is base64-encoded\n * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation.\n * @returns {Promise} Response data for the Block Blob Commit Block List operation.\n * @memberof BlockBlobClient\n */\n public async commitBlockList(\n blocks: string[],\n options: BlockBlobCommitBlockListOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-commitBlockList\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.commitBlockList(\n { latest: blocks },\n {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of blocks that have been uploaded as part of a block blob\n * using the specified block list filter.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list\n *\n * @param {BlockListType} listType Specifies whether to return the list of committed blocks,\n * the list of uncommitted blocks, or both lists together.\n * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation.\n * @returns {Promise} Response data for the Block Blob Get Block List operation.\n * @memberof BlockBlobClient\n */\n public async getBlockList(\n listType: BlockListType,\n options: BlockBlobGetBlockListOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-getBlockList\",\n options.tracingOptions\n );\n try {\n const res = await this.blockBlobContext.getBlockList(listType, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n\n if (!res.committedBlocks) {\n res.committedBlocks = [];\n }\n\n if (!res.uncommittedBlocks) {\n res.uncommittedBlocks = [];\n }\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n // High level functions\n\n /**\n * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @export\n * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView\n * @param {BlockBlobParallelUploadOptions} [options]\n * @returns {Promise}\n * @memberof BlockBlobClient\n */\n public async uploadData(\n data: Buffer | Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-uploadData\", options.tracingOptions);\n try {\n if (isNode) {\n let buffer: Buffer;\n if (data instanceof Buffer) {\n buffer = data;\n } else if (data instanceof ArrayBuffer) {\n buffer = Buffer.from(data);\n } else {\n data = data as ArrayBufferView;\n buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n\n return this.uploadSeekableInternal(\n (offset: number, size: number): Buffer => buffer.slice(offset, offset + size),\n buffer.byteLength,\n {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n }\n );\n } else {\n const browserBlob = new Blob([data]);\n return this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n }\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN BROWSERS.\n *\n * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.\n *\n * When buffer length <= 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call\n * {@link commitBlockList} to commit the block list.\n *\n * @deprecated Use {@link uploadData} instead.\n *\n * @export\n * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView\n * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadBrowserData(\n browserData: Blob | ArrayBuffer | ArrayBufferView,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadBrowserData\",\n options.tracingOptions\n );\n try {\n const browserBlob = new Blob([browserData]);\n return await this.uploadSeekableInternal(\n (offset: number, size: number): Blob => browserBlob.slice(offset, offset + size),\n browserBlob.size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n *\n * Uploads data to block blob. Requires a bodyFactory as the data source,\n * which need to return a {@link HttpRequestBody} object with the offset and size provided.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory\n * @param {number} size size of the data to upload.\n * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n private async uploadSeekableInternal(\n bodyFactory: (offset: number, size: number) => HttpRequestBody,\n size: number,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {\n throw new RangeError(\n `blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`\n );\n }\n\n if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) {\n options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;\n }\n if (\n options.maxSingleShotSize < 0 ||\n options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES\n ) {\n throw new RangeError(\n `maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`\n );\n }\n\n if (options.blockSize === 0) {\n if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`${size} is too larger to upload to a block blob.`);\n }\n if (size > options.maxSingleShotSize) {\n options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);\n if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n }\n }\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadSeekableInternal\",\n options.tracingOptions\n );\n\n try {\n if (size <= options.maxSingleShotSize) {\n return await this.upload(bodyFactory(0, size), size, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n }\n\n const numBlocks: number = Math.floor((size - 1) / options.blockSize) + 1;\n if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(\n `The buffer's size is too big or the BlockSize is too small;` +\n `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`\n );\n }\n\n const blockList: string[] = [];\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n\n const batch = new Batch(options.concurrency);\n for (let i = 0; i < numBlocks; i++) {\n batch.addOperation(\n async (): Promise => {\n const blockID = generateBlockID(blockIDPrefix, i);\n const start = options.blockSize! * i;\n const end = i === numBlocks - 1 ? size : start + options.blockSize!;\n const contentLength = end - start;\n blockList.push(blockID);\n await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n // TODO: Hook with convenience layer progress event in finer level\n transferProgress += contentLength;\n if (options.onProgress) {\n options.onProgress!({\n loadedBytes: transferProgress\n });\n }\n }\n );\n }\n await batch.do();\n\n return this.commitBlockList(blockList, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a local file in blocks to a block blob.\n *\n * When file size <= 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList\n * to commit the block list.\n *\n * @param {string} filePath Full path of local file\n * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation.\n * @returns {(Promise)} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadFile(\n filePath: string,\n options: BlockBlobParallelUploadOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlockBlobClient-uploadFile\", options.tracingOptions);\n try {\n const size = (await fsStat(filePath)).size;\n return await this.uploadSeekableInternal(\n (offset, count) => {\n return () =>\n fsCreateReadStream(filePath, {\n autoClose: true,\n end: count ? offset + count - 1 : Infinity,\n start: offset\n });\n },\n size,\n { ...options, tracingOptions: { ...options!.tracingOptions, spanOptions } }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a Node.js Readable stream into block blob.\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * * Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n *\n * @param {Readable} stream Node.js Readable stream\n * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB\n * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated,\n * positive correlation with max uploading concurrency. Default value is 5\n * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation.\n * @returns {Promise} Response data for the Blob Upload operation.\n * @memberof BlockBlobClient\n */\n public async uploadStream(\n stream: Readable,\n bufferSize: number = DEFAULT_BLOCK_BUFFER_SIZE_BYTES,\n maxConcurrency: number = 5,\n options: BlockBlobUploadStreamOptions = {}\n ): Promise {\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BlockBlobClient-uploadStream\",\n options.tracingOptions\n );\n\n try {\n let blockNum = 0;\n const blockIDPrefix = generateUuid();\n let transferProgress: number = 0;\n const blockList: string[] = [];\n\n const scheduler = new BufferScheduler(\n stream,\n bufferSize,\n maxConcurrency,\n async (body, length) => {\n const blockID = generateBlockID(blockIDPrefix, blockNum);\n blockList.push(blockID);\n blockNum++;\n\n await this.stageBlock(blockID, body, length, {\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n\n // Update progress after block is successfully uploaded to server, in case of block trying\n transferProgress += length;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n },\n // concurrency should set a smaller value than maxConcurrency, which is helpful to\n // reduce the possibility when a outgoing handler waits for stream data, in\n // this situation, outgoing handlers are blocked.\n // Outgoing queue shouldn't be empty.\n Math.ceil((maxConcurrency / 4) * 3)\n );\n await scheduler.do();\n\n return await this.commitBlockList(blockList, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure the {@link PageBlobClient.create} operation.\n *\n * @export\n * @interface PageBlobCreateOptions\n */\nexport interface PageBlobCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobCreateOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when creating a page blob.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobCreateOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n *\n * @type {number}\n * @memberof PageBlobCreateOptions\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof PageBlobCreateOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof PageBlobCreateOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobCreateOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobCreateOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {PremiumPageBlobTier | string}\n * @memberof PageBlobCreateOptions\n */\n tier?: PremiumPageBlobTier | string;\n /**\n * Blob tags.\n *\n * @type {Tags}\n * @memberof PageBlobCreateOptions\n */\n tags?: Tags;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface PageBlobCreateIfNotExistsOptions\n */\nexport interface PageBlobCreateIfNotExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A user-controlled value that can be used to track requests.\n * The value must be between 0 and 2^63 - 1. The default value is 0.\n *\n * @type {number}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n blobSequenceNumber?: number;\n /**\n * HTTP headers to set when creating a page blob.\n *\n * @type {BlobHTTPHeaders}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n blobHTTPHeaders?: BlobHTTPHeaders;\n /**\n * A collection of key-value string pair to associate with the blob when creating append blobs.\n *\n * @type {Metadata}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n metadata?: Metadata;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n encryptionScope?: string;\n /**\n * Access tier.\n * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers\n *\n * @type {PremiumPageBlobTier | string}\n * @memberof PageBlobCreateIfNotExistsOptions\n */\n tier?: PremiumPageBlobTier | string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.uploadPages} operation.\n *\n * @export\n * @interface PageBlobUploadPagesOptions\n */\nexport interface PageBlobUploadPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUploadPagesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when uploading pages.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobUploadPagesOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Callback to receive events on the progress of upload pages operation.\n *\n * @type {(progress: TransferProgressEvent) => void}\n * @memberof PageBlobUploadPagesOptions\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesOptions\n */\n transactionalContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport.\n * When this is specified, the storage service compares the hash of the content that has arrived with this value.\n *\n * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesOptions\n */\n transactionalContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobUploadPagesOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobUploadPagesOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.clearPages} operation.\n *\n * @export\n * @interface PageBlobClearPagesOptions\n */\nexport interface PageBlobClearPagesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobClearPagesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when clearing pages.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobClearPagesOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobClearPagesOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobClearPagesOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getPageRanges} operation.\n *\n * @export\n * @interface PageBlobGetPageRangesOptions\n */\nexport interface PageBlobGetPageRangesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobGetPageRangesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobGetPageRangesOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure the {@link PageBlobClient.getRangesDiff} operation.\n *\n * @export\n * @interface PageBlobGetPageRangesDiffOptions\n */\nexport interface PageBlobGetPageRangesDiffOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when getting page ranges diff.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * (unused)\n *\n * @type {string}\n * @memberof PageBlobGetPageRangesDiffOptions\n */\n range?: string;\n}\n\n/**\n * Options to configure {@link PageBlobClient.resize} operation.\n *\n * @export\n * @interface PageBlobResizeOptions\n */\nexport interface PageBlobResizeOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobResizeOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when resizing a page blob.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobResizeOptions\n */\n conditions?: BlobRequestConditions;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobResizeOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link PageBlobClient.updateSequenceNumber} operation.\n *\n * @export\n * @interface PageBlobUpdateSequenceNumberOptions\n */\nexport interface PageBlobUpdateSequenceNumberOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUpdateSequenceNumberOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n *\n * @type {BlobRequestConditions}\n * @memberof PageBlobUpdateSequenceNumberOptions\n */\n conditions?: BlobRequestConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.startCopyIncremental} operation.\n *\n * @export\n * @interface PageBlobStartCopyIncrementalOptions\n */\nexport interface PageBlobStartCopyIncrementalOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobStartCopyIncrementalOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when starting a copy incremental operation.\n *\n * @type {ModifiedAccessConditions}\n * @memberof PageBlobStartCopyIncrementalOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation.\n *\n * @export\n * @interface PageBlobUploadPagesFromURLOptions\n */\nexport interface PageBlobUploadPagesFromURLOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when updating sequence number.\n *\n * @type {PageBlobRequestConditions}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n conditions?: PageBlobRequestConditions;\n /**\n * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob.\n *\n * @type {MatchConditions & ModificationConditions}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceConditions?: MatchConditions & ModificationConditions;\n /**\n * An MD5 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceContentMD5?: Uint8Array;\n /**\n * A CRC64 hash of the content from the URI.\n * This hash is used to verify the integrity of the content during transport of the data from the URI.\n * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value.\n *\n * sourceContentMD5 and sourceContentCrc64 cannot be set at same time.\n *\n * @type {Uint8Array}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n sourceContentCrc64?: Uint8Array;\n /**\n * Customer Provided Key Info.\n *\n * @type {CpkInfo}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to\n * encrypt the data provided in the request. If not specified, encryption is performed with the\n * default account encryption scope. For more information, see Encryption at Rest for Azure\n * Storage Services.\n *\n * @type {string}\n * @memberof PageBlobUploadPagesFromURLOptions\n */\n encryptionScope?: string;\n}\n\n/**\n * Contains response data for the {@link PageBlobClient.createIfNotExists} operation.\n *\n * @export\n * @interface PageBlobCreateIfNotExistsResponse\n */\nexport interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse {\n /**\n * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof PageBlobCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * PageBlobClient defines a set of operations applicable to page blobs.\n *\n * @export\n * @class PageBlobClient\n * @extends {BlobClient}\n */\nexport class PageBlobClient extends BlobClient {\n /**\n * pageBlobsContext provided by protocol layer.\n *\n * @private\n * @type {PageBlobs}\n * @memberof PageBlobClient\n */\n private pageBlobContext: PageBlob;\n\n /**\n *\n * Creates an instance of PageBlobClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {string} blobName Blob name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof PageBlobClient\n */\n constructor(\n connectionString: string,\n containerName: string,\n blobName: string,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof PageBlobClient\n */\n constructor(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of PageBlobClient.\n *\n * @param {string} url A URL string pointing to Azure Storage blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob\".\n * You can append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof PageBlobClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n blobNameOrOptions?: string | StoragePipelineOptions,\n options?: StoragePipelineOptions\n ) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions as StoragePipelineOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)),\n encodeURIComponent(blobName)\n ) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.pageBlobContext = new PageBlob(this.storageClientContext);\n }\n\n /**\n * Creates a new PageBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param {string} snapshot The snapshot timestamp.\n * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp.\n * @memberof PageBlobClient\n */\n public withSnapshot(snapshot: string): PageBlobClient {\n return new PageBlobClient(\n setURLParameter(\n this.url,\n URLConstants.Parameters.SNAPSHOT,\n snapshot.length === 0 ? undefined : snapshot\n ),\n this.pipeline\n );\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {number} size size of the page blob.\n * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation.\n * @returns {Promise} Response data for the Page Blob Create operation.\n * @memberof PageBlobClient\n */\n public async create(\n size: number,\n options: PageBlobCreateOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-create\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.create(0, size, {\n abortSignal: options.abortSignal,\n blobHTTPHeaders: options.blobHTTPHeaders,\n blobSequenceNumber: options.blobSequenceNumber,\n leaseAccessConditions: options.conditions,\n metadata: options.metadata,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n tier: toAccessTier(options.tier),\n blobTagsString: toBlobTagsString(options.tags),\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob. If the blob with the same name already exists, the content\n * of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {number} size size of the page blob.\n * @param {PageBlobCreateIfNotExistsOptions} [options]\n * @returns {Promise}\n * @memberof PageBlobClient\n */\n public async createIfNotExists(\n size: number,\n options: PageBlobCreateIfNotExistsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-createIfNotExists\",\n options.tracingOptions\n );\n try {\n const conditions = { ifNoneMatch: ETagAny };\n const res = await this.create(size, {\n ...options,\n conditions,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"BlobAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a blob only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param {HttpRequestBody} body Data to upload\n * @param {number} offset Offset of destination page blob\n * @param {number} count Content length of the body, also number of bytes to be uploaded\n * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation.\n * @returns {Promise} Response data for the Page Blob Upload Pages operation.\n * @memberof PageBlobClient\n */\n public async uploadPages(\n body: HttpRequestBody,\n offset: number,\n count: number,\n options: PageBlobUploadPagesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-uploadPages\", options.tracingOptions);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPages(body, count, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n onUploadProgress: options.onProgress,\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n transactionalContentMD5: options.transactionalContentMD5,\n transactionalContentCrc64: options.transactionalContentCrc64,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the\n * contents are read from a URL.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url\n *\n * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication\n * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob\n * @param {number} destOffset Offset of destination page blob\n * @param {number} count Number of bytes to be uploaded from source page blob\n * @param {PageBlobUploadPagesFromURLOptions} [options={}]\n * @returns {Promise}\n * @memberof PageBlobClient\n */\n public async uploadPagesFromURL(\n sourceURL: string,\n sourceOffset: number,\n destOffset: number,\n count: number,\n options: PageBlobUploadPagesFromURLOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-uploadPagesFromURL\",\n options.tracingOptions\n );\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPagesFromURL(\n sourceURL,\n rangeToString({ offset: sourceOffset, count }),\n 0,\n rangeToString({ offset: destOffset, count }),\n {\n abortSignal: options.abortSignal,\n sourceContentMD5: options.sourceContentMD5,\n sourceContentCrc64: options.sourceContentCrc64,\n leaseAccessConditions: options.conditions,\n sequenceNumberAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince\n },\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Frees the specified pages from the page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param {number} [offset] Starting byte position of the pages to clear.\n * @param {number} [count] Number of bytes to clear.\n * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation.\n * @returns {Promise} Response data for the Page Blob Clear Pages operation.\n * @memberof PageBlobClient\n */\n public async clearPages(\n offset: number = 0,\n count?: number,\n options: PageBlobClearPagesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-clearPages\", options.tracingOptions);\n try {\n return await this.pageBlobContext.clearPages(0, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({ offset, count }),\n sequenceNumberAccessConditions: options.conditions,\n cpkInfo: options.customerProvidedKey,\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the list of valid page ranges for a page blob or snapshot of a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} [offset] Starting byte position of the page ranges.\n * @param {number} [count] Number of bytes to get.\n * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation.\n * @returns {Promise} Response data for the Page Blob Get Ranges operation.\n * @memberof PageBlobClient\n */\n public async getPageRanges(\n offset: number = 0,\n count?: number,\n options: PageBlobGetPageRangesOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-getPageRanges\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext\n .getPageRanges({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} offset Starting byte position of the page blob\n * @param {number} count Number of bytes to get ranges diff.\n * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference.\n * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation.\n * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation.\n * @memberof PageBlobClient\n */\n public async getPageRangesDiff(\n offset: number,\n count: number,\n prevSnapshot: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-getPageRangesDiff\",\n options.tracingOptions\n );\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n prevsnapshot: prevSnapshot,\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param {number} offset Starting byte position of the page blob\n * @param {number} count Number of bytes to get ranges diff.\n * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference.\n * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation.\n * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation.\n * @memberof PageBlobClient\n */\n public async getPageRangesDiffForManagedDisks(\n offset: number,\n count: number,\n prevSnapshotUrl: string,\n options: PageBlobGetPageRangesDiffOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-GetPageRangesDiffForManagedDisks\",\n options.tracingOptions\n );\n\n try {\n return await this.pageBlobContext\n .getPageRangesDiff({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n prevSnapshotUrl,\n range: rangeToString({ offset, count }),\n spanOptions\n })\n .then(rangeResponseFromModel);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resizes the page blob to the specified size (which must be a multiple of 512).\n * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties\n *\n * @param {number} size Target size\n * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation.\n * @returns {Promise} Response data for the Page Blob Resize operation.\n * @memberof PageBlobClient\n */\n public async resize(\n size: number,\n options: PageBlobResizeOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\"PageBlobClient-resize\", options.tracingOptions);\n try {\n return await this.pageBlobContext.resize(size, {\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n encryptionScope: options.encryptionScope,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets a page blob's sequence number.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number.\n * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update\n * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation.\n * @returns {Promise} Response data for the Page Blob Update Sequence Number operation.\n * @memberof PageBlobClient\n */\n public async updateSequenceNumber(\n sequenceNumberAction: SequenceNumberActionType,\n sequenceNumber?: number,\n options: PageBlobUpdateSequenceNumberOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-updateSequenceNumber\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, {\n abortSignal: options.abortSignal,\n blobSequenceNumber: sequenceNumber,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.\n * The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination.\n * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.\n * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob\n * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots\n *\n * @param {string} copySource Specifies the name of the source page blob snapshot. For example,\n * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation.\n * @returns {Promise} Response data for the Page Blob Copy Incremental operation.\n * @memberof PageBlobClient\n */\n public async startCopyIncremental(\n copySource: string,\n options: PageBlobStartCopyIncrementalOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"PageBlobClient-startCopyIncremental\",\n options.tracingOptions\n );\n try {\n return await this.pageBlobContext.copyIncremental(copySource, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * The details for a specific lease.\n */\nexport interface Lease {\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally. If the request version is 2011-08-18 or\n * newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was\n * last modified. Any operation that modifies the blob, including an update\n * of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * Approximate time remaining in the lease\n * period, in seconds.\n */\n leaseTime?: number;\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used\n * to execute the request. This header is returned for requests made against\n * version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that\n * indicates the time at which the response was initiated\n */\n date?: Date;\n /**\n * Error code if any associated with the response that returned\n * the Lease information.\n */\n errorCode?: string;\n}\n\n/**\n * Contains the response data for operations that create, modify, or delete a lease.\n *\n * See {@link BlobLeaseClient}.\n */\nexport type LeaseOperationResponse = Lease & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Lease;\n };\n};\n\n/**\n * Configures lease operations.\n *\n * @export\n * @interface LeaseOperationOptions\n */\nexport interface LeaseOperationOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof LeaseOperationOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof LeaseOperationOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n *\n * @export\n * @class BlobLeaseClient\n */\nexport class BlobLeaseClient {\n private _leaseId: string;\n private _url: string;\n private _containerOrBlobOperation: Container | StorageBlob;\n private _isContainer: boolean;\n\n /**\n * Gets the lease Id.\n *\n * @readonly\n * @memberof BlobLeaseClient\n * @type {string}\n */\n public get leaseId(): string {\n return this._leaseId;\n }\n\n /**\n * Gets the url.\n *\n * @readonly\n * @memberof BlobLeaseClient\n * @type {string}\n */\n public get url(): string {\n return this._url;\n }\n\n /**\n * Creates an instance of BlobLeaseClient.\n * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests.\n * @param {string} leaseId Initial proposed lease id.\n * @memberof BlobLeaseClient\n */\n constructor(client: ContainerClient | BlobClient, leaseId?: string) {\n const clientContext = new StorageClientContext(\n client.url,\n (client as any).pipeline.toServiceClientOptions()\n );\n this._url = client.url;\n\n if (client instanceof ContainerClient) {\n this._isContainer = true;\n this._containerOrBlobOperation = new Container(clientContext);\n } else {\n this._isContainer = false;\n this._containerOrBlobOperation = new StorageBlob(clientContext);\n }\n\n if (!leaseId) {\n leaseId = generateUuid();\n }\n this._leaseId = leaseId;\n }\n\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1)\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for acquire lease operation.\n * @memberof BlobLeaseClient\n */\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobLeaseClient-acquireLease\",\n options.tracingOptions\n );\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.acquireLease({\n abortSignal: options.abortSignal,\n duration,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n proposedLeaseId: this._leaseId,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To change the ID of the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {string} proposedLeaseId the proposed new lease Id.\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for change lease operation.\n * @memberof BlobLeaseClient\n */\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-changeLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n const response = await this._containerOrBlobOperation.changeLease(\n this._leaseId,\n proposedLeaseId,\n {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n }\n );\n this._leaseId = proposedLeaseId;\n return response;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {LeaseOperationOptions} [options={}] option to configure lease management operations.\n * @returns {Promise} Response data for release lease operation.\n * @memberof BlobLeaseClient\n */\n public async releaseLease(options: LeaseOperationOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobLeaseClient-releaseLease\",\n options.tracingOptions\n );\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.releaseLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To renew the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations.\n * @returns {Promise} Response data for renew lease operation.\n * @memberof BlobLeaseClient\n */\n public async renewLease(options: LeaseOperationOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-renewLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n return await this._containerOrBlobOperation.renewLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @static\n * @param {number} breakPeriod Break period\n * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations.\n * @returns {Promise} Response data for break lease operation.\n * @memberof BlobLeaseClient\n */\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"BlobLeaseClient-breakLease\", options.tracingOptions);\n\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n try {\n const operationOptions: ContainerBreakLeaseOptionalParams = {\n abortSignal: options.abortSignal,\n breakPeriod,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions\n },\n spanOptions\n };\n return await this._containerOrBlobOperation.breakLease(operationOptions);\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Options to configure {@link ContainerClient.create} operation.\n *\n * @export\n * @interface ContainerCreateOptions\n */\nexport interface ContainerCreateOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerCreateOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * A collection of key-value string pair to associate with the container.\n *\n * @type {Metadata}\n * @memberof ContainerCreateOptions\n */\n metadata?: Metadata;\n /**\n * Specifies whether data in the container may be accessed publicly and the level of access. Possible values include:\n * - `container`: Specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account.\n * - `blob`: Specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request.\n *\n * @type {PublicAccessType}\n * @memberof ContainerCreateOptions\n */\n access?: PublicAccessType;\n /**\n * Container encryption scope info.\n *\n * @type {ContainerEncryptionScope}\n * @memberof ContainerCreateOptions\n */\n containerEncryptionScope?: ContainerEncryptionScope;\n}\n\n/**\n * Options to configure {@link ContainerClient.getProperties} operation.\n *\n * @export\n * @interface ContainerGetPropertiesOptions\n */\nexport interface ContainerGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof ContainerGetPropertiesOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.delete} operation.\n *\n * @export\n * @interface ContainerDeleteMethodOptions\n */\nexport interface ContainerDeleteMethodOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerDeleteMethodOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when deleting the container.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerDeleteMethodOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.exists} operation.\n *\n * @export\n * @interface ContainerExistsOptions\n */\nexport interface ContainerExistsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerDeleteMethodOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link ContainerClient.setMetadata} operation.\n *\n * @export\n * @interface ContainerSetMetadataOptions\n */\nexport interface ContainerSetMetadataOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerSetMetadataOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerSetMetadataOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure {@link ContainerClient.getAccessPolicy} operation.\n *\n * @export\n * @interface ContainerGetAccessPolicyOptions\n */\nexport interface ContainerGetAccessPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerGetAccessPolicyOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * If specified, contains the lease id that must be matched and lease with this id\n * must be active in order for the operation to succeed.\n *\n * @type {LeaseAccessConditions}\n * @memberof ContainerGetAccessPolicyOptions\n */\n conditions?: LeaseAccessConditions;\n}\n\n/**\n * Signed identifier.\n *\n * @export\n * @interface SignedIdentifier\n */\nexport interface SignedIdentifier {\n /**\n * @member {string} id a unique id\n */\n id: string;\n /**\n * @member {AccessPolicy} accessPolicy\n */\n accessPolicy: {\n /**\n * @member {Date} startsOn Optional. The date-time the policy is active\n */\n startsOn?: Date;\n /**\n * @member {Date} expiresOn Optional. The date-time the policy expires\n */\n expiresOn?: Date;\n /**\n * @member {string} permissions The permissions for the acl policy\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n */\n permissions?: string;\n };\n}\n\n/**\n * Contains response data for the {@link ContainerClient.getAccessPolicy} operation.\n */\nexport declare type ContainerGetAccessPolicyResponse = {\n signedIdentifiers: SignedIdentifier[];\n} & ContainerGetAccessPolicyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerGetAccessPolicyHeaders;\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: SignedIdentifierModel[];\n };\n };\n\n/**\n * Options to configure {@link ContainerClient.setAccessPolicy} operation.\n *\n * @export\n * @interface ContainerSetAccessPolicyOptions\n */\nexport interface ContainerSetAccessPolicyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerSetAccessPolicyOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when setting the access policy.\n *\n * @type {ContainerRequestConditions}\n * @memberof ContainerSetAccessPolicyOptions\n */\n conditions?: ContainerRequestConditions;\n}\n\n/**\n * Options to configure Container - Acquire Lease operation.\n *\n * @export\n * @interface ContainerAcquireLeaseOptions\n */\nexport interface ContainerAcquireLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerAcquireLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when acquiring the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerAcquireLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Release Lease operation.\n *\n * @export\n * @interface ContainerReleaseLeaseOptions\n */\nexport interface ContainerReleaseLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerReleaseLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when releasing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerReleaseLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Renew Lease operation.\n *\n * @export\n * @interface ContainerRenewLeaseOptions\n */\nexport interface ContainerRenewLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerRenewLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when renewing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerRenewLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Break Lease operation.\n *\n * @export\n * @interface ContainerBreakLeaseOptions\n */\nexport interface ContainerBreakLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerBreakLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when breaking the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerBreakLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure Container - Change Lease operation.\n *\n * @export\n * @interface ContainerChangeLeaseOptions\n */\nexport interface ContainerChangeLeaseOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerChangeLeaseOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease.\n *\n * @type {ModifiedAccessConditions}\n * @memberof ContainerChangeLeaseOptions\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * Options to configure the {@link ContainerClient.deleteBlob} operation.\n *\n * @export\n * @interface ContainerDeleteBlobOptions\n */\nexport interface ContainerDeleteBlobOptions extends BlobDeleteOptions {\n /**\n * An opaque DateTime value that, when present, specifies the version\n * of the blob to delete. It's for service version 2019-10-10 and newer.\n *\n * @type {string}\n * @memberof ContainerDeleteBlobOptions\n */\n versionId?: string;\n}\n\n/**\n * Options to configure Container - List Segment operations.\n *\n * See:\n * - {@link ContainerClient.listSegments}\n * - {@link ContainerClient.listBlobFlatSegment}\n * - {@link ContainerClient.listBlobHierarchySegment}\n * - {@link ContainerClient.listHierarchySegments}\n * - {@link ContainerClient.listItemsByHierarchy}\n *\n * @interface ContainerListBlobsSegmentOptions\n */\ninterface ContainerListBlobsSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerListBlobsSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListBlobsIncludeItem[];\n}\n\n/**\n * An interface representing BlobHierarchyListSegment.\n */\nexport interface BlobHierarchyListSegment {\n blobPrefixes?: BlobPrefix[];\n blobItems: BlobItem[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsHierarchySegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n delimiter?: string;\n segment: BlobHierarchyListSegment;\n continuationToken?: string;\n}\n\n/**\n * Contains response data for the listBlobHierarchySegment operation.\n */\nexport type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse &\n ContainerListBlobHierarchySegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobHierarchySegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsHierarchySegmentResponseModel;\n };\n };\n\n/**\n * An Azure Storage blob\n */\nexport interface BlobItem {\n name: string;\n deleted: boolean;\n snapshot: string;\n versionId?: string;\n isCurrentVersion?: boolean;\n properties: BlobProperties;\n metadata?: { [propertyName: string]: string };\n tags?: Tags;\n objectReplicationSourceProperties?: ObjectReplicationPolicy[];\n}\n\n/**\n * An interface representing BlobFlatListSegment.\n */\nexport interface BlobFlatListSegment {\n blobItems: BlobItem[];\n}\n\n/**\n * An enumeration of blobs\n */\nexport interface ListBlobsFlatSegmentResponse {\n serviceEndpoint: string;\n containerName: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n segment: BlobFlatListSegment;\n continuationToken?: string;\n}\n\n/**\n * Contains response data for the listBlobFlatSegment operation.\n */\nexport type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse &\n ContainerListBlobFlatSegmentHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ContainerListBlobFlatSegmentHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: ListBlobsFlatSegmentResponseModel;\n };\n };\n\n/**\n * Options to configure Container - List Blobs operations.\n *\n * See:\n * - {@link ContainerClient.listBlobsFlat}\n * - {@link ContainerClient.listBlobsByHierarchy}\n *\n * @export\n * @interface ContainerListBlobsOptions\n */\nexport interface ContainerListBlobsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ContainerListBlobsOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies whether metadata related to any current or previous Copy Blob operation should be included in the response.\n */\n includeCopy?: boolean;\n /**\n * Specifies whether soft deleted blobs should be included in the response.\n */\n includeDeleted?: boolean;\n /**\n * Specifies whether blob metadata be returned in the response.\n */\n includeMetadata?: boolean;\n /**\n * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response.\n */\n includeSnapshots?: boolean;\n /**\n * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response.\n */\n includeVersions?: boolean;\n /**\n * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response.\n */\n includeUncommitedBlobs?: boolean;\n /**\n * Specifies whether blob tags be returned in the response.\n */\n includeTags?: boolean;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.createIfNotExists} operation.\n *\n * @export\n * @interface ContainerCreateIfNotExistsResponse\n */\nexport interface ContainerCreateIfNotExistsResponse extends ContainerCreateResponse {\n /**\n * Indicate whether the container is successfully created. Is false when the container is not changed as it already exists.\n *\n * @type {boolean}\n * @memberof ContainerCreateIfNotExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link ContainerClient.deleteIfExists} operation.\n *\n * @export\n * @interface ContainerDeleteIfExistsResponse\n */\nexport interface ContainerDeleteIfExistsResponse extends ContainerDeleteResponse {\n /**\n * Indicate whether the container is successfully deleted. Is false if the container does not exist in the first place.\n *\n * @type {boolean}\n * @memberof ContainerDeleteIfExistsResponse\n */\n succeeded: boolean;\n}\n\n/**\n * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.\n *\n * @export\n * @class ContainerClient\n */\nexport class ContainerClient extends StorageClient {\n /**\n * containerContext provided by protocol layer.\n *\n * @private\n * @type {Containers}\n * @memberof ContainerClient\n */\n private containerContext: Container;\n\n private _containerName: string;\n\n /**\n * The name of the container.\n */\n public get containerName(): string {\n return this._containerName;\n }\n /**\n *\n * Creates an instance of ContainerClient.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {string} containerName Container name.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof ContainerClient\n */\n constructor(connectionString: string, containerName: string, options?: StoragePipelineOptions);\n /**\n * Creates an instance of ContainerClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a page blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof ContainerClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of ContainerClient.\n * This method accepts an encoded URL or non-encoded URL pointing to a page blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * If a blob name includes ? or %, blob name must be encoded in the URL.\n *\n * @param {string} url A URL string pointing to Azure Storage page blob, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString\".\n * This method accepts an encoded URL or non-encoded URL pointing to a blob.\n * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.\n * However, if a blob name includes ? or %, blob name must be encoded in the URL.\n\n * Such as a blob named \"my?blob%\", the URL should be \"https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof ContainerClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrContainerName?:\n | string\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n let url: string;\n options = options || {};\n if (credentialOrPipelineOrContainerName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n } else if (\n (isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrContainerName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n } else if (\n !credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\"\n ) {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n pipeline = newPipeline(sharedKeyCredential, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for containerName parameter\");\n }\n super(url, pipeline);\n this._containerName = this.getContainerNameFromUrl();\n this.containerContext = new Container(this.storageClientContext);\n }\n\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, the operation fails.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param {ContainerCreateOptions} [options] Options to Container Create operation.\n * @returns {Promise}\n * @memberof ContainerClient\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * const createContainerResponse = await containerClient.create();\n * console.log(\"Container was created successfully\", createContainerResponse.requestId);\n * ```\n */\n public async create(options: ContainerCreateOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-create\", options.tracingOptions);\n try {\n // Spread operator in destructuring assignments,\n // this will filter out unwanted properties from the response object into result object\n return await this.containerContext.create({\n ...options,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, it is not changed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param {ContainerCreateOptions} [options]\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async createIfNotExists(\n options: ContainerCreateOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-createIfNotExists\",\n options.tracingOptions\n );\n try {\n const res = await this.create({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"ContainerAlreadyExists\") {\n span.setStatus({\n code: CanonicalCode.ALREADY_EXISTS,\n message: \"Expected exception when creating a container only if it does not already exist.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the Azure container resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing container might be deleted by other clients or\n * applications. Vice versa new containers with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param {ContainerExistsOptions} [options={}]\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async exists(options: ContainerExistsOptions = {}): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-exists\", options.tracingOptions);\n try {\n await this.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return true;\n } catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when checking container existence\"\n });\n return false;\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a {@link BlobClient}\n *\n * @param {string} blobName A blob name\n * @returns {BlobClient} A new BlobClient object for the given blob name.\n * @memberof ContainerClient\n */\n public getBlobClient(blobName: string): BlobClient {\n return new BlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline);\n }\n\n /**\n * Creates an {@link AppendBlobClient}\n *\n * @param {string} blobName An append blob name\n * @returns {AppendBlobClient}\n * @memberof ContainerClient\n */\n public getAppendBlobClient(blobName: string): AppendBlobClient {\n return new AppendBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Creates a {@link BlockBlobClient}\n *\n * @param {string} blobName A block blob name\n * @returns {BlockBlobClient}\n * @memberof ContainerClient\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n *\n * const blockBlobClient = containerClient.getBlockBlobClient(\"\");\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n public getBlockBlobClient(blobName: string): BlockBlobClient {\n return new BlockBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Creates a {@link PageBlobClient}\n *\n * @param {string} blobName A page blob name\n * @returns {PageBlobClient}\n * @memberof ContainerClient\n */\n public getPageBlobClient(blobName: string): PageBlobClient {\n return new PageBlobClient(\n appendToURLPath(this.url, encodeURIComponent(blobName)),\n this.pipeline\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * container. The data returned does not include the container's list of blobs.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async getProperties(\n options: ContainerGetPropertiesOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"ContainerClient-getProperties\",\n options.tracingOptions\n );\n try {\n return await this.containerContext.getProperties({\n abortSignal: options.abortSignal,\n ...options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified container for deletion. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async delete(\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\"ContainerClient-delete\", options.tracingOptions);\n try {\n return await this.containerContext.deleteMethod({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified container for deletion if it exists. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async deleteIfExists(\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-deleteIfExists\",\n options.tracingOptions\n );\n\n try {\n const res = await this.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n succeeded: true,\n ...res,\n _response: res._response // _response is made non-enumerable\n };\n } catch (e) {\n if (e.details?.errorCode === \"ContainerNotFound\") {\n span.setStatus({\n code: CanonicalCode.NOT_FOUND,\n message: \"Expected exception when deleting a container only if it exists.\"\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response\n };\n }\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified container.\n *\n * If no option provided, or no metadata defined in the parameter, the container\n * metadata will be removed.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata\n *\n * @param {Metadata} [metadata] Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async setMetadata(\n metadata?: Metadata,\n options: ContainerSetMetadataOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n if (options.conditions.ifUnmodifiedSince) {\n throw new RangeError(\n \"the IfUnmodifiedSince must have their default values because they are ignored by the blob service\"\n );\n }\n\n const { span, spanOptions } = createSpan(\"ContainerClient-setMetadata\", options.tracingOptions);\n\n try {\n return await this.containerContext.setMetadata({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n metadata,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the permissions for the specified container. The permissions indicate\n * whether container data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl\n *\n * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async getAccessPolicy(\n options: ContainerGetAccessPolicyOptions = {}\n ): Promise {\n if (!options.conditions) {\n options.conditions = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"ContainerClient-getAccessPolicy\",\n options.tracingOptions\n );\n\n try {\n const response = await this.containerContext.getAccessPolicy({\n abortSignal: options.abortSignal,\n leaseAccessConditions: options.conditions,\n spanOptions\n });\n\n const res: ContainerGetAccessPolicyResponse = {\n _response: response._response,\n blobPublicAccess: response.blobPublicAccess,\n date: response.date,\n etag: response.etag,\n errorCode: response.errorCode,\n lastModified: response.lastModified,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n signedIdentifiers: [],\n version: response.version\n };\n\n for (const identifier of response) {\n let accessPolicy: any = undefined;\n if (identifier.accessPolicy) {\n accessPolicy = {\n permissions: identifier.accessPolicy.permissions\n };\n\n if (identifier.accessPolicy.expiresOn) {\n accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);\n }\n\n if (identifier.accessPolicy.startsOn) {\n accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);\n }\n }\n\n res.signedIdentifiers.push({\n accessPolicy,\n id: identifier.id\n });\n }\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets the permissions for the specified container. The permissions indicate\n * whether blobs in a container may be accessed publicly.\n *\n * When you set permissions for a container, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing container ACL will be\n * removed.\n *\n * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.\n * During this interval, a shared access signature that is associated with the stored access policy will\n * fail with status code 403 (Forbidden), until the access policy becomes active.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n *\n * @param {PublicAccessType} [access] The level of public access to data in the container.\n * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy.\n * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n containerAcl?: SignedIdentifier[],\n options: ContainerSetAccessPolicyOptions = {}\n ): Promise {\n options.conditions = options.conditions || {};\n const { span, spanOptions } = createSpan(\n \"ContainerClient-setAccessPolicy\",\n options.tracingOptions\n );\n try {\n const acl: SignedIdentifierModel[] = [];\n for (const identifier of containerAcl || []) {\n acl.push({\n accessPolicy: {\n expiresOn: identifier.accessPolicy.expiresOn\n ? truncatedISO8061Date(identifier.accessPolicy.expiresOn)\n : \"\",\n permissions: identifier.accessPolicy.permissions,\n startsOn: identifier.accessPolicy.startsOn\n ? truncatedISO8061Date(identifier.accessPolicy.startsOn)\n : \"\"\n },\n id: identifier.id\n });\n }\n\n return await this.containerContext.setAccessPolicy({\n abortSignal: options.abortSignal,\n access,\n containerAcl: acl,\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: options.conditions,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the container.\n *\n * @param {string} [proposeLeaseId] Initial proposed lease Id.\n * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container.\n * @memberof ContainerClient\n */\n public getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n *\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},\n * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better\n * performance with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param {string} blobName Name of the block blob to create or update.\n * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation.\n * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance.\n * @memberof ContainerClient\n */\n public async uploadBlockBlob(\n blobName: string,\n body: HttpRequestBody,\n contentLength: number,\n options: BlockBlobUploadOptions = {}\n ): Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }> {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-uploadBlockBlob\",\n options.tracingOptions\n );\n try {\n const blockBlobClient = this.getBlockBlobClient(blobName);\n const response = await blockBlobClient.upload(body, contentLength, {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n blockBlobClient,\n response\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param {string} blobName\n * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation.\n * @returns {Promise} Block blob deletion response data.\n * @memberof ContainerClient\n */\n public async deleteBlob(\n blobName: string,\n options: ContainerDeleteBlobOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\"ContainerClient-deleteBlob\", options.tracingOptions);\n try {\n let blobClient = this.getBlobClient(blobName);\n if (options.versionId) {\n blobClient = blobClient.withVersion(options.versionId);\n }\n return await blobClient.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * listBlobFlatSegment returns a single segment of blobs starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call listBlobsFlatSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n private async listBlobFlatSegment(\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-listBlobFlatSegment\",\n options.tracingOptions\n );\n try {\n const response = await this.containerContext.listBlobFlatSegment({\n marker,\n ...options,\n spanOptions\n });\n const wrappedResponse: ContainerListBlobFlatSegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n segment: {\n ...response.segment,\n blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem: BlobItem = {\n ...blobItemInteral,\n tags: toTags(blobItemInteral.blobTags),\n objectReplicationSourceProperties: parseObjectReplicationRecord(\n blobItemInteral.objectReplicationMetadata\n )\n };\n return blobItem;\n })\n }\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * listBlobHierarchySegment returns a single segment of blobs starting from\n * the specified Marker. Use an empty Marker to start enumeration from the\n * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment\n * again (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation.\n * @returns {Promise}\n * @memberof ContainerClient\n */\n private async listBlobHierarchySegment(\n delimiter: string,\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"ContainerClient-listBlobHierarchySegment\",\n options.tracingOptions\n );\n try {\n const response = await this.containerContext.listBlobHierarchySegment(delimiter, {\n marker,\n ...options,\n spanOptions\n });\n const wrappedResponse: ContainerListBlobHierarchySegmentResponse = {\n ...response,\n _response: response._response, // _response is made non-enumerable\n segment: {\n ...response.segment,\n blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem: BlobItem = {\n ...blobItemInteral,\n tags: toTags(blobItemInteral.blobTags),\n objectReplicationSourceProperties: parseObjectReplicationRecord(\n blobItemInteral.objectReplicationMetadata\n )\n };\n return blobItem;\n })\n }\n };\n return wrappedResponse;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse\n *\n * @private\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listSegments(\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options);\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield await listBlobsFlatSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator of {@link BlobItem} objects\n *\n * @private\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listItems(\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) {\n yield* listBlobsFlatSegmentResponse.segment.blobItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the blobs\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the containerClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\");`\n * let i = 1;\n * for await (const blob of containerClient.listBlobsFlat()) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = containerClient.listBlobsFlat();\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * @param {ContainerListBlobsOptions} [options={}] Options to list blobs.\n * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging.\n * @memberof ContainerClient\n */\n public listBlobsFlat(\n options: ContainerListBlobsOptions = {}\n ): PagedAsyncIterableIterator {\n const include: ListBlobsIncludeItem[] = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ContainerListBlobsSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {})\n };\n\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions\n });\n }\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse\n *\n * @private\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator}\n * @memberof ContainerClient\n */\n private async *listHierarchySegments(\n delimiter: string,\n marker?: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator {\n let listBlobsHierarchySegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(\n delimiter,\n marker,\n options\n );\n marker = listBlobsHierarchySegmentResponse.continuationToken;\n yield await listBlobsHierarchySegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.\n *\n * @private\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation.\n * @returns {AsyncIterableIterator<{ kind: \"prefix\" } & BlobPrefix | { kind: \"blob\" } & BlobItem>}\n * @memberof ContainerClient\n */\n private async *listItemsByHierarchy(\n delimiter: string,\n options: ContainerListBlobsSegmentOptions = {}\n ): AsyncIterableIterator<({ kind: \"prefix\" } & BlobPrefix) | ({ kind: \"blob\" } & BlobItem)> {\n let marker: string | undefined;\n for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(\n delimiter,\n marker,\n options\n )) {\n const segment = listBlobsHierarchySegmentResponse.segment;\n if (segment.blobPrefixes) {\n for (const prefix of segment.blobPrefixes) {\n yield { kind: \"prefix\", ...prefix };\n }\n }\n for (const blob of segment.blobItems) {\n yield { kind: \"blob\", ...blob };\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the blobs by hierarchy.\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * for await (const item of containerClient.listBlobsByHierarchy(\"/\")) {\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let iter = containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix1/\" });\n * let entity = await iter.next();\n * while (!entity.done) {\n * let item = entity.value;\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);\n * }\n * entity = await iter.next();\n * }\n * ```js\n *\n * Example using `byPage()`:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page\");\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\").byPage()) {\n * const segment = response.segment;\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * Example using paging with a max page size:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page, specifying a prefix and a max page size\");\n *\n * let i = 1;\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix2/sub1/\"}).byPage({ maxPageSize: 2 })) {\n * console.log(`Page ${i++}`);\n * const segment = response.segment;\n *\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n *\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);\n * }\n * }\n * ```\n *\n * @param {string} delimiter The character or string used to define the virtual hierarchy\n * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation.\n * @returns {(PagedAsyncIterableIterator<\n * { kind: \"prefix\" } & BlobPrefix | { kind: \"blob\" } & BlobItem,\n * ContainerListBlobHierarchySegmentResponse\n * >)}\n * @memberof ContainerClient\n */\n public listBlobsByHierarchy(\n delimiter: string,\n options: ContainerListBlobsOptions = {}\n ): PagedAsyncIterableIterator<\n ({ kind: \"prefix\" } & BlobPrefix) | ({ kind: \"blob\" } & BlobItem),\n ContainerListBlobHierarchySegmentResponse\n > {\n if (delimiter === \"\") {\n throw new RangeError(\"delimiter should contain one or more characters\");\n }\n\n const include: ListBlobsIncludeItem[] = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ContainerListBlobsSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {})\n };\n // AsyncIterableIterator to iterate over blob prefixes and blobs\n const iter = this.listItemsByHierarchy(delimiter, updatedOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n async next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listHierarchySegments(delimiter, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions\n });\n }\n };\n }\n\n private getContainerNameFromUrl(): string {\n let containerName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername`\n // http://localhost:10001/devstoreaccount1/containername\n\n const parsedUrl = URLBuilder.parse(this.url);\n\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername\".\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath()!.split(\"/\")[1];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername\n // .getPath() -> /devstoreaccount1/containername\n containerName = parsedUrl.getPath()!.split(\"/\")[2];\n } else {\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath()!.split(\"/\")[1];\n }\n\n // decode the encoded containerName - to get all the special characters that might be present in it\n containerName = decodeURIComponent(containerName);\n\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n\n return containerName;\n } catch (error) {\n throw new Error(\"Unable to extract containerName with provided information.\");\n }\n }\n}\n","import { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport { streamToBuffer2 } from \"./utils/utils.node\";\nimport { BATCH_MAX_PAYLOAD_IN_BYTES } from \"./utils/constants\";\n\nexport async function getBodyAsText(\n batchResponse: ServiceSubmitBatchResponseModel\n): Promise {\n let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);\n\n let responseLength = await streamToBuffer2(\n batchResponse.readableStreamBody as NodeJS.ReadableStream,\n buffer\n );\n\n // Slice the buffer to trim the empty ending.\n buffer = buffer.slice(0, responseLength);\n\n return buffer.toString();\n}\n\nexport function utf8ByteLength(str: string): number {\n return Buffer.byteLength(str);\n}\n","import { HttpHeaders } from \"@azure/core-http\";\n\nimport { ServiceSubmitBatchResponseModel } from \"./generatedModels\";\nimport {\n HTTP_VERSION_1_1,\n HTTP_LINE_ENDING,\n HeaderConstants,\n HTTPURLConnection\n} from \"./utils/constants\";\nimport { getBodyAsText } from \"./BatchUtils\";\nimport { BatchSubRequest } from \"./BlobBatch\";\nimport { BatchSubResponse, ParsedBatchResponse } from \"./BatchResponse\";\n\nconst HTTP_HEADER_DELIMITER = \": \";\nconst SPACE_DELIMITER = \" \";\nconst NOT_FOUND = -1;\n\n/**\n * Util class for parsing batch response.\n */\nexport class BatchResponseParser {\n private readonly batchResponse: ServiceSubmitBatchResponseModel;\n private readonly responseBatchBoundary: string;\n private readonly perResponsePrefix: string;\n private readonly batchResponseEnding: string;\n private readonly subRequests: Map;\n\n constructor(\n batchResponse: ServiceSubmitBatchResponseModel,\n subRequests: Map\n ) {\n if (!batchResponse || !batchResponse.contentType) {\n // In special case(reported), server may return invalid content-type which could not be parsed.\n throw new RangeError(\"batchResponse is malformed or doesn't contain valid content-type.\");\n }\n\n if (!subRequests || subRequests.size === 0) {\n // This should be prevent during coding.\n throw new RangeError(\"Invalid state: subRequests is not provided or size is 0.\");\n }\n\n this.batchResponse = batchResponse;\n this.subRequests = subRequests;\n this.responseBatchBoundary = this.batchResponse.contentType!.split(\"=\")[1];\n this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`;\n this.batchResponseEnding = `--${this.responseBatchBoundary}--`;\n }\n\n // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response\n public async parseBatchResponse(): Promise {\n // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse\n // sub request's response.\n if (this.batchResponse._response.status != HTTPURLConnection.HTTP_ACCEPTED) {\n throw new Error(\n `Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`\n );\n }\n\n let responseBodyAsText = await getBodyAsText(this.batchResponse);\n\n let subResponses = responseBodyAsText\n .split(this.batchResponseEnding)[0] // string after ending is useless\n .split(this.perResponsePrefix)\n .slice(1); // string before first response boundary is useless\n let subResponseCount = subResponses.length;\n\n // Defensive coding in case of potential error parsing.\n // Note: subResponseCount == 1 is special case where sub request is invalid.\n // We try to prevent such cases through early validation, e.g. validate sub request count >= 1.\n // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user.\n if (subResponseCount != this.subRequests.size && subResponseCount != 1) {\n throw new Error(\"Invalid state: sub responses' count is not equal to sub requests' count.\");\n }\n\n let deserializedSubResponses: Array = new Array(subResponseCount);\n let subResponsesSucceededCount: number = 0;\n let subResponsesFailedCount: number = 0;\n\n // Parse sub subResponses.\n for (let index = 0; index < subResponseCount; index++) {\n const subResponse = subResponses[index];\n deserializedSubResponses[index] = {} as BatchSubResponse;\n let deserializedSubResponse = deserializedSubResponses[index];\n deserializedSubResponse.headers = new HttpHeaders();\n\n let responseLines = subResponse.split(`${HTTP_LINE_ENDING}`);\n let subRespHeaderStartFound = false;\n let subRespHeaderEndFound = false;\n let subRespFailed = false;\n let contentId = NOT_FOUND;\n\n for (const responseLine of responseLines) {\n if (!subRespHeaderStartFound) {\n // Convention line to indicate content ID\n if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) {\n contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]);\n }\n\n // Http version line with status code indicates the start of sub request's response.\n // Example: HTTP/1.1 202 Accepted\n if (responseLine.startsWith(HTTP_VERSION_1_1)) {\n subRespHeaderStartFound = true;\n\n let tokens = responseLine.split(SPACE_DELIMITER);\n deserializedSubResponse.status = parseInt(tokens[1]);\n deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER);\n }\n\n continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: *\n }\n\n if (responseLine.trim() === \"\") {\n // Sub response's header start line already found, and the first empty line indicates header end line found.\n if (!subRespHeaderEndFound) {\n subRespHeaderEndFound = true;\n }\n\n continue; // Skip empty line\n }\n\n // Note: when code reach here, it indicates subRespHeaderStartFound == true\n if (!subRespHeaderEndFound) {\n if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) {\n // Defensive coding to prevent from missing valuable lines.\n throw new Error(\n `Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`\n );\n }\n\n // Parse headers of sub response.\n let tokens = responseLine.split(HTTP_HEADER_DELIMITER);\n deserializedSubResponse.headers.set(tokens[0], tokens[1]);\n if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) {\n deserializedSubResponse.errorCode = tokens[1];\n subRespFailed = true;\n }\n } else {\n // Assemble body of sub response.\n if (!deserializedSubResponse.bodyAsText) {\n deserializedSubResponse.bodyAsText = \"\";\n }\n\n deserializedSubResponse.bodyAsText += responseLine;\n }\n } // Inner for end\n\n if (contentId != NOT_FOUND) {\n deserializedSubResponse._request = this.subRequests.get(contentId)!;\n }\n\n if (subRespFailed) {\n subResponsesFailedCount++;\n } else {\n subResponsesSucceededCount++;\n }\n }\n\n return {\n subResponses: deserializedSubResponses,\n subResponsesSucceededCount: subResponsesSucceededCount,\n subResponsesFailedCount: subResponsesFailedCount\n };\n }\n}\n","enum MutexLockStatus {\n LOCKED,\n UNLOCKED\n}\n\ntype Callback = (...args: any[]) => any;\n\n/**\n * An async mutex lock.\n *\n * @export\n * @class Mutex\n */\nexport class Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @static\n * @param {string} key lock key\n * @returns {Promise}\n * @memberof Mutex\n */\n public static async lock(key: string): Promise {\n return new Promise((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n } else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n\n /**\n * Unlock a key.\n *\n * @static\n * @param {string} key\n * @returns {Promise}\n * @memberof Mutex\n */\n public static async unlock(key: string): Promise {\n return new Promise((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n\n private static keys: { [key: string]: MutexLockStatus } = {};\n private static listeners: { [key: string]: Callback[] } = {};\n\n private static onUnlockEvent(key: string, handler: Callback) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n } else {\n this.listeners[key].push(handler);\n }\n }\n\n private static emitUnlockEvent(key: string) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler!.call(this);\n });\n }\n }\n}\n","import {\n BaseRequestPolicy,\n deserializationPolicy,\n generateUuid,\n HttpHeaders,\n HttpOperationResponse,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptions,\n WebResource,\n TokenCredential,\n isTokenCredential,\n bearerTokenAuthenticationPolicy,\n isNode\n} from \"@azure/core-http\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { BlobClient, BlobDeleteOptions, BlobSetTierOptions } from \"./Clients\";\nimport { AccessTier } from \"./generatedModels\";\nimport { Mutex } from \"./utils/Mutex\";\nimport { Pipeline } from \"./Pipeline\";\nimport { getURLPath, getURLPathAndQuery, iEqual } from \"./utils/utils.common\";\nimport {\n HeaderConstants,\n BATCH_MAX_REQUEST,\n HTTP_VERSION_1_1,\n HTTP_LINE_ENDING,\n StorageOAuthScopes\n} from \"./utils/constants\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { createSpan } from \"./utils/tracing\";\n\n/**\n * A request associated with a batch operation.\n */\nexport interface BatchSubRequest {\n /**\n * The URL of the resource to request operation.\n *\n * @type {string}\n * @memberof BatchSubRequest\n */\n url: string;\n\n /**\n * The credential used for sub request.\n * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service.\n * You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n *\n * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential}\n * @memberof BatchSubRequest\n */\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n}\n\n/**\n * A BlobBatch represents an aggregated set of operations on blobs.\n * Currently, only `delete` and `setAccessTier` are supported.\n *\n * @export\n * @class BlobBatch\n */\nexport class BlobBatch {\n private batchRequest: InnerBatchRequest;\n private readonly batch: string = \"batch\";\n private batchType: \"delete\" | \"setAccessTier\" | undefined;\n\n constructor() {\n this.batchRequest = new InnerBatchRequest();\n }\n\n /**\n * Get the value of Content-Type for a batch request.\n * The value must be multipart/mixed with a batch boundary.\n * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252\n */\n public getMultiPartContentType(): string {\n return this.batchRequest.getMultipartContentType();\n }\n\n /**\n * Get assembled HTTP request body for sub requests.\n */\n public getHttpRequestBody(): string {\n return this.batchRequest.getHttpRequestBody();\n }\n\n /**\n * Get sub requests that are added into the batch request.\n */\n public getSubRequests(): Map {\n return this.batchRequest.getSubRequests();\n }\n\n private async addSubRequestInternal(\n subRequest: BatchSubRequest,\n assembleSubRequestFunc: () => Promise\n ): Promise {\n await Mutex.lock(this.batch);\n\n try {\n this.batchRequest.preAddSubRequest(subRequest);\n await assembleSubRequestFunc();\n this.batchRequest.postAddSubRequest(subRequest);\n } finally {\n await Mutex.unlock(this.batch);\n }\n }\n\n private setBatchType(batchType: \"delete\" | \"setAccessTier\"): void {\n if (!this.batchType) {\n this.batchType = batchType;\n }\n if (this.batchType !== batchType) {\n throw new RangeError(\n `BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`\n );\n }\n }\n\n /**\n * The deleteBlob operation marks the specified blob or snapshot for deletion.\n * The blob is later deleted during garbage collection.\n * Only one kind of operation is allowed per batch request.\n *\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string} url The url of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async deleteBlob(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: BlobDeleteOptions\n ): Promise;\n\n /**\n * The deleteBlob operation marks the specified blob or snapshot for deletion.\n * The blob is later deleted during garbage collection.\n * Only one kind of operation is allowed per batch request.\n *\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient} blobClient The BlobClient.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions): Promise;\n\n public async deleteBlob(\n urlOrBlobClient: string | BlobClient,\n credentialOrOptions:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | BlobDeleteOptions\n | undefined,\n options?: BlobDeleteOptions\n ): Promise {\n let url: string;\n let credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n if (\n typeof urlOrBlobClient === \"string\" &&\n ((isNode && credentialOrOptions instanceof StorageSharedKeyCredential) ||\n credentialOrOptions instanceof AnonymousCredential ||\n isTokenCredential(credentialOrOptions))\n ) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrOptions;\n } else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n options = credentialOrOptions as BlobDeleteOptions;\n } else {\n throw new RangeError(\n \"Invalid arguments. Either url and credential, or BlobClient need be provided.\"\n );\n }\n\n if (!options) {\n options = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BatchDeleteRequest-addSubRequest\",\n options.tracingOptions\n );\n\n try {\n this.setBatchType(\"delete\");\n await this.addSubRequestInternal(\n {\n url: url,\n credential: credential\n },\n async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The setBlobAccessTier operation sets the tier on a blob.\n * The operation is allowed on block blobs in a blob storage or general purpose v2 account.\n * Only one kind of operation is allowed per batch request.\n *\n * A block blob's tier determines Hot/Cool/Archive storage type.\n * This operation does not update the blob's ETag.\n * For detailed information about block blob level tiering\n * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).\n * The operation will be authenticated and authorized\n * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string} url The url of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async setBlobAccessTier(\n url: string,\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n /**\n * The setBlobAccessTier operation sets the tier on a blob.\n * The operation is allowed on block blobs in a blob storage or general purpose v2 account.\n * Only one kind of operation is allowed per batch request.\n *\n * A block blob's tier determines Hot/Cool/Archive storage type.\n * This operation does not update the blob's ETag.\n * For detailed information about block blob level tiering\n * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers).\n * The operation will be authenticated and authorized\n * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient} blobClient The BlobClient.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatch\n */\n public async setBlobAccessTier(\n blobClient: BlobClient,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n public async setBlobAccessTier(\n urlOrBlobClient: string | BlobClient,\n credentialOrTier:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | AccessTier,\n tierOrOptions?: AccessTier | BlobSetTierOptions,\n options?: BlobSetTierOptions\n ): Promise {\n let url: string;\n let credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n let tier: AccessTier;\n\n if (\n typeof urlOrBlobClient === \"string\" &&\n ((isNode && credentialOrTier instanceof StorageSharedKeyCredential) ||\n credentialOrTier instanceof AnonymousCredential ||\n isTokenCredential(credentialOrTier))\n ) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrTier as\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential;\n tier = tierOrOptions as AccessTier;\n } else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n tier = credentialOrTier as AccessTier;\n options = tierOrOptions as BlobSetTierOptions;\n } else {\n throw new RangeError(\n \"Invalid arguments. Either url and credential, or BlobClient need be provided.\"\n );\n }\n\n if (!options) {\n options = {};\n }\n\n const { span, spanOptions } = createSpan(\n \"BatchSetTierRequest-addSubRequest\",\n options.tracingOptions\n );\n\n try {\n this.setBatchType(\"setAccessTier\");\n await this.addSubRequestInternal(\n {\n url: url,\n credential: credential\n },\n async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(\n tier,\n {\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n }\n );\n }\n );\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n\n/**\n * Inner batch request class which is responsible for assembling and serializing sub requests.\n * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled.\n */\nclass InnerBatchRequest {\n private operationCount: number;\n private body: string;\n private subRequests: Map;\n private readonly boundary: string;\n private readonly subRequestPrefix: string;\n private readonly multipartContentType: string;\n private readonly batchRequestEnding: string;\n\n constructor() {\n this.operationCount = 0;\n this.body = \"\";\n\n let tempGuid = generateUuid();\n\n // batch_{batchid}\n this.boundary = `batch_${tempGuid}`;\n // --batch_{batchid}\n // Content-Type: application/http\n // Content-Transfer-Encoding: binary\n this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`;\n // multipart/mixed; boundary=batch_{batchid}\n this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`;\n // --batch_{batchid}--\n this.batchRequestEnding = `--${this.boundary}--`;\n\n this.subRequests = new Map();\n }\n\n /**\n * Create pipeline to assemble sub requests. The idea here is to use existing\n * credential and serialization/deserialization components, with additional policies to\n * filter unnecessary headers, assemble sub requests into request's body\n * and intercept request from going to wire.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n */\n public createPipeline(\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential\n ): Pipeline {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n let factories: RequestPolicyFactory[] = new Array(policyFactoryLength);\n\n factories[0] = deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n\n return new Pipeline(factories, {});\n }\n\n public appendSubRequestToBody(request: WebResource) {\n // Start to assemble sub request\n this.body += [\n this.subRequestPrefix, // sub request constant prefix\n `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID\n \"\", // empty line after sub request's content ID\n `${request.method.toString()} ${getURLPathAndQuery(\n request.url\n )} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method\n ].join(HTTP_LINE_ENDING);\n\n for (const header of request.headers.headersArray()) {\n this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;\n }\n\n this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line\n // No body to assemble for current batch request support\n // End to assemble sub request\n }\n\n public preAddSubRequest(subRequest: BatchSubRequest) {\n if (this.operationCount >= BATCH_MAX_REQUEST) {\n throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`);\n }\n\n // Fast fail if url for sub request is invalid\n const path = getURLPath(subRequest.url);\n if (!path || path == \"\") {\n throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`);\n }\n }\n\n public postAddSubRequest(subRequest: BatchSubRequest) {\n this.subRequests.set(this.operationCount, subRequest);\n this.operationCount++;\n }\n\n // Return the http request body with assembling the ending line to the sub request body.\n public getHttpRequestBody(): string {\n return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`;\n }\n\n public getMultipartContentType(): string {\n return this.multipartContentType;\n }\n\n public getSubRequests(): Map {\n return this.subRequests;\n }\n}\n\nclass BatchRequestAssemblePolicy extends BaseRequestPolicy {\n private batchRequest: InnerBatchRequest;\n private readonly dummyResponse: HttpOperationResponse = {\n request: new WebResource(),\n status: 200,\n headers: new HttpHeaders()\n };\n\n constructor(\n batchRequest: InnerBatchRequest,\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ) {\n super(nextPolicy, options);\n\n this.batchRequest = batchRequest;\n }\n\n public async sendRequest(request: WebResource): Promise {\n await this.batchRequest.appendSubRequestToBody(request);\n\n return this.dummyResponse; // Intercept request from going to wire\n }\n}\n\nclass BatchRequestAssemblePolicyFactory implements RequestPolicyFactory {\n private batchRequest: InnerBatchRequest;\n\n constructor(batchRequest: InnerBatchRequest) {\n this.batchRequest = batchRequest;\n }\n\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions\n ): BatchRequestAssemblePolicy {\n return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options);\n }\n}\n\nclass BatchHeaderFilterPolicy extends BaseRequestPolicy {\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n public async sendRequest(request: WebResource): Promise {\n let xMsHeaderName = \"\";\n\n for (const header of request.headers.headersArray()) {\n if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) {\n xMsHeaderName = header.name;\n }\n }\n\n if (xMsHeaderName !== \"\") {\n request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header.\n }\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n\nclass BatchHeaderFilterPolicyFactory implements RequestPolicyFactory {\n constructor() {}\n\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): BatchHeaderFilterPolicy {\n return new BatchHeaderFilterPolicy(nextPolicy, options);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport {\n AccessTier,\n ServiceSubmitBatchHeaders,\n ServiceSubmitBatchOptionalParamsModel,\n ServiceSubmitBatchResponseModel\n} from \"./generatedModels\";\nimport { ParsedBatchResponse } from \"./BatchResponse\";\nimport { BatchResponseParser } from \"./BatchResponseParser\";\nimport { utf8ByteLength } from \"./BatchUtils\";\nimport { BlobBatch } from \"./BlobBatch\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { createSpan } from \"./utils/tracing\";\nimport { HttpResponse, TokenCredential } from \"@azure/core-http\";\nimport { Service } from \"./generated/src/operations\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport { CommonOptions } from \"./StorageClient\";\nimport { BlobDeleteOptions, BlobClient, BlobSetTierOptions } from \"./Clients\";\nimport { StorageClientContext } from \"./generated/src/storageClientContext\";\nimport { Pipeline, StoragePipelineOptions, newPipeline } from \"./Pipeline\";\n\n/**\n * Options to configure the Service - Submit Batch Optional Params.\n *\n * @export\n * @interface BlobBatchSubmitBatchOptionalParams\n */\nexport interface BlobBatchSubmitBatchOptionalParams\n extends ServiceSubmitBatchOptionalParamsModel,\n CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof BlobBatchSubmitBatchOptionalParams\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Contains response data for blob batch operations.\n */\nexport declare type BlobBatchSubmitBatchResponse = ParsedBatchResponse &\n ServiceSubmitBatchHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceSubmitBatchHeaders;\n };\n };\n\n/**\n * Contains response data for the {@link deleteBlobs} operation.\n */\nexport declare type BlobBatchDeleteBlobsResponse = BlobBatchSubmitBatchResponse;\n\n/**\n * Contains response data for the {@link setBlobsAccessTier} operation.\n */\nexport declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchResponse;\n\n/**\n * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n */\nexport class BlobBatchClient {\n private _serviceContext: Service;\n\n /**\n * Creates an instance of BlobBatchClient.\n *\n * @param {string} url A url pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Options to configure the HTTP pipeline.\n * @memberof BlobBatchClient\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobBatchClient.\n *\n * @param {string} url A url pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobBatchClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n if (credentialOrPipeline instanceof Pipeline) {\n pipeline = credentialOrPipeline;\n } else if (!credentialOrPipeline) {\n // no credential provided\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n\n const storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions());\n\n this._serviceContext = new Service(storageClientContext);\n }\n\n /**\n * Creates a {@link BlobBatch}.\n * A BlobBatch represents an aggregated set of operations on blobs.\n */\n public createBatch(): BlobBatch {\n return new BlobBatch();\n }\n\n /**\n * Create multiple delete operations to mark the specified blobs or snapshots for deletion.\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operations will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string[]} urls The urls of the blob resources to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async deleteBlobs(\n urls: string[],\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: BlobDeleteOptions\n ): Promise;\n\n /**\n * Create multiple delete operations to mark the specified blobs or snapshots for deletion.\n * Note that in order to delete a blob, you must delete all of its snapshots.\n * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob).\n * The operation(subrequest) will be authenticated and authorized with specified credential.\n * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient[]} blobClients The BlobClients for the blobs to delete.\n * @param {BlobDeleteOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async deleteBlobs(\n blobClients: BlobClient[],\n options?: BlobDeleteOptions\n ): Promise;\n\n public async deleteBlobs(\n urlsOrBlobClients: string[] | BlobClient[],\n credentialOrOptions:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | BlobDeleteOptions\n | undefined,\n options?: BlobDeleteOptions\n ): Promise {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions as TokenCredential, options);\n } else {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions as BlobDeleteOptions);\n }\n }\n return this.submitBatch(batch);\n }\n\n /**\n * Create multiple set tier operations to set the tier on a blob.\n * The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).\n * The operation(subrequest) will be authenticated and authorized\n * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {string[]} urls The urls of the blob resource to delete.\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async setBlobsAccessTier(\n urls: string[],\n credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n /**\n * Create multiple set tier operations to set the tier on a blob.\n * The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier).\n * The operation(subrequest) will be authenticated and authorized\n * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization).\n *\n * @param {BlobClient[]} blobClients The BlobClients for the blobs which should have a new tier set.\n * @param {AccessTier} tier\n * @param {BlobSetTierOptions} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async setBlobsAccessTier(\n blobClients: BlobClient[],\n tier: AccessTier,\n options?: BlobSetTierOptions\n ): Promise;\n\n public async setBlobsAccessTier(\n urlsOrBlobClients: string[] | BlobClient[],\n credentialOrTier:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | AccessTier,\n tierOrOptions?: AccessTier | BlobSetTierOptions,\n options?: BlobSetTierOptions\n ): Promise {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.setBlobAccessTier(\n urlOrBlobClient,\n credentialOrTier as TokenCredential,\n tierOrOptions as AccessTier,\n options\n );\n } else {\n await batch.setBlobAccessTier(\n urlOrBlobClient,\n credentialOrTier as AccessTier,\n tierOrOptions as BlobSetTierOptions\n );\n }\n }\n return this.submitBatch(batch);\n }\n\n /**\n * Submit batch request which consists of multiple subrequests.\n *\n * Get `blobBatchClient` and other details before running the snippets.\n * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`\n *\n * Example usage:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.deleteBlob(urlInString0, credential0);\n * await batchRequest.deleteBlob(urlInString1, credential1, {\n * deleteSnapshots: \"include\"\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * Example using a lease:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.setBlobAccessTier(blockBlobClient0, \"Cool\");\n * await batchRequest.setBlobAccessTier(blockBlobClient1, \"Cool\", {\n * conditions: { leaseId: leaseId }\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @param {BlobBatch} batchRequest A set of Delete or SetTier operations.\n * @param {BlobBatchSubmitBatchOptionalParams} [options]\n * @returns {Promise}\n * @memberof BlobBatchClient\n */\n public async submitBatch(\n batchRequest: BlobBatch,\n options: BlobBatchSubmitBatchOptionalParams = {}\n ): Promise {\n if (!batchRequest || batchRequest.getSubRequests().size == 0) {\n throw new RangeError(\"Batch request should contain one or more sub requests.\");\n }\n\n const { span, spanOptions } = createSpan(\"BlobBatchClient-submitBatch\", options.tracingOptions);\n try {\n const batchRequestBody = batchRequest.getHttpRequestBody();\n\n const rawBatchResponse: ServiceSubmitBatchResponseModel = await this._serviceContext.submitBatch(\n batchRequestBody,\n utf8ByteLength(batchRequestBody),\n batchRequest.getMultiPartContentType(),\n {\n ...options,\n spanOptions\n }\n );\n\n // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202).\n const batchResponseParser = new BatchResponseParser(\n rawBatchResponse,\n batchRequest.getSubRequests()\n );\n const responseSummary = await batchResponseParser.parseBatchResponse();\n\n const res: BlobBatchSubmitBatchResponse = {\n _response: rawBatchResponse._response,\n contentType: rawBatchResponse.contentType,\n errorCode: rawBatchResponse.errorCode,\n requestId: rawBatchResponse.requestId,\n clientRequestId: rawBatchResponse.clientRequestId,\n version: rawBatchResponse.version,\n subResponses: responseSummary.subResponses,\n subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,\n subResponsesFailedCount: responseSummary.subResponsesFailedCount\n };\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport {\n TokenCredential,\n isTokenCredential,\n isNode,\n HttpResponse,\n getDefaultProxySettings\n} from \"@azure/core-http\";\nimport { CanonicalCode } from \"@opentelemetry/api\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n ServiceGetUserDelegationKeyHeaders,\n ContainerCreateResponse,\n ContainerDeleteResponse,\n ServiceGetPropertiesResponse,\n BlobServiceProperties,\n ServiceSetPropertiesResponse,\n ServiceGetStatisticsResponse,\n ServiceGetAccountInfoResponse,\n ServiceListContainersSegmentResponse,\n ContainerItem,\n ListContainersIncludeType,\n UserDelegationKeyModel,\n ServiceFindBlobsByTagsSegmentResponse,\n FilterBlobItem,\n ContainerUndeleteResponse\n} from \"./generatedModels\";\nimport { Container, Service } from \"./generated/src/operations\";\nimport { newPipeline, StoragePipelineOptions, Pipeline } from \"./Pipeline\";\nimport { ContainerClient, ContainerCreateOptions, ContainerDeleteMethodOptions } from \"./Clients\";\nimport { appendToURLPath, extractConnectionStringParts } from \"./utils/utils.common\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential\";\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\nimport { createSpan } from \"./utils/tracing\";\nimport { BlobBatchClient } from \"./BlobBatchClient\";\nimport { CommonOptions, StorageClient } from \"./StorageClient\";\n\n/**\n * Options to configure the {@link BlobServiceClient.getProperties} operation.\n *\n * @export\n * @interface ServiceGetPropertiesOptions\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.setProperties} operation.\n *\n * @export\n * @interface ServiceSetPropertiesOptions\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceSetPropertiesOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.getAccountInfo} operation.\n *\n * @export\n * @interface ServiceGetAccountInfoOptions\n */\nexport interface ServiceGetAccountInfoOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetAccountInfoOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.getStatistics} operation.\n *\n * @export\n * @interface ServiceGetStatisticsOptions\n */\nexport interface ServiceGetStatisticsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetStatisticsOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the Service - Get User Delegation Key.\n *\n * @export\n * @interface ServiceGetUserDelegationKeyOptions\n */\nexport interface ServiceGetUserDelegationKeyOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceGetStatisticsOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainerSegment} operation.\n *\n * @interface ServiceListContainersSegmentOptions\n */\ninterface ServiceListContainersSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of containers\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the container's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: ListContainersIncludeType | ListContainersIncludeType[];\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTagsSegment} operation.\n *\n * @interface ServiceFindBlobsByTagsSegmentOptions\n */\ninterface ServiceFindBlobsByTagsSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceFindBlobsByTagsSegmentOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Specifies the maximum number of blobs\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n * @type {number}\n * @memberof ServiceFindBlobsByTagsSegmentOptions\n */\n maxPageSize?: number;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.listContainers} operation.\n *\n * @export\n * @interface ServiceListContainersOptions\n */\nexport interface ServiceListContainersOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only containers\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the container's metadata\n * should be returned as part of the response body.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted containers should be included in the response.\n *\n * @type {boolean}\n * @memberof ServiceListContainersOptions\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation.\n *\n * @export\n * @interface ServiceFindBlobByTagsOptions\n */\nexport interface ServiceFindBlobByTagsOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceListContainersOptions\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * A user delegation key.\n */\nexport interface UserDelegationKey {\n /**\n * The Azure Active Directory object ID in GUID format.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedObjectId: string;\n /**\n * The Azure Active Directory tenant ID in GUID format.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedTenantId: string;\n /**\n * The date-time the key is active.\n *\n * @type {Date}\n * @memberof UserDelegationKey\n */\n signedStartsOn: Date;\n /**\n * The date-time the key expires.\n *\n * @type {Date}\n * @memberof UserDelegationKey\n */\n signedExpiresOn: Date;\n /**\n * Abbreviation of the Azure Storage service that accepts the key.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedService: string;\n /**\n * The service version that created the key.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n signedVersion: string;\n /**\n * The key as a base64 string.\n *\n * @type {string}\n * @memberof UserDelegationKey\n */\n value: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = UserDelegationKey &\n ServiceGetUserDelegationKeyHeaders & {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: ServiceGetUserDelegationKeyHeaders;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: UserDelegationKeyModel;\n };\n };\n\n/**\n * Options to configure {@link BlobServiceClient.undeleteContainer} operation.\n *\n * @export\n * @interface ServiceUndeleteContainerOptions\n */\nexport interface ServiceUndeleteContainerOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n *\n * @type {AbortSignalLike}\n * @memberof ServiceUndeleteContainerOptions\n */\n abortSignal?: AbortSignalLike;\n /**\n * Optional. Specifies the new name of the restored container.\n * Will use its original name if this is not specified.\n *\n * @type {string}\n * @memberof ServiceUndeleteContainerOptions\n */\n destinationContainerName?: string;\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n *\n * @export\n * @class BlobServiceClient\n */\nexport class BlobServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n *\n * @private\n * @type {Service}\n * @memberof BlobServiceClient\n */\n private serviceContext: Service;\n\n /**\n *\n * Creates an instance of BlobServiceClient from connection string.\n *\n * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobServiceClient\n */\n public static fromConnectionString(connectionString: string, options?: StoragePipelineOptions) {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey\n );\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n }\n\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline.\n * @memberof BlobServiceClient\n *\n * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```js\n * const account = \"\";\n *\n * const defaultAzureCredential = new DefaultAzureCredential();\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * defaultAzureCredential\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```js\n * const account = \"\"\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, \"\");\n *\n * const blobServiceClient = new BlobServiceClient(\n * `https://${account}.blob.core.windows.net`,\n * sharedKeyCredential\n * );\n * ```\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n options?: StoragePipelineOptions\n );\n /**\n * Creates an instance of BlobServiceClient.\n *\n * @param {string} url A Client string pointing to Azure Storage blob service, such as\n * \"https://myaccount.blob.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.blob.core.windows.net?sasString\".\n * @param {Pipeline} pipeline Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @memberof BlobServiceClient\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n options?: StoragePipelineOptions\n ) {\n let pipeline: Pipeline;\n if (credentialOrPipeline instanceof Pipeline) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = new Service(this.storageClientContext);\n }\n\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param {string} containerName A container name\n * @returns {ContainerClient} A new ContainerClient object for the given container name.\n * @memberof BlobServiceClient\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * ```\n */\n public getContainerClient(containerName: string): ContainerClient {\n return new ContainerClient(\n appendToURLPath(this.url, encodeURIComponent(containerName)),\n this.pipeline\n );\n }\n\n /**\n * Create a Blob container.\n *\n * @param {string} containerName Name of the container to create.\n * @param {ContainerCreateOptions} [options] Options to configure Container Create operation.\n * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client.\n * @memberof BlobServiceClient\n */\n public async createContainer(\n containerName: string,\n options: ContainerCreateOptions = {}\n ): Promise<{\n containerClient: ContainerClient;\n containerCreateResponse: ContainerCreateResponse;\n }> {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-createContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return {\n containerClient,\n containerCreateResponse\n };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes a Blob container.\n *\n * @param {string} containerName Name of the container to delete.\n * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation.\n * @returns {Promise} Container deletion response.\n * @memberof BlobServiceClient\n */\n public async deleteContainer(\n containerName: string,\n options: ContainerDeleteMethodOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-deleteContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(containerName);\n return await containerClient.delete({\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param {string} deletedContainerName Name of the previously deleted container.\n * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container.\n * @returns {Promise} Container deletion response.\n * @memberof BlobServiceClient\n */\n public async undeleteContainer(\n deletedContainerName: string,\n deletedContainerVersion: string,\n options: ServiceUndeleteContainerOptions = {}\n ): Promise<{\n containerClient: ContainerClient;\n containerUndeleteResponse: ContainerUndeleteResponse;\n }> {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-undeleteContainer\",\n options.tracingOptions\n );\n try {\n const containerClient = this.getContainerClient(\n options.destinationContainerName || deletedContainerName\n );\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerUndeleteResponse = await containerContext.restore({\n deletedContainerName,\n deletedContainerVersion,\n ...options,\n tracingOptions: { ...options!.tracingOptions, spanOptions }\n });\n return { containerClient, containerUndeleteResponse };\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation.\n * @returns {Promise} Response data for the Service Get Properties operation.\n * @memberof BlobServiceClient\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getProperties\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getProperties({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties}\n *\n * @param {BlobServiceProperties} properties\n * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation.\n * @returns {Promise} Response data for the Service Set Properties operation.\n * @memberof BlobServiceClient\n */\n public async setProperties(\n properties: BlobServiceProperties,\n options: ServiceSetPropertiesOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-setProperties\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.setProperties(properties, {\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats}\n *\n * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation.\n * @returns {Promise} Response data for the Service Get Statistics operation.\n * @memberof BlobServiceClient\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getStatistics\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getStatistics({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information\n *\n * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation.\n * @returns {Promise} Response data for the Service Get Account Info operation.\n * @memberof BlobServiceClient\n */\n public async getAccountInfo(\n options: ServiceGetAccountInfoOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getAccountInfo\",\n options.tracingOptions\n );\n try {\n return await this.serviceContext.getAccountInfo({\n abortSignal: options.abortSignal,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns a list of the containers under the specified account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param {string} [marker] A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation.\n * @returns {Promise} Response data for the Service List Container Segment operation.\n * @memberof BlobServiceClient\n */\n private async listContainersSegment(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-listContainersSegment\",\n options.tracingOptions\n );\n\n try {\n return await this.serviceContext.listContainersSegment({\n abortSignal: options.abortSignal,\n marker,\n ...options,\n include: typeof options.include === \"string\" ? [options.include] : options.include,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags.\n * @returns {Promise}\n * @memberof BlobServiceClient\n */\n private async findBlobsByTagsSegment(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): Promise {\n // TODO: Rename response.blobs to response.blobItems?\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-findBlobsByTagsSegment\",\n options.tracingOptions\n );\n\n try {\n return await this.serviceContext.filterBlobs({\n abortSignal: options.abortSignal,\n where: tagFilterSqlExpression,\n marker,\n maxPageSize: options.maxPageSize,\n spanOptions\n });\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {string} [marker] A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *findBlobsByTagsSegments(\n tagFilterSqlExpression: string,\n marker?: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): AsyncIterableIterator {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options);\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield response;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @private\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *findBlobsByTagsItems(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobsByTagsSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const segment of this.findBlobsByTagsSegments(\n tagFilterSqlExpression,\n marker,\n options\n )) {\n yield* segment.blobs;\n }\n }\n\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags.\n * @returns {PagedAsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n public findBlobsByTags(\n tagFilterSqlExpression: string,\n options: ServiceFindBlobByTagsOptions = {}\n ): PagedAsyncIterableIterator {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions: ServiceFindBlobsByTagsSegmentOptions = {\n ...options\n };\n\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions\n });\n }\n };\n }\n\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @private\n * @param {string} [marker] A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListContainersSegmentOptions = {}\n ): AsyncIterableIterator {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = await this.listContainersSegment(marker, options);\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield await listContainersSegmentResponse;\n } while (marker);\n }\n }\n\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @private\n * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation.\n * @returns {AsyncIterableIterator}\n * @memberof BlobServiceClient\n */\n private async *listItems(\n options: ServiceListContainersSegmentOptions = {}\n ): AsyncIterableIterator {\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n yield* segment.containerItems;\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.listContainers();\n * let containerItem = await iter.next();\n * while (!containerItem.done) {\n * console.log(`Container ${i++}: ${containerItem.value.name}`);\n * containerItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param {ServiceListContainersOptions} [options={}] Options to list containers.\n * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging.\n * @memberof BlobServiceClient\n */\n public listContainers(\n options: ServiceListContainersOptions = {}\n ): PagedAsyncIterableIterator {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListContainersIncludeType[] = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions: ServiceListContainersSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include } : {})\n };\n\n const iter = this.listItems(listSegmentOptions);\n return {\n /**\n * @member {Promise} [next] The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * @member {Symbol} [asyncIterator] The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * @member {Function} [byPage] Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...listSegmentOptions\n });\n }\n };\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key\n *\n * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time\n * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time\n * @returns {Promise}\n * @memberof BlobServiceClient\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {}\n ): Promise {\n const { span, spanOptions } = createSpan(\n \"BlobServiceClient-getUserDelegationKey\",\n options.tracingOptions\n );\n try {\n const response = await this.serviceContext.getUserDelegationKey(\n {\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false)\n },\n {\n abortSignal: options.abortSignal,\n spanOptions\n }\n );\n\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\n signedService: response.signedService,\n signedVersion: response.signedVersion,\n value: response.value\n };\n\n const res: ServiceGetUserDelegationKeyResponse = {\n _response: response._response,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n version: response.version,\n date: response.date,\n errorCode: response.errorCode,\n ...userDelegationKey\n };\n\n return res;\n } catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns {BlobBatchClient} A new BlobBatchClient object for this service.\n * @memberof BlobServiceClient\n */\n public getBlobBatchClient(): BlobBatchClient {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASPermissions\n */\nexport class AccountSASPermissions {\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @static\n * @param {string} permissions\n * @returns {AccountSASPermissions}\n * @memberof AccountSASPermissions\n */\n public static parse(permissions: string): AccountSASPermissions {\n const accountSASPermissions = new AccountSASPermissions();\n\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n\n return accountSASPermissions;\n }\n\n /**\n * Permission to read resources and list queues and tables granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Permission to write resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Permission to delete versions granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public list: boolean = false;\n\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Permission to create blobs and files granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Permissions to update messages and table entities granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public update: boolean = false;\n\n /**\n * Permission to get and delete messages granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public process: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Permission to filter blobs.\n *\n * @type {boolean}\n * @memberof AccountSASPermissions\n */\n public filter: boolean = false;\n\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @returns {string}\n * @memberof AccountSASPermissions\n */\n public toString(): string {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n return permissions.join(\"\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASResourceTypes\n */\nexport class AccountSASResourceTypes {\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @static\n * @param {string} resourceTypes\n * @returns {AccountSASResourceTypes}\n * @memberof AccountSASResourceTypes\n */\n public static parse(resourceTypes: string): AccountSASResourceTypes {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n\n return accountSASResourceTypes;\n }\n\n /**\n * Permission to access service level APIs granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public service: boolean = false;\n\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public container: boolean = false;\n\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n *\n * @type {boolean}\n * @memberof AccountSASResourceTypes\n */\n public object: boolean = false;\n\n /**\n * Converts the given resource types to a string.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @returns {string}\n * @memberof AccountSASResourceTypes\n */\n public toString(): string {\n const resourceTypes: string[] = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n *\n * @export\n * @class AccountSASServices\n */\nexport class AccountSASServices {\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @static\n * @param {string} services\n * @returns {AccountSASServices}\n * @memberof AccountSASServices\n */\n public static parse(services: string): AccountSASServices {\n const accountSASServices = new AccountSASServices();\n\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n\n return accountSASServices;\n }\n\n /**\n * Permission to access blob resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public blob: boolean = false;\n\n /**\n * Permission to access file resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public file: boolean = false;\n\n /**\n * Permission to access queue resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public queue: boolean = false;\n\n /**\n * Permission to access table resources granted.\n *\n * @type {boolean}\n * @memberof AccountSASServices\n */\n public table: boolean = false;\n\n /**\n * Converts the given services to a string.\n *\n * @returns {string}\n * @memberof AccountSASServices\n */\n public toString(): string {\n const services: string[] = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * Allowed IP range for a SAS.\n *\n * @export\n * @interface SasIPRange\n */\nexport interface SasIPRange {\n /**\n * Starting IP address in the IP range.\n * If end IP doesn't provide, start IP will the only IP allowed.\n *\n * @type {string}\n * @memberof SasIPRange\n */\n start: string;\n /**\n * Optional. IP address that ends the IP range.\n * If not provided, start IP will the only IP allowed.\n *\n * @type {string}\n * @memberof SasIPRange\n */\n end?: string;\n}\n\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @export\n * @param {SasIPRange} ipRange\n * @returns {string}\n */\nexport function ipRangeToString(ipRange: SasIPRange): string {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * Protocols for generated SAS.\n *\n * @export\n * @enum {number}\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\"\n}\n\n/**\n * Options to construct {@link SASQueryParameters}.\n *\n * @export\n * @interface SASQueryParametersOptions\n */\nexport interface SASQueryParametersOptions {\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n permissions?: string;\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n services?: string;\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n resourceTypes?: string;\n /**\n * Optional. The allowed HTTP protocol(s).\n *\n * @type {SASProtocol}\n * @memberof SASQueryParametersOptions\n */\n protocol?: SASProtocol;\n /**\n * Optional. The start time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParametersOptions\n */\n startsOn?: Date;\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParametersOptions\n */\n expiresOn?: Date;\n /**\n * Optional. IP ranges allowed in this SAS.\n *\n * @type {SasIPRange}\n * @memberof SASQueryParametersOptions\n */\n ipRange?: SasIPRange;\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n identifier?: string;\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n resource?: string;\n /**\n * Value for cache-control header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n cacheControl?: string;\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentDisposition?: string;\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentEncoding?: string;\n /**\n * Value for content-length header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentLanguage?: string;\n /**\n * Value for content-type header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n contentType?: string;\n /**\n * User delegation key properties.\n *\n * @type {UserDelegationKey}\n * @memberof SASQueryParametersOptions\n */\n userDelegationKey?: UserDelegationKey;\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n preauthorizedAgentObjectId?: string;\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParametersOptions\n */\n correlationId?: string;\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n *\n * @export\n * @class SASQueryParameters\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n *\n * @type {SASProtocol}\n * @memberof SASQueryParameters\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParameters\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n *\n * @type {Date}\n * @memberof SASQueryParameters\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly identifier?: string;\n\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n *\n * @private\n * @type {SasIPRange}\n * @memberof SASQueryParameters\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * The Azure Active Directory object ID in GUID format.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedOid?: string;\n\n /**\n * The Azure Active Directory tenant ID in GUID format.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedTenantId?: string;\n\n /**\n * The date-time the key is active.\n * Property of user delegation key.\n *\n * @private\n * @type {Date}\n * @memberof SASQueryParameters\n */\n private readonly signedStartsOn?: Date;\n\n /**\n * The date-time the key expires.\n * Property of user delegation key.\n *\n * @private\n * @type {Date}\n * @memberof SASQueryParameters\n */\n private readonly signedExpiresOn?: Date;\n\n /**\n * Abbreviation of the Azure Storage service that accepts the user delegation key.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedService?: string;\n\n /**\n * The service version that created the user delegation key.\n * Property of user delegation key.\n *\n * @private\n * @type {string}\n * @memberof SASQueryParameters\n */\n private readonly signedVersion?: string;\n\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly preauthorizedAgentObjectId?: string;\n\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof SASQueryParameters\n */\n public readonly correlationId?: string;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n * @type {(SasIPRange | undefined)}\n * @memberof SASQueryParameters\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param {string} version Representing the storage version\n * @param {string} signature Representing the signature for the SAS token\n * @param {string} [permissions] Representing the storage permissions\n * @param {string} [services] Representing the storage services being accessed (only for Account SAS)\n * @param {string} [resourceTypes] Representing the storage resource types being accessed (only for Account SAS)\n * @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s)\n * @param {Date} [startsOn] Representing the start time for this SAS token\n * @param {Date} [expiresOn] Representing the expiry time for this SAS token\n * @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token\n * @param {string} [identifier] Representing the signed identifier (only for Service SAS)\n * @param {string} [resource] Representing the storage container or blob (only for Service SAS)\n * @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS)\n * @param {string} [contentDisposition] Representing the content-disposition header (only for Blob/File Service SAS)\n * @param {string} [contentEncoding] Representing the content-encoding header (only for Blob/File Service SAS)\n * @param {string} [contentLanguage] Representing the content-language header (only for Blob/File Service SAS)\n * @param {string} [contentType] Representing the content-type header (only for Blob/File Service SAS)\n * @param {userDelegationKey} [userDelegationKey] Representing the user delegation key properties\n * @param {string} [preauthorizedAgentObjectId] Representing the authorized AAD Object ID (only for User Delegation SAS)\n * @param {string} [correlationId] Representing the correlation ID (only for User Delegation SAS)\n * @memberof SASQueryParameters\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string\n );\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param {string} version Representing the storage version\n * @param {string} signature Representing the signature for the SAS token\n * @param {SASQueryParametersOptions} [options] Optional. Options to construct the SASQueryParameters.\n * @memberof SASQueryParameters\n */\n constructor(version: string, signature: string, options?: SASQueryParametersOptions);\n\n constructor(\n version: string,\n signature: string,\n permissionsOrOptions?: string | SASQueryParametersOptions,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string\n ) {\n this.version = version;\n this.signature = signature;\n\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n } else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n * @returns {string}\n * @memberof SASQueryParameters\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"skoid\", // Signed object ID\n \"sktid\", // Signed tenant ID\n \"skt\", // Signed key start time\n \"ske\", // Signed key expiry time\n \"sks\", // Signed key service\n \"skv\", // Signed key version\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\"\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined\n );\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined\n );\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @private\n * @param {string[]} queries\n * @param {string} key\n * @param {string} [value]\n * @returns {void}\n * @memberof SASQueryParameters\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation\n * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters}\n * exist because the former is mutable and a logical representation while the latter is immutable and used to generate\n * actual REST requests.\n *\n * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n *\n * @export\n * @class AccountSASSignatureValues\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the library.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n *\n * @type {SASProtocol}\n * @memberof AccountSASSignatureValues\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n *\n * @type {Date}\n * @memberof AccountSASSignatureValues\n */\n startsOn?: Date;\n\n /**\n * The time after which the SAS will no longer work.\n *\n * @type {Date}\n * @memberof AccountSASSignatureValues\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n *\n * @type {AccountSASPermissions}\n * @memberof AccountSASSignatureValues\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n *\n * @type {SasIPRange}\n * @memberof AccountSASSignatureValues\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n *\n * @type {string}\n * @memberof AccountSASSignatureValues\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param {AccountSASSignatureValues} accountSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n * @memberof AccountSASSignatureValues\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n\n if (\n accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString()\n );\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes\n ).toString();\n\n const stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\" // Account SAS requires an additional newline character\n ].join(\"\\n\");\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n parsedPermissions.toString(),\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange\n );\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class BlobSASPermissions\n */\nexport class BlobSASPermissions {\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @static\n * @param {string} permissions\n * @returns {BlobSASPermissions}\n * @memberof BlobSASPermissions\n */\n public static parse(permissions: string): BlobSASPermissions {\n const blobSASPermissions = new BlobSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return blobSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n *\n * @type {boolean}\n * @memberof BlobSASPermissions\n */\n public execute: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns {string} A string which represents the BlobSASPermissions\n * @memberof BlobSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n return permissions.join(\"\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n *\n * @export\n * @class ContainerSASPermissions\n */\nexport class ContainerSASPermissions {\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @static\n * @param {string} permissions\n * @returns {ContainerSASPermissions}\n * @memberof ContainerSASPermissions\n */\n public static parse(permissions: string) {\n const containerSASPermissions = new ContainerSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return containerSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specifies List access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public list: boolean = false;\n\n /**\n * Specfies Tag access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n *\n * @type {boolean}\n * @memberof ContainerSASPermissions\n */\n public execute: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @returns {string}\n * @memberof ContainerSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n return permissions.join(\"\");\n }\n}\n","import { createHmac } from \"crypto\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas\n *\n * @export\n * @class UserDelegationKeyCredential\n */\nexport class UserDelegationKeyCredential {\n /**\n * Azure Storage account name; readonly.\n *\n * @type {string}\n * @memberof UserDelegationKeyCredential\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage user delegation key; readonly.\n *\n * @type {UserDelegationKey}\n * @memberof UserDelegationKeyCredential\n */\n public readonly userDelegationKey: UserDelegationKey;\n\n /**\n * Key value in Buffer type.\n *\n * @private\n * @type {Buffer}\n * @memberof UserDelegationKeyCredential\n */\n private readonly key: Buffer;\n\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param {string} accountName\n * @param {UserDelegationKey} userDelegationKey\n * @memberof UserDelegationKeyCredential\n */\n constructor(accountName: string, userDelegationKey: UserDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param {string} stringToSign\n * @returns {string}\n * @memberof UserDelegationKeyCredential\n */\n public computeHMACSHA256(stringToSign: string): string {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n\n return createHmac(\"sha256\", this.key)\n .update(stringToSign, \"utf8\")\n .digest(\"base64\");\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\nimport { BlobSASPermissions } from \"./BlobSASPermissions\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\nimport { ContainerSASPermissions } from \"./ContainerSASPermissions\";\nimport { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential\";\nimport { UserDelegationKeyCredential } from \"../credentials/UserDelegationKeyCredential\";\nimport { ipRangeToString, SasIPRange } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"../utils/constants\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs.\n *\n * @export\n * @class BlobSASSignatureValues\n */\nexport interface BlobSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n *\n * @type {SASProtocol}\n * @memberof BlobSASSignatureValues\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n *\n * @type {Date}\n * @memberof BlobSASSignatureValues\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n *\n * @type {Date}\n * @memberof BlobSASSignatureValues\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n *\n * @type {BlobSASPermissions | ContainerSASPermissions}\n * @memberof BlobSASSignatureValues\n */\n permissions?: BlobSASPermissions | ContainerSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n *\n * @type {SasIPRange}\n * @memberof BlobSASSignatureValues\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the container the SAS user may access.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n containerName: string;\n\n /**\n * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n blobName?: string;\n\n /**\n * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n snapshotTime?: string;\n\n /**\n * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n versionId?: string;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n identifier?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n contentType?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user\n * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will\n * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission\n * check for the user specified in this value will be performed. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n preauthorizedAgentObjectId?: string;\n\n /**\n * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to\n * correlate SAS generation with storage resource access. This is only used for User Delegation SAS.\n *\n * @type {string}\n * @memberof BlobSASSignatureValues\n */\n correlationId?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * Fill in the required details before running the following snippets.\n *\n * Example usage:\n *\n * ```js\n * // Generate service level SAS for a container\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using an identifier:\n *\n * ```js\n * // Generate service level SAS for a container with identifier\n * // startsOn & permissions are optional when identifier is provided\n * const identifier = \"unique-id\";\n * await containerClient.setAccessPolicy(undefined, [\n * {\n * accessPolicy: {\n * expiresOn: new Date(new Date().valueOf() + 86400), // Date type\n * permissions: ContainerSASPermissions.parse(\"racwdl\").toString(),\n * startsOn: new Date() // Date type\n * },\n * id: identifier\n * }\n * ]);\n *\n * const containerSAS = generateBlobSASQueryParameters(\n * {\n * containerName, // Required\n * identifier // Required\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * Example using a blob name:\n *\n * ```js\n * // Generate service level SAS for a blob\n * const blobSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * blobName, // Required\n * permissions: BlobSASPermissions.parse(\"racwd\"), // Required\n * startsOn: new Date(), // Optional\n * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type\n * cacheControl: \"cache-control-override\", // Optional\n * contentDisposition: \"content-disposition-override\", // Optional\n * contentEncoding: \"content-encoding-override\", // Optional\n * contentLanguage: \"content-language-override\", // Optional\n * contentType: \"content-type-override\", // Optional\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2016-05-31\" // Optional\n * },\n * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)`\n * ).toString();\n * ```\n *\n * @export\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters;\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required.\n *\n * Example usage:\n *\n * ```js\n * // Generate user delegation SAS for a container\n * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const containerSAS = generateBlobSASQueryParameters({\n * containerName, // Required\n * permissions: ContainerSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Optional. Date type\n * expiresOn, // Required. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\" // Must >= 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName\n * ).toString();\n * ```\n *\n * @export\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKey} userDelegationKey Return value of `blobServiceClient.getUserDelegationKey()`\n * @param {string} accountName\n * @returns {SASQueryParameters}\n */\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKey: UserDelegationKey,\n accountName: string\n): SASQueryParameters;\n\nexport function generateBlobSASQueryParameters(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string\n): SASQueryParameters {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n\n const sharedKeyCredential =\n sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential: UserDelegationKeyCredential | undefined;\n\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(\n accountName,\n sharedKeyCredentialOrUserDelegationKey as UserDelegationKey\n );\n }\n\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n } else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues,\n userDelegationKeyCredential!\n );\n } else {\n return generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues,\n userDelegationKeyCredential!\n );\n }\n }\n }\n\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n } else {\n throw new RangeError(\n \"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\"\n );\n }\n }\n\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParameters20150405(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !blobSASSignatureValues.permissions &&\n !blobSASSignatureValues.expiresOn\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\"\n );\n }\n\n let resource: string = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\"\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {StorageSharedKeyCredential} sharedKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParameters20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n if (\n !blobSASSignatureValues.identifier &&\n !blobSASSignatureValues.permissions &&\n !blobSASSignatureValues.expiresOn\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\"\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKeyCredential} userDelegationKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParametersUDK20181109(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey\n );\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param {BlobSASSignatureValues} blobSASSignatureValues\n * @param {UserDelegationKeyCredential} userDelegationKeyCredential\n * @returns {SASQueryParameters}\n */\nfunction generateBlobSASQueryParametersUDK20200210(\n blobSASSignatureValues: BlobSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential\n): SASQueryParameters {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\"\n );\n }\n\n let resource: string = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n } else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions: string | undefined;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ContainerSASPermissions.parse(\n blobSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n userDelegationKeyCredential.accountName,\n blobSASSignatureValues.containerName,\n blobSASSignatureValues.blobName\n ),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined, // agentObjectId\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(\n blobSASSignatureValues.version!,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n blobSASSignatureValues.protocol,\n blobSASSignatureValues.startsOn,\n blobSASSignatureValues.expiresOn,\n blobSASSignatureValues.ipRange,\n blobSASSignatureValues.identifier,\n resource,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n userDelegationKeyCredential.userDelegationKey,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n blobSASSignatureValues.correlationId\n );\n}\n\nfunction getCanonicalName(accountName: string, containerName: string, blobName?: string): string {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements: string[] = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\n\nfunction SASSignatureValuesSanityCheckAndAutofill(\n blobSASSignatureValues: BlobSASSignatureValues\n): BlobSASSignatureValues {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\"\n ) {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n\n if (\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\"\n ) {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)\n ) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n\n if (\n version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)\n ) {\n throw RangeError(\n \"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\"\n );\n }\n\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n"],"names":["coreHttp.QueryCollectionFormat","coreHttp.Serializer","Parameters.url","Parameters.timeoutInSeconds","Parameters.restype0","Parameters.comp0","Parameters.version","Parameters.requestId","Mappers.BlobServiceProperties","Mappers.ServiceSetPropertiesHeaders","Mappers.StorageError","Mappers.ServiceGetPropertiesHeaders","Parameters.comp1","Mappers.BlobServiceStatistics","Mappers.ServiceGetStatisticsHeaders","Parameters.prefix","Parameters.marker0","Parameters.maxPageSize","Parameters.include0","Parameters.comp2","Mappers.ListContainersSegmentResponse","Mappers.ServiceListContainersSegmentHeaders","Parameters.comp3","Mappers.KeyInfo","Mappers.UserDelegationKey","Mappers.ServiceGetUserDelegationKeyHeaders","Parameters.restype1","Mappers.ServiceGetAccountInfoHeaders","Parameters.comp4","Parameters.contentLength","Parameters.multipartContentType","Mappers.ServiceSubmitBatchHeaders","Parameters.where","Parameters.comp5","Mappers.FilterBlobSegment","Mappers.ServiceFilterBlobsHeaders","getPropertiesOperationSpec","getAccountInfoOperationSpec","serializer","Mappers","Parameters.restype2","Parameters.metadata","Parameters.access","Parameters.defaultEncryptionScope","Parameters.preventEncryptionScopeOverride","Mappers.ContainerCreateHeaders","Parameters.leaseId0","Mappers.ContainerGetPropertiesHeaders","Parameters.ifModifiedSince","Parameters.ifUnmodifiedSince","Mappers.ContainerDeleteHeaders","Parameters.comp6","Mappers.ContainerSetMetadataHeaders","Parameters.comp7","Mappers.ContainerGetAccessPolicyHeaders","Mappers.ContainerSetAccessPolicyHeaders","Parameters.comp8","Parameters.deletedContainerName","Parameters.deletedContainerVersion","Mappers.ContainerRestoreHeaders","Parameters.comp9","Parameters.duration","Parameters.proposedLeaseId0","Parameters.action0","Mappers.ContainerAcquireLeaseHeaders","Parameters.leaseId1","Parameters.action1","Mappers.ContainerReleaseLeaseHeaders","Parameters.action2","Mappers.ContainerRenewLeaseHeaders","Parameters.breakPeriod","Parameters.action3","Mappers.ContainerBreakLeaseHeaders","Parameters.proposedLeaseId1","Parameters.action4","Mappers.ContainerChangeLeaseHeaders","Parameters.include1","Mappers.ListBlobsFlatSegmentResponse","Mappers.ContainerListBlobFlatSegmentHeaders","Parameters.delimiter","Mappers.ListBlobsHierarchySegmentResponse","Mappers.ContainerListBlobHierarchySegmentHeaders","Mappers.ContainerGetAccountInfoHeaders","deleteMethodOperationSpec","setMetadataOperationSpec","acquireLeaseOperationSpec","releaseLeaseOperationSpec","renewLeaseOperationSpec","changeLeaseOperationSpec","breakLeaseOperationSpec","Parameters.snapshot","Parameters.versionId","Parameters.range0","Parameters.rangeGetContentMD5","Parameters.rangeGetContentCRC64","Parameters.encryptionKey","Parameters.encryptionKeySha256","Parameters.encryptionAlgorithm","Parameters.ifMatch","Parameters.ifNoneMatch","Parameters.ifTags","Mappers.BlobDownloadHeaders","Mappers.BlobGetPropertiesHeaders","Parameters.deleteSnapshots","Mappers.BlobDeleteHeaders","Parameters.action5","Parameters.owner","Parameters.group","Parameters.posixPermissions","Parameters.posixAcl","Mappers.BlobSetAccessControlHeaders","Mappers.DataLakeStorageError","Parameters.upn","Parameters.action6","Mappers.BlobGetAccessControlHeaders","Parameters.pathRenameMode","Parameters.renameSource","Parameters.directoryProperties","Parameters.posixUmask","Parameters.sourceLeaseId","Parameters.cacheControl","Parameters.contentType","Parameters.contentEncoding","Parameters.contentLanguage","Parameters.contentDisposition","Parameters.sourceIfModifiedSince","Parameters.sourceIfUnmodifiedSince","Parameters.sourceIfMatch","Parameters.sourceIfNoneMatch","Mappers.BlobRenameHeaders","Mappers.BlobUndeleteHeaders","Parameters.comp10","Parameters.expiryOptions","Parameters.expiresOn","Mappers.BlobSetExpiryHeaders","Parameters.blobCacheControl","Parameters.blobContentType","Parameters.blobContentMD5","Parameters.blobContentEncoding","Parameters.blobContentLanguage","Parameters.blobContentDisposition","Mappers.BlobSetHTTPHeadersHeaders","Parameters.encryptionScope","Mappers.BlobSetMetadataHeaders","Mappers.BlobAcquireLeaseHeaders","Mappers.BlobReleaseLeaseHeaders","Mappers.BlobRenewLeaseHeaders","Mappers.BlobChangeLeaseHeaders","Mappers.BlobBreakLeaseHeaders","Parameters.comp11","Mappers.BlobCreateSnapshotHeaders","Parameters.tier0","Parameters.rehydratePriority","Parameters.copySource","Parameters.blobTagsString","Parameters.sealBlob","Parameters.sourceIfTags","Mappers.BlobStartCopyFromURLHeaders","Parameters.sourceContentMD5","Parameters.xMsRequiresSync","Mappers.BlobCopyFromURLHeaders","Parameters.copyId","Parameters.comp12","Parameters.copyActionAbortConstant","Mappers.BlobAbortCopyFromURLHeaders","Parameters.comp13","Parameters.tier1","Mappers.BlobSetTierHeaders","Mappers.BlobGetAccountInfoHeaders","Parameters.comp14","Mappers.QueryRequest","Mappers.BlobQueryHeaders","Parameters.comp15","Mappers.BlobTags","Mappers.BlobGetTagsHeaders","Parameters.transactionalContentMD5","Parameters.transactionalContentCrc64","Mappers.BlobSetTagsHeaders","createOperationSpec","Parameters.blobContentLength","Parameters.blobSequenceNumber","Parameters.blobType0","Mappers.PageBlobCreateHeaders","Parameters.comp16","Parameters.pageWrite0","Parameters.ifSequenceNumberLessThanOrEqualTo","Parameters.ifSequenceNumberLessThan","Parameters.ifSequenceNumberEqualTo","Mappers.PageBlobUploadPagesHeaders","Parameters.pageWrite1","Mappers.PageBlobClearPagesHeaders","Parameters.sourceUrl","Parameters.sourceRange0","Parameters.sourceContentCrc64","Parameters.range1","Mappers.PageBlobUploadPagesFromURLHeaders","Parameters.comp17","Mappers.PageList","Mappers.PageBlobGetPageRangesHeaders","Parameters.prevsnapshot","Parameters.prevSnapshotUrl","Mappers.PageBlobGetPageRangesDiffHeaders","Mappers.PageBlobResizeHeaders","Parameters.sequenceNumberAction","Mappers.PageBlobUpdateSequenceNumberHeaders","Parameters.comp18","Mappers.PageBlobCopyIncrementalHeaders","Parameters.blobType1","Mappers.AppendBlobCreateHeaders","Parameters.comp19","Parameters.maxSize","Parameters.appendPosition","Mappers.AppendBlobAppendBlockHeaders","Parameters.sourceRange1","Mappers.AppendBlobAppendBlockFromUrlHeaders","Parameters.comp20","Mappers.AppendBlobSealHeaders","Parameters.blobType2","Mappers.BlockBlobUploadHeaders","Parameters.blockId","Parameters.comp21","Mappers.BlockBlobStageBlockHeaders","Mappers.BlockBlobStageBlockFromURLHeaders","Parameters.comp22","Mappers.BlockLookupList","Mappers.BlockBlobCommitBlockListHeaders","Parameters.listType","Mappers.BlockList","Mappers.BlockBlobGetBlockListHeaders","createClientLogger","URLBuilder","isNode","__extends","BaseRequestPolicy","StorageRetryPolicyType","AbortError","HttpHeaders","os.type","os.release","DefaultHttpClient","tracingPolicy","keepAlivePolicy","generateClientRequestIdPolicy","deserializationPolicy","logPolicy","proxyPolicy","disableResponseDecompressionPolicy","isTokenCredential","bearerTokenAuthenticationPolicy","AbortSignal","Readable","ABORT_ERROR","__asyncValues","createHmac","coreHttp.getDefaultUserAgentValue","coreHttp.ServiceClient","BlockBlobTier","PremiumPageBlobTier","delay","Poller","EventEmitter","getTracer","SpanKind","fs.createWriteStream","util.promisify","fs.stat","fs.createReadStream","getDefaultProxySettings","StorageBlob","CanonicalCode","generateUuid","__values","__asyncDelegator","WebResource","SASProtocol"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAWO,IAAM,OAAO,GAA6B;IAC/C,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE;YACf,QAAQ,EAAE;gBACR,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,IAAI;gBACd,cAAc,EAAE,OAAO;gBACvB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,QAAQ;gBACjB,QAAQ,EAAE,IAAI;gBACd,cAAc,EAAE,QAAQ;gBACxB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEK,IAAM,iBAAiB,GAA6B;IACzD,cAAc,EAAE,mBAAmB;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACj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AU,CAAC,wDAAwD,CAAC,CAAC;KAC5E;IAED,IAAI,sBAAsB,CAAC,SAAS,IAAI,OAAO,GAAG,YAAY,EAAE;QAC9D,MAAM,UAAU,CAAC,+DAA+D,CAAC,CAAC;KACnF;IACD,IAAI,sBAAsB,CAAC,QAAQ,KAAK,SAAS,IAAI,sBAAsB,CAAC,SAAS,EAAE;QACrF,MAAM,UAAU,CAAC,qDAAqD,CAAC,CAAC;KACzE;IAED,IACE,sBAAsB,CAAC,WAAW;QAClC,sBAAsB,CAAC,WAAW,CAAC,aAAa;QAChD,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,kEAAkE,CAAC,CAAC;KACtF;IAED,IACE,sBAAsB,CAAC,WAAW;QAClC,sBAAsB,CAAC,WAAW,CAAC,GAAG;QACtC,OAAO,GAAG,YAAY,EACtB;QACA,MAAM,UAAU,CAAC,kEAAkE,CAAC,CAAC;KACtF;IAED,IACE,OAAO,GAAG,YAAY;QACtB,sBAAsB,CAAC,WAAW;SACjC,sBAAsB,CAAC,WAAW,CAAC,IAAI,IAAI,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,EACvF;QACA,MAAM,UAAU,CAAC,6EAA6E,CAAC,CAAC;KACjG;IAED,IACE,OAAO,GAAG,YAAY;SACrB,sBAAsB,CAAC,0BAA0B,IAAI,sBAAsB,CAAC,aAAa,CAAC,EAC3F;QACA,MAAM,UAAU,CACd,mGAAmG,CACpG,CAAC;KACH;IAED,sBAAsB,CAAC,OAAO,GAAG,OAAO,CAAC;IACzC,OAAO,sBAAsB,CAAC;AAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/CopyrightNotice.txt b/node_modules/@azure/storage-blob/node_modules/tslib/CopyrightNotice.txt new file mode 100644 index 000000000..3d4c82348 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/CopyrightNotice.txt @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/LICENSE.txt b/node_modules/@azure/storage-blob/node_modules/tslib/LICENSE.txt new file mode 100644 index 000000000..bfe6430cb --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/LICENSE.txt @@ -0,0 +1,12 @@ +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/README.md b/node_modules/@azure/storage-blob/node_modules/tslib/README.md new file mode 100644 index 000000000..49c001420 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/README.md @@ -0,0 +1,154 @@ +# tslib + +This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions. + +This library is primarily used by the `--importHelpers` flag in TypeScript. +When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: + +```ts +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; +exports.x = {}; +exports.y = __assign({}, exports.x); + +``` + +will instead be emitted as something like the following: + +```ts +var tslib_1 = require("tslib"); +exports.x = {}; +exports.y = tslib_1.__assign({}, exports.x); +``` + +Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. +For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. + +# Installing + +For the latest stable version, run: + +## npm + +```sh +# TypeScript 3.9.2 or later +npm install tslib + +# TypeScript 3.8.4 or earlier +npm install tslib@^1 + +# TypeScript 2.3.2 or earlier +npm install tslib@1.6.1 +``` + +## yarn + +```sh +# TypeScript 3.9.2 or later +yarn add tslib + +# TypeScript 3.8.4 or earlier +yarn add tslib@^1 + +# TypeScript 2.3.2 or earlier +yarn add tslib@1.6.1 +``` + +## bower + +```sh +# TypeScript 3.9.2 or later +bower install tslib + +# TypeScript 3.8.4 or earlier +bower install tslib@^1 + +# TypeScript 2.3.2 or earlier +bower install tslib@1.6.1 +``` + +## JSPM + +```sh +# TypeScript 3.9.2 or later +jspm install tslib + +# TypeScript 3.8.4 or earlier +jspm install tslib@^1 + +# TypeScript 2.3.2 or earlier +jspm install tslib@1.6.1 +``` + +# Usage + +Set the `importHelpers` compiler option on the command line: + +``` +tsc --importHelpers file.ts +``` + +or in your tsconfig.json: + +```json +{ + "compilerOptions": { + "importHelpers": true + } +} +``` + +#### For bower and JSPM users + +You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: + +```json +{ + "compilerOptions": { + "module": "amd", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["bower_components/tslib/tslib.d.ts"] + } + } +} +``` + +For JSPM users: + +```json +{ + "compilerOptions": { + "module": "system", + "importHelpers": true, + "baseUrl": "./", + "paths": { + "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] + } + } +} +``` + + +# Contribute + +There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). +* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. +* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). + +# Documentation + +* [Quick tutorial](http://www.typescriptlang.org/Tutorial) +* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/modules/index.js b/node_modules/@azure/storage-blob/node_modules/tslib/modules/index.js new file mode 100644 index 000000000..d241d0422 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/modules/index.js @@ -0,0 +1,51 @@ +import tslib from '../tslib.js'; +const { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +} = tslib; +export { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, +}; diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/modules/package.json b/node_modules/@azure/storage-blob/node_modules/tslib/modules/package.json new file mode 100644 index 000000000..aafa0e4b4 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/modules/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/package.json b/node_modules/@azure/storage-blob/node_modules/tslib/package.json new file mode 100644 index 000000000..95d445037 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/package.json @@ -0,0 +1,64 @@ +{ + "_from": "tslib@^2.0.0", + "_id": "tslib@2.0.3", + "_inBundle": false, + "_integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "_location": "/@azure/storage-blob/tslib", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "tslib@^2.0.0", + "name": "tslib", + "escapedName": "tslib", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "_shasum": "8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c", + "_spec": "tslib@^2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Microsoft Corp." + }, + "bugs": { + "url": "https://github.com/Microsoft/TypeScript/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Runtime library for TypeScript helper functions", + "exports": { + ".": { + "module": "./tslib.es6.js", + "import": "./modules/index.js", + "default": "./tslib.js" + }, + "./": "./" + }, + "homepage": "https://www.typescriptlang.org/", + "jsnext:main": "tslib.es6.js", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript", + "tslib", + "runtime" + ], + "license": "0BSD", + "main": "tslib.js", + "module": "tslib.es6.js", + "name": "tslib", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/tslib.git" + }, + "sideEffects": false, + "typings": "tslib.d.ts", + "version": "2.0.3" +} diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/tslib.d.ts b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.d.ts new file mode 100644 index 000000000..9e43edcda --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.d.ts @@ -0,0 +1,37 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +export declare function __extends(d: Function, b: Function): void; +export declare function __assign(t: any, ...sources: any[]): any; +export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; +export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; +export declare function __param(paramIndex: number, decorator: Function): Function; +export declare function __metadata(metadataKey: any, metadataValue: any): Function; +export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; +export declare function __generator(thisArg: any, body: Function): any; +export declare function __exportStar(m: any, o: any): void; +export declare function __values(o: any): any; +export declare function __read(o: any, n?: number): any[]; +export declare function __spread(...args: any[][]): any[]; +export declare function __spreadArrays(...args: any[][]): any[]; +export declare function __await(v: any): any; +export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; +export declare function __asyncDelegator(o: any): any; +export declare function __asyncValues(o: any): any; +export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; +export declare function __importStar(mod: T): T; +export declare function __importDefault(mod: T): T | { default: T }; +export declare function __classPrivateFieldGet(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V; +export declare function __classPrivateFieldSet(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V; +export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.html b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.html new file mode 100644 index 000000000..b122e41b0 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.js b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.js new file mode 100644 index 000000000..c60aa609f --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.js @@ -0,0 +1,227 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export var __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]; +}); + +export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/tslib.html b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.html new file mode 100644 index 000000000..44c9ba51e --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/@azure/storage-blob/node_modules/tslib/tslib.js b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.js new file mode 100644 index 000000000..fcf619a47 --- /dev/null +++ b/node_modules/@azure/storage-blob/node_modules/tslib/tslib.js @@ -0,0 +1,292 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) 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]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __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]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/node_modules/@azure/storage-blob/package.json b/node_modules/@azure/storage-blob/package.json new file mode 100644 index 000000000..d960dc924 --- /dev/null +++ b/node_modules/@azure/storage-blob/package.json @@ -0,0 +1,207 @@ +{ + "//metadata": { + "constantPaths": [ + { + "path": "src/utils/constants.ts", + "prefix": "SDK_VERSION" + } + ] + }, + "//smokeTestConfiguration": { + "skip": [ + "advanced.js", + "anonymousCred.js", + "azureAdAuth.js", + "basic.js", + "customPipeline.js", + "customizedClientHeaders.js", + "iterators-blobs-hierarchy.js", + "iterators-blobs.js", + "iterators-containers.js", + "iterators-without-await.js", + "readingSnapshot.js", + "sharedKeyCred.js" + ] + }, + "_from": "@azure/storage-blob@^12.1.2", + "_id": "@azure/storage-blob@12.3.0", + "_inBundle": false, + "_integrity": "sha512-nCySzNfm782pEW3sg9GHj1zE4gBeVVMeEBdWb4MefifrCwQQOoz5cXZTNFiUJAJqAO+/72r2UjZcUwHk/QmzkA==", + "_location": "/@azure/storage-blob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@azure/storage-blob@^12.1.2", + "name": "@azure/storage-blob", + "escapedName": "@azure%2fstorage-blob", + "scope": "@azure", + "rawSpec": "^12.1.2", + "saveSpec": null, + "fetchSpec": "^12.1.2" + }, + "_requiredBy": [ + "/@actions/cache" + ], + "_resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.3.0.tgz", + "_shasum": "4afda22f72c9a9bc8c01b99ea4c2d63f20779e0d", + "_spec": "@azure/storage-blob@^12.1.2", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@actions/cache", + "author": { + "name": "Microsoft Corporation" + }, + "browser": { + "./dist-esm/storage-blob/src/index.js": "./dist-esm/storage-blob/src/index.browser.js", + "./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js": "./dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js", + "./dist-esm/storage-blob/src/utils/utils.node.js": "./dist-esm/storage-blob/src/utils/utils.browser.js", + "./dist-esm/storage-blob/test/utils/index.js": "./dist-esm/storage-blob/test/utils/index.browser.js", + "./dist-esm/storage-blob/src/BatchUtils.js": "./dist-esm/storage-blob/src/BatchUtils.browser.js", + "./dist-esm/storage-blob/src/BlobDownloadResponse.js": "./dist-esm/storage-blob/src/BlobDownloadResponse.browser.js", + "./dist-esm/storage-blob/src/BlobQueryResponse.js": "./dist-esm/storage-blob/src/BlobQueryResponse.browser.js", + "./dist-esm/storage-blob/src/utils/BufferScheduler.js": "./dist-esm/storage-blob/src/utils/BufferScheduler.browser.js", + "./dist-esm/storage-common/src/index.js": "./dist-esm/storage-common/src/index.browser.js", + "fs": false, + "os": false, + "process": false + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^1.2.0", + "@azure/core-lro": "^1.0.2", + "@azure/core-paging": "^1.1.1", + "@azure/core-tracing": "1.0.0-preview.9", + "@azure/logger": "^1.0.0", + "@opentelemetry/api": "^0.10.2", + "events": "^3.0.0", + "tslib": "^2.0.0" + }, + "deprecated": false, + "description": "Microsoft Azure Storage SDK for JavaScript - Blob", + "devDependencies": { + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^1.1.0", + "@azure/test-utils-recorder": "^1.0.0", + "@microsoft/api-extractor": "7.7.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "@rollup/plugin-replace": "^2.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^8.0.0", + "assert": "^1.4.1", + "cross-env": "^7.0.2", + "dotenv": "^8.2.0", + "downlevel-dts": "~0.4.0", + "es6-promise": "^4.2.5", + "eslint": "^6.1.0", + "esm": "^3.2.18", + "inherits": "^2.0.3", + "karma": "^5.1.0", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-edge-launcher": "^0.4.2", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^1.1.0", + "karma-ie-launcher": "^1.0.0", + "karma-json-preprocessor": "^0.3.3", + "karma-json-to-file-reporter": "^1.0.1", + "karma-junit-reporter": "^2.0.1", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-remap-istanbul": "^0.6.0", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "nyc": "^14.0.0", + "prettier": "^1.16.4", + "puppeteer": "^3.3.0", + "rimraf": "^3.0.0", + "rollup": "^1.16.3", + "rollup-plugin-shim": "^1.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-visualizer": "^4.0.4", + "source-map-support": "^0.5.9", + "ts-node": "^8.3.0", + "typescript": "~3.9.3", + "util": "^0.12.1" + }, + "engine": { + "node": ">=8.0.0" + }, + "files": [ + "BreakingChanges.md", + "dist/", + "dist-esm/storage-blob/src/", + "dist-esm/storage-internal-avro/src/", + "dist-esm/storage-common/src/", + "typings/latest/storage-blob.d.ts", + "typings/3.1/storage-blob.d.ts", + "README.md", + "LICENSE" + ], + "homepage": "https://github.com/Azure/azure-sdk-for-js#readme", + "keywords": [ + "azure", + "atorage", + "alob", + "node.js", + "typescript", + "javascript", + "browser" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/storage-blob/src/index.js", + "name": "@azure/storage-blob", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git" + }, + "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", + "build": "npm run build:es6 && npm run build:nodebrowser && api-extractor run --local && npm run build:types", + "build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.3.0 --use=@microsoft.azure/autorest.typescript@5.0.1", + "build:es6": "tsc -p tsconfig.json", + "build:nodebrowser": "rollup -c 2>&1", + "build:prep-samples": "dev-tool samples prep && cd dist-samples && tsc", + "build:samples": "npm run clean && npm run build:es6 && cross-env ONLY_NODE=true rollup -c 2>&1 && npm run build:prep-samples", + "build:test": "npm run build:es6 && rollup -c rollup.test.config.js 2>&1", + "build:types": "downlevel-dts typings/latest typings/3.1", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm dist-test typings temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml", + "clean:samples": "rimraf samples/javascript/node_modules samples/typescript/node_modules samples/typescript/dist samples/typescript/package-lock.json samples/javascript/package-lock.json", + "emulator-tests": "cross-env STORAGE_CONNECTION_STRING=UseDevelopmentStorage=true && npm run test:node", + "execute:samples": "npm run build:samples && dev-tool samples run dist-samples/javascript dist-samples/typescript/dist/storage-blob/dist-samples/typescript/src/", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "karma start --single-run", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/storage-blob/test/*.spec.js dist-esm/storage-blob/test/node/*.spec.js", + "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o storage-blob-lintReport.html || exit 0", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test": "npm run clean && npm run build:test && npm run unit-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 120000 dist-test/index.node.js" + }, + "sdk-type": "client", + "sideEffects": false, + "types": "./typings/latest/storage-blob.d.ts", + "typesVersions": { + "<3.6": { + "*": [ + "./typings/3.1/storage-blob.d.ts" + ] + } + }, + "version": "12.3.0" +} diff --git a/node_modules/@azure/storage-blob/typings/3.1/storage-blob.d.ts b/node_modules/@azure/storage-blob/typings/3.1/storage-blob.d.ts new file mode 100644 index 000000000..3fdf20334 --- /dev/null +++ b/node_modules/@azure/storage-blob/typings/3.1/storage-blob.d.ts @@ -0,0 +1,11940 @@ +/// +import { AbortSignalLike } from '@azure/abort-controller'; +import { BaseRequestPolicy } from '@azure/core-http'; +import * as coreHttp from '@azure/core-http'; +import { deserializationPolicy } from '@azure/core-http'; +import { HttpHeaders } from '@azure/core-http'; +import { HttpOperationResponse } from '@azure/core-http'; +import { HttpRequestBody } from '@azure/core-http'; +import { HttpResponse } from '@azure/core-http'; +import { HttpClient as IHttpClient } from '@azure/core-http'; +import { KeepAliveOptions } from '@azure/core-http'; +import { OperationTracingOptions } from '@azure/core-tracing'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; +import { ProxyOptions } from '@azure/core-http'; +import { Readable } from 'stream'; +import { RequestPolicy } from '@azure/core-http'; +import { RequestPolicyFactory } from '@azure/core-http'; +import { RequestPolicyOptions } from '@azure/core-http'; +import { RestError } from '@azure/core-http'; +import { ServiceClientOptions } from '@azure/core-http'; +import { TokenCredential } from '@azure/core-http'; +import { TransferProgressEvent } from '@azure/core-http'; +import { UserAgentOptions } from '@azure/core-http'; +import { WebResource } from '@azure/core-http'; +/** + * An Access policy + */ +export declare interface AccessPolicy { + /** + * the date-time the policy is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + startsOn?: string; + /** + * the date-time the policy expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + expiresOn?: string; + /** + * the permissions for the acl policy + */ + permissions?: string; +} +/** + * Defines values for AccessTier. + * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', + * 'P80', 'Hot', 'Cool', 'Archive' + * @readonly + * @enum {string} + */ +export declare type AccessTier = 'P4' | 'P6' | 'P10' | 'P15' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'Hot' | 'Cool' | 'Archive'; +/** + * Defines values for AccountKind. + * Possible values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage' + * @readonly + * @enum {string} + */ +export declare type AccountKind = 'Storage' | 'BlobStorage' | 'StorageV2' | 'FileStorage' | 'BlockBlobStorage'; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class AccountSASPermissions + */ +export declare class AccountSASPermissions { + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @static + * @param {string} permissions + * @returns {AccountSASPermissions} + * @memberof AccountSASPermissions + */ + static parse(permissions: string): AccountSASPermissions; + /** + * Permission to read resources and list queues and tables granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + read: boolean; + /** + * Permission to write resources granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + write: boolean; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + delete: boolean; + /** + * Permission to delete versions granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + deleteVersion: boolean; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + list: boolean; + /** + * Permission to add messages, table entities, and append to blobs granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + add: boolean; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + create: boolean; + /** + * Permissions to update messages and table entities granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + update: boolean; + /** + * Permission to get and delete messages granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + process: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + tag: boolean; + /** + * Permission to filter blobs. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + filter: boolean; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASPermissions + */ + toString(): string; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + * + * @export + * @class AccountSASResourceTypes + */ +export declare class AccountSASResourceTypes { + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @static + * @param {string} resourceTypes + * @returns {AccountSASResourceTypes} + * @memberof AccountSASResourceTypes + */ + static parse(resourceTypes: string): AccountSASResourceTypes; + /** + * Permission to access service level APIs granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + service: boolean; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + container: boolean; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + object: boolean; + /** + * Converts the given resource types to a string. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASResourceTypes + */ + toString(): string; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + * + * @export + * @class AccountSASServices + */ +export declare class AccountSASServices { + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @static + * @param {string} services + * @returns {AccountSASServices} + * @memberof AccountSASServices + */ + static parse(services: string): AccountSASServices; + /** + * Permission to access blob resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + blob: boolean; + /** + * Permission to access file resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + file: boolean; + /** + * Permission to access queue resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + queue: boolean; + /** + * Permission to access table resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + table: boolean; + /** + * Converts the given services to a string. + * + * @returns {string} + * @memberof AccountSASServices + */ + toString(): string; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once + * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation + * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters} + * exist because the former is mutable and a logical representation while the latter is immutable and used to generate + * actual REST requests. + * + * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1 + * for more conceptual information on SAS + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * for descriptions of the parameters, including which are required + * + * @export + * @class AccountSASSignatureValues + */ +export declare interface AccountSASSignatureValues { + /** + * If not provided, this defaults to the service version targeted by this version of the library. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + version?: string; + /** + * Optional. SAS protocols allowed. + * + * @type {SASProtocol} + * @memberof AccountSASSignatureValues + */ + protocol?: SASProtocol; + /** + * Optional. When the SAS will take effect. + * + * @type {Date} + * @memberof AccountSASSignatureValues + */ + startsOn?: Date; + /** + * The time after which the SAS will no longer work. + * + * @type {Date} + * @memberof AccountSASSignatureValues + */ + expiresOn: Date; + /** + * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help + * constructing the permissions string. + * + * @type {AccountSASPermissions} + * @memberof AccountSASSignatureValues + */ + permissions: AccountSASPermissions; + /** + * Optional. IP range allowed. + * + * @type {SasIPRange} + * @memberof AccountSASSignatureValues + */ + ipRange?: SasIPRange; + /** + * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to + * construct this value. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + services: string; + /** + * The values that indicate the resource types accessible with this SAS. Please refer + * to {@link AccountSASResourceTypes} to construct this value. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + resourceTypes: string; +} +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + * + * @export + * @class AnonymousCredential + * @extends {Credential} + */ +export declare class AnonymousCredential extends Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {AnonymousCredentialPolicy} + * @memberof AnonymousCredential + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): AnonymousCredentialPolicy; +} +/** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + * + * @export + * @class AnonymousCredentialPolicy + * @extends {CredentialPolicy} + */ +export declare class AnonymousCredentialPolicy extends CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof AnonymousCredentialPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); +} +/** + * Defines headers for AppendBlockFromUrl operation. + */ +export declare interface AppendBlobAppendBlockFromUrlHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This response header is returned only for append operations. It returns the offset at which + * the block was committed, in bytes. + */ + blobAppendOffset?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + errorCode?: string; +} +/** + * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation. + * + * @export + * @interface AppendBlobAppendBlockFromURLOptions + */ +export declare interface AppendBlobAppendBlockFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when appending append blob blocks. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + conditions?: AppendBlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * An MD5 hash of the append block content from the URI. + * This hash is used to verify the integrity of the append block during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the append block content from the URI. + * This hash is used to verify the integrity of the append block during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the appendBlockFromUrl operation. + */ +export declare type AppendBlobAppendBlockFromUrlResponse = AppendBlobAppendBlockFromUrlHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobAppendBlockFromUrlHeaders; + }; +}; +/** + * Defines headers for AppendBlock operation. + */ +export declare interface AppendBlobAppendBlockHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This response header is returned only for append operations. It returns the offset at which + * the block was committed, in bytes. + */ + blobAppendOffset?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure the {@link AppendBlobClient.appendBlock} operation. + * + * @export + * @interface AppendBlobAppendBlockOptions + */ +export declare interface AppendBlobAppendBlockOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when appending append blob blocks. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockOptions + */ + conditions?: AppendBlobRequestConditions; + /** + * Callback to receive events on the progress of append block operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof AppendBlobAppendBlockOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobAppendBlockOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobAppendBlockOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the appendBlock operation. + */ +export declare type AppendBlobAppendBlockResponse = AppendBlobAppendBlockHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobAppendBlockHeaders; + }; +}; +/** + * AppendBlobClient defines a set of operations applicable to append blobs. + * + * @export + * @class AppendBlobClient + * @extends {BlobClient} + */ +export declare class AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + * + * @private + * @type {AppendBlob} + * @memberof AppendBlobClient + */ + private appendBlobContext; + /** + * + * Creates an instance of AppendBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof AppendBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of AppendBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to an append blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage append blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof AppendBlobClient + */ + constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of AppendBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to an append blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage append blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof AppendBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof AppendBlobClient + */ + withSnapshot(snapshot: string): AppendBlobClient; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const appendBlobClient = containerClient.getAppendBlobClient(""); + * await appendBlobClient.create(); + * ``` + */ + create(options?: AppendBlobCreateOptions): Promise; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof AppendBlobClient + */ + createIfNotExists(options?: AppendBlobCreateIfNotExistsOptions): Promise; + /** + * Seals the append blob, making it read only. + * + * @param {AppendBlobSealOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + seal(options?: AppendBlobSealOptions): Promise; + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * + * @param {HttpRequestBody} body Data to be appended. + * @param {number} contentLength Length of the body in bytes. + * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + appendBlock(body: HttpRequestBody, contentLength: number, options?: AppendBlobAppendBlockOptions): Promise; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * + * @param {string} sourceURL + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param {number} sourceOffset Offset in source to be appended + * @param {number} count Number of bytes to be appended as a block + * @param {AppendBlobAppendBlockFromURLOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + appendBlockFromURL(sourceURL: string, sourceOffset: number, count: number, options?: AppendBlobAppendBlockFromURLOptions): Promise; +} +/** + * Defines headers for Create operation. + */ +export declare interface AppendBlobCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link AppendBlobClient.createIfNotExists} operation. + * + * @export + * @interface AppendBlobCreateIfNotExistsOptions + */ +export declare interface AppendBlobCreateIfNotExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * HTTP headers to set when creating append blobs. + * + * @type {BlobHTTPHeaders} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the {@link appendBlobClient.createIfNotExists} operation. + * + * @export + * @interface AppendBlobCreateIfNotExistsResponse + */ +export declare interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse { + /** + * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists. + * + * @type {boolean} + * @memberof AppendBlobCreateIfNotExistsResponse + */ + succeeded: boolean; +} +/** + * Options to configure {@link AppendBlobClient.create} operation. + * + * @export + * @interface AppendBlobCreateOptions + */ +export declare interface AppendBlobCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when creating append blobs. + * + * @type {BlobRequestConditions} + * @memberof AppendBlobCreateOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when creating append blobs. + * + * @type {BlobHTTPHeaders} + * @memberof AppendBlobCreateOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof AppendBlobCreateOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobCreateOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobCreateOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof AppendBlobCreateOptions + */ + tags?: Tags; +} +/** + * Contains response data for the create operation. + */ +export declare type AppendBlobCreateResponse = AppendBlobCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobCreateHeaders; + }; +}; +/** + * Conditions to add to the creation of this append blob. + */ +export declare interface AppendBlobRequestConditions extends BlobRequestConditions, AppendPositionAccessConditions { +} +/** + * Options to configure {@link AppendBlobClient.seal} operation. + * + * @export + * @interface AppendBlobSealOptions + * @extends {CommonOptions} + */ +export declare interface AppendBlobSealOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockOptions + */ + conditions?: AppendBlobRequestConditions; +} +/** + * Additional parameters for a set of operations, such as: AppendBlob_appendBlock, + * AppendBlob_appendBlockFromUrl, AppendBlob_seal. + */ +export declare interface AppendPositionAccessConditions { + /** + * Optional conditional header. The max length in bytes permitted for the append blob. If the + * Append Block operation would cause the blob to exceed that limit or if the blob size is + * already greater than the value specified in this header, the request will fail with + * MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). + */ + maxSize?: number; + /** + * Optional conditional header, used only for the Append Block operation. A number indicating the + * byte offset to compare. Append Block will succeed only if the append position is equal to this + * number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP + * status code 412 - Precondition Failed). + */ + appendPosition?: number; +} +/** + * Defines values for ArchiveStatus. + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + * @readonly + * @enum {string} + */ +export declare type ArchiveStatus = 'rehydrate-pending-to-hot' | 'rehydrate-pending-to-cool'; +export { BaseRequestPolicy }; +/** + * A request associated with a batch operation. + */ +export declare interface BatchSubRequest { + /** + * The URL of the resource to request operation. + * + * @type {string} + * @memberof BatchSubRequest + */ + url: string; + /** + * The credential used for sub request. + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. + * You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * + * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} + * @memberof BatchSubRequest + */ + credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential; +} +/** + * The response data associated with a single request within a batch operation. + */ +export declare interface BatchSubResponse { + /** + * The status code of the sub operation. + */ + status: number; + /** + * The status message of the sub operation. + */ + statusMessage: string; + /** + * The error code of the sub operation, if the sub operation failed. + */ + errorCode?: string; + /** + * The HTTP response headers. + */ + headers: HttpHeaders; + /** + * The body as text. + */ + bodyAsText?: string; + /** + * The batch sub request corresponding to the sub response. + */ + _request: BatchSubRequest; +} +/** + * Defines headers for AbortCopyFromURL operation. + */ +export declare interface BlobAbortCopyFromURLHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.abortCopyFromURL} operation. + * + * @export + * @interface BlobAbortCopyFromURLOptions + */ +export declare interface BlobAbortCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobAbortCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlobAbortCopyFromURLOptions + */ + conditions?: LeaseAccessConditions; +} +/** + * Contains response data for the abortCopyFromURL operation. + */ +export declare type BlobAbortCopyFromURLResponse = BlobAbortCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobAbortCopyFromURLHeaders; + }; +}; +/** + * Options to configure Blob - Acquire Lease operation. + * + * @export + * @interface BlobAcquireLeaseOptions + */ +export declare interface BlobAcquireLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobAcquireLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when acquiring the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobAcquireLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + * + * @export + * @class BlobBatch + */ +export declare class BlobBatch { + private batchRequest; + private readonly batch; + private batchType; + constructor(); + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + getMultiPartContentType(): string; + /** + * Get assembled HTTP request body for sub requests. + */ + getHttpRequestBody(): string; + /** + * Get sub requests that are added into the batch request. + */ + getSubRequests(): Map; + private addSubRequestInternal; + private setBatchType; + /** + * The deleteBlob operation marks the specified blob or snapshot for deletion. + * The blob is later deleted during garbage collection. + * Only one kind of operation is allowed per batch request. + * + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string} url The url of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + deleteBlob(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise; + /** + * The deleteBlob operation marks the specified blob or snapshot for deletion. + * The blob is later deleted during garbage collection. + * Only one kind of operation is allowed per batch request. + * + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient} blobClient The BlobClient. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions): Promise; + /** + * The setBlobAccessTier operation sets the tier on a blob. + * The operation is allowed on block blobs in a blob storage or general purpose v2 account. + * Only one kind of operation is allowed per batch request. + * + * A block blob's tier determines Hot/Cool/Archive storage type. + * This operation does not update the blob's ETag. + * For detailed information about block blob level tiering + * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers). + * The operation will be authenticated and authorized + * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string} url The url of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + setBlobAccessTier(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * The setBlobAccessTier operation sets the tier on a blob. + * The operation is allowed on block blobs in a blob storage or general purpose v2 account. + * Only one kind of operation is allowed per batch request. + * + * A block blob's tier determines Hot/Cool/Archive storage type. + * This operation does not update the blob's ETag. + * For detailed information about block blob level tiering + * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers). + * The operation will be authenticated and authorized + * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient} blobClient The BlobClient. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + setBlobAccessTier(blobClient: BlobClient, tier: AccessTier, options?: BlobSetTierOptions): Promise; +} +/** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + */ +export declare class BlobBatchClient { + private _serviceContext; + /** + * Creates an instance of BlobBatchClient. + * + * @param {string} url A url pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Options to configure the HTTP pipeline. + * @memberof BlobBatchClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobBatchClient. + * + * @param {string} url A url pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobBatchClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + createBatch(): BlobBatch; + /** + * Create multiple delete operations to mark the specified blobs or snapshots for deletion. + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operations will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string[]} urls The urls of the blob resources to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + deleteBlobs(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise; + /** + * Create multiple delete operations to mark the specified blobs or snapshots for deletion. + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation(subrequest) will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient[]} blobClients The BlobClients for the blobs to delete. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + deleteBlobs(blobClients: BlobClient[], options?: BlobDeleteOptions): Promise; + /** + * Create multiple set tier operations to set the tier on a blob. + * The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier). + * The operation(subrequest) will be authenticated and authorized + * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string[]} urls The urls of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + setBlobsAccessTier(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * Create multiple set tier operations to set the tier on a blob. + * The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier). + * The operation(subrequest) will be authenticated and authorized + * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient[]} blobClients The BlobClients for the blobs which should have a new tier set. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + setBlobsAccessTier(blobClients: BlobClient[], tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob(urlInString0, credential0); + * await batchRequest.deleteBlob(urlInString1, credential1, { + * deleteSnapshots: "include" + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); + * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { + * conditions: { leaseId: leaseId } + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @param {BlobBatch} batchRequest A set of Delete or SetTier operations. + * @param {BlobBatchSubmitBatchOptionalParams} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + submitBatch(batchRequest: BlobBatch, options?: BlobBatchSubmitBatchOptionalParams): Promise; +} +/** + * Contains response data for the {@link deleteBlobs} operation. + */ +export declare type BlobBatchDeleteBlobsResponse = BlobBatchSubmitBatchResponse; +/** + * Contains response data for the {@link setBlobsAccessTier} operation. + */ +export declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchResponse; +/** + * Options to configure the Service - Submit Batch Optional Params. + * + * @export + * @interface BlobBatchSubmitBatchOptionalParams + */ +export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel, CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobBatchSubmitBatchOptionalParams + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for blob batch operations. + */ +export declare type BlobBatchSubmitBatchResponse = ParsedBatchResponse & ServiceSubmitBatchHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSubmitBatchHeaders; + }; +}; +/** + * Options to configure the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobBeginCopyFromURLOptions + */ +export declare interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions { + /** + * The amount of time in milliseconds the poller should wait between + * calls to the service to determine the status of the Blob copy. + * Defaults to 15 seconds. + * + * @type {number} + * @memberof BlobBeginCopyFromURLOptions + */ + intervalInMs?: number; + /** + * Callback to receive the state of the copy progress. + * + * @memberof BlobBeginCopyFromURLOptions + */ + onProgress?: (state: BlobBeginCopyFromUrlPollState) => void; + /** + * Serialized poller state that can be used to resume polling from. + * This may be useful when starting a copy on one process or thread + * and you wish to continue polling on another process or thread. + * + * To get serialized poller state, call `poller.toString()` on an existing + * poller. + * + * @memberof BlobBeginCopyFromURLOptions + */ + resumeFrom?: string; +} +/** + * The state used by the poller returned from {@link BlobClient.beginCopyFromURL}. + * + * This state is passed into the user-specified `onProgress` callback + * whenever copy progress is detected. + */ +export declare interface BlobBeginCopyFromUrlPollState extends PollOperationState { + /** + * The instance of {@link BlobClient} that was used when calling {@link BlobClient.beginCopyFromURL}. + */ + readonly blobClient: CopyPollerBlobClient; + /** + * The copyId that identifies the in-progress blob copy. + */ + copyId?: string; + /** + * the progress of the blob copy as reported by the service. + */ + copyProgress?: string; + /** + * The source URL provided in {@link BlobClient.beginCopyFromURL}. + */ + copySource: string; + /** + * The options that were passed to the initial {@link BlobClient.beginCopyFromURL} call. + * This is exposed for the poller and should not be modified directly. + */ + readonly startCopyFromURLOptions?: BlobStartCopyFromURLOptions; +} +/** + * Contains response data for the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobBeginCopyFromURLResponse + */ +export declare interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse { +} +/** + * Options to configure Blob - Break Lease operation. + * + * @export + * @interface BlobBreakLeaseOptions + */ +export declare interface BlobBreakLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobBreakLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when breaking the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobBreakLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Options to configure Blob - Change Lease operation. + * + * @export + * @interface BlobChangeLeaseOptions + */ +export declare interface BlobChangeLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobChangeLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobChangeLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + * + * @export + * @class BlobClient + */ +export declare class BlobClient extends StorageClient { + /** + * blobContext provided by protocol layer. + * + * @private + * @type {Blobs} + * @memberof BlobClient + */ + private blobContext; + private _name; + private _containerName; + readonly name: string; + readonly containerName: string; + /** + * + * Creates an instance of BlobClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob". + * You can append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp + * @memberof BlobClient + */ + withSnapshot(snapshot: string): BlobClient; + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param {string} versionId The versionId. + * @returns {BlobClient} A new BlobClient object pointing to the version of this blob. + * @memberof BlobClient + */ + withVersion(versionId: string): BlobClient; + /** + * Creates a AppendBlobClient object. + * + * @returns {AppendBlobClient} + * @memberof BlobClient + */ + getAppendBlobClient(): AppendBlobClient; + /** + * Creates a BlockBlobClient object. + * + * @returns {BlockBlobClient} + * @memberof BlobClient + */ + getBlockBlobClient(): BlockBlobClient; + /** + * Creates a PageBlobClient object. + * + * @returns {PageBlobClient} + * @memberof BlobClient + */ + getPageBlobClient(): PageBlobClient; + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation. + * @returns {Promise} + * @memberof BlobClient + * + * Example usage (Node.js): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); + * console.log("Downloaded blob content:", downloaded.toString()); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * Example usage (browser): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + * console.log( + * "Downloaded blob content", + * downloaded + * ); + * + * async function blobToString(blob: Blob): Promise { + * const fileReader = new FileReader(); + * return new Promise((resolve, reject) => { + * fileReader.onloadend = (ev: any) => { + * resolve(ev.target!.result); + * }; + * fileReader.onerror = reject; + * fileReader.readAsText(blob); + * }); + * } + * ``` + */ + download(offset?: number, count?: number, options?: BlobDownloadOptions): Promise; + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param {BlobExistsOptions} [options] options to Exists operation. + * @returns {Promise} + * @memberof BlobClient + */ + exists(options?: BlobExistsOptions): Promise; + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation. + * @returns {Promise} + * @memberof BlobClient + */ + getProperties(options?: BlobGetPropertiesOptions): Promise; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + delete(options?: BlobDeleteOptions): Promise; + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + deleteIfExists(options?: BlobDeleteOptions): Promise; + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * + * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation. + * @returns {Promise} + * @memberof BlobClient + */ + undelete(options?: BlobUndeleteOptions): Promise; + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation. + * @returns {Promise} + * @memberof BlobClient + */ + setHTTPHeaders(blobHTTPHeaders?: BlobHTTPHeaders, options?: BlobSetHTTPHeadersOptions): Promise; + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation. + * @returns {Promise} + * @memberof BlobClient + */ + setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise; + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param {Tags} tags + * @param {BlobSetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + setTags(tags: Tags, options?: BlobSetTagsOptions): Promise; + /** + * Gets the tags associated with the underlying blob. + * + * @param {BlobGetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + getTags(options?: BlobGetTagsOptions): Promise; + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob. + * @memberof BlobClient + */ + getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient; + /** + * Creates a read-only snapshot of a blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * + * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation. + * @returns {Promise} + * @memberof BlobClient + */ + createSnapshot(options?: BlobCreateSnapshotOptions): Promise; + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * Example using automatic polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using manual polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * while (!poller.isDone()) { + * await poller.poll(); + * } + * const result = copyPoller.getResult(); + * ``` + * + * Example using progress updates: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * } + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using a changing polling interval (default 15 seconds): + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * intervalInMs: 1000 // poll blob every 1 second for copy progress + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using copy cancellation: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // cancel operation after starting it. + * try { + * await copyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * await copyPoller.getResult(); + * } catch (err) { + * if (err.name === 'PollerCancelledError') { + * console.log('The copy was cancelled.'); + * } + * } + * ``` + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + */ + beginCopyFromURL(copySource: string, options?: BlobBeginCopyFromURLOptions): Promise, BlobBeginCopyFromURLResponse>>; + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * + * @param {string} copyId Id of the Copy From URL operation. + * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + abortCopyFromURL(copyId: string, options?: BlobAbortCopyFromURLOptions): Promise; + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * + * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param {BlobSyncCopyFromURLOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + syncCopyFromURL(copySource: string, options?: BlobSyncCopyFromURLOptions): Promise; + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * + * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation. + * @returns {Promise} + * @memberof BlobClient + */ + setAccessTier(tier: BlockBlobTier | PremiumPageBlobTier | string, options?: BlobSetTierOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob in parallel to a buffer. + * Offset and count are optional, downloads the entire blob if they are not provided. + * + * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two + * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size, + * consider {@link downloadToFile}. + * + * @export + * @param {number} offset From which position of the block blob to download(in bytes) + * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined + * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions + * @returns {Promise} + */ + downloadToBuffer(offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob in parallel to a buffer. + * Offset and count are optional, downloads the entire blob if they are not provided. + * + * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two + * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size, + * consider {@link downloadToFile}. + * + * @export + * @param {Buffer} buffer Buffer to be fill, must have length larger than count + * @param {number} offset From which position of the block blob to download(in bytes) + * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined + * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions + * @returns {Promise} + */ + downloadToBuffer(buffer: Buffer, offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param {string} filePath + * @param {number} [offset] From which position of the block blob to download. + * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined. + * @param {BlobDownloadOptions} [options] Options to Blob download options. + * @returns {Promise} The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + * @memberof BlobClient + */ + downloadToFile(filePath: string, offset?: number, count?: number, options?: BlobDownloadOptions): Promise; + private getBlobAndContainerNamesFromUrl; + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + private startCopyFromURL; +} +/** + * Defines headers for CopyFromURL operation. + */ +export declare interface BlobCopyFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'success' + */ + copyStatus?: SyncCopyStatusType; + /** + * This response header is returned so that the client can check for the integrity of the copied + * content. This header is only returned if the source content MD5 was specified. + */ + contentMD5?: Uint8Array; + /** + * This response header is returned so that the client can check for the integrity of the copied + * content. + */ + xMsContentCrc64?: Uint8Array; + errorCode?: string; +} +/** + * Contains response data for the copyFromURL operation. + */ +export declare type BlobCopyFromURLResponse = BlobCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobCopyFromURLHeaders; + }; +}; +/** + * Defines headers for CreateSnapshot operation. + */ +export declare interface BlobCreateSnapshotHeaders { + /** + * Uniquely identifies the snapshot and indicates the snapshot version. It may be used in + * subsequent requests to access the snapshot + */ + snapshot?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * True if the contents of the request are successfully encrypted using the specified algorithm, + * and false otherwise. For a snapshot request, this header is set to true when metadata was + * provided in the request and encrypted with a customer-provided key. + */ + isServerEncrypted?: boolean; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.createSnapshot} operation. + * + * @export + * @interface BlobCreateSnapshotOptions + */ +export declare interface BlobCreateSnapshotOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobCreateSnapshotOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the snapshot. + * + * @type {Metadata} + * @memberof BlobCreateSnapshotOptions + */ + metadata?: Metadata; + /** + * Conditions to meet when creating blob snapshots. + * + * @type {BlobRequestConditions} + * @memberof BlobCreateSnapshotOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobCreateSnapshotOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlobCreateSnapshotOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the createSnapshot operation. + */ +export declare type BlobCreateSnapshotResponse = BlobCreateSnapshotHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobCreateSnapshotHeaders; + }; +}; +/** + * Defines headers for Delete operation. + */ +export declare interface BlobDeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the {@link BlobClient.deleteIfExists} operation. + * + * @export + * @interface BlobDeleteIfExistsResponse + */ +export declare interface BlobDeleteIfExistsResponse extends BlobDeleteResponse { + /** + * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place. + * + * @type {boolean} + * @memberof BlobDeleteIfExistsResponse + */ + succeeded: boolean; +} +/** + * Options to configure the {@link BlobClient.delete} operation. + * + * @export + * @interface BlobDeleteOptions + */ +export declare interface BlobDeleteOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDeleteOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when deleting blobs. + * + * @type {BlobRequestConditions} + * @memberof BlobDeleteOptions + */ + conditions?: BlobRequestConditions; + /** + * Specifies options to delete blobs that have associated snapshots. + * - `include`: Delete the base blob and all of its snapshots. + * - `only`: Delete only the blob's snapshots and not the blob itself. + * + * @type {DeleteSnapshotsOptionType} + * @memberof BlobDeleteOptions + */ + deleteSnapshots?: DeleteSnapshotsOptionType; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDeleteOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Contains response data for the deleteMethod operation. + */ +export declare type BlobDeleteResponse = BlobDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobDeleteHeaders; + }; +}; +/** + * Defines headers for Download operation. + */ +export declare interface BlobDownloadHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { + [propertyName: string]: string; + }; + /** + * The number of bytes present in the response body. + */ + contentLength?: number; + /** + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' + */ + contentType?: string; + /** + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. + */ + contentRange?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletedOn?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the whole blob's MD5 value. This value may or + * may not be equal to the value returned in Content-MD5 header, with the latter calculated from + * the requested range + */ + blobContentMD5?: Uint8Array; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * If this blob has been sealed + */ + isSealed?: boolean; + /** + * UTC date/time value generated by the service that indicates the time at which the blob was + * last read or written to + */ + lastAccessed?: Date; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + contentCrc64?: Uint8Array; + errorCode?: string; +} +/** + * Optional Parameters. + */ +export declare interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see Creating + * a Snapshot of a Blob. + */ + snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Return only the bytes of the blob in the specified range. + */ + range?: string; + /** + * When set to true and specified together with the Range, the service returns the MD5 hash for + * the range, as long as the range is less than or equal to 4 MB in size. + */ + rangeGetContentMD5?: boolean; + /** + * When set to true and specified together with the Range, the service returns the CRC64 hash for + * the range, as long as the range is less than or equal to 4 MB in size. + */ + rangeGetContentCRC64?: boolean; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + cpkInfo?: CpkInfo; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditionsModel; +} +/** + * Options to configure the {@link BlobClient.download} operation. + * + * @export + * @interface BlobDownloadOptions + */ +export declare interface BlobDownloadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDownloadOptions + */ + abortSignal?: AbortSignalLike; + /** + * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve. + * + * @type {string} + * @memberof BlobDownloadOptions + */ + snapshot?: string; + /** + * When this is set to true and download range of blob, the service returns the MD5 hash for the range, + * as long as the range is less than or equal to 4 MB in size. + * + * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time. + * + * @type {boolean} + * @memberof BlobDownloadOptions + */ + rangeGetContentMD5?: boolean; + /** + * When this is set to true and download range of blob, the service returns the CRC64 hash for the range, + * as long as the range is less than or equal to 4 MB in size. + * + * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time. + * + * @type {boolean} + * @memberof BlobDownloadOptions + */ + rangeGetContentCrc64?: boolean; + /** + * Conditions to meet when downloading blobs. + * + * @type {BlobRequestConditions} + * @memberof BlobDownloadOptions + */ + conditions?: BlobRequestConditions; + /** + * Call back to receive events on the progress of download operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlobDownloadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Optional. ONLY AVAILABLE IN NODE.JS. + * + * How many retries will perform when original body download stream unexpected ends. + * Above kind of ends will not trigger retry policy defined in a pipeline, + * because they doesn't emit network errors. + * + * With this option, every additional retry means an additional `FileClient.download()` request will be made + * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached. + * + * Default value is 5, please set a larger value when loading large files in poor network. + * + * @type {number} + * @memberof BlobDownloadOptions + */ + maxRetryRequests?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Contains response data for the download operation. + */ +export declare type BlobDownloadResponseModel = BlobDownloadHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobDownloadHeaders; + }; +}; +/** + * Contains response data for the {@link BlobClient.download} operation. + * + * @export + * @interface BlobDownloadResponseParsed + */ +export declare interface BlobDownloadResponseParsed extends BlobDownloadResponseModel { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @type {ObjectReplicationPolicy[]} + * @memberof BlobDownloadResponseParsed + */ + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; + /** + * Object Replication Policy Id of the destination blob. + * + * @type {string} + * @memberof BlobDownloadResponseParsed + */ + objectReplicationDestinationPolicyId?: string; +} +/** + * Option interface for the {@link BlobClient.downloadToBuffer} operation. + * + * @export + * @interface BlobDownloadToBufferOptions + */ +export declare interface BlobDownloadToBufferOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDownloadToBufferOptions + */ + abortSignal?: AbortSignalLike; + /** + * blockSize is the data every request trying to download. + * Must be >= 0, if set to 0 or undefined, blockSize will automatically calculated according + * to the blob size. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + blockSize?: number; + /** + * Optional. ONLY AVAILABLE IN NODE.JS. + * + * How many retries will perform when original block download stream unexpected ends. + * Above kind of ends will not trigger retry policy defined in a pipeline, + * because they doesn't emit network errors. + * + * With this option, every additional retry means an additional FileClient.download() request will be made + * from the broken point, until the requested block has been successfully downloaded or + * maxRetryRequestsPerBlock is reached. + * + * Default value is 5, please set a larger value when in poor network. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + maxRetryRequestsPerBlock?: number; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlobDownloadToBufferOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlobDownloadToBufferOptions + */ + conditions?: BlobRequestConditions; + /** + * Concurrency of parallel download. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + concurrency?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadToBufferOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Options to configure the {@link BlobClient.exists} operation. + * + * @export + * @interface BlobExistsOptions + */ +export declare interface BlobExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Conditions to meet. + * + * @type {BlobRequestConditions} + * @memberof BlobExistsOptions + */ + conditions?: BlobRequestConditions; +} +/** + * An interface representing BlobFlatListSegment. + */ +export declare interface BlobFlatListSegment { + blobItems: BlobItem[]; +} +/** + * An interface representing BlobFlatListSegment. + */ +export declare interface BlobFlatListSegmentModel { + blobItems: BlobItemInternal[]; +} +/** + * Defines headers for GetProperties operation. + */ +export declare interface BlobGetPropertiesHeaders { + /** + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. + */ + lastModified?: Date; + /** + * Returns the date and time the blob was created. + */ + createdOn?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { + [propertyName: string]: string; + }; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletedOn?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * Included if the blob is incremental copy blob. + */ + isIncrementalCopy?: boolean; + /** + * Included if the blob is incremental copy blob or incremental copy snapshot, if + * x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot + * for this blob. + */ + destinationSnapshot?: string; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * The size of the blob in bytes. For a page blob, this header returns the value of the + * x-ms-blob-content-length header that is stored with the blob. + */ + contentLength?: number; + /** + * The content type specified for the blob. The default content type is + * 'application/octet-stream' + */ + contentType?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only + * returned when the metadata was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * The tier of page blob on a premium storage account or tier of block blob on blob storage LRS + * accounts. For a list of allowed premium page blob tiers, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For + * blob storage LRS accounts, valid values are Hot/Cool/Archive. + */ + accessTier?: string; + /** + * For page blobs on a premium storage account only. If the access tier is not explicitly set on + * the blob, the tier is inferred based on its content length and this header will be returned + * with true value. + */ + accessTierInferred?: boolean; + /** + * For blob storage LRS accounts, valid values are + * rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not + * complete then this header is returned indicating that rehydrate is pending and also tells the + * destination tier. + */ + archiveStatus?: string; + /** + * The time the tier was changed on the object. This is only returned if the tier on the block + * blob was ever set. + */ + accessTierChangedOn?: Date; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * The value of this header indicates whether version of this blob is a current version, see also + * x-ms-version-id header. + */ + isCurrentVersion?: boolean; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * The time this blob will expire. + */ + expiresOn?: Date; + /** + * If this blob has been sealed + */ + isSealed?: boolean; + /** + * If an object is in rehydrate pending state then this header is returned with priority of + * rehydrate. Possible values include: 'High', 'Standard' + */ + rehydratePriority?: RehydratePriority; + /** + * UTC date/time value generated by the service that indicates the time at which the blob was + * last read or written to + */ + lastAccessed?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.getProperties} operation. + * + * @export + * @interface BlobGetPropertiesOptions + */ +export declare interface BlobGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting blob properties. + * + * @type {BlobRequestConditions} + * @memberof BlobGetPropertiesOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobGetPropertiesOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Contains response data for the {@link BlobClient.getProperties} operation. + * + * @export + * @interface BlobGetPropertiesResponse + */ +export declare interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @type {ObjectReplicationPolicy[]} + * @memberof BlobGetPropertiesResponse + */ + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; + /** + * Object Replication Policy Id of the destination blob. + * + * @type {string} + * @memberof BlobGetPropertiesResponse + */ + objectReplicationDestinationPolicyId?: string; +} +/** + * Contains response data for the getProperties operation. + */ +export declare type BlobGetPropertiesResponseModel = BlobGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetPropertiesHeaders; + }; +}; +/** + * Defines headers for GetTags operation. + */ +export declare interface BlobGetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.getTags} operation. + * + * @export + * @interface BlobGetTagsOptions + */ +export declare interface BlobGetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobGetTagsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet for the blob to perform this operation. + * + * @type {TagConditions} + * @memberof BlobGetTagsOptions + */ + conditions?: TagConditions; +} +/** + * Contains response data for the {@link ContainerClient.getTags} operation. + */ +export declare type BlobGetTagsResponse = { + tags: Tags; +} & BlobGetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetTagsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobTags; + }; +}; +/** + * An interface representing BlobHierarchyListSegment. + */ +export declare interface BlobHierarchyListSegment { + blobPrefixes?: BlobPrefix[]; + blobItems: BlobItem[]; +} +/** + * An interface representing BlobHierarchyListSegment. + */ +export declare interface BlobHierarchyListSegmentModel { + blobPrefixes?: BlobPrefix[]; + blobItems: BlobItemInternal[]; +} +/** + * Additional parameters for a set of operations. + */ +export declare interface BlobHTTPHeaders { + /** + * Optional. Sets the blob's cache control. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobCacheControl?: string; + /** + * Optional. Sets the blob's content type. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobContentType?: string; + /** + * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes + * for the individual blocks were validated when each was uploaded. + */ + blobContentMD5?: Uint8Array; + /** + * Optional. Sets the blob's content encoding. If specified, this property is stored with the + * blob and returned with a read request. + */ + blobContentEncoding?: string; + /** + * Optional. Set the blob's content language. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobContentLanguage?: string; + /** + * Optional. Sets the blob's Content-Disposition header. + */ + blobContentDisposition?: string; +} +/** + * An Azure Storage blob + */ +export declare interface BlobItem { + name: string; + deleted: boolean; + snapshot: string; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobProperties; + metadata?: { + [propertyName: string]: string; + }; + tags?: Tags; + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; +} +/** + * An Azure Storage blob + */ +export declare interface BlobItemInternal { + name: string; + deleted: boolean; + snapshot: string; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobProperties; + metadata?: { + [propertyName: string]: string; + }; + blobTags?: BlobTags; + objectReplicationMetadata?: { + [propertyName: string]: string; + }; +} +/** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + * + * @export + * @class BlobLeaseClient + */ +export declare class BlobLeaseClient { + private _leaseId; + private _url; + private _containerOrBlobOperation; + private _isContainer; + readonly leaseId: string; + readonly url: string; + /** + * Creates an instance of BlobLeaseClient. + * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests. + * @param {string} leaseId Initial proposed lease id. + * @memberof BlobLeaseClient + */ + constructor(client: ContainerClient | BlobClient, leaseId?: string); + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1) + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for acquire lease operation. + * @memberof BlobLeaseClient + */ + acquireLease(duration: number, options?: LeaseOperationOptions): Promise; + /** + * To change the ID of the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {string} proposedLeaseId the proposed new lease Id. + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for change lease operation. + * @memberof BlobLeaseClient + */ + changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise; + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for release lease operation. + * @memberof BlobLeaseClient + */ + releaseLease(options?: LeaseOperationOptions): Promise; + /** + * To renew the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations. + * @returns {Promise} Response data for renew lease operation. + * @memberof BlobLeaseClient + */ + renewLease(options?: LeaseOperationOptions): Promise; + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @static + * @param {number} breakPeriod Break period + * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations. + * @returns {Promise} Response data for break lease operation. + * @memberof BlobLeaseClient + */ + breakLease(breakPeriod: number, options?: LeaseOperationOptions): Promise; +} +/** + * An interface representing BlobPrefix. + */ +export declare interface BlobPrefix { + name: string; +} +/** + * Properties of a blob + */ +export declare interface BlobProperties { + createdOn?: Date; + lastModified: Date; + etag: string; + /** + * Size in bytes + */ + contentLength?: number; + contentType?: string; + contentEncoding?: string; + contentLanguage?: string; + contentMD5?: Uint8Array; + contentDisposition?: string; + cacheControl?: string; + blobSequenceNumber?: number; + /** + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * Possible values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + copyId?: string; + /** + * Possible values include: 'pending', 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + copySource?: string; + copyProgress?: string; + copyCompletedOn?: Date; + copyStatusDescription?: string; + serverEncrypted?: boolean; + incrementalCopy?: boolean; + destinationSnapshot?: string; + deletedOn?: Date; + remainingRetentionDays?: number; + /** + * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', + * 'P80', 'Hot', 'Cool', 'Archive' + */ + accessTier?: AccessTier; + accessTierInferred?: boolean; + /** + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + */ + archiveStatus?: ArchiveStatus; + customerProvidedKeySha256?: string; + /** + * The name of the encryption scope under which the blob is encrypted. + */ + encryptionScope?: string; + accessTierChangedOn?: Date; + tagCount?: number; + expiresOn?: Date; + isSealed?: boolean; + /** + * Possible values include: 'High', 'Standard' + */ + rehydratePriority?: RehydratePriority; + lastAccessedOn?: Date; +} +/** + * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}. + * + * @export + * @interface BlobQueryArrowConfiguration + */ +export declare interface BlobQueryArrowConfiguration { + /** + * Kind. + * + * @type {"arrow"} + * @memberof BlobQueryArrowConfiguration + */ + kind: "arrow"; + /** + * List of {@link BlobQueryArrowField} describing the schema of the data. + * + * @type {BlobQueryArrowField[]} + * @memberof BlobQueryArrowConfiguration + */ + schema: BlobQueryArrowField[]; +} +/** + * Describe a field in {@link BlobQueryArrowConfiguration}. + * + * @export + * @interface BlobQueryArrowField + */ +export declare interface BlobQueryArrowField { + /** + * The type of the field. + * + * @type {BlobQueryArrowFieldType} + * @memberof BlobQueryArrowField + */ + type: BlobQueryArrowFieldType; + /** + * The name of the field. + * + * @type {string} + * @memberof BlobQueryArrowField + */ + name?: string; + /** + * The precision of the field. Required if type is "decimal". + * + * @type {number} + * @memberof BlobQueryArrowField + */ + precision?: number; + /** + * The scale of the field. Required if type is is "decimal". + * + * @type {number} + * @memberof BlobQueryArrowField + */ + scale?: number; +} +/** + * The type of a {@link BlobQueryArrowField}. + */ +export declare type BlobQueryArrowFieldType = "int64" | "bool" | "timestamp[ms]" | "string" | "double" | "decimal"; +/** + * Options to query blob with CSV format. + * + * @export + * @interface BlobQueryCsvTextConfiguration + */ +export declare interface BlobQueryCsvTextConfiguration { + /** + * Record separator. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + recordSeparator: string; + /** + * Query for a CSV format blob. + * + * @type {"csv"} + * @memberof BlobQueryCsvTextConfiguration + */ + kind: "csv"; + /** + * Column separator. Default is ",". + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + columnSeparator?: string; + /** + * Field quote. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + fieldQuote?: string; + /** + * Escape character. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + escapeCharacter?: string; + /** + * Has headers. Default is false. + * + * @type {boolean} + * @memberof BlobQueryCsvTextConfiguration + */ + hasHeaders?: boolean; +} +/** + * Blob query error type. + * + * @export + * @interface BlobQueryError + */ +export declare interface BlobQueryError { + /** + * Whether error is fatal. Fatal error will stop query. + * + * @type {boolean} + * @memberof BlobQueryError + */ + isFatal: boolean; + /** + * Error name. + * + * @type {string} + * @memberof BlobQueryError + */ + name: string; + /** + * Position in bytes of the query. + * + * @type {number} + * @memberof BlobQueryError + */ + position: number; + /** + * Error description. + * + * @type {string} + * @memberof BlobQueryError + */ + description: string; +} +/** + * Defines headers for Query operation. + */ +export declare interface BlobQueryHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * The number of bytes present in the response body. + */ + contentLength?: number; + /** + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' + */ + contentType?: string; + /** + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. + */ + contentRange?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletionTime?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the whole blob's MD5 value. This value may or + * may not be equal to the value returned in Content-MD5 header, with the latter calculated from + * the requested range + */ + blobContentMD5?: Uint8Array; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + contentCrc64?: Uint8Array; + errorCode?: string; +} +/** + * Options to query blob with JSON format. + * + * @export + * @interface BlobQueryJsonTextConfiguration + */ +export declare interface BlobQueryJsonTextConfiguration { + /** + * Record separator. + * + * @type {string} + * @memberof BlobQueryJsonTextConfiguration + */ + recordSeparator: string; + /** + * Query for a JSON format blob. + * + * @type {"json"} + * @memberof BlobQueryJsonTextConfiguration + */ + kind: "json"; +} +/** + * Contains response data for the query operation. + */ +export declare type BlobQueryResponseModel = BlobQueryHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobQueryHeaders; + }; +}; +/** + * Options to configure Blob - Release Lease operation. + * + * @export + * @interface BlobReleaseLeaseOptions + */ +export declare interface BlobReleaseLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobReleaseLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when releasing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobReleaseLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Options to configure Blob - Renew Lease operation. + * + * @export + * @interface BlobRenewLeaseOptions + */ +export declare interface BlobRenewLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobRenewLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when renewing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobRenewLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * standard HTTP conditional headers, tags condition and lease condition + */ +export declare interface BlobRequestConditions extends ModifiedAccessConditions, LeaseAccessConditions { +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class BlobSASPermissions + */ +export declare class BlobSASPermissions { + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {BlobSASPermissions} + * @memberof BlobSASPermissions + */ + static parse(permissions: string): BlobSASPermissions; + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + read: boolean; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + add: boolean; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + create: boolean; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + write: boolean; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + delete: boolean; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + deleteVersion: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + tag: boolean; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + move: boolean; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + execute: boolean; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns {string} A string which represents the BlobSASPermissions + * @memberof BlobSASPermissions + */ + toString(): string; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs. + * + * @export + * @class BlobSASSignatureValues + */ +export declare interface BlobSASSignatureValues { + /** + * The version of the service this SAS will target. If not specified, it will default to the version targeted by the + * library. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + version?: string; + /** + * Optional. SAS protocols, HTTPS only or HTTPSandHTTP + * + * @type {SASProtocol} + * @memberof BlobSASSignatureValues + */ + protocol?: SASProtocol; + /** + * Optional. When the SAS will take effect. + * + * @type {Date} + * @memberof BlobSASSignatureValues + */ + startsOn?: Date; + /** + * Optional only when identifier is provided. The time after which the SAS will no longer work. + * + * @type {Date} + * @memberof BlobSASSignatureValues + */ + expiresOn?: Date; + /** + * Optional only when identifier is provided. + * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource + * being accessed for help constructing the permissions string. + * + * @type {BlobSASPermissions | ContainerSASPermissions} + * @memberof BlobSASSignatureValues + */ + permissions?: BlobSASPermissions | ContainerSASPermissions; + /** + * Optional. IP ranges allowed in this SAS. + * + * @type {SasIPRange} + * @memberof BlobSASSignatureValues + */ + ipRange?: SasIPRange; + /** + * The name of the container the SAS user may access. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + containerName: string; + /** + * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + blobName?: string; + /** + * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + snapshotTime?: string; + /** + * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + versionId?: string; + /** + * Optional. The name of the access policy on the container this SAS references if any. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + identifier?: string; + /** + * Optional. The cache-control header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + cacheControl?: string; + /** + * Optional. The content-disposition header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentDisposition?: string; + /** + * Optional. The content-encoding header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentEncoding?: string; + /** + * Optional. The content-language header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentLanguage?: string; + /** + * Optional. The content-type header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentType?: string; + /** + * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user + * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will + * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission + * check for the user specified in this value will be performed. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + preauthorizedAgentObjectId?: string; + /** + * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to + * correlate SAS generation with storage resource access. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + correlationId?: string; +} +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + * + * @export + * @class BlobServiceClient + */ +export declare class BlobServiceClient extends StorageClient { + /** + * serviceContext provided by protocol layer. + * + * @private + * @type {Service} + * @memberof BlobServiceClient + */ + private serviceContext; + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + */ + static fromConnectionString(connectionString: string, options?: StoragePipelineOptions): BlobServiceClient; + /** + * Creates an instance of BlobServiceClient. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + * + * Example using DefaultAzureCredential from `@azure/identity`: + * + * ```js + * const account = ""; + * + * const defaultAzureCredential = new DefaultAzureCredential(); + * + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * defaultAzureCredential + * ); + * ``` + * + * Example using an account name/key: + * + * ```js + * const account = "" + * const sharedKeyCredential = new StorageSharedKeyCredential(account, ""); + * + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * sharedKeyCredential + * ); + * ``` + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobServiceClient. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobServiceClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a {@link ContainerClient} object + * + * @param {string} containerName A container name + * @returns {ContainerClient} A new ContainerClient object for the given container name. + * @memberof BlobServiceClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName: string): ContainerClient; + /** + * Create a Blob container. + * + * @param {string} containerName Name of the container to create. + * @param {ContainerCreateOptions} [options] Options to configure Container Create operation. + * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client. + * @memberof BlobServiceClient + */ + createContainer(containerName: string, options?: ContainerCreateOptions): Promise<{ + containerClient: ContainerClient; + containerCreateResponse: ContainerCreateResponse; + }>; + /** + * Deletes a Blob container. + * + * @param {string} containerName Name of the container to delete. + * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + deleteContainer(containerName: string, options?: ContainerDeleteMethodOptions): Promise; + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param {string} deletedContainerName Name of the previously deleted container. + * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + undeleteContainer(deletedContainerName: string, deletedContainerVersion: string, options?: ServiceUndeleteContainerOptions): Promise<{ + containerClient: ContainerClient; + containerUndeleteResponse: ContainerUndeleteResponse; + }>; + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation. + * @returns {Promise} Response data for the Service Get Properties operation. + * @memberof BlobServiceClient + */ + getProperties(options?: ServiceGetPropertiesOptions): Promise; + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties} + * + * @param {BlobServiceProperties} properties + * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation. + * @returns {Promise} Response data for the Service Set Properties operation. + * @memberof BlobServiceClient + */ + setProperties(properties: BlobServiceProperties, options?: ServiceSetPropertiesOptions): Promise; + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats} + * + * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation. + * @returns {Promise} Response data for the Service Get Statistics operation. + * @memberof BlobServiceClient + */ + getStatistics(options?: ServiceGetStatisticsOptions): Promise; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation. + * @returns {Promise} Response data for the Service Get Account Info operation. + * @memberof BlobServiceClient + */ + getAccountInfo(options?: ServiceGetAccountInfoOptions): Promise; + /** + * Returns a list of the containers under the specified account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation. + * @returns {Promise} Response data for the Service List Container Segment operation. + * @memberof BlobServiceClient + */ + private listContainersSegment; + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {Promise} + * @memberof BlobServiceClient + */ + private findBlobsByTagsSegment; + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private findBlobsByTagsSegments; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private findBlobsByTagsItems; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags. + * @returns {PagedAsyncIterableIterator} + * @memberof BlobServiceClient + */ + findBlobsByTags(tagFilterSqlExpression: string, options?: ServiceFindBlobByTagsOptions): PagedAsyncIterableIterator; + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private listSegments; + /** + * Returns an AsyncIterableIterator for Container Items + * + * @private + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private listItems; + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.listContainers(); + * let containerItem = await iter.next(); + * while (!containerItem.done) { + * console.log(`Container ${i++}: ${containerItem.value.name}`); + * containerItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param {ServiceListContainersOptions} [options={}] Options to list containers. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof BlobServiceClient + */ + listContainers(options?: ServiceListContainersOptions): PagedAsyncIterableIterator; + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * + * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time + * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time + * @returns {Promise} + * @memberof BlobServiceClient + */ + getUserDelegationKey(startsOn: Date, expiresOn: Date, options?: ServiceGetUserDelegationKeyOptions): Promise; + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns {BlobBatchClient} A new BlobBatchClient object for this service. + * @memberof BlobServiceClient + */ + getBlobBatchClient(): BlobBatchClient; +} +/** + * Storage Service Properties. + */ +export declare interface BlobServiceProperties { + blobAnalyticsLogging?: Logging; + hourMetrics?: Metrics; + minuteMetrics?: Metrics; + /** + * The set of CORS rules. + */ + cors?: CorsRule[]; + /** + * The default version to use for requests to the Blob service if an incoming request's version + * is not specified. Possible values include version 2008-10-27 and all more recent versions + */ + defaultServiceVersion?: string; + deleteRetentionPolicy?: RetentionPolicy; + staticWebsite?: StaticWebsite; +} +/** + * Stats for the storage service. + */ +export declare interface BlobServiceStatistics { + geoReplication?: GeoReplication; +} +/** + * Defines headers for SetHTTPHeaders operation. + */ +export declare interface BlobSetHTTPHeadersHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.setHTTPHeaders} operation. + * + * @export + * @interface BlobSetHTTPHeadersOptions + */ +export declare interface BlobSetHTTPHeadersOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetHTTPHeadersOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting blob HTTP headers. + * + * @type {BlobRequestConditions} + * @memberof BlobSetHTTPHeadersOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobSetHTTPHeadersOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Contains response data for the setHTTPHeaders operation. + */ +export declare type BlobSetHTTPHeadersResponse = BlobSetHTTPHeadersHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetHTTPHeadersHeaders; + }; +}; +/** + * Defines headers for SetMetadata operation. + */ +export declare interface BlobSetMetadataHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only + * returned when the metadata was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.setMetadata} operation. + * + * @export + * @interface BlobSetMetadataOptions + */ +export declare interface BlobSetMetadataOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetMetadataOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting blob metadata. + * + * @type {BlobRequestConditions} + * @memberof BlobSetMetadataOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobSetMetadataOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlobSetMetadataOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the setMetadata operation. + */ +export declare type BlobSetMetadataResponse = BlobSetMetadataHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetMetadataHeaders; + }; +}; +/** + * Defines headers for SetTags operation. + */ +export declare interface BlobSetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.setTags} operation. + * + * @export + * @interface BlobSetTagsOptions + */ +export declare interface BlobSetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetTagsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet for the blob to perform this operation. + * + * @type {TagConditions} + * @memberof BlobSetTagsOptions + */ + conditions?: TagConditions; +} +/** + * Contains response data for the setTags operation. + */ +export declare type BlobSetTagsResponse = BlobSetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetTagsHeaders; + }; +}; +/** + * Defines headers for SetTier operation. + */ +export declare interface BlobSetTierHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and newer. + */ + version?: string; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.setAccessTier} operation. + * + * @export + * @interface BlobSetTierOptions + */ +export declare interface BlobSetTierOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetTierOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions & TagConditions} + * @memberof BlobSetTierOptions + */ + conditions?: LeaseAccessConditions & TagConditions; + /** + * Rehydrate Priority - possible values include 'High', 'Standard'. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier + * + * @type {RehydratePriority} + * @memberof BlobSetTierOptions + */ + rehydratePriority?: RehydratePriority; +} +/** + * Contains response data for the setTier operation. + */ +export declare type BlobSetTierResponse = BlobSetTierHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetTierHeaders; + }; +}; +/** + * Defines headers for StartCopyFromURL operation. + */ +export declare interface BlobStartCopyFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobStartCopyFromURLOptions + */ +export declare interface BlobStartCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobStartCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the blob that are being copied. + * + * @type {Metadata} + * @memberof BlobStartCopyFromURLOptions + */ + metadata?: Metadata; + /** + * Conditions to meet for the destination blob when copying from a URL to the blob. + * + * @type {BlobRequestConditions} + * @memberof BlobStartCopyFromURLOptions + */ + conditions?: BlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobStartCopyFromURLOptions + */ + sourceConditions?: ModifiedAccessConditions; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | PremiumPageBlobTier | string} + * @memberof BlobStartCopyFromURLOptions + */ + tier?: BlockBlobTier | PremiumPageBlobTier | string; + /** + * Rehydrate Priority - possible values include 'High', 'Standard'. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier + * + * @type {RehydratePriority} + * @memberof BlobStartCopyFromURLOptions + */ + rehydratePriority?: RehydratePriority; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobStartCopyFromURLOptions + */ + tags?: Tags; + /** + * Overrides the sealed state of the destination blob. Default true. + * + * @type {boolean} + * @memberof BlobStartCopyFromURLOptions + */ + sealBlob?: boolean; +} +/** + * Contains response data for the startCopyFromURL operation. + */ +export declare type BlobStartCopyFromURLResponse = BlobStartCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobStartCopyFromURLHeaders; + }; +}; +/** + * Options to configure the {@link BlobClient.syncCopyFromURL} operation. + * + * @export + * @interface BlobSyncCopyFromURLOptions + */ +export declare interface BlobSyncCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSyncCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the snapshot. + * + * @type {Metadata} + * @memberof BlobSyncCopyFromURLOptions + */ + metadata?: Metadata; + /** + * Conditions to meet for the destination blob when copying from a URL to the blob. + * + * @type {BlobRequestConditions} + * @memberof BlobSyncCopyFromURLOptions + */ + conditions?: BlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof BlobSyncCopyFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * Specify the md5 calculated for the range of bytes that must be read from the copy source. + * + * @type {Uint8Array} + * @memberof BlobSyncCopyFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobSyncCopyFromURLOptions + */ + tags?: Tags; +} +/** + * An interface representing BlobTag. + */ +export declare interface BlobTag { + key: string; + value: string; +} +/** + * Blob tags + */ +export declare interface BlobTags { + blobTagSet: BlobTag[]; +} +/** + * Defines values for BlobType. + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + * @readonly + * @enum {string} + */ +export declare type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; +/** + * Defines headers for Undelete operation. + */ +export declare interface BlobUndeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated. + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobClient.undelete} operation. + * + * @export + * @interface BlobUndeleteOptions + */ +export declare interface BlobUndeleteOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobUndeleteOptions + */ + abortSignal?: AbortSignalLike; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobUndeleteOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Contains response data for the undelete operation. + */ +export declare type BlobUndeleteResponse = BlobUndeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobUndeleteHeaders; + }; +}; +/** + * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and + * {@link BlockBlobClient.uploadBrowserDate}. + * + * @export + */ +export declare type BlobUploadCommonResponse = BlockBlobUploadHeaders & { + /** + * The underlying HTTP response. + * + * @type {HttpResponse} + * @memberof BlobUploadCommonResponse + */ + _response: HttpResponse; +}; +/** + * Represents a single block in a block blob. It describes the block's ID and size. + */ +export declare interface Block { + /** + * The base64 encoded block ID. + */ + name: string; + /** + * The block size in bytes. + */ + size: number; +} +/** + * BlockBlobClient defines a set of operations applicable to block blobs. + * + * @export + * @class BlockBlobClient + * @extends {BlobClient} + */ +export declare class BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + * + * @private + * @type {Blobs} + * @memberof BlobClient + */ + private _blobContext; + /** + * blockBlobContext provided by protocol layer. + * + * @private + * @type {BlockBlobs} + * @memberof BlockBlobClient + */ + private blockBlobContext; + /** + * + * Creates an instance of BlockBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlockBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of BlockBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a block blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage block blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlockBlobClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlockBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a block blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage block blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlockBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof BlockBlobClient + */ + withSnapshot(snapshot: string): BlockBlobClient; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); + * console.log("Query blob content:", downloaded); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param {string} query + * @param {BlockBlobQueryOptions} [options={}] + * @returns {Promise} + * @memberof BlockBlobClient + */ + query(query: string, options?: BlockBlobQueryOptions): Promise; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation. + * @returns {Promise} Response data for the Block Blob Upload operation. + * @memberof BlockBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise; + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {HttpRequestBody} body Data to upload to the staging area. + * @param {number} contentLength Number of bytes to upload. + * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation. + * @returns {Promise} Response data for the Block Blob Stage Block operation. + * @memberof BlockBlobClient + */ + stageBlock(blockId: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobStageBlockOptions): Promise; + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {string} sourceURL Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation. + * @returns {Promise} Response data for the Block Blob Stage Block From URL operation. + * @memberof BlockBlobClient + */ + stageBlockFromURL(blockId: string, sourceURL: string, offset?: number, count?: number, options?: BlockBlobStageBlockFromURLOptions): Promise; + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * + * @param {string[]} blocks Array of 64-byte value that is base64-encoded + * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation. + * @returns {Promise} Response data for the Block Blob Commit Block List operation. + * @memberof BlockBlobClient + */ + commitBlockList(blocks: string[], options?: BlockBlobCommitBlockListOptions): Promise; + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * + * @param {BlockListType} listType Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation. + * @returns {Promise} Response data for the Block Blob Get Block List operation. + * @memberof BlockBlobClient + */ + getBlockList(listType: BlockListType, options?: BlockBlobGetBlockListOptions): Promise; + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @export + * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] + * @returns {Promise} + * @memberof BlockBlobClient + */ + uploadData(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise; + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * @deprecated Use {@link uploadData} instead. + * + * @export + * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadBrowserData(browserData: Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise; + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory + * @param {number} size size of the data to upload. + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + private uploadSeekableInternal; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param {string} filePath Full path of local file + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {(Promise)} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadFile(filePath: string, options?: BlockBlobParallelUploadOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param {Readable} stream Node.js Readable stream + * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadStream(stream: Readable, bufferSize?: number, maxConcurrency?: number, options?: BlockBlobUploadStreamOptions): Promise; +} +/** + * Defines headers for CommitBlockList operation. + */ +export declare interface BlockBlobCommitBlockListHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * This header is returned so that the client can check for message content integrity. This + * header refers to the content of the request, meaning, in this case, the list of blocks, and + * not the content of the blob itself. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. This + * header refers to the content of the request, meaning, in this case, the list of blocks, and + * not the content of the blob itself. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link BlockBlobClient.commitBlockList} operation. + * + * @export + * @interface BlockBlobCommitBlockListOptions + */ +export declare interface BlockBlobCommitBlockListOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobCommitBlockListOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when committing the block list. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobCommitBlockListOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when committing block list. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobCommitBlockListOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when committing block list. + * + * @type {Metadata} + * @memberof BlockBlobCommitBlockListOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobCommitBlockListOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobCommitBlockListOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobCommitBlockListOptions + */ + tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobCommitBlockListOptions + */ + tags?: Tags; +} +/** + * Contains response data for the commitBlockList operation. + */ +export declare type BlockBlobCommitBlockListResponse = BlockBlobCommitBlockListHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobCommitBlockListHeaders; + }; +}; +/** + * Defines headers for GetBlockList operation. + */ +export declare interface BlockBlobGetBlockListHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The media type of the body of the response. For Get Block List this is 'application/xml' + */ + contentType?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link BlockBlobClient.getBlockList} operation. + * + * @export + * @interface BlockBlobGetBlockListOptions + */ +export declare interface BlockBlobGetBlockListOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobGetBlockListOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions & TagConditions} + * @memberof BlockBlobGetBlockListOptions + */ + conditions?: LeaseAccessConditions & TagConditions; +} +/** + * Contains response data for the getBlockList operation. + */ +export declare type BlockBlobGetBlockListResponse = BlockList & BlockBlobGetBlockListHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobGetBlockListHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlockList; + }; +}; +/** + * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}. + * + * @export + * @interface BlockBlobParallelUploadOptions + */ +export declare interface BlockBlobParallelUploadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobParallelUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Destination block blob size in bytes. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + blockSize?: number; + /** + * Blob size threshold in bytes to start concurrency uploading. + * Default value is 256MB, blob size less than this option will + * be uploaded via one I/O operation without concurrency. + * You can customize a value less equal than the default value. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + maxSingleShotSize?: number; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobParallelUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Blob HTTP Headers. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobParallelUploadOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * Metadata of block blob. + * + * @type {{ [propertyName: string]: string }} + * @memberof BlockBlobParallelUploadOptions + */ + metadata?: { + [propertyName: string]: string; + }; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobParallelUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * Concurrency of parallel uploading. Must be >= 0. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + concurrency?: number; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobParallelUploadOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobParallelUploadOptions + */ + tags?: Tags; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobParallelUploadOptions + */ + tier?: BlockBlobTier | string; +} +/** + * Options to configure {@link BlockBlobClient.query} operation. + * + * @export + * @interface BlockBlobQueryOptions + */ +export declare interface BlockBlobQueryOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Configurations for the query input. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions + */ + inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; + /** + * Configurations for the query output. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration| BlobQueryArrowConfiguration} + * @memberof BlockBlobQueryOptions + */ + outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration; + /** + * Callback to receive events on the progress of query operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback to receive error events during the query operaiton. + * + * @memberof BlockBlobQueryOptions + */ + onError?: (error: BlobQueryError) => void; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; +} +/** + * Defines headers for StageBlockFromURL operation. + */ +export declare interface BlockBlobStageBlockFromURLHeaders { + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation. + * + * @export + * @interface BlockBlobStageBlockFromURLOptions + */ +export declare interface BlockBlobStageBlockFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobStageBlockFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Specifies the bytes of the source Blob/File to upload. + * If not specified, the entire content is uploaded as a single block. + * + * @type {Range} + * @memberof BlockBlobStageBlockFromURLOptions + */ + range?: Range; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlockBlobStageBlockFromURLOptions + */ + conditions?: LeaseAccessConditions; + /** + * An MD5 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * @type {Uint8Array} + * @memberof BlockBlobStageBlockFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobStageBlockFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobStageBlockFromURLOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the stageBlockFromURL operation. + */ +export declare type BlockBlobStageBlockFromURLResponse = BlockBlobStageBlockFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobStageBlockFromURLHeaders; + }; +}; +/** + * Defines headers for StageBlock operation. + */ +export declare interface BlockBlobStageBlockHeaders { + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link BlockBlobClient.stageBlock} operation. + * + * @export + * @interface BlockBlobStageBlockOptions + */ +export declare interface BlockBlobStageBlockOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobStageBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlockBlobStageBlockOptions + */ + conditions?: LeaseAccessConditions; + /** + * Callback to receive events on the progress of stage block operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobStageBlockOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobStageBlockOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobStageBlockOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the stageBlock operation. + */ +export declare type BlockBlobStageBlockResponse = BlockBlobStageBlockHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobStageBlockHeaders; + }; +}; +/** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ +export declare enum BlockBlobTier { + /** + * Optimized for storing data that is accessed frequently. + */ + Hot = "Hot", + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + Cool = "Cool", + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + Archive = "Archive" +} +/** + * Defines headers for Upload operation. + */ +export declare interface BlockBlobUploadHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link BlockBlobClient.upload} operation. + * + * @export + * @interface BlockBlobUploadOptions + */ +export declare interface BlockBlobUploadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when uploading to a block blob. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobUploadOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when uploading to a block blob. + * + * @type {Metadata} + * @memberof BlockBlobUploadOptions + */ + metadata?: Metadata; + /** + * Callback to receive events on the progress of upload operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobUploadOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobUploadOptions + */ + tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadOptions + */ + tags?: Tags; +} +/** + * Contains response data for the upload operation. + */ +export declare type BlockBlobUploadResponse = BlockBlobUploadHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobUploadHeaders; + }; +}; +/** + * Option interface for the {@link BlockBlobClient.uploadStream} operation. + * + * @export + * @interface BlockBlobUploadStreamOptions + */ +export declare interface BlockBlobUploadStreamOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadStreamOptions + */ + abortSignal?: AbortSignalLike; + /** + * Blob HTTP Headers. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobUploadStreamOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * Metadata of block blob. + * + * @type {{ [propertyName: string]: string }} + * @memberof BlockBlobUploadStreamOptions + */ + metadata?: { + [propertyName: string]: string; + }; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadStreamOptions + */ + conditions?: BlobRequestConditions; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadStreamOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobUploadStreamOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadStreamOptions + */ + tags?: Tags; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobUploadStreamOptions + */ + tier?: BlockBlobTier | string; +} +/** + * An interface representing BlockList. + */ +export declare interface BlockList { + committedBlocks?: Block[]; + uncommittedBlocks?: Block[]; +} +/** + * Defines values for BlockListType. + * Possible values include: 'committed', 'uncommitted', 'all' + * @readonly + * @enum {string} + */ +export declare type BlockListType = 'committed' | 'uncommitted' | 'all'; +/** + * An interface for options common to every remote operation. + */ +export declare interface CommonOptions { + /** + * Options to configure spans created when tracing is enabled. + */ + tracingOptions?: OperationTracingOptions; +} +/** + * Options to configure Container - Acquire Lease operation. + * + * @export + * @interface ContainerAcquireLeaseOptions + */ +export declare interface ContainerAcquireLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerAcquireLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when acquiring the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerAcquireLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Optional Parameters. + */ +export declare interface ContainerBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time + * remaining on the lease. If longer, the time remaining on the lease is used. A new lease will + * not be available before the break period has expired, but the lease may be held for longer + * than the break period. If this header does not appear with a break operation, a fixed-duration + * lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + */ + breakPeriod?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditionsModel; +} +/** + * Options to configure Container - Break Lease operation. + * + * @export + * @interface ContainerBreakLeaseOptions + */ +export declare interface ContainerBreakLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerBreakLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when breaking the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerBreakLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Options to configure Container - Change Lease operation. + * + * @export + * @interface ContainerChangeLeaseOptions + */ +export declare interface ContainerChangeLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerChangeLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerChangeLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + * + * @export + * @class ContainerClient + */ +export declare class ContainerClient extends StorageClient { + /** + * containerContext provided by protocol layer. + * + * @private + * @type {Containers} + * @memberof ContainerClient + */ + private containerContext; + private _containerName; + readonly containerName: string; + /** + * + * Creates an instance of ContainerClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof ContainerClient + */ + constructor(connectionString: string, containerName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of ContainerClient. + * This method accepts an encoded URL or non-encoded URL pointing to a page blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage page blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof ContainerClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of ContainerClient. + * This method accepts an encoded URL or non-encoded URL pointing to a page blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage page blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof ContainerClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] Options to Container Create operation. + * @returns {Promise} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + create(options?: ContainerCreateOptions): Promise; + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] + * @returns {Promise} + * @memberof ContainerClient + */ + createIfNotExists(options?: ContainerCreateOptions): Promise; + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param {ContainerExistsOptions} [options={}] + * @returns {Promise} + * @memberof ContainerClient + */ + exists(options?: ContainerExistsOptions): Promise; + /** + * Creates a {@link BlobClient} + * + * @param {string} blobName A blob name + * @returns {BlobClient} A new BlobClient object for the given blob name. + * @memberof ContainerClient + */ + getBlobClient(blobName: string): BlobClient; + /** + * Creates an {@link AppendBlobClient} + * + * @param {string} blobName An append blob name + * @returns {AppendBlobClient} + * @memberof ContainerClient + */ + getAppendBlobClient(blobName: string): AppendBlobClient; + /** + * Creates a {@link BlockBlobClient} + * + * @param {string} blobName A block blob name + * @returns {BlockBlobClient} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * + * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + getBlockBlobClient(blobName: string): BlockBlobClient; + /** + * Creates a {@link PageBlobClient} + * + * @param {string} blobName A page blob name + * @returns {PageBlobClient} + * @memberof ContainerClient + */ + getPageBlobClient(blobName: string): PageBlobClient; + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation. + * @returns {Promise} + * @memberof ContainerClient + */ + getProperties(options?: ContainerGetPropertiesOptions): Promise; + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + delete(options?: ContainerDeleteMethodOptions): Promise; + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + deleteIfExists(options?: ContainerDeleteMethodOptions): Promise; + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation. + * @returns {Promise} + * @memberof ContainerClient + */ + setMetadata(metadata?: Metadata, options?: ContainerSetMetadataOptions): Promise; + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * + * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + getAccessPolicy(options?: ContainerGetAccessPolicyOptions): Promise; + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * + * @param {PublicAccessType} [access] The level of public access to data in the container. + * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy. + * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + setAccessPolicy(access?: PublicAccessType, containerAcl?: SignedIdentifier[], options?: ContainerSetAccessPolicyOptions): Promise; + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container. + * @memberof ContainerClient + */ + getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {string} blobName Name of the block blob to create or update. + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation. + * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance. + * @memberof ContainerClient + */ + uploadBlockBlob(blobName: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<{ + blockBlobClient: BlockBlobClient; + response: BlockBlobUploadResponse; + }>; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {string} blobName + * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation. + * @returns {Promise} Block blob deletion response data. + * @memberof ContainerClient + */ + deleteBlob(blobName: string, options?: ContainerDeleteBlobOptions): Promise; + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + private listBlobFlatSegment; + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + private listBlobHierarchySegment; + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listSegments; + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @private + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listItems; + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * // Get the containerClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("");` + * let i = 1; + * for await (const blob of containerClient.listBlobsFlat()) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = containerClient.listBlobsFlat(); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof ContainerClient + */ + listBlobsFlat(options?: ContainerListBlobsOptions): PagedAsyncIterableIterator; + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listHierarchySegments; + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator<{ kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem>} + * @memberof ContainerClient + */ + private listItemsByHierarchy; + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * Example using `for await` syntax: + * + * ```js + * for await (const item of containerClient.listBlobsByHierarchy("/")) { + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); + * let entity = await iter.next(); + * while (!entity.done) { + * let item = entity.value; + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * entity = await iter.next(); + * } + * ```js + * + * Example using `byPage()`: + * + * ```js + * console.log("Listing blobs by hierarchy by page"); + * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { + * const segment = response.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * Example using paging with a max page size: + * + * ```js + * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * + * let i = 1; + * for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { + * console.log(`Page ${i++}`); + * const segment = response.segment; + * + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation. + * @returns {(PagedAsyncIterableIterator< + * { kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem, + * ContainerListBlobHierarchySegmentResponse + * >)} + * @memberof ContainerClient + */ + listBlobsByHierarchy(delimiter: string, options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<({ + kind: "prefix"; + } & BlobPrefix) | ({ + kind: "blob"; + } & BlobItem), ContainerListBlobHierarchySegmentResponse>; + private getContainerNameFromUrl; +} +/** + * Defines headers for Create operation. + */ +export declare interface ContainerCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the {@link ContainerClient.createIfNotExists} operation. + * + * @export + * @interface ContainerCreateIfNotExistsResponse + */ +export declare interface ContainerCreateIfNotExistsResponse extends ContainerCreateResponse { + /** + * Indicate whether the container is successfully created. Is false when the container is not changed as it already exists. + * + * @type {boolean} + * @memberof ContainerCreateIfNotExistsResponse + */ + succeeded: boolean; +} +/** + * Options to configure {@link ContainerClient.create} operation. + * + * @export + * @interface ContainerCreateOptions + */ +export declare interface ContainerCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the container. + * + * @type {Metadata} + * @memberof ContainerCreateOptions + */ + metadata?: Metadata; + /** + * Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: + * - `container`: Specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. + * - `blob`: Specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. + * + * @type {PublicAccessType} + * @memberof ContainerCreateOptions + */ + access?: PublicAccessType; + /** + * Container encryption scope info. + * + * @type {ContainerEncryptionScope} + * @memberof ContainerCreateOptions + */ + containerEncryptionScope?: ContainerEncryptionScope; +} +/** + * Contains response data for the create operation. + */ +export declare type ContainerCreateResponse = ContainerCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerCreateHeaders; + }; +}; +/** + * Options to configure the {@link ContainerClient.deleteBlob} operation. + * + * @export + * @interface ContainerDeleteBlobOptions + */ +export declare interface ContainerDeleteBlobOptions extends BlobDeleteOptions { + /** + * An opaque DateTime value that, when present, specifies the version + * of the blob to delete. It's for service version 2019-10-10 and newer. + * + * @type {string} + * @memberof ContainerDeleteBlobOptions + */ + versionId?: string; +} +/** + * Defines headers for Delete operation. + */ +export declare interface ContainerDeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the {@link ContainerClient.deleteIfExists} operation. + * + * @export + * @interface ContainerDeleteIfExistsResponse + */ +export declare interface ContainerDeleteIfExistsResponse extends ContainerDeleteResponse { + /** + * Indicate whether the container is successfully deleted. Is false if the container does not exist in the first place. + * + * @type {boolean} + * @memberof ContainerDeleteIfExistsResponse + */ + succeeded: boolean; +} +/** + * Options to configure {@link ContainerClient.delete} operation. + * + * @export + * @interface ContainerDeleteMethodOptions + */ +export declare interface ContainerDeleteMethodOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerDeleteMethodOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when deleting the container. + * + * @type {ContainerRequestConditions} + * @memberof ContainerDeleteMethodOptions + */ + conditions?: ContainerRequestConditions; +} +/** + * Contains response data for the deleteMethod operation. + */ +export declare type ContainerDeleteResponse = ContainerDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerDeleteHeaders; + }; +}; +/** + * Additional parameters for create operation. + */ +export declare interface ContainerEncryptionScope { + /** + * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the + * container and use for all future writes. + */ + defaultEncryptionScope?: string; + /** + * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a + * different encryption scope than the scope set on the container. + */ + preventEncryptionScopeOverride?: boolean; +} +/** + * Options to configure {@link ContainerClient.exists} operation. + * + * @export + * @interface ContainerExistsOptions + */ +export declare interface ContainerExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerDeleteMethodOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Defines headers for GetAccessPolicy operation. + */ +export declare interface ContainerGetAccessPolicyHeaders { + /** + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' + */ + blobPublicAccess?: PublicAccessType; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link ContainerClient.getAccessPolicy} operation. + * + * @export + * @interface ContainerGetAccessPolicyOptions + */ +export declare interface ContainerGetAccessPolicyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerGetAccessPolicyOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof ContainerGetAccessPolicyOptions + */ + conditions?: LeaseAccessConditions; +} +/** + * Contains response data for the {@link ContainerClient.getAccessPolicy} operation. + */ +export declare type ContainerGetAccessPolicyResponse = { + signedIdentifiers: SignedIdentifier[]; +} & ContainerGetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerGetAccessPolicyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SignedIdentifierModel[]; + }; +}; +/** + * Defines headers for GetProperties operation. + */ +export declare interface ContainerGetPropertiesHeaders { + metadata?: { + [propertyName: string]: string; + }; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' + */ + blobPublicAccess?: PublicAccessType; + /** + * Indicates whether the container has an immutability policy set on it. + */ + hasImmutabilityPolicy?: boolean; + /** + * Indicates whether the container has a legal hold. + */ + hasLegalHold?: boolean; + /** + * The default encryption scope for the container. + */ + defaultEncryptionScope?: string; + /** + * Indicates whether the container's default encryption scope can be overriden. + */ + denyEncryptionScopeOverride?: boolean; + errorCode?: string; +} +/** + * Options to configure {@link ContainerClient.getProperties} operation. + * + * @export + * @interface ContainerGetPropertiesOptions + */ +export declare interface ContainerGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof ContainerGetPropertiesOptions + */ + conditions?: LeaseAccessConditions; +} +/** + * Contains response data for the getProperties operation. + */ +export declare type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerGetPropertiesHeaders; + }; +}; +/** + * An Azure Storage container + */ +export declare interface ContainerItem { + name: string; + deleted?: boolean; + version?: string; + properties: ContainerProperties; + metadata?: { + [propertyName: string]: string; + }; +} +/** + * Defines headers for ListBlobFlatSegment operation. + */ +export declare interface ContainerListBlobFlatSegmentHeaders { + /** + * The media type of the body of the response. For List Blobs this is 'application/xml' + */ + contentType?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the listBlobFlatSegment operation. + */ +export declare type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobFlatSegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsFlatSegmentResponseModel; + }; +}; +/** + * Defines headers for ListBlobHierarchySegment operation. + */ +export declare interface ContainerListBlobHierarchySegmentHeaders { + /** + * The media type of the body of the response. For List Blobs this is 'application/xml' + */ + contentType?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the listBlobHierarchySegment operation. + */ +export declare type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobHierarchySegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsHierarchySegmentResponseModel; + }; +}; +/** + * Options to configure Container - List Blobs operations. + * + * See: + * - {@link ContainerClient.listBlobsFlat} + * - {@link ContainerClient.listBlobsByHierarchy} + * + * @export + * @interface ContainerListBlobsOptions + */ +export declare interface ContainerListBlobsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerListBlobsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Filters the results to return only containers + * whose name begins with the specified prefix. + */ + prefix?: string; + /** + * Specifies whether metadata related to any current or previous Copy Blob operation should be included in the response. + */ + includeCopy?: boolean; + /** + * Specifies whether soft deleted blobs should be included in the response. + */ + includeDeleted?: boolean; + /** + * Specifies whether blob metadata be returned in the response. + */ + includeMetadata?: boolean; + /** + * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response. + */ + includeSnapshots?: boolean; + /** + * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response. + */ + includeVersions?: boolean; + /** + * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response. + */ + includeUncommitedBlobs?: boolean; + /** + * Specifies whether blob tags be returned in the response. + */ + includeTags?: boolean; +} +/** + * Properties of a container + */ +export declare interface ContainerProperties { + lastModified: Date; + etag: string; + /** + * Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * Possible values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Possible values include: 'container', 'blob' + */ + publicAccess?: PublicAccessType; + hasImmutabilityPolicy?: boolean; + hasLegalHold?: boolean; + defaultEncryptionScope?: string; + preventEncryptionScopeOverride?: boolean; + deletedOn?: Date; + remainingRetentionDays?: number; +} +/** + * Options to configure Container - Release Lease operation. + * + * @export + * @interface ContainerReleaseLeaseOptions + */ +export declare interface ContainerReleaseLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerReleaseLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when releasing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerReleaseLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Options to configure Container - Renew Lease operation. + * + * @export + * @interface ContainerRenewLeaseOptions + */ +export declare interface ContainerRenewLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerRenewLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when renewing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerRenewLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Conditions to meet for the container. + */ +export declare interface ContainerRequestConditions extends LeaseAccessConditions, ModificationConditions { +} +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class ContainerSASPermissions + */ +export declare class ContainerSASPermissions { + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {ContainerSASPermissions} + * @memberof ContainerSASPermissions + */ + static parse(permissions: string): ContainerSASPermissions; + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + read: boolean; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + add: boolean; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + create: boolean; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + write: boolean; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + delete: boolean; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + deleteVersion: boolean; + /** + * Specifies List access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + list: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + tag: boolean; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + move: boolean; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + execute: boolean; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @returns {string} + * @memberof ContainerSASPermissions + */ + toString(): string; +} +/** + * Defines headers for SetAccessPolicy operation. + */ +export declare interface ContainerSetAccessPolicyHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link ContainerClient.setAccessPolicy} operation. + * + * @export + * @interface ContainerSetAccessPolicyOptions + */ +export declare interface ContainerSetAccessPolicyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerSetAccessPolicyOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting the access policy. + * + * @type {ContainerRequestConditions} + * @memberof ContainerSetAccessPolicyOptions + */ + conditions?: ContainerRequestConditions; +} +/** + * Contains response data for the setAccessPolicy operation. + */ +export declare type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerSetAccessPolicyHeaders; + }; +}; +/** + * Defines headers for SetMetadata operation. + */ +export declare interface ContainerSetMetadataHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link ContainerClient.setMetadata} operation. + * + * @export + * @interface ContainerSetMetadataOptions + */ +export declare interface ContainerSetMetadataOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerSetMetadataOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {ContainerRequestConditions} + * @memberof ContainerSetMetadataOptions + */ + conditions?: ContainerRequestConditions; +} +/** + * Contains response data for the setMetadata operation. + */ +export declare type ContainerSetMetadataResponse = ContainerSetMetadataHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerSetMetadataHeaders; + }; +}; +/** + * Defines headers for Restore operation. + */ +export declare interface ContainerUndeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Contains response data for the restore operation. + */ +export declare type ContainerUndeleteResponse = ContainerUndeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerUndeleteHeaders; + }; +}; +/** + * Defines the operations from a {@link BlobClient} that are needed for the poller + * returned by {@link BlobClient.beginCopyFromURL} to work. + */ +export declare type CopyPollerBlobClient = Pick & { + startCopyFromURL(copySource: string, options?: BlobStartCopyFromURLOptions): Promise; +}; +/** + * Defines values for CopyStatusType. + * Possible values include: 'pending', 'success', 'aborted', 'failed' + * @readonly + * @enum {string} + */ +export declare type CopyStatusType = 'pending' | 'success' | 'aborted' | 'failed'; +/** + * CORS is an HTTP feature that enables a web application running under one domain to access + * resources in another domain. Web browsers implement a security restriction known as same-origin + * policy that prevents a web page from calling APIs in a different domain; CORS provides a secure + * way to allow one domain (the origin domain) to call APIs in another domain + */ +export declare interface CorsRule { + /** + * The origin domains that are permitted to make a request against the storage service via CORS. + * The origin domain is the domain from which the request originates. Note that the origin must + * be an exact case-sensitive match with the origin that the user age sends to the service. You + * can also use the wildcard character '*' to allow all origin domains to make requests via CORS. + */ + allowedOrigins: string; + /** + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma + * separated) + */ + allowedMethods: string; + /** + * the request headers that the origin domain may specify on the CORS request. + */ + allowedHeaders: string; + /** + * The response headers that may be sent in the response to the CORS request and exposed by the + * browser to the request issuer + */ + exposedHeaders: string; + /** + * The maximum amount time that a browser should cache the preflight OPTIONS request. + */ + maxAgeInSeconds: number; +} +/** + * Additional parameters for a set of operations. + */ +export declare interface CpkInfo { + /** + * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If + * not specified, encryption is performed with the root account encryption key. For more + * information, see Encryption at Rest for Azure Storage Services. + */ + encryptionKey?: string; + /** + * The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key + * header is provided. + */ + encryptionKeySha256?: string; + /** + * The algorithm used to produce the encryption key hash. Currently, the only accepted value is + * "AES256". Must be provided if the x-ms-encryption-key header is provided. Possible values + * include: 'AES256' + */ + encryptionAlgorithm?: EncryptionAlgorithmType; +} +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + * + * @export + * @abstract + * @class Credential + */ +export declare abstract class Credential implements RequestPolicyFactory { + /** + * Creates a RequestPolicy object. + * + * @param {RequestPolicy} _nextPolicy + * @param {RequestPolicyOptions} _options + * @returns {RequestPolicy} + * @memberof Credential + */ + create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy; +} +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + * + * @export + * @abstract + * @class CredentialPolicy + * @extends {BaseRequestPolicy} + */ +export declare abstract class CredentialPolicy extends BaseRequestPolicy { + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof CredentialPolicy + */ + sendRequest(request: WebResource): Promise; + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @protected + * @abstract + * @param {WebResource} request + * @returns {WebResource} + * @memberof CredentialPolicy + */ + protected signRequest(request: WebResource): WebResource; +} +/** + * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy. + */ +export declare type CredentialPolicyCreator = (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => CredentialPolicy; +/** + * Defines values for DeleteSnapshotsOptionType. + * Possible values include: 'include', 'only' + * @readonly + * @enum {string} + */ +export declare type DeleteSnapshotsOptionType = 'include' | 'only'; +export { deserializationPolicy }; +/** + * Defines values for EncryptionAlgorithmType. + * Possible values include: 'AES256' + * @readonly + * @enum {string} + */ +export declare type EncryptionAlgorithmType = 'AES256'; +/** + * Blob info from a Filter Blobs API call + */ +export declare interface FilterBlobItem { + name: string; + containerName: string; + tagValue: string; +} +/** + * The result of a Filter Blobs API call + */ +export declare interface FilterBlobSegment { + serviceEndpoint: string; + where: string; + blobs: FilterBlobItem[]; + continuationToken?: string; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @param {AccountSASSignatureValues} accountSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + * @memberof AccountSASSignatureValues + */ +export declare function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * Fill in the required details before running the following snippets. + * + * Example usage: + * + * ```js + * // Generate service level SAS for a container + * const containerSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * permissions: ContainerSASPermissions.parse("racwdl"), // Required + * startsOn: new Date(), // Optional + * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2016-05-31" // Optional + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * Example using an identifier: + * + * ```js + * // Generate service level SAS for a container with identifier + * // startsOn & permissions are optional when identifier is provided + * const identifier = "unique-id"; + * await containerClient.setAccessPolicy(undefined, [ + * { + * accessPolicy: { + * expiresOn: new Date(new Date().valueOf() + 86400), // Date type + * permissions: ContainerSASPermissions.parse("racwdl").toString(), + * startsOn: new Date() // Date type + * }, + * id: identifier + * } + * ]); + * + * const containerSAS = generateBlobSASQueryParameters( + * { + * containerName, // Required + * identifier // Required + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * Example using a blob name: + * + * ```js + * // Generate service level SAS for a blob + * const blobSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * blobName, // Required + * permissions: BlobSASPermissions.parse("racwd"), // Required + * startsOn: new Date(), // Optional + * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type + * cacheControl: "cache-control-override", // Optional + * contentDisposition: "content-disposition-override", // Optional + * contentEncoding: "content-encoding-override", // Optional + * contentLanguage: "content-language-override", // Optional + * contentType: "content-type-override", // Optional + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2016-05-31" // Optional + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * @export + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Creates an instance of SASQueryParameters. + * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required. + * + * Example usage: + * + * ```js + * // Generate user delegation SAS for a container + * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn); + * const containerSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * permissions: ContainerSASPermissions.parse("racwdl"), // Required + * startsOn, // Optional. Date type + * expiresOn, // Required. Date type + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2018-11-09" // Must >= 2018-11-09 to generate user delegation SAS + * }, + * userDelegationKey, // UserDelegationKey + * accountName + * ).toString(); + * ``` + * + * @export + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKey} userDelegationKey Return value of `blobServiceClient.getUserDelegationKey()` + * @param {string} accountName + * @returns {SASQueryParameters} + */ +export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, userDelegationKey: UserDelegationKey, accountName: string): SASQueryParameters; +/** + * Geo-Replication information for the Secondary Storage Service + */ +export declare interface GeoReplication { + /** + * The status of the secondary location. Possible values include: 'live', 'bootstrap', + * 'unavailable' + */ + status: GeoReplicationStatusType; + /** + * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed + * to be available for read operations at the secondary. Primary writes after this point in time + * may or may not be available for reads. + */ + lastSyncOn: Date; +} +/** + * Defines values for GeoReplicationStatusType. + * Possible values include: 'live', 'bootstrap', 'unavailable' + * @readonly + * @enum {string} + */ +export declare type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable'; +export { HttpHeaders }; +export { HttpOperationResponse }; +export { HttpRequestBody }; +export { IHttpClient }; +/** + * The details for a specific lease. + */ +export declare interface Lease { + /** + * The ETag contains a value that you can use to + * perform operations conditionally. If the request version is 2011-08-18 or + * newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was + * last modified. Any operation that modifies the blob, including an update + * of the blob's metadata or properties, changes the last-modified time of + * the blob. + */ + lastModified?: Date; + /** + * Uniquely identifies a container's lease + */ + leaseId?: string; + /** + * Approximate time remaining in the lease + * period, in seconds. + */ + leaseTime?: number; + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used + * to execute the request. This header is returned for requests made against + * version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that + * indicates the time at which the response was initiated + */ + date?: Date; + /** + * Error code if any associated with the response that returned + * the Lease information. + */ + errorCode?: string; +} +/** + * Additional parameters for a set of operations. + */ +export declare interface LeaseAccessConditions { + /** + * If specified, the operation only succeeds if the resource's lease is active and matches this + * ID. + */ + leaseId?: string; +} +/** + * Defines values for LeaseDurationType. + * Possible values include: 'infinite', 'fixed' + * @readonly + * @enum {string} + */ +export declare type LeaseDurationType = 'infinite' | 'fixed'; +/** + * Configures lease operations. + * + * @export + * @interface LeaseOperationOptions + */ +export declare interface LeaseOperationOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof LeaseOperationOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof LeaseOperationOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Contains the response data for operations that create, modify, or delete a lease. + * + * See {@link BlobLeaseClient}. + */ +export declare type LeaseOperationResponse = Lease & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: Lease; + }; +}; +/** + * Defines values for LeaseStateType. + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * @readonly + * @enum {string} + */ +export declare type LeaseStateType = 'available' | 'leased' | 'expired' | 'breaking' | 'broken'; +/** + * Defines values for LeaseStatusType. + * Possible values include: 'locked', 'unlocked' + * @readonly + * @enum {string} + */ +export declare type LeaseStatusType = 'locked' | 'unlocked'; +/** + * An enumeration of blobs + */ +export declare interface ListBlobsFlatSegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + segment: BlobFlatListSegment; + continuationToken?: string; +} +/** + * An enumeration of blobs + */ +export declare interface ListBlobsFlatSegmentResponseModel { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + segment: BlobFlatListSegmentModel; + continuationToken?: string; +} +/** + * An enumeration of blobs + */ +export declare interface ListBlobsHierarchySegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + delimiter?: string; + segment: BlobHierarchyListSegment; + continuationToken?: string; +} +/** + * An enumeration of blobs + */ +export declare interface ListBlobsHierarchySegmentResponseModel { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + delimiter?: string; + segment: BlobHierarchyListSegmentModel; + continuationToken?: string; +} +/** + * Defines values for ListBlobsIncludeItem. + * Possible values include: 'copy', 'deleted', 'metadata', 'snapshots', 'uncommittedblobs', + * 'versions', 'tags' + * @readonly + * @enum {string} + */ +export declare type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; +/** + * Defines values for ListContainersIncludeType. + * Possible values include: 'metadata', 'deleted' + * @readonly + * @enum {string} + */ +export declare type ListContainersIncludeType = 'metadata' | 'deleted'; +/** + * An enumeration of containers + */ +export declare interface ListContainersSegmentResponse { + serviceEndpoint: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + containerItems: ContainerItem[]; + continuationToken?: string; +} +/** + * The @azure/logger configuration for this package. + */ +export declare const logger: import("@azure/logger").AzureLogger; +/** + * Azure Analytics Logging settings. + */ +export declare interface Logging { + /** + * The version of Storage Analytics to configure. + */ + version: string; + /** + * Indicates whether all delete requests should be logged. + */ + deleteProperty: boolean; + /** + * Indicates whether all read requests should be logged. + */ + read: boolean; + /** + * Indicates whether all write requests should be logged. + */ + write: boolean; + retentionPolicy: RetentionPolicy; +} +/** + * Specifies HTTP options for conditional requests based on ETag matching. + */ +export declare interface MatchConditions { + /** + * Specify an ETag value to operate only on blobs with a matching value. + */ + ifMatch?: string; + /** + * Specify an ETag value to operate only on blobs without a matching value. + */ + ifNoneMatch?: string; +} +/** + * A map of name-value pairs to associate with the resource. + */ +export declare interface Metadata { + /** + * A name-value pair. + */ + [propertyName: string]: string; +} +/** + * a summary of request statistics grouped by API in hour or minute aggregates for blobs + */ +export declare interface Metrics { + /** + * The version of Storage Analytics to configure. + */ + version?: string; + /** + * Indicates whether metrics are enabled for the Blob service. + */ + enabled: boolean; + /** + * Indicates whether metrics should generate summary statistics for called API operations. + */ + includeAPIs?: boolean; + retentionPolicy?: RetentionPolicy; +} +/** + * Specifies HTTP options for conditional requests based on modification time. + */ +export declare interface ModificationConditions { + /** + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + */ + ifModifiedSince?: Date; + /** + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. + */ + ifUnmodifiedSince?: Date; +} +/** + * standard HTTP conditional headers and tags condition. + */ +export declare interface ModifiedAccessConditions extends MatchConditions, ModificationConditions, TagConditions { +} +/** + * Additional parameters for a set of operations. + */ +export declare interface ModifiedAccessConditionsModel { + /** + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + */ + ifModifiedSince?: Date; + /** + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. + */ + ifUnmodifiedSince?: Date; + /** + * Specify an ETag value to operate only on blobs with a matching value. + */ + ifMatch?: string; + /** + * Specify an ETag value to operate only on blobs without a matching value. + */ + ifNoneMatch?: string; + /** + * Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + */ + ifTags?: string; +} +/** + * Creates a new Pipeline object with Credential provided. + * + * @export + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options. + * @returns {Pipeline} A new Pipeline object. + */ +export declare function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline; +/** + * Contains Object Replication Policy ID and the respective list of {@link ObjectReplicationRule}. + * This is used when retrieving the Object Replication Properties on the source blob. The policy id for the + * destination blob is set in ObjectReplicationDestinationPolicyId of the respective method responses + * (e.g. {@link BlobProperties.ObjectReplicationDestinationPolicyId}. + * + * @export + * @interface ObjectReplicationPolicy + */ +export declare interface ObjectReplicationPolicy { + /** + * The Object Replication Policy ID. + * + * @type {string} + * @memberof ObjectReplicationPolicy + */ + policyId: string; + /** + * The Rule ID(s) and respective Replication Status(s) that are under the Policy ID. + * + * @type {ObjectReplicationRule[]} + * @memberof ObjectReplicationPolicy + */ + rules: ObjectReplicationRule[]; +} +/** + * Contains the Object Replication Rule ID and {@link ObjectReplicationStatus} of a blob. + * There can be more than one {@link ObjectReplicationRule} under a {@link ObjectReplicationPolicy}. + */ +export declare interface ObjectReplicationRule { + /** + * The Object Replication Rule ID. + * + * @type {string} + * @memberof ObjectReplicationRule + */ + ruleId: string; + /** + * The Replication Status + * + * @type {ObjectReplicationStatus} + * @memberof ObjectReplicationRule + */ + replicationStatus: ObjectReplicationStatus; +} +/** + * Specifies the Replication Status of a blob. This is used when a storage account has + * Object Replication Policy(s) applied. See {@link ObjectReplicationPolicy} and {@link ObjectReplicationRule}. + */ +export declare type ObjectReplicationStatus = "complete" | "failed"; +/** + * Defines headers for ClearPages operation. + */ +export declare interface PageBlobClearPagesHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link PageBlobClient.clearPages} operation. + * + * @export + * @interface PageBlobClearPagesOptions + */ +export declare interface PageBlobClearPagesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobClearPagesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when clearing pages. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobClearPagesOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobClearPagesOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobClearPagesOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the clearPages operation. + */ +export declare type PageBlobClearPagesResponse = PageBlobClearPagesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobClearPagesHeaders; + }; +}; +/** + * PageBlobClient defines a set of operations applicable to page blobs. + * + * @export + * @class PageBlobClient + * @extends {BlobClient} + */ +export declare class PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + * + * @private + * @type {PageBlobs} + * @memberof PageBlobClient + */ + private pageBlobContext; + /** + * + * Creates an instance of PageBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof PageBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of PageBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof PageBlobClient + */ + constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of PageBlobClient. + * + * @param {string} url A URL string pointing to Azure Storage blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob". + * You can append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof PageBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof PageBlobClient + */ + withSnapshot(snapshot: string): PageBlobClient; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation. + * @returns {Promise} Response data for the Page Blob Create operation. + * @memberof PageBlobClient + */ + create(size: number, options?: PageBlobCreateOptions): Promise; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof PageBlobClient + */ + createIfNotExists(size: number, options?: PageBlobCreateIfNotExistsOptions): Promise; + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {HttpRequestBody} body Data to upload + * @param {number} offset Offset of destination page blob + * @param {number} count Content length of the body, also number of bytes to be uploaded + * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation. + * @returns {Promise} Response data for the Page Blob Upload Pages operation. + * @memberof PageBlobClient + */ + uploadPages(body: HttpRequestBody, offset: number, count: number, options?: PageBlobUploadPagesOptions): Promise; + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * + * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param {number} destOffset Offset of destination page blob + * @param {number} count Number of bytes to be uploaded from source page blob + * @param {PageBlobUploadPagesFromURLOptions} [options={}] + * @returns {Promise} + * @memberof PageBlobClient + */ + uploadPagesFromURL(sourceURL: string, sourceOffset: number, destOffset: number, count: number, options?: PageBlobUploadPagesFromURLOptions): Promise; + /** + * Frees the specified pages from the page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {number} [offset] Starting byte position of the pages to clear. + * @param {number} [count] Number of bytes to clear. + * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation. + * @returns {Promise} Response data for the Page Blob Clear Pages operation. + * @memberof PageBlobClient + */ + clearPages(offset?: number, count?: number, options?: PageBlobClearPagesOptions): Promise; + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} [offset] Starting byte position of the page ranges. + * @param {number} [count] Number of bytes to get. + * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation. + * @returns {Promise} Response data for the Page Blob Get Ranges operation. + * @memberof PageBlobClient + */ + getPageRanges(offset?: number, count?: number, options?: PageBlobGetPageRangesOptions): Promise; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + getPageRangesDiff(offset: number, count: number, prevSnapshot: string, options?: PageBlobGetPageRangesDiffOptions): Promise; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + getPageRangesDiffForManagedDisks(offset: number, count: number, prevSnapshotUrl: string, options?: PageBlobGetPageRangesDiffOptions): Promise; + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param {number} size Target size + * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation. + * @returns {Promise} Response data for the Page Blob Resize operation. + * @memberof PageBlobClient + */ + resize(size: number, options?: PageBlobResizeOptions): Promise; + /** + * Sets a page blob's sequence number. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number. + * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update + * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation. + * @returns {Promise} Response data for the Page Blob Update Sequence Number operation. + * @memberof PageBlobClient + */ + updateSequenceNumber(sequenceNumberAction: SequenceNumberActionType, sequenceNumber?: number, options?: PageBlobUpdateSequenceNumberOptions): Promise; + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * + * @param {string} copySource Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation. + * @returns {Promise} Response data for the Page Blob Copy Incremental operation. + * @memberof PageBlobClient + */ + startCopyIncremental(copySource: string, options?: PageBlobStartCopyIncrementalOptions): Promise; +} +/** + * Defines headers for CopyIncremental operation. + */ +export declare interface PageBlobCopyIncrementalHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + errorCode?: string; +} +/** + * Contains response data for the copyIncremental operation. + */ +export declare type PageBlobCopyIncrementalResponse = PageBlobCopyIncrementalHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobCopyIncrementalHeaders; + }; +}; +/** + * Defines headers for Create operation. + */ +export declare interface PageBlobCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure the {@link PageBlobClient.createIfNotExists} operation. + * + * @export + * @interface PageBlobCreateIfNotExistsOptions + */ +export declare interface PageBlobCreateIfNotExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobCreateIfNotExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * A user-controlled value that can be used to track requests. + * The value must be between 0 and 2^63 - 1. The default value is 0. + * + * @type {number} + * @memberof PageBlobCreateIfNotExistsOptions + */ + blobSequenceNumber?: number; + /** + * HTTP headers to set when creating a page blob. + * + * @type {BlobHTTPHeaders} + * @memberof PageBlobCreateIfNotExistsOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof PageBlobCreateIfNotExistsOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobCreateIfNotExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobCreateIfNotExistsOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {PremiumPageBlobTier | string} + * @memberof PageBlobCreateIfNotExistsOptions + */ + tier?: PremiumPageBlobTier | string; +} +/** + * Contains response data for the {@link PageBlobClient.createIfNotExists} operation. + * + * @export + * @interface PageBlobCreateIfNotExistsResponse + */ +export declare interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse { + /** + * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists. + * + * @type {boolean} + * @memberof PageBlobCreateIfNotExistsResponse + */ + succeeded: boolean; +} +/** + * Options to configure the {@link PageBlobClient.create} operation. + * + * @export + * @interface PageBlobCreateOptions + */ +export declare interface PageBlobCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when creating a page blob. + * + * @type {BlobRequestConditions} + * @memberof PageBlobCreateOptions + */ + conditions?: BlobRequestConditions; + /** + * A user-controlled value that can be used to track requests. + * The value must be between 0 and 2^63 - 1. The default value is 0. + * + * @type {number} + * @memberof PageBlobCreateOptions + */ + blobSequenceNumber?: number; + /** + * HTTP headers to set when creating a page blob. + * + * @type {BlobHTTPHeaders} + * @memberof PageBlobCreateOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof PageBlobCreateOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobCreateOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobCreateOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {PremiumPageBlobTier | string} + * @memberof PageBlobCreateOptions + */ + tier?: PremiumPageBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof PageBlobCreateOptions + */ + tags?: Tags; +} +/** + * Contains response data for the create operation. + */ +export declare type PageBlobCreateResponse = PageBlobCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobCreateHeaders; + }; +}; +/** + * Defines headers for GetPageRangesDiff operation. + */ +export declare interface PageBlobGetPageRangesDiffHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link PageBlobClient.getRangesDiff} operation. + * + * @export + * @interface PageBlobGetPageRangesDiffOptions + */ +export declare interface PageBlobGetPageRangesDiffOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobGetPageRangesDiffOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting page ranges diff. + * + * @type {BlobRequestConditions} + * @memberof PageBlobGetPageRangesDiffOptions + */ + conditions?: BlobRequestConditions; + /** + * (unused) + * + * @type {string} + * @memberof PageBlobGetPageRangesDiffOptions + */ + range?: string; +} +/** + * Contains response data for the {@link BlobClient.getPageRangesDiff} operation. + */ +export declare interface PageBlobGetPageRangesDiffResponse extends PageList, PageBlobGetPageRangesDiffHeaders { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobGetPageRangesDiffHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PageList; + }; +} +/** + * Defines headers for GetPageRanges operation. + */ +export declare interface PageBlobGetPageRangesHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link PageBlobClient.getPageRanges} operation. + * + * @export + * @interface PageBlobGetPageRangesOptions + */ +export declare interface PageBlobGetPageRangesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobGetPageRangesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting page ranges. + * + * @type {BlobRequestConditions} + * @memberof PageBlobGetPageRangesOptions + */ + conditions?: BlobRequestConditions; +} +/** + * Contains response data for the {@link BlobClient.getPageRanges} operation. + */ +export declare interface PageBlobGetPageRangesResponse extends PageList, PageBlobGetPageRangesHeaders { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobGetPageRangesHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PageList; + }; +} +/** + * Conditions to add to the creation of this page blob. + */ +export declare interface PageBlobRequestConditions extends BlobRequestConditions, SequenceNumberAccessConditions { +} +/** + * Defines headers for Resize operation. + */ +export declare interface PageBlobResizeHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link PageBlobClient.resize} operation. + * + * @export + * @interface PageBlobResizeOptions + */ +export declare interface PageBlobResizeOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobResizeOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when resizing a page blob. + * + * @type {BlobRequestConditions} + * @memberof PageBlobResizeOptions + */ + conditions?: BlobRequestConditions; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobResizeOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the resize operation. + */ +export declare type PageBlobResizeResponse = PageBlobResizeHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobResizeHeaders; + }; +}; +/** + * Options to configure {@link PageBlobClient.startCopyIncremental} operation. + * + * @export + * @interface PageBlobStartCopyIncrementalOptions + */ +export declare interface PageBlobStartCopyIncrementalOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobStartCopyIncrementalOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when starting a copy incremental operation. + * + * @type {ModifiedAccessConditions} + * @memberof PageBlobStartCopyIncrementalOptions + */ + conditions?: ModifiedAccessConditions; +} +/** + * Defines headers for UpdateSequenceNumber operation. + */ +export declare interface PageBlobUpdateSequenceNumberHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure {@link PageBlobClient.updateSequenceNumber} operation. + * + * @export + * @interface PageBlobUpdateSequenceNumberOptions + */ +export declare interface PageBlobUpdateSequenceNumberOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUpdateSequenceNumberOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when updating sequence number. + * + * @type {BlobRequestConditions} + * @memberof PageBlobUpdateSequenceNumberOptions + */ + conditions?: BlobRequestConditions; +} +/** + * Contains response data for the updateSequenceNumber operation. + */ +export declare type PageBlobUpdateSequenceNumberResponse = PageBlobUpdateSequenceNumberHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUpdateSequenceNumberHeaders; + }; +}; +/** + * Defines headers for UploadPagesFromURL operation. + */ +export declare interface PageBlobUploadPagesFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation. + * + * @export + * @interface PageBlobUploadPagesFromURLOptions + */ +export declare interface PageBlobUploadPagesFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUploadPagesFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when updating sequence number. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobUploadPagesFromURLOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * An MD5 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobUploadPagesFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobUploadPagesFromURLOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the uploadPagesFromURL operation. + */ +export declare type PageBlobUploadPagesFromURLResponse = PageBlobUploadPagesFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUploadPagesFromURLHeaders; + }; +}; +/** + * Defines headers for UploadPages operation. + */ +export declare interface PageBlobUploadPagesHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned + * when the pages were encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} +/** + * Options to configure the {@link PageBlobClient.uploadPages} operation. + * + * @export + * @interface PageBlobUploadPagesOptions + */ +export declare interface PageBlobUploadPagesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUploadPagesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when uploading pages. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobUploadPagesOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Callback to receive events on the progress of upload pages operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof PageBlobUploadPagesOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobUploadPagesOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobUploadPagesOptions + */ + encryptionScope?: string; +} +/** + * Contains response data for the uploadPages operation. + */ +export declare type PageBlobUploadPagesResponse = PageBlobUploadPagesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUploadPagesHeaders; + }; +}; +/** + * List of page ranges for a blob. + */ +export declare interface PageList { + /** + * Valid non-overlapping page ranges. + */ + pageRange?: Range[]; + /** + * Present if the prevSnapshot parameter was specified and there were cleared + * pages between the previous snapshot and the target snapshot. + */ + clearRange?: Range[]; +} +/** + * The multipart/mixed response which contains the response for each subrequest. + */ +export declare interface ParsedBatchResponse { + /** + * The parsed sub responses. + */ + subResponses: BatchSubResponse[]; + /** + * The succeeded executed sub responses' count; + */ + subResponsesSucceededCount: number; + /** + * The failed executed sub responses' count; + */ + subResponsesFailedCount: number; +} +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + * + * @export + * @class Pipeline + */ +export declare class Pipeline { + /** + * A list of chained request policy factories. + * + * @type {RequestPolicyFactory[]} + * @memberof Pipeline + */ + readonly factories: RequestPolicyFactory[]; + /** + * Configures pipeline logger and HTTP client. + * + * @type {PipelineOptions} + * @memberof Pipeline + */ + readonly options: PipelineOptions; + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param {RequestPolicyFactory[]} factories + * @param {PipelineOptions} [options={}] + * @memberof Pipeline + */ + constructor(factories: RequestPolicyFactory[], options?: PipelineOptions); + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline. + * @memberof Pipeline + */ + toServiceClientOptions(): ServiceClientOptions; +} +/** + * Option interface for Pipeline constructor. + * + * @export + * @interface PipelineOptions + */ +export declare interface PipelineOptions { + /** + * Optional. Configures the HTTP client to send requests and receive responses. + * + * @type {IHttpClient} + * @memberof PipelineOptions + */ + httpClient?: IHttpClient; +} +export { PollerLike }; +export { PollOperationState }; +/** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ +export declare enum PremiumPageBlobTier { + /** + * P4 Tier. + */ + P4 = "P4", + /** + * P6 Tier. + */ + P6 = "P6", + /** + * P10 Tier. + */ + P10 = "P10", + /** + * P15 Tier. + */ + P15 = "P15", + /** + * P20 Tier. + */ + P20 = "P20", + /** + * P30 Tier. + */ + P30 = "P30", + /** + * P40 Tier. + */ + P40 = "P40", + /** + * P50 Tier. + */ + P50 = "P50", + /** + * P60 Tier. + */ + P60 = "P60", + /** + * P70 Tier. + */ + P70 = "P70", + /** + * P80 Tier. + */ + P80 = "P80" +} +/** + * Defines values for PublicAccessType. + * Possible values include: 'container', 'blob' + * @readonly + * @enum {string} + */ +export declare type PublicAccessType = 'container' | 'blob'; +/** + * Range for Blob Service Operations. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations + * + * @export + * @interface Range + */ +export declare interface Range { + /** + * StartByte, larger than or equal 0. + * + * @type {string} + * @memberof Range + */ + offset: number; + /** + * Optional. Count of bytes, larger than 0. + * If not provided, will return bytes from offset to the end. + * + * @type {string} + * @memberof Range + */ + count?: number; +} +/** + * Defines values for RehydratePriority. + * Possible values include: 'High', 'Standard' + * @readonly + * @enum {string} + */ +export declare type RehydratePriority = 'High' | 'Standard'; +export { RequestPolicy }; +export { RequestPolicyFactory }; +export { RequestPolicyOptions }; +export { RestError }; +/** + * the retention policy which determines how long the associated data should persist + */ +export declare interface RetentionPolicy { + /** + * Indicates whether a retention policy is enabled for the storage service + */ + enabled: boolean; + /** + * Indicates the number of days that metrics or logging or soft-deleted data should be retained. + * All data older than this value will be deleted + */ + days?: number; +} +/** + * Allowed IP range for a SAS. + * + * @export + * @interface SasIPRange + */ +export declare interface SasIPRange { + /** + * Starting IP address in the IP range. + * If end IP doesn't provide, start IP will the only IP allowed. + * + * @type {string} + * @memberof SasIPRange + */ + start: string; + /** + * Optional. IP address that ends the IP range. + * If not provided, start IP will the only IP allowed. + * + * @type {string} + * @memberof SasIPRange + */ + end?: string; +} +/** + * Protocols for generated SAS. + * + * @export + * @enum {number} + */ +export declare enum SASProtocol { + /** + * Protocol that allows HTTPS only + */ + Https = "https", + /** + * Protocol that allows both HTTPS and HTTP + */ + HttpsAndHttp = "https,http" +} +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + * + * @export + * @class SASQueryParameters + */ +export declare class SASQueryParameters { + /** + * The storage API version. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly version: string; + /** + * Optional. The allowed HTTP protocol(s). + * + * @type {SASProtocol} + * @memberof SASQueryParameters + */ + readonly protocol?: SASProtocol; + /** + * Optional. The start time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParameters + */ + readonly startsOn?: Date; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParameters + */ + readonly expiresOn?: Date; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly permissions?: string; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly services?: string; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly resourceTypes?: string; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly identifier?: string; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly resource?: string; + /** + * The signature for the SAS token. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly signature: string; + /** + * Value for cache-control header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly cacheControl?: string; + /** + * Value for content-disposition header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentDisposition?: string; + /** + * Value for content-encoding header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentEncoding?: string; + /** + * Value for content-length header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentLanguage?: string; + /** + * Value for content-type header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentType?: string; + /** + * Inner value of getter ipRange. + * + * @private + * @type {SasIPRange} + * @memberof SASQueryParameters + */ + private readonly ipRangeInner?; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedOid?; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedTenantId?; + /** + * The date-time the key is active. + * Property of user delegation key. + * + * @private + * @type {Date} + * @memberof SASQueryParameters + */ + private readonly signedStartsOn?; + /** + * The date-time the key expires. + * Property of user delegation key. + * + * @private + * @type {Date} + * @memberof SASQueryParameters + */ + private readonly signedExpiresOn?; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedService?; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedVersion?; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly preauthorizedAgentObjectId?: string; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly correlationId?: string; + readonly ipRange: SasIPRange | undefined; + /** + * Creates an instance of SASQueryParameters. + * + * @param {string} version Representing the storage version + * @param {string} signature Representing the signature for the SAS token + * @param {string} [permissions] Representing the storage permissions + * @param {string} [services] Representing the storage services being accessed (only for Account SAS) + * @param {string} [resourceTypes] Representing the storage resource types being accessed (only for Account SAS) + * @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s) + * @param {Date} [startsOn] Representing the start time for this SAS token + * @param {Date} [expiresOn] Representing the expiry time for this SAS token + * @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token + * @param {string} [identifier] Representing the signed identifier (only for Service SAS) + * @param {string} [resource] Representing the storage container or blob (only for Service SAS) + * @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS) + * @param {string} [contentDisposition] Representing the content-disposition header (only for Blob/File Service SAS) + * @param {string} [contentEncoding] Representing the content-encoding header (only for Blob/File Service SAS) + * @param {string} [contentLanguage] Representing the content-language header (only for Blob/File Service SAS) + * @param {string} [contentType] Representing the content-type header (only for Blob/File Service SAS) + * @param {userDelegationKey} [userDelegationKey] Representing the user delegation key properties + * @param {string} [preauthorizedAgentObjectId] Representing the authorized AAD Object ID (only for User Delegation SAS) + * @param {string} [correlationId] Representing the correlation ID (only for User Delegation SAS) + * @memberof SASQueryParameters + */ + constructor(version: string, signature: string, permissions?: string, services?: string, resourceTypes?: string, protocol?: SASProtocol, startsOn?: Date, expiresOn?: Date, ipRange?: SasIPRange, identifier?: string, resource?: string, cacheControl?: string, contentDisposition?: string, contentEncoding?: string, contentLanguage?: string, contentType?: string, userDelegationKey?: UserDelegationKey, preauthorizedAgentObjectId?: string, correlationId?: string); + /** + * Creates an instance of SASQueryParameters. + * + * @param {string} version Representing the storage version + * @param {string} signature Representing the signature for the SAS token + * @param {SASQueryParametersOptions} [options] Optional. Options to construct the SASQueryParameters. + * @memberof SASQueryParameters + */ + constructor(version: string, signature: string, options?: SASQueryParametersOptions); + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + * @returns {string} + * @memberof SASQueryParameters + */ + toString(): string; + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @private + * @param {string[]} queries + * @param {string} key + * @param {string} [value] + * @returns {void} + * @memberof SASQueryParameters + */ + private tryAppendQueryParameter; +} +/** + * Options to construct {@link SASQueryParameters}. + * + * @export + * @interface SASQueryParametersOptions + */ +export declare interface SASQueryParametersOptions { + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + permissions?: string; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + services?: string; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + resourceTypes?: string; + /** + * Optional. The allowed HTTP protocol(s). + * + * @type {SASProtocol} + * @memberof SASQueryParametersOptions + */ + protocol?: SASProtocol; + /** + * Optional. The start time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParametersOptions + */ + startsOn?: Date; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParametersOptions + */ + expiresOn?: Date; + /** + * Optional. IP ranges allowed in this SAS. + * + * @type {SasIPRange} + * @memberof SASQueryParametersOptions + */ + ipRange?: SasIPRange; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + identifier?: string; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + resource?: string; + /** + * Value for cache-control header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + cacheControl?: string; + /** + * Value for content-disposition header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentDisposition?: string; + /** + * Value for content-encoding header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentEncoding?: string; + /** + * Value for content-length header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentLanguage?: string; + /** + * Value for content-type header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentType?: string; + /** + * User delegation key properties. + * + * @type {UserDelegationKey} + * @memberof SASQueryParametersOptions + */ + userDelegationKey?: UserDelegationKey; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + preauthorizedAgentObjectId?: string; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + correlationId?: string; +} +/** + * Additional parameters for a set of operations, such as: PageBlob_uploadPages, + * PageBlob_clearPages, PageBlob_uploadPagesFromURL. + */ +export declare interface SequenceNumberAccessConditions { + /** + * Specify this header value to operate only on a blob if it has a sequence number less than or + * equal to the specified. + */ + ifSequenceNumberLessThanOrEqualTo?: number; + /** + * Specify this header value to operate only on a blob if it has a sequence number less than the + * specified. + */ + ifSequenceNumberLessThan?: number; + /** + * Specify this header value to operate only on a blob if it has the specified sequence number. + */ + ifSequenceNumberEqualTo?: number; +} +/** + * Defines values for SequenceNumberActionType. + * Possible values include: 'max', 'update', 'increment' + * @readonly + * @enum {string} + */ +export declare type SequenceNumberActionType = 'max' | 'update' | 'increment'; +/** + * Defines headers for FilterBlobs operation. + */ +export declare interface ServiceFilterBlobsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation. + * + * @export + * @interface ServiceFindBlobByTagsOptions + */ +export declare interface ServiceFindBlobByTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceListContainersOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the filterBlobs operation. + */ +export declare type ServiceFindBlobsByTagsSegmentResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceFilterBlobsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FilterBlobSegment; + }; +}; +/** + * Defines headers for GetAccountInfo operation. + */ +export declare interface ServiceGetAccountInfoHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Identifies the sku name of the account. Possible values include: 'Standard_LRS', + * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' + */ + skuName?: SkuName; + /** + * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2', + * 'FileStorage', 'BlockBlobStorage' + */ + accountKind?: AccountKind; + errorCode?: string; +} +/** + * Options to configure the {@link BlobServiceClient.getAccountInfo} operation. + * + * @export + * @interface ServiceGetAccountInfoOptions + */ +export declare interface ServiceGetAccountInfoOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetAccountInfoOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the getAccountInfo operation. + */ +export declare type ServiceGetAccountInfoResponse = ServiceGetAccountInfoHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetAccountInfoHeaders; + }; +}; +/** + * Defines headers for GetProperties operation. + */ +export declare interface ServiceGetPropertiesHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} +/** + * Options to configure the {@link BlobServiceClient.getProperties} operation. + * + * @export + * @interface ServiceGetPropertiesOptions + */ +export declare interface ServiceGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the getProperties operation. + */ +export declare type ServiceGetPropertiesResponse = BlobServiceProperties & ServiceGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetPropertiesHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobServiceProperties; + }; +}; +/** + * Defines headers for GetStatistics operation. + */ +export declare interface ServiceGetStatisticsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the {@link BlobServiceClient.getStatistics} operation. + * + * @export + * @interface ServiceGetStatisticsOptions + */ +export declare interface ServiceGetStatisticsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetStatisticsOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the getStatistics operation. + */ +export declare type ServiceGetStatisticsResponse = BlobServiceStatistics & ServiceGetStatisticsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetStatisticsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobServiceStatistics; + }; +}; +/** + * Defines headers for GetUserDelegationKey operation. + */ +export declare interface ServiceGetUserDelegationKeyHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} +/** + * Options to configure the Service - Get User Delegation Key. + * + * @export + * @interface ServiceGetUserDelegationKeyOptions + */ +export declare interface ServiceGetUserDelegationKeyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetStatisticsOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the {@link getUserDelegationKey} operation. + */ +export declare type ServiceGetUserDelegationKeyResponse = UserDelegationKey & ServiceGetUserDelegationKeyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetUserDelegationKeyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: UserDelegationKeyModel; + }; +}; +/** + * Options to configure the {@link BlobServiceClient.listContainers} operation. + * + * @export + * @interface ServiceListContainersOptions + */ +export declare interface ServiceListContainersOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceListContainersOptions + */ + abortSignal?: AbortSignalLike; + /** + * Filters the results to return only containers + * whose name begins with the specified prefix. + */ + prefix?: string; + /** + * Specifies whether the container's metadata + * should be returned as part of the response body. + */ + includeMetadata?: boolean; + /** + * Specifies whether soft deleted containers should be included in the response. + * + * @type {boolean} + * @memberof ServiceListContainersOptions + */ + includeDeleted?: boolean; +} +/** + * Defines headers for ListContainersSegment operation. + */ +export declare interface ServiceListContainersSegmentHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} +/** + * Contains response data for the listContainersSegment operation. + */ +export declare type ServiceListContainersSegmentResponse = ListContainersSegmentResponse & ServiceListContainersSegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceListContainersSegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListContainersSegmentResponse; + }; +}; +/** + * Defines headers for SetProperties operation. + */ +export declare interface ServiceSetPropertiesHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} +/** + * Options to configure the {@link BlobServiceClient.setProperties} operation. + * + * @export + * @interface ServiceSetPropertiesOptions + */ +export declare interface ServiceSetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceSetPropertiesOptions + */ + abortSignal?: AbortSignalLike; +} +/** + * Contains response data for the setProperties operation. + */ +export declare type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSetPropertiesHeaders; + }; +}; +/** + * Defines headers for SubmitBatch operation. + */ +export declare interface ServiceSubmitBatchHeaders { + /** + * The media type of the body of the response. For batch requests, this is multipart/mixed; + * boundary=batchresponse_GUID + */ + contentType?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + errorCode?: string; +} +/** + * Optional Parameters. + */ +export declare interface ServiceSubmitBatchOptionalParamsModel extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} +/** + * Contains response data for the submitBatch operation. + */ +export declare type ServiceSubmitBatchResponseModel = ServiceSubmitBatchHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSubmitBatchHeaders; + }; +}; +/** + * Options to configure {@link BlobServiceClient.undeleteContainer} operation. + * + * @export + * @interface ServiceUndeleteContainerOptions + */ +export declare interface ServiceUndeleteContainerOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceUndeleteContainerOptions + */ + abortSignal?: AbortSignalLike; + /** + * Optional. Specifies the new name of the restored container. + * Will use its original name if this is not specified. + * + * @type {string} + * @memberof ServiceUndeleteContainerOptions + */ + destinationContainerName?: string; +} +/** + * Signed identifier. + * + * @export + * @interface SignedIdentifier + */ +export declare interface SignedIdentifier { + /** + * @member {string} id a unique id + */ + id: string; + /** + * @member {AccessPolicy} accessPolicy + */ + accessPolicy: { + /** + * @member {Date} startsOn Optional. The date-time the policy is active + */ + startsOn?: Date; + /** + * @member {Date} expiresOn Optional. The date-time the policy expires + */ + expiresOn?: Date; + /** + * @member {string} permissions The permissions for the acl policy + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + */ + permissions?: string; + }; +} +/** + * signed identifier + */ +export declare interface SignedIdentifierModel { + /** + * a unique id + */ + id: string; + accessPolicy: AccessPolicy; +} +/** + * Defines values for SkuName. + * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', + * 'Premium_LRS' + * @readonly + * @enum {string} + */ +export declare type SkuName = 'Standard_LRS' | 'Standard_GRS' | 'Standard_RAGRS' | 'Standard_ZRS' | 'Premium_LRS'; +/** + * The properties that enable an account to host a static website + */ +export declare interface StaticWebsite { + /** + * Indicates whether this account is hosting a static website + */ + enabled: boolean; + /** + * The default name of the index page under each directory + */ + indexDocument?: string; + /** + * The absolute path of the custom 404 page + */ + errorDocument404Path?: string; + /** + * Absolute path of the default index page + */ + defaultIndexDocumentPath?: string; +} +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + * + * @class StorageBrowserPolicy + * @extends {BaseRequestPolicy} + */ +export declare class StorageBrowserPolicy extends BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof StorageBrowserPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageBrowserPolicy + */ + sendRequest(request: WebResource): Promise; +} +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + * + * @export + * @class StorageBrowserPolicyFactory + * @implements {RequestPolicyFactory} + */ +export declare class StorageBrowserPolicyFactory implements RequestPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageBrowserPolicy} + * @memberof StorageBrowserPolicyFactory + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy; +} +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + * + * @export + * @class StorageClient + */ +declare abstract class StorageClient { + /** + * Encoded URL string value. + * + * @type {string} + * @memberof StorageClient + */ + readonly url: string; + readonly accountName: string; + /* Excluded from this release type: pipeline */ + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * + * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} + * @memberof StorageClient + */ + readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + * + * @protected + * @type {StorageClientContext} + * @memberof StorageClient + */ + protected readonly storageClientContext: StorageClientContext; + /** + * @protected + * @type {boolean} + * @memberof StorageClient + */ + protected readonly isHttps: boolean; + /** + * Creates an instance of StorageClient. + * @param {string} url url to resource + * @param {Pipeline} pipeline request policy pipeline. + * @memberof StorageClient + */ + protected constructor(url: string, pipeline: Pipeline); +} +declare class StorageClientContext extends coreHttp.ServiceClient { + url: string; + version: string; + /** + * Initializes a new instance of the StorageClientContext class. + * @param url The URL of the service account, container, or blob that is the targe of the desired + * operation. + * @param [options] The parameter options + */ + constructor(url: string, options?: coreHttp.ServiceClientOptions); +} +/** + * The OAuth scope to use with Azure Storage. + */ +export declare const StorageOAuthScopes: string | string[]; +/** + * Options interface for the {@link newPipeline} function. + * + * @export + * @interface StoragePipelineOptions + */ +export declare interface StoragePipelineOptions { + /** + * Options to configure a proxy for outgoing requests. + */ + proxyOptions?: ProxyOptions; + /** + * Options for adding user agent details to outgoing requests. + * + * @type {UserAgentOptions} + * @memberof StoragePipelineOptions + */ + userAgentOptions?: UserAgentOptions; + /** + * Configures the built-in retry policy behavior. + * + * @type {StorageRetryOptions} + * @memberof StoragePipelineOptions + */ + retryOptions?: StorageRetryOptions; + /** + * Keep alive configurations. Default keep-alive is enabled. + * + * @type {KeepAliveOptions} + * @memberof StoragePipelineOptions + */ + keepAliveOptions?: KeepAliveOptions; + /** + * Configures the HTTP client to send requests and receive responses. + * + * @type {IHttpClient} + * @memberof StoragePipelineOptions + */ + httpClient?: IHttpClient; +} +/** + * Storage Blob retry options interface. + * + * @export + * @interface StorageRetryOptions + */ +export declare interface StorageRetryOptions { + /** + * Optional. StorageRetryPolicyType, default is exponential retry policy. + * + * @type {StorageRetryPolicyType} + * @memberof StorageRetryOptions + */ + readonly retryPolicyType?: StorageRetryPolicyType; + /** + * Optional. Max try number of attempts, default is 4. + * A value of 1 means 1 try and no retries. + * A value smaller than 1 means default retry number of attempts. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly maxTries?: number; + /** + * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request. + * A value of zero or undefined means no default timeout on SDK client, Azure + * Storage server's default timeout policy will be used. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly tryTimeoutInMs?: number; + /** + * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms). + * The delay increases (exponentially or linearly) with each retry up to a maximum specified by + * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly retryDelayInMs?: number; + /** + * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms). + * If you specify 0, then you must also specify 0 for retryDelayInMs. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly maxRetryDelayInMs?: number; + /** + * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined + * (the default) then operations are not retried against another host. + * + * NOTE: Before setting this field, make sure you understand the issues around + * reading stale and potentially-inconsistent data at + * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs} + * + * @type {string} + * @memberof StorageRetryOptions + */ + readonly secondaryHost?: string; +} +/** + * Retry policy with exponential retry and linear retry implemented. + * + * @class RetryPolicy + * @extends {BaseRequestPolicy} + */ +export declare class StorageRetryPolicy extends BaseRequestPolicy { + /** + * RetryOptions. + * + * @private + * @type {StorageRetryOptions} + * @memberof StorageRetryPolicy + */ + private readonly retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] + * @memberof StorageRetryPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryOptions?: StorageRetryOptions); + /** + * Sends request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + sendRequest(request: WebResource): Promise; + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @protected + * @param {WebResource} request + * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + protected attemptSendRequest(request: WebResource, secondaryHas404: boolean, attempt: number): Promise; + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @protected + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {HttpOperationResponse} [response] + * @param {RestError} [err] + * @returns {boolean} + * @memberof StorageRetryPolicy + */ + protected shouldRetry(isPrimaryRetry: boolean, attempt: number, response?: HttpOperationResponse, err?: RestError): boolean; + /** + * Delay a calculated time between retries. + * + * @private + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {AbortSignalLike} [abortSignal] + * @memberof StorageRetryPolicy + */ + private delay; +} +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + * + * @export + * @class StorageRetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +export declare class StorageRetryPolicyFactory implements RequestPolicyFactory { + private retryOptions?; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param {StorageRetryOptions} [retryOptions] + * @memberof StorageRetryPolicyFactory + */ + constructor(retryOptions?: StorageRetryOptions); + /** + * Creates a StorageRetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageRetryPolicy} + * @memberof StorageRetryPolicyFactory + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy; +} +/** + * RetryPolicy types. + * + * @export + * @enum {number} + */ +export declare enum StorageRetryPolicyType { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + EXPONENTIAL = 0, + /** + * Linear retry. Retry time delay grows linearly. + */ + FIXED = 1 +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + * + * @export + * @class StorageSharedKeyCredential + * @extends {Credential} + */ +export declare class StorageSharedKeyCredential extends Credential { + /** + * Azure Storage account name; readonly. + * + * @type {string} + * @memberof StorageSharedKeyCredential + */ + readonly accountName: string; + /** + * Azure Storage account key; readonly. + * + * @type {Buffer} + * @memberof StorageSharedKeyCredential + */ + private readonly accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param {string} accountName + * @param {string} accountKey + * @memberof StorageSharedKeyCredential + */ + constructor(accountName: string, accountKey: string); + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageSharedKeyCredentialPolicy} + * @memberof StorageSharedKeyCredential + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageSharedKeyCredentialPolicy; + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof StorageSharedKeyCredential + */ + computeHMACSHA256(stringToSign: string): string; +} +/** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + * + * @export + * @class StorageSharedKeyCredentialPolicy + * @extends {CredentialPolicy} + */ +export declare class StorageSharedKeyCredentialPolicy extends CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + * + * @type {StorageSharedKeyCredential} + * @memberof StorageSharedKeyCredentialPolicy + */ + private readonly factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageSharedKeyCredential} factory + * @memberof StorageSharedKeyCredentialPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, factory: StorageSharedKeyCredential); + /** + * Signs request. + * + * @protected + * @param {WebResource} request + * @returns {WebResource} + * @memberof StorageSharedKeyCredentialPolicy + */ + protected signRequest(request: WebResource): WebResource; + /** + * Retrieve header value according to shared key sign rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @private + * @param {WebResource} request + * @param {string} headerName + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getHeaderValueToSign; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getCanonicalizedHeadersString; + /** + * Retrieves the webResource canonicalized resource string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getCanonicalizedResourceString; +} +/** + * Defines values for SyncCopyStatusType. + * Possible values include: 'success' + * @readonly + * @enum {string} + */ +export declare type SyncCopyStatusType = 'success'; +/** + * Specifies HTTP options for conditional requests based on blob tags. + */ +export declare interface TagConditions { + /** + * Optional SQL statement to apply to the tags of the blob. + */ + tagConditions?: string; +} +/** + * Blob tags. + */ +export declare type Tags = Record; +/** + * A user delegation key. + */ +export declare interface UserDelegationKey { + /** + * The Azure Active Directory object ID in GUID format. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedObjectId: string; + /** + * The Azure Active Directory tenant ID in GUID format. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedTenantId: string; + /** + * The date-time the key is active. + * + * @type {Date} + * @memberof UserDelegationKey + */ + signedStartsOn: Date; + /** + * The date-time the key expires. + * + * @type {Date} + * @memberof UserDelegationKey + */ + signedExpiresOn: Date; + /** + * Abbreviation of the Azure Storage service that accepts the key. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedService: string; + /** + * The service version that created the key. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedVersion: string; + /** + * The key as a base64 string. + * + * @type {string} + * @memberof UserDelegationKey + */ + value: string; +} +/** + * A user delegation key + */ +export declare interface UserDelegationKeyModel { + /** + * The Azure Active Directory object ID in GUID format. + */ + signedObjectId: string; + /** + * The Azure Active Directory tenant ID in GUID format + */ + signedTenantId: string; + /** + * The date-time the key is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + signedStartsOn: string; + /** + * The date-time the key expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + signedExpiresOn: string; + /** + * Abbreviation of the Azure Storage service that accepts the key + */ + signedService: string; + /** + * The service version that created the key + */ + signedVersion: string; + /** + * The key as a base64 string + */ + value: string; +} +export { WebResource }; +export {}; diff --git a/node_modules/@azure/storage-blob/typings/latest/storage-blob.d.ts b/node_modules/@azure/storage-blob/typings/latest/storage-blob.d.ts new file mode 100644 index 000000000..f08de2e14 --- /dev/null +++ b/node_modules/@azure/storage-blob/typings/latest/storage-blob.d.ts @@ -0,0 +1,12285 @@ +/// +import { AbortSignalLike } from '@azure/abort-controller'; +import { BaseRequestPolicy } from '@azure/core-http'; +import * as coreHttp from '@azure/core-http'; +import { deserializationPolicy } from '@azure/core-http'; +import { HttpHeaders } from '@azure/core-http'; +import { HttpOperationResponse } from '@azure/core-http'; +import { HttpRequestBody } from '@azure/core-http'; +import { HttpResponse } from '@azure/core-http'; +import { HttpClient as IHttpClient } from '@azure/core-http'; +import { KeepAliveOptions } from '@azure/core-http'; +import { OperationTracingOptions } from '@azure/core-tracing'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; +import { ProxyOptions } from '@azure/core-http'; +import { Readable } from 'stream'; +import { RequestPolicy } from '@azure/core-http'; +import { RequestPolicyFactory } from '@azure/core-http'; +import { RequestPolicyOptions } from '@azure/core-http'; +import { RestError } from '@azure/core-http'; +import { ServiceClientOptions } from '@azure/core-http'; +import { TokenCredential } from '@azure/core-http'; +import { TransferProgressEvent } from '@azure/core-http'; +import { UserAgentOptions } from '@azure/core-http'; +import { WebResource } from '@azure/core-http'; + +/** + * An Access policy + */ +export declare interface AccessPolicy { + /** + * the date-time the policy is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + startsOn?: string; + /** + * the date-time the policy expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + expiresOn?: string; + /** + * the permissions for the acl policy + */ + permissions?: string; +} + +/** + * Defines values for AccessTier. + * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', + * 'P80', 'Hot', 'Cool', 'Archive' + * @readonly + * @enum {string} + */ +export declare type AccessTier = 'P4' | 'P6' | 'P10' | 'P15' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'Hot' | 'Cool' | 'Archive'; + +/** + * Defines values for AccountKind. + * Possible values include: 'Storage', 'BlobStorage', 'StorageV2', 'FileStorage', + * 'BlockBlobStorage' + * @readonly + * @enum {string} + */ +export declare type AccountKind = 'Storage' | 'BlobStorage' | 'StorageV2' | 'FileStorage' | 'BlockBlobStorage'; + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class AccountSASPermissions + */ +export declare class AccountSASPermissions { + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @static + * @param {string} permissions + * @returns {AccountSASPermissions} + * @memberof AccountSASPermissions + */ + static parse(permissions: string): AccountSASPermissions; + /** + * Permission to read resources and list queues and tables granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + read: boolean; + /** + * Permission to write resources granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + write: boolean; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + delete: boolean; + /** + * Permission to delete versions granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + deleteVersion: boolean; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + list: boolean; + /** + * Permission to add messages, table entities, and append to blobs granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + add: boolean; + /** + * Permission to create blobs and files granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + create: boolean; + /** + * Permissions to update messages and table entities granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + update: boolean; + /** + * Permission to get and delete messages granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + process: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + tag: boolean; + /** + * Permission to filter blobs. + * + * @type {boolean} + * @memberof AccountSASPermissions + */ + filter: boolean; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASPermissions + */ + toString(): string; +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + * + * @export + * @class AccountSASResourceTypes + */ +export declare class AccountSASResourceTypes { + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @static + * @param {string} resourceTypes + * @returns {AccountSASResourceTypes} + * @memberof AccountSASResourceTypes + */ + static parse(resourceTypes: string): AccountSASResourceTypes; + /** + * Permission to access service level APIs granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + service: boolean; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + container: boolean; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + * + * @type {boolean} + * @memberof AccountSASResourceTypes + */ + object: boolean; + /** + * Converts the given resource types to a string. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @returns {string} + * @memberof AccountSASResourceTypes + */ + toString(): string; +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + * + * @export + * @class AccountSASServices + */ +export declare class AccountSASServices { + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @static + * @param {string} services + * @returns {AccountSASServices} + * @memberof AccountSASServices + */ + static parse(services: string): AccountSASServices; + /** + * Permission to access blob resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + blob: boolean; + /** + * Permission to access file resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + file: boolean; + /** + * Permission to access queue resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + queue: boolean; + /** + * Permission to access table resources granted. + * + * @type {boolean} + * @memberof AccountSASServices + */ + table: boolean; + /** + * Converts the given services to a string. + * + * @returns {string} + * @memberof AccountSASServices + */ + toString(): string; +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once + * all the values here are set appropriately, call {@link generateAccountSASQueryParameters} to obtain a representation + * of the SAS which can actually be applied to blob urls. Note: that both this class and {@link SASQueryParameters} + * exist because the former is mutable and a logical representation while the latter is immutable and used to generate + * actual REST requests. + * + * @see https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1 + * for more conceptual information on SAS + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * for descriptions of the parameters, including which are required + * + * @export + * @class AccountSASSignatureValues + */ +export declare interface AccountSASSignatureValues { + /** + * If not provided, this defaults to the service version targeted by this version of the library. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + version?: string; + /** + * Optional. SAS protocols allowed. + * + * @type {SASProtocol} + * @memberof AccountSASSignatureValues + */ + protocol?: SASProtocol; + /** + * Optional. When the SAS will take effect. + * + * @type {Date} + * @memberof AccountSASSignatureValues + */ + startsOn?: Date; + /** + * The time after which the SAS will no longer work. + * + * @type {Date} + * @memberof AccountSASSignatureValues + */ + expiresOn: Date; + /** + * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help + * constructing the permissions string. + * + * @type {AccountSASPermissions} + * @memberof AccountSASSignatureValues + */ + permissions: AccountSASPermissions; + /** + * Optional. IP range allowed. + * + * @type {SasIPRange} + * @memberof AccountSASSignatureValues + */ + ipRange?: SasIPRange; + /** + * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to + * construct this value. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + services: string; + /** + * The values that indicate the resource types accessible with this SAS. Please refer + * to {@link AccountSASResourceTypes} to construct this value. + * + * @type {string} + * @memberof AccountSASSignatureValues + */ + resourceTypes: string; +} + +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + * + * @export + * @class AnonymousCredential + * @extends {Credential} + */ +export declare class AnonymousCredential extends Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {AnonymousCredentialPolicy} + * @memberof AnonymousCredential + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): AnonymousCredentialPolicy; +} + +/** + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). + * + * @export + * @class AnonymousCredentialPolicy + * @extends {CredentialPolicy} + */ +export declare class AnonymousCredentialPolicy extends CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof AnonymousCredentialPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); +} + +/** + * Defines headers for AppendBlockFromUrl operation. + */ +export declare interface AppendBlobAppendBlockFromUrlHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This response header is returned only for append operations. It returns the offset at which + * the block was committed, in bytes. + */ + blobAppendOffset?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + errorCode?: string; +} + +/** + * Options to configure the {@link AppendBlobClient.appendBlockFromURL} operation. + * + * @export + * @interface AppendBlobAppendBlockFromURLOptions + */ +export declare interface AppendBlobAppendBlockFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when appending append blob blocks. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + conditions?: AppendBlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * An MD5 hash of the append block content from the URI. + * This hash is used to verify the integrity of the append block during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the append block content from the URI. + * This hash is used to verify the integrity of the append block during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobAppendBlockFromURLOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the appendBlockFromUrl operation. + */ +export declare type AppendBlobAppendBlockFromUrlResponse = AppendBlobAppendBlockFromUrlHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobAppendBlockFromUrlHeaders; + }; +}; + +/** + * Defines headers for AppendBlock operation. + */ +export declare interface AppendBlobAppendBlockHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This response header is returned only for append operations. It returns the offset at which + * the block was committed, in bytes. + */ + blobAppendOffset?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link AppendBlobClient.appendBlock} operation. + * + * @export + * @interface AppendBlobAppendBlockOptions + */ +export declare interface AppendBlobAppendBlockOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when appending append blob blocks. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockOptions + */ + conditions?: AppendBlobRequestConditions; + /** + * Callback to receive events on the progress of append block operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof AppendBlobAppendBlockOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the append block content. This hash is used to verify the integrity of the append block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof AppendBlobAppendBlockOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobAppendBlockOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobAppendBlockOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the appendBlock operation. + */ +export declare type AppendBlobAppendBlockResponse = AppendBlobAppendBlockHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobAppendBlockHeaders; + }; +}; + +/** + * AppendBlobClient defines a set of operations applicable to append blobs. + * + * @export + * @class AppendBlobClient + * @extends {BlobClient} + */ +export declare class AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + * + * @private + * @type {AppendBlob} + * @memberof AppendBlobClient + */ + private appendBlobContext; + /** + * + * Creates an instance of AppendBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof AppendBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of AppendBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to an append blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage append blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof AppendBlobClient + */ + constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of AppendBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to an append blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage append blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/appendblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof AppendBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {AppendBlobClient} A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof AppendBlobClient + */ + withSnapshot(snapshot: string): AppendBlobClient; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateOptions} [options] Options to the Append Block Create operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const appendBlobClient = containerClient.getAppendBlobClient(""); + * await appendBlobClient.create(); + * ``` + */ + create(options?: AppendBlobCreateOptions): Promise; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {AppendBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof AppendBlobClient + */ + createIfNotExists(options?: AppendBlobCreateIfNotExistsOptions): Promise; + /** + * Seals the append blob, making it read only. + * + * @param {AppendBlobSealOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + seal(options?: AppendBlobSealOptions): Promise; + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * + * @param {HttpRequestBody} body Data to be appended. + * @param {number} contentLength Length of the body in bytes. + * @param {AppendBlobAppendBlockOptions} [options] Options to the Append Block operation. + * @returns {Promise} + * @memberof AppendBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + appendBlock(body: HttpRequestBody, contentLength: number, options?: AppendBlobAppendBlockOptions): Promise; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * + * @param {string} sourceURL + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param {number} sourceOffset Offset in source to be appended + * @param {number} count Number of bytes to be appended as a block + * @param {AppendBlobAppendBlockFromURLOptions} [options={}] + * @returns {Promise} + * @memberof AppendBlobClient + */ + appendBlockFromURL(sourceURL: string, sourceOffset: number, count: number, options?: AppendBlobAppendBlockFromURLOptions): Promise; +} + +/** + * Defines headers for Create operation. + */ +export declare interface AppendBlobCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link AppendBlobClient.createIfNotExists} operation. + * + * @export + * @interface AppendBlobCreateIfNotExistsOptions + */ +export declare interface AppendBlobCreateIfNotExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * HTTP headers to set when creating append blobs. + * + * @type {BlobHTTPHeaders} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobCreateIfNotExistsOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the {@link appendBlobClient.createIfNotExists} operation. + * + * @export + * @interface AppendBlobCreateIfNotExistsResponse + */ +export declare interface AppendBlobCreateIfNotExistsResponse extends AppendBlobCreateResponse { + /** + * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists. + * + * @type {boolean} + * @memberof AppendBlobCreateIfNotExistsResponse + */ + succeeded: boolean; +} + +/** + * Options to configure {@link AppendBlobClient.create} operation. + * + * @export + * @interface AppendBlobCreateOptions + */ +export declare interface AppendBlobCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when creating append blobs. + * + * @type {BlobRequestConditions} + * @memberof AppendBlobCreateOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when creating append blobs. + * + * @type {BlobHTTPHeaders} + * @memberof AppendBlobCreateOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof AppendBlobCreateOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof AppendBlobCreateOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof AppendBlobCreateOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof AppendBlobCreateOptions + */ + tags?: Tags; +} + +/** + * Contains response data for the create operation. + */ +export declare type AppendBlobCreateResponse = AppendBlobCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: AppendBlobCreateHeaders; + }; +}; + +/** + * Conditions to add to the creation of this append blob. + */ +export declare interface AppendBlobRequestConditions extends BlobRequestConditions, AppendPositionAccessConditions { +} + +/** + * Options to configure {@link AppendBlobClient.seal} operation. + * + * @export + * @interface AppendBlobSealOptions + * @extends {CommonOptions} + */ +export declare interface AppendBlobSealOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof AppendBlobAppendBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet. + * + * @type {AppendBlobRequestConditions} + * @memberof AppendBlobAppendBlockOptions + */ + conditions?: AppendBlobRequestConditions; +} + +/** + * Additional parameters for a set of operations, such as: AppendBlob_appendBlock, + * AppendBlob_appendBlockFromUrl, AppendBlob_seal. + */ +export declare interface AppendPositionAccessConditions { + /** + * Optional conditional header. The max length in bytes permitted for the append blob. If the + * Append Block operation would cause the blob to exceed that limit or if the blob size is + * already greater than the value specified in this header, the request will fail with + * MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed). + */ + maxSize?: number; + /** + * Optional conditional header, used only for the Append Block operation. A number indicating the + * byte offset to compare. Append Block will succeed only if the append position is equal to this + * number. If it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP + * status code 412 - Precondition Failed). + */ + appendPosition?: number; +} + +/** + * Defines values for ArchiveStatus. + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + * @readonly + * @enum {string} + */ +export declare type ArchiveStatus = 'rehydrate-pending-to-hot' | 'rehydrate-pending-to-cool'; +export { BaseRequestPolicy } + +/** + * A request associated with a batch operation. + */ +export declare interface BatchSubRequest { + /** + * The URL of the resource to request operation. + * + * @type {string} + * @memberof BatchSubRequest + */ + url: string; + /** + * The credential used for sub request. + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. + * You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * + * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} + * @memberof BatchSubRequest + */ + credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential; +} + +/** + * The response data associated with a single request within a batch operation. + */ +export declare interface BatchSubResponse { + /** + * The status code of the sub operation. + */ + status: number; + /** + * The status message of the sub operation. + */ + statusMessage: string; + /** + * The error code of the sub operation, if the sub operation failed. + */ + errorCode?: string; + /** + * The HTTP response headers. + */ + headers: HttpHeaders; + /** + * The body as text. + */ + bodyAsText?: string; + /** + * The batch sub request corresponding to the sub response. + */ + _request: BatchSubRequest; +} + +/** + * Defines headers for AbortCopyFromURL operation. + */ +export declare interface BlobAbortCopyFromURLHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.abortCopyFromURL} operation. + * + * @export + * @interface BlobAbortCopyFromURLOptions + */ +export declare interface BlobAbortCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobAbortCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlobAbortCopyFromURLOptions + */ + conditions?: LeaseAccessConditions; +} + +/** + * Contains response data for the abortCopyFromURL operation. + */ +export declare type BlobAbortCopyFromURLResponse = BlobAbortCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobAbortCopyFromURLHeaders; + }; +}; + +/** + * Options to configure Blob - Acquire Lease operation. + * + * @export + * @interface BlobAcquireLeaseOptions + */ +export declare interface BlobAcquireLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobAcquireLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when acquiring the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobAcquireLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + * + * @export + * @class BlobBatch + */ +export declare class BlobBatch { + private batchRequest; + private readonly batch; + private batchType; + constructor(); + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + getMultiPartContentType(): string; + /** + * Get assembled HTTP request body for sub requests. + */ + getHttpRequestBody(): string; + /** + * Get sub requests that are added into the batch request. + */ + getSubRequests(): Map; + private addSubRequestInternal; + private setBatchType; + /** + * The deleteBlob operation marks the specified blob or snapshot for deletion. + * The blob is later deleted during garbage collection. + * Only one kind of operation is allowed per batch request. + * + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string} url The url of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + deleteBlob(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise; + /** + * The deleteBlob operation marks the specified blob or snapshot for deletion. + * The blob is later deleted during garbage collection. + * Only one kind of operation is allowed per batch request. + * + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient} blobClient The BlobClient. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions): Promise; + /** + * The setBlobAccessTier operation sets the tier on a blob. + * The operation is allowed on block blobs in a blob storage or general purpose v2 account. + * Only one kind of operation is allowed per batch request. + * + * A block blob's tier determines Hot/Cool/Archive storage type. + * This operation does not update the blob's ETag. + * For detailed information about block blob level tiering + * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers). + * The operation will be authenticated and authorized + * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string} url The url of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + setBlobAccessTier(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * The setBlobAccessTier operation sets the tier on a blob. + * The operation is allowed on block blobs in a blob storage or general purpose v2 account. + * Only one kind of operation is allowed per batch request. + * + * A block blob's tier determines Hot/Cool/Archive storage type. + * This operation does not update the blob's ETag. + * For detailed information about block blob level tiering + * see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers). + * The operation will be authenticated and authorized + * with specified credential. See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient} blobClient The BlobClient. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatch + */ + setBlobAccessTier(blobClient: BlobClient, tier: AccessTier, options?: BlobSetTierOptions): Promise; +} + +/** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + */ +export declare class BlobBatchClient { + private _serviceContext; + /** + * Creates an instance of BlobBatchClient. + * + * @param {string} url A url pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Options to configure the HTTP pipeline. + * @memberof BlobBatchClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobBatchClient. + * + * @param {string} url A url pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobBatchClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + createBatch(): BlobBatch; + /** + * Create multiple delete operations to mark the specified blobs or snapshots for deletion. + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operations will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string[]} urls The urls of the blob resources to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + deleteBlobs(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions): Promise; + /** + * Create multiple delete operations to mark the specified blobs or snapshots for deletion. + * Note that in order to delete a blob, you must delete all of its snapshots. + * You can delete both at the same time. See [delete operation details](https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob). + * The operation(subrequest) will be authenticated and authorized with specified credential. + * See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient[]} blobClients The BlobClients for the blobs to delete. + * @param {BlobDeleteOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + deleteBlobs(blobClients: BlobClient[], options?: BlobDeleteOptions): Promise; + /** + * Create multiple set tier operations to set the tier on a blob. + * The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier). + * The operation(subrequest) will be authenticated and authorized + * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {string[]} urls The urls of the blob resource to delete. + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + setBlobsAccessTier(urls: string[], credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * Create multiple set tier operations to set the tier on a blob. + * The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * See [set blob tier details](https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier). + * The operation(subrequest) will be authenticated and authorized + * with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). + * + * @param {BlobClient[]} blobClients The BlobClients for the blobs which should have a new tier set. + * @param {AccessTier} tier + * @param {BlobSetTierOptions} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + setBlobsAccessTier(blobClients: BlobClient[], tier: AccessTier, options?: BlobSetTierOptions): Promise; + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob(urlInString0, credential0); + * await batchRequest.deleteBlob(urlInString1, credential1, { + * deleteSnapshots: "include" + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```js + * let batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); + * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { + * conditions: { leaseId: leaseId } + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @param {BlobBatch} batchRequest A set of Delete or SetTier operations. + * @param {BlobBatchSubmitBatchOptionalParams} [options] + * @returns {Promise} + * @memberof BlobBatchClient + */ + submitBatch(batchRequest: BlobBatch, options?: BlobBatchSubmitBatchOptionalParams): Promise; +} + +/** + * Contains response data for the {@link deleteBlobs} operation. + */ +export declare type BlobBatchDeleteBlobsResponse = BlobBatchSubmitBatchResponse; + +/** + * Contains response data for the {@link setBlobsAccessTier} operation. + */ +export declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchResponse; + +/** + * Options to configure the Service - Submit Batch Optional Params. + * + * @export + * @interface BlobBatchSubmitBatchOptionalParams + */ +export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel, CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobBatchSubmitBatchOptionalParams + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for blob batch operations. + */ +export declare type BlobBatchSubmitBatchResponse = ParsedBatchResponse & ServiceSubmitBatchHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSubmitBatchHeaders; + }; +}; + +/** + * Options to configure the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobBeginCopyFromURLOptions + */ +export declare interface BlobBeginCopyFromURLOptions extends BlobStartCopyFromURLOptions { + /** + * The amount of time in milliseconds the poller should wait between + * calls to the service to determine the status of the Blob copy. + * Defaults to 15 seconds. + * + * @type {number} + * @memberof BlobBeginCopyFromURLOptions + */ + intervalInMs?: number; + /** + * Callback to receive the state of the copy progress. + * + * @memberof BlobBeginCopyFromURLOptions + */ + onProgress?: (state: BlobBeginCopyFromUrlPollState) => void; + /** + * Serialized poller state that can be used to resume polling from. + * This may be useful when starting a copy on one process or thread + * and you wish to continue polling on another process or thread. + * + * To get serialized poller state, call `poller.toString()` on an existing + * poller. + * + * @memberof BlobBeginCopyFromURLOptions + */ + resumeFrom?: string; +} + +/** + * The state used by the poller returned from {@link BlobClient.beginCopyFromURL}. + * + * This state is passed into the user-specified `onProgress` callback + * whenever copy progress is detected. + */ +export declare interface BlobBeginCopyFromUrlPollState extends PollOperationState { + /** + * The instance of {@link BlobClient} that was used when calling {@link BlobClient.beginCopyFromURL}. + */ + readonly blobClient: CopyPollerBlobClient; + /** + * The copyId that identifies the in-progress blob copy. + */ + copyId?: string; + /** + * the progress of the blob copy as reported by the service. + */ + copyProgress?: string; + /** + * The source URL provided in {@link BlobClient.beginCopyFromURL}. + */ + copySource: string; + /** + * The options that were passed to the initial {@link BlobClient.beginCopyFromURL} call. + * This is exposed for the poller and should not be modified directly. + */ + readonly startCopyFromURLOptions?: BlobStartCopyFromURLOptions; +} + +/** + * Contains response data for the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobBeginCopyFromURLResponse + */ +export declare interface BlobBeginCopyFromURLResponse extends BlobStartCopyFromURLResponse { +} + +/** + * Options to configure Blob - Break Lease operation. + * + * @export + * @interface BlobBreakLeaseOptions + */ +export declare interface BlobBreakLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobBreakLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when breaking the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobBreakLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Options to configure Blob - Change Lease operation. + * + * @export + * @interface BlobChangeLeaseOptions + */ +export declare interface BlobChangeLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobChangeLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobChangeLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + * + * @export + * @class BlobClient + */ +export declare class BlobClient extends StorageClient { + /** + * blobContext provided by protocol layer. + * + * @private + * @type {Blobs} + * @memberof BlobClient + */ + private blobContext; + private _name; + private _containerName; + /** + * The name of the blob. + */ + get name(): string; + /** + * The name of the storage container the blob is associated with. + */ + get containerName(): string; + /** + * + * Creates an instance of BlobClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob". + * You can append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlobClient} A new BlobClient object identical to the source but with the specified snapshot timestamp + * @memberof BlobClient + */ + withSnapshot(snapshot: string): BlobClient; + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param {string} versionId The versionId. + * @returns {BlobClient} A new BlobClient object pointing to the version of this blob. + * @memberof BlobClient + */ + withVersion(versionId: string): BlobClient; + /** + * Creates a AppendBlobClient object. + * + * @returns {AppendBlobClient} + * @memberof BlobClient + */ + getAppendBlobClient(): AppendBlobClient; + /** + * Creates a BlockBlobClient object. + * + * @returns {BlockBlobClient} + * @memberof BlobClient + */ + getBlockBlobClient(): BlockBlobClient; + /** + * Creates a PageBlobClient object. + * + * @returns {PageBlobClient} + * @memberof BlobClient + */ + getPageBlobClient(): PageBlobClient; + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlobDownloadOptions} [options] Optional options to Blob Download operation. + * @returns {Promise} + * @memberof BlobClient + * + * Example usage (Node.js): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); + * console.log("Downloaded blob content:", downloaded.toString()); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * Example usage (browser): + * + * ```js + * // Download and convert a blob to a string + * const downloadBlockBlobResponse = await blobClient.download(); + * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); + * console.log( + * "Downloaded blob content", + * downloaded + * ); + * + * async function blobToString(blob: Blob): Promise { + * const fileReader = new FileReader(); + * return new Promise((resolve, reject) => { + * fileReader.onloadend = (ev: any) => { + * resolve(ev.target!.result); + * }; + * fileReader.onerror = reject; + * fileReader.readAsText(blob); + * }); + * } + * ``` + */ + download(offset?: number, count?: number, options?: BlobDownloadOptions): Promise; + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param {BlobExistsOptions} [options] options to Exists operation. + * @returns {Promise} + * @memberof BlobClient + */ + exists(options?: BlobExistsOptions): Promise; + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {BlobGetPropertiesOptions} [options] Optional options to Get Properties operation. + * @returns {Promise} + * @memberof BlobClient + */ + getProperties(options?: BlobGetPropertiesOptions): Promise; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + delete(options?: BlobDeleteOptions): Promise; + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {BlobDeleteOptions} [options] Optional options to Blob Delete operation. + * @returns {Promise} + * @memberof BlobClient + */ + deleteIfExists(options?: BlobDeleteOptions): Promise; + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * + * @param {BlobUndeleteOptions} [options] Optional options to Blob Undelete operation. + * @returns {Promise} + * @memberof BlobClient + */ + undelete(options?: BlobUndeleteOptions): Promise; + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {BlobHTTPHeaders} [blobHTTPHeaders] If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * @param {BlobSetHTTPHeadersOptions} [options] Optional options to Blob Set HTTP Headers operation. + * @returns {Promise} + * @memberof BlobClient + */ + setHTTPHeaders(blobHTTPHeaders?: BlobHTTPHeaders, options?: BlobSetHTTPHeadersOptions): Promise; + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {BlobSetMetadataOptions} [options] Optional options to Set Metadata operation. + * @returns {Promise} + * @memberof BlobClient + */ + setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise; + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param {Tags} tags + * @param {BlobSetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + setTags(tags: Tags, options?: BlobSetTagsOptions): Promise; + /** + * Gets the tags associated with the underlying blob. + * + * @param {BlobGetTagsOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + getTags(options?: BlobGetTagsOptions): Promise; + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the blob. + * @memberof BlobClient + */ + getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient; + /** + * Creates a read-only snapshot of a blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * + * @param {BlobCreateSnapshotOptions} [options] Optional options to the Blob Create Snapshot operation. + * @returns {Promise} + * @memberof BlobClient + */ + createSnapshot(options?: BlobCreateSnapshotOptions): Promise; + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * Example using automatic polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using manual polling: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * while (!poller.isDone()) { + * await poller.poll(); + * } + * const result = copyPoller.getResult(); + * ``` + * + * Example using progress updates: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * } + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using a changing polling interval (default 15 seconds): + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url', { + * intervalInMs: 1000 // poll blob every 1 second for copy progress + * }); + * const result = await copyPoller.pollUntilDone(); + * ``` + * + * Example using copy cancellation: + * + * ```js + * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // cancel operation after starting it. + * try { + * await copyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * await copyPoller.getResult(); + * } catch (err) { + * if (err.name === 'PollerCancelledError') { + * console.log('The copy was cancelled.'); + * } + * } + * ``` + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobBeginCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + */ + beginCopyFromURL(copySource: string, options?: BlobBeginCopyFromURLOptions): Promise, BlobBeginCopyFromURLResponse>>; + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * + * @param {string} copyId Id of the Copy From URL operation. + * @param {BlobAbortCopyFromURLOptions} [options] Optional options to the Blob Abort Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + abortCopyFromURL(copyId: string, options?: BlobAbortCopyFromURLOptions): Promise; + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * + * @param {string} copySource The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param {BlobSyncCopyFromURLOptions} [options={}] + * @returns {Promise} + * @memberof BlobClient + */ + syncCopyFromURL(copySource: string, options?: BlobSyncCopyFromURLOptions): Promise; + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * + * @param {BlockBlobTier | PremiumPageBlobTier | string} tier The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param {BlobSetTierOptions} [options] Optional options to the Blob Set Tier operation. + * @returns {Promise} + * @memberof BlobClient + */ + setAccessTier(tier: BlockBlobTier | PremiumPageBlobTier | string, options?: BlobSetTierOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob in parallel to a buffer. + * Offset and count are optional, downloads the entire blob if they are not provided. + * + * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two + * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size, + * consider {@link downloadToFile}. + * + * @export + * @param {number} offset From which position of the block blob to download(in bytes) + * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined + * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions + * @returns {Promise} + */ + downloadToBuffer(offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob in parallel to a buffer. + * Offset and count are optional, downloads the entire blob if they are not provided. + * + * Warning: Buffers can only support files up to about one gigabyte on 32-bit systems or about two + * gigabytes on 64-bit systems due to limitations of Node.js/V8. For blobs larger than this size, + * consider {@link downloadToFile}. + * + * @export + * @param {Buffer} buffer Buffer to be fill, must have length larger than count + * @param {number} offset From which position of the block blob to download(in bytes) + * @param {number} [count] How much data(in bytes) to be downloaded. Will download to the end when passing undefined + * @param {BlobDownloadToBufferOptions} [options] BlobDownloadToBufferOptions + * @returns {Promise} + */ + downloadToBuffer(buffer: Buffer, offset?: number, count?: number, options?: BlobDownloadToBufferOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param {string} filePath + * @param {number} [offset] From which position of the block blob to download. + * @param {number} [count] How much data to be downloaded. Will download to the end when passing undefined. + * @param {BlobDownloadOptions} [options] Options to Blob download options. + * @returns {Promise} The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + * @memberof BlobClient + */ + downloadToFile(filePath: string, offset?: number, count?: number, options?: BlobDownloadOptions): Promise; + private getBlobAndContainerNamesFromUrl; + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * + * @param {string} copySource url to the source Azure Blob/File. + * @param {BlobStartCopyFromURLOptions} [options] Optional options to the Blob Start Copy From URL operation. + * @returns {Promise} + * @memberof BlobClient + */ + private startCopyFromURL; +} + +/** + * Defines headers for CopyFromURL operation. + */ +export declare interface BlobCopyFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'success' + */ + copyStatus?: SyncCopyStatusType; + /** + * This response header is returned so that the client can check for the integrity of the copied + * content. This header is only returned if the source content MD5 was specified. + */ + contentMD5?: Uint8Array; + /** + * This response header is returned so that the client can check for the integrity of the copied + * content. + */ + xMsContentCrc64?: Uint8Array; + errorCode?: string; +} + +/** + * Contains response data for the copyFromURL operation. + */ +export declare type BlobCopyFromURLResponse = BlobCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobCopyFromURLHeaders; + }; +}; + +/** + * Defines headers for CreateSnapshot operation. + */ +export declare interface BlobCreateSnapshotHeaders { + /** + * Uniquely identifies the snapshot and indicates the snapshot version. It may be used in + * subsequent requests to access the snapshot + */ + snapshot?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * True if the contents of the request are successfully encrypted using the specified algorithm, + * and false otherwise. For a snapshot request, this header is set to true when metadata was + * provided in the request and encrypted with a customer-provided key. + */ + isServerEncrypted?: boolean; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.createSnapshot} operation. + * + * @export + * @interface BlobCreateSnapshotOptions + */ +export declare interface BlobCreateSnapshotOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobCreateSnapshotOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the snapshot. + * + * @type {Metadata} + * @memberof BlobCreateSnapshotOptions + */ + metadata?: Metadata; + /** + * Conditions to meet when creating blob snapshots. + * + * @type {BlobRequestConditions} + * @memberof BlobCreateSnapshotOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobCreateSnapshotOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlobCreateSnapshotOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the createSnapshot operation. + */ +export declare type BlobCreateSnapshotResponse = BlobCreateSnapshotHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobCreateSnapshotHeaders; + }; +}; + +/** + * Defines headers for Delete operation. + */ +export declare interface BlobDeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the {@link BlobClient.deleteIfExists} operation. + * + * @export + * @interface BlobDeleteIfExistsResponse + */ +export declare interface BlobDeleteIfExistsResponse extends BlobDeleteResponse { + /** + * Indicate whether the blob is successfully deleted. Is false if the blob does not exist in the first place. + * + * @type {boolean} + * @memberof BlobDeleteIfExistsResponse + */ + succeeded: boolean; +} + +/** + * Options to configure the {@link BlobClient.delete} operation. + * + * @export + * @interface BlobDeleteOptions + */ +export declare interface BlobDeleteOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDeleteOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when deleting blobs. + * + * @type {BlobRequestConditions} + * @memberof BlobDeleteOptions + */ + conditions?: BlobRequestConditions; + /** + * Specifies options to delete blobs that have associated snapshots. + * - `include`: Delete the base blob and all of its snapshots. + * - `only`: Delete only the blob's snapshots and not the blob itself. + * + * @type {DeleteSnapshotsOptionType} + * @memberof BlobDeleteOptions + */ + deleteSnapshots?: DeleteSnapshotsOptionType; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDeleteOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Contains response data for the deleteMethod operation. + */ +export declare type BlobDeleteResponse = BlobDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobDeleteHeaders; + }; +}; + +/** + * Defines headers for Download operation. + */ +export declare interface BlobDownloadHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { + [propertyName: string]: string; + }; + /** + * The number of bytes present in the response body. + */ + contentLength?: number; + /** + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' + */ + contentType?: string; + /** + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. + */ + contentRange?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletedOn?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the whole blob's MD5 value. This value may or + * may not be equal to the value returned in Content-MD5 header, with the latter calculated from + * the requested range + */ + blobContentMD5?: Uint8Array; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * If this blob has been sealed + */ + isSealed?: boolean; + /** + * UTC date/time value generated by the service that indicates the time at which the blob was + * last read or written to + */ + lastAccessed?: Date; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + contentCrc64?: Uint8Array; + errorCode?: string; +} + +/** + * Optional Parameters. + */ +export declare interface BlobDownloadOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see Creating + * a Snapshot of a Blob. + */ + snapshot?: string; + /** + * The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + */ + versionId?: string; + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Return only the bytes of the blob in the specified range. + */ + range?: string; + /** + * When set to true and specified together with the Range, the service returns the MD5 hash for + * the range, as long as the range is less than or equal to 4 MB in size. + */ + rangeGetContentMD5?: boolean; + /** + * When set to true and specified together with the Range, the service returns the CRC64 hash for + * the range, as long as the range is less than or equal to 4 MB in size. + */ + rangeGetContentCRC64?: boolean; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + leaseAccessConditions?: LeaseAccessConditions; + /** + * Additional parameters for the operation + */ + cpkInfo?: CpkInfo; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditionsModel; +} + +/** + * Options to configure the {@link BlobClient.download} operation. + * + * @export + * @interface BlobDownloadOptions + */ +export declare interface BlobDownloadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDownloadOptions + */ + abortSignal?: AbortSignalLike; + /** + * An opaque DateTime string value that, when present, specifies the blob snapshot to retrieve. + * + * @type {string} + * @memberof BlobDownloadOptions + */ + snapshot?: string; + /** + * When this is set to true and download range of blob, the service returns the MD5 hash for the range, + * as long as the range is less than or equal to 4 MB in size. + * + * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time. + * + * @type {boolean} + * @memberof BlobDownloadOptions + */ + rangeGetContentMD5?: boolean; + /** + * When this is set to true and download range of blob, the service returns the CRC64 hash for the range, + * as long as the range is less than or equal to 4 MB in size. + * + * rangeGetContentCrc64 and rangeGetContentMD5 cannot be set at same time. + * + * @type {boolean} + * @memberof BlobDownloadOptions + */ + rangeGetContentCrc64?: boolean; + /** + * Conditions to meet when downloading blobs. + * + * @type {BlobRequestConditions} + * @memberof BlobDownloadOptions + */ + conditions?: BlobRequestConditions; + /** + * Call back to receive events on the progress of download operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlobDownloadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Optional. ONLY AVAILABLE IN NODE.JS. + * + * How many retries will perform when original body download stream unexpected ends. + * Above kind of ends will not trigger retry policy defined in a pipeline, + * because they doesn't emit network errors. + * + * With this option, every additional retry means an additional `FileClient.download()` request will be made + * from the broken point, until the requested range has been successfully downloaded or maxRetryRequests is reached. + * + * Default value is 5, please set a larger value when loading large files in poor network. + * + * @type {number} + * @memberof BlobDownloadOptions + */ + maxRetryRequests?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Contains response data for the download operation. + */ +export declare type BlobDownloadResponseModel = BlobDownloadHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobDownloadHeaders; + }; +}; + +/** + * Contains response data for the {@link BlobClient.download} operation. + * + * @export + * @interface BlobDownloadResponseParsed + */ +export declare interface BlobDownloadResponseParsed extends BlobDownloadResponseModel { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @type {ObjectReplicationPolicy[]} + * @memberof BlobDownloadResponseParsed + */ + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; + /** + * Object Replication Policy Id of the destination blob. + * + * @type {string} + * @memberof BlobDownloadResponseParsed + */ + objectReplicationDestinationPolicyId?: string; +} + +/** + * Option interface for the {@link BlobClient.downloadToBuffer} operation. + * + * @export + * @interface BlobDownloadToBufferOptions + */ +export declare interface BlobDownloadToBufferOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobDownloadToBufferOptions + */ + abortSignal?: AbortSignalLike; + /** + * blockSize is the data every request trying to download. + * Must be >= 0, if set to 0 or undefined, blockSize will automatically calculated according + * to the blob size. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + blockSize?: number; + /** + * Optional. ONLY AVAILABLE IN NODE.JS. + * + * How many retries will perform when original block download stream unexpected ends. + * Above kind of ends will not trigger retry policy defined in a pipeline, + * because they doesn't emit network errors. + * + * With this option, every additional retry means an additional FileClient.download() request will be made + * from the broken point, until the requested block has been successfully downloaded or + * maxRetryRequestsPerBlock is reached. + * + * Default value is 5, please set a larger value when in poor network. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + maxRetryRequestsPerBlock?: number; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlobDownloadToBufferOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlobDownloadToBufferOptions + */ + conditions?: BlobRequestConditions; + /** + * Concurrency of parallel download. + * + * @type {number} + * @memberof BlobDownloadToBufferOptions + */ + concurrency?: number; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobDownloadToBufferOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Options to configure the {@link BlobClient.exists} operation. + * + * @export + * @interface BlobExistsOptions + */ +export declare interface BlobExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Conditions to meet. + * + * @type {BlobRequestConditions} + * @memberof BlobExistsOptions + */ + conditions?: BlobRequestConditions; +} + +/** + * An interface representing BlobFlatListSegment. + */ +export declare interface BlobFlatListSegment { + blobItems: BlobItem[]; +} + +/** + * An interface representing BlobFlatListSegment. + */ +export declare interface BlobFlatListSegmentModel { + blobItems: BlobItemInternal[]; +} + +/** + * Defines headers for GetProperties operation. + */ +export declare interface BlobGetPropertiesHeaders { + /** + * Returns the date and time the blob was last modified. Any operation that modifies the blob, + * including an update of the blob's metadata or properties, changes the last-modified time of + * the blob. + */ + lastModified?: Date; + /** + * Returns the date and time the blob was created. + */ + createdOn?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * Optional. Only valid when Object Replication is enabled for the storage container and on the + * destination blob of the replication. + */ + objectReplicationPolicyId?: string; + objectReplicationRules?: { + [propertyName: string]: string; + }; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletedOn?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * Included if the blob is incremental copy blob. + */ + isIncrementalCopy?: boolean; + /** + * Included if the blob is incremental copy blob or incremental copy snapshot, if + * x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot + * for this blob. + */ + destinationSnapshot?: string; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * The size of the blob in bytes. For a page blob, this header returns the value of the + * x-ms-blob-content-length header that is stored with the blob. + */ + contentLength?: number; + /** + * The content type specified for the blob. The default content type is + * 'application/octet-stream' + */ + contentType?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only + * returned when the metadata was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * The tier of page blob on a premium storage account or tier of block blob on blob storage LRS + * accounts. For a list of allowed premium page blob tiers, see + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For + * blob storage LRS accounts, valid values are Hot/Cool/Archive. + */ + accessTier?: string; + /** + * For page blobs on a premium storage account only. If the access tier is not explicitly set on + * the blob, the tier is inferred based on its content length and this header will be returned + * with true value. + */ + accessTierInferred?: boolean; + /** + * For blob storage LRS accounts, valid values are + * rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not + * complete then this header is returned indicating that rehydrate is pending and also tells the + * destination tier. + */ + archiveStatus?: string; + /** + * The time the tier was changed on the object. This is only returned if the tier on the block + * blob was ever set. + */ + accessTierChangedOn?: Date; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * The value of this header indicates whether version of this blob is a current version, see also + * x-ms-version-id header. + */ + isCurrentVersion?: boolean; + /** + * The number of tags associated with the blob + */ + tagCount?: number; + /** + * The time this blob will expire. + */ + expiresOn?: Date; + /** + * If this blob has been sealed + */ + isSealed?: boolean; + /** + * If an object is in rehydrate pending state then this header is returned with priority of + * rehydrate. Possible values include: 'High', 'Standard' + */ + rehydratePriority?: RehydratePriority; + /** + * UTC date/time value generated by the service that indicates the time at which the blob was + * last read or written to + */ + lastAccessed?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.getProperties} operation. + * + * @export + * @interface BlobGetPropertiesOptions + */ +export declare interface BlobGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting blob properties. + * + * @type {BlobRequestConditions} + * @memberof BlobGetPropertiesOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobGetPropertiesOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Contains response data for the {@link BlobClient.getProperties} operation. + * + * @export + * @interface BlobGetPropertiesResponse + */ +export declare interface BlobGetPropertiesResponse extends BlobGetPropertiesResponseModel { + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @type {ObjectReplicationPolicy[]} + * @memberof BlobGetPropertiesResponse + */ + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; + /** + * Object Replication Policy Id of the destination blob. + * + * @type {string} + * @memberof BlobGetPropertiesResponse + */ + objectReplicationDestinationPolicyId?: string; +} + +/** + * Contains response data for the getProperties operation. + */ +export declare type BlobGetPropertiesResponseModel = BlobGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetPropertiesHeaders; + }; +}; + +/** + * Defines headers for GetTags operation. + */ +export declare interface BlobGetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.getTags} operation. + * + * @export + * @interface BlobGetTagsOptions + */ +export declare interface BlobGetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobGetTagsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet for the blob to perform this operation. + * + * @type {TagConditions} + * @memberof BlobGetTagsOptions + */ + conditions?: TagConditions; +} + +/** + * Contains response data for the {@link ContainerClient.getTags} operation. + */ +export declare type BlobGetTagsResponse = { + tags: Tags; +} & BlobGetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobGetTagsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobTags; + }; +}; + +/** + * An interface representing BlobHierarchyListSegment. + */ +export declare interface BlobHierarchyListSegment { + blobPrefixes?: BlobPrefix[]; + blobItems: BlobItem[]; +} + +/** + * An interface representing BlobHierarchyListSegment. + */ +export declare interface BlobHierarchyListSegmentModel { + blobPrefixes?: BlobPrefix[]; + blobItems: BlobItemInternal[]; +} + +/** + * Additional parameters for a set of operations. + */ +export declare interface BlobHTTPHeaders { + /** + * Optional. Sets the blob's cache control. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobCacheControl?: string; + /** + * Optional. Sets the blob's content type. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobContentType?: string; + /** + * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes + * for the individual blocks were validated when each was uploaded. + */ + blobContentMD5?: Uint8Array; + /** + * Optional. Sets the blob's content encoding. If specified, this property is stored with the + * blob and returned with a read request. + */ + blobContentEncoding?: string; + /** + * Optional. Set the blob's content language. If specified, this property is stored with the blob + * and returned with a read request. + */ + blobContentLanguage?: string; + /** + * Optional. Sets the blob's Content-Disposition header. + */ + blobContentDisposition?: string; +} + +/** + * An Azure Storage blob + */ +export declare interface BlobItem { + name: string; + deleted: boolean; + snapshot: string; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobProperties; + metadata?: { + [propertyName: string]: string; + }; + tags?: Tags; + objectReplicationSourceProperties?: ObjectReplicationPolicy[]; +} + +/** + * An Azure Storage blob + */ +export declare interface BlobItemInternal { + name: string; + deleted: boolean; + snapshot: string; + versionId?: string; + isCurrentVersion?: boolean; + properties: BlobProperties; + metadata?: { + [propertyName: string]: string; + }; + blobTags?: BlobTags; + objectReplicationMetadata?: { + [propertyName: string]: string; + }; +} + +/** + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. + * + * @export + * @class BlobLeaseClient + */ +export declare class BlobLeaseClient { + private _leaseId; + private _url; + private _containerOrBlobOperation; + private _isContainer; + /** + * Gets the lease Id. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get leaseId(): string; + /** + * Gets the url. + * + * @readonly + * @memberof BlobLeaseClient + * @type {string} + */ + get url(): string; + /** + * Creates an instance of BlobLeaseClient. + * @param {(ContainerClient | BlobClient)} client The client to make the lease operation requests. + * @param {string} leaseId Initial proposed lease id. + * @memberof BlobLeaseClient + */ + constructor(client: ContainerClient | BlobClient, leaseId?: string); + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {number} duration Must be between 15 to 60 seconds, or infinite (-1) + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for acquire lease operation. + * @memberof BlobLeaseClient + */ + acquireLease(duration: number, options?: LeaseOperationOptions): Promise; + /** + * To change the ID of the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {string} proposedLeaseId the proposed new lease Id. + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for change lease operation. + * @memberof BlobLeaseClient + */ + changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise; + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] option to configure lease management operations. + * @returns {Promise} Response data for release lease operation. + * @memberof BlobLeaseClient + */ + releaseLease(options?: LeaseOperationOptions): Promise; + /** + * To renew the lease. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @param {LeaseOperationOptions} [options={}] Optional option to configure lease management operations. + * @returns {Promise} Response data for renew lease operation. + * @memberof BlobLeaseClient + */ + renewLease(options?: LeaseOperationOptions): Promise; + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * and + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * + * @static + * @param {number} breakPeriod Break period + * @param {LeaseOperationOptions} [options={}] Optional options to configure lease management operations. + * @returns {Promise} Response data for break lease operation. + * @memberof BlobLeaseClient + */ + breakLease(breakPeriod: number, options?: LeaseOperationOptions): Promise; +} + +/** + * An interface representing BlobPrefix. + */ +export declare interface BlobPrefix { + name: string; +} + +/** + * Properties of a blob + */ +export declare interface BlobProperties { + createdOn?: Date; + lastModified: Date; + etag: string; + /** + * Size in bytes + */ + contentLength?: number; + contentType?: string; + contentEncoding?: string; + contentLanguage?: string; + contentMD5?: Uint8Array; + contentDisposition?: string; + cacheControl?: string; + blobSequenceNumber?: number; + /** + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * Possible values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + copyId?: string; + /** + * Possible values include: 'pending', 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + copySource?: string; + copyProgress?: string; + copyCompletedOn?: Date; + copyStatusDescription?: string; + serverEncrypted?: boolean; + incrementalCopy?: boolean; + destinationSnapshot?: string; + deletedOn?: Date; + remainingRetentionDays?: number; + /** + * Possible values include: 'P4', 'P6', 'P10', 'P15', 'P20', 'P30', 'P40', 'P50', 'P60', 'P70', + * 'P80', 'Hot', 'Cool', 'Archive' + */ + accessTier?: AccessTier; + accessTierInferred?: boolean; + /** + * Possible values include: 'rehydrate-pending-to-hot', 'rehydrate-pending-to-cool' + */ + archiveStatus?: ArchiveStatus; + customerProvidedKeySha256?: string; + /** + * The name of the encryption scope under which the blob is encrypted. + */ + encryptionScope?: string; + accessTierChangedOn?: Date; + tagCount?: number; + expiresOn?: Date; + isSealed?: boolean; + /** + * Possible values include: 'High', 'Standard' + */ + rehydratePriority?: RehydratePriority; + lastAccessedOn?: Date; +} + +/** + * Options to query blob with Apache Arrow format. Only valid for {@link BlockBlobQueryOptions.outputTextConfiguration}. + * + * @export + * @interface BlobQueryArrowConfiguration + */ +export declare interface BlobQueryArrowConfiguration { + /** + * Kind. + * + * @type {"arrow"} + * @memberof BlobQueryArrowConfiguration + */ + kind: "arrow"; + /** + * List of {@link BlobQueryArrowField} describing the schema of the data. + * + * @type {BlobQueryArrowField[]} + * @memberof BlobQueryArrowConfiguration + */ + schema: BlobQueryArrowField[]; +} + +/** + * Describe a field in {@link BlobQueryArrowConfiguration}. + * + * @export + * @interface BlobQueryArrowField + */ +export declare interface BlobQueryArrowField { + /** + * The type of the field. + * + * @type {BlobQueryArrowFieldType} + * @memberof BlobQueryArrowField + */ + type: BlobQueryArrowFieldType; + /** + * The name of the field. + * + * @type {string} + * @memberof BlobQueryArrowField + */ + name?: string; + /** + * The precision of the field. Required if type is "decimal". + * + * @type {number} + * @memberof BlobQueryArrowField + */ + precision?: number; + /** + * The scale of the field. Required if type is is "decimal". + * + * @type {number} + * @memberof BlobQueryArrowField + */ + scale?: number; +} + +/** + * The type of a {@link BlobQueryArrowField}. + */ +export declare type BlobQueryArrowFieldType = "int64" | "bool" | "timestamp[ms]" | "string" | "double" | "decimal"; + +/** + * Options to query blob with CSV format. + * + * @export + * @interface BlobQueryCsvTextConfiguration + */ +export declare interface BlobQueryCsvTextConfiguration { + /** + * Record separator. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + recordSeparator: string; + /** + * Query for a CSV format blob. + * + * @type {"csv"} + * @memberof BlobQueryCsvTextConfiguration + */ + kind: "csv"; + /** + * Column separator. Default is ",". + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + columnSeparator?: string; + /** + * Field quote. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + fieldQuote?: string; + /** + * Escape character. + * + * @type {string} + * @memberof BlobQueryCsvTextConfiguration + */ + escapeCharacter?: string; + /** + * Has headers. Default is false. + * + * @type {boolean} + * @memberof BlobQueryCsvTextConfiguration + */ + hasHeaders?: boolean; +} + +/** + * Blob query error type. + * + * @export + * @interface BlobQueryError + */ +export declare interface BlobQueryError { + /** + * Whether error is fatal. Fatal error will stop query. + * + * @type {boolean} + * @memberof BlobQueryError + */ + isFatal: boolean; + /** + * Error name. + * + * @type {string} + * @memberof BlobQueryError + */ + name: string; + /** + * Position in bytes of the query. + * + * @type {number} + * @memberof BlobQueryError + */ + position: number; + /** + * Error description. + * + * @type {string} + * @memberof BlobQueryError + */ + description: string; +} + +/** + * Defines headers for Query operation. + */ +export declare interface BlobQueryHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + metadata?: { + [propertyName: string]: string; + }; + /** + * The number of bytes present in the response body. + */ + contentLength?: number; + /** + * The media type of the body of the response. For Download Blob this is + * 'application/octet-stream' + */ + contentType?: string; + /** + * Indicates the range of bytes returned in the event that the client requested a subset of the + * blob by setting the 'Range' request header. + */ + contentRange?: string; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header returns the value that was specified for the Content-Encoding request header + */ + contentEncoding?: string; + /** + * This header is returned if it was previously specified for the blob. + */ + cacheControl?: string; + /** + * This header returns the value that was specified for the 'x-ms-blob-content-disposition' + * header. The Content-Disposition response header field conveys additional information about how + * to process the response payload, and also can be used to attach additional metadata. For + * example, if set to attachment, it indicates that the user-agent should not display the + * response, but instead show a Save As dialog with a filename other than the blob name + * specified. + */ + contentDisposition?: string; + /** + * This header returns the value that was specified for the Content-Language request header. + */ + contentLanguage?: string; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * The blob's type. Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + */ + blobType?: BlobType; + /** + * Conclusion time of the last attempted Copy Blob operation where this blob was the destination + * blob. This value can specify the time of a completed, aborted, or failed copy attempt. This + * header does not appear if a copy is pending, if this blob has never been the destination in a + * Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation + * using Set Blob Properties, Put Blob, or Put Block List. + */ + copyCompletionTime?: Date; + /** + * Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal + * or non-fatal copy operation failure. This header does not appear if this blob has never been + * the destination in a Copy Blob operation, or if this blob has been modified after a concluded + * Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyStatusDescription?: string; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * Contains the number of bytes copied and the total bytes in the source in the last attempted + * Copy Blob operation where this blob was the destination blob. Can show between 0 and + * Content-Length bytes copied. This header does not appear if this blob has never been the + * destination in a Copy Blob operation, or if this blob has been modified after a concluded Copy + * Blob operation using Set Blob Properties, Put Blob, or Put Block List + */ + copyProgress?: string; + /** + * URL up to 2 KB in length that specifies the source blob or file used in the last attempted + * Copy Blob operation where this blob was the destination blob. This header does not appear if + * this blob has never been the destination in a Copy Blob operation, or if this blob has been + * modified after a concluded Copy Blob operation using Set Blob Properties, Put Blob, or Put + * Block List. + */ + copySource?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * Indicates that the service supports requests for partial blob content. + */ + acceptRanges?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The number of committed blocks present in the blob. This header is returned only for append + * blobs. + */ + blobCommittedBlockCount?: number; + /** + * The value of this header is set to true if the blob data and application metadata are + * completely encrypted using the specified algorithm. Otherwise, the value is set to false (when + * the blob is unencrypted, or if only parts of the blob/application metadata are encrypted). + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + /** + * If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this + * response header is returned with the value of the whole blob's MD5 value. This value may or + * may not be equal to the value returned in Content-MD5 header, with the latter calculated from + * the requested range + */ + blobContentMD5?: Uint8Array; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 and x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + contentCrc64?: Uint8Array; + errorCode?: string; +} + +/** + * Options to query blob with JSON format. + * + * @export + * @interface BlobQueryJsonTextConfiguration + */ +export declare interface BlobQueryJsonTextConfiguration { + /** + * Record separator. + * + * @type {string} + * @memberof BlobQueryJsonTextConfiguration + */ + recordSeparator: string; + /** + * Query for a JSON format blob. + * + * @type {"json"} + * @memberof BlobQueryJsonTextConfiguration + */ + kind: "json"; +} + +/** + * Contains response data for the query operation. + */ +export declare type BlobQueryResponseModel = BlobQueryHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobQueryHeaders; + }; +}; + +/** + * Options to configure Blob - Release Lease operation. + * + * @export + * @interface BlobReleaseLeaseOptions + */ +export declare interface BlobReleaseLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobReleaseLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when releasing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobReleaseLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Options to configure Blob - Renew Lease operation. + * + * @export + * @interface BlobRenewLeaseOptions + */ +export declare interface BlobRenewLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobRenewLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when renewing the lease of a blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobRenewLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * standard HTTP conditional headers, tags condition and lease condition + */ +export declare interface BlobRequestConditions extends ModifiedAccessConditions, LeaseAccessConditions { +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class BlobSASPermissions + */ +export declare class BlobSASPermissions { + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {BlobSASPermissions} + * @memberof BlobSASPermissions + */ + static parse(permissions: string): BlobSASPermissions; + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + read: boolean; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + add: boolean; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + create: boolean; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + write: boolean; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + delete: boolean; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + deleteVersion: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + tag: boolean; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + move: boolean; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof BlobSASPermissions + */ + execute: boolean; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns {string} A string which represents the BlobSASPermissions + * @memberof BlobSASPermissions + */ + toString(): string; +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobSASSignatureValues is used to help generating Blob service SAS tokens for containers or blobs. + * + * @export + * @class BlobSASSignatureValues + */ +export declare interface BlobSASSignatureValues { + /** + * The version of the service this SAS will target. If not specified, it will default to the version targeted by the + * library. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + version?: string; + /** + * Optional. SAS protocols, HTTPS only or HTTPSandHTTP + * + * @type {SASProtocol} + * @memberof BlobSASSignatureValues + */ + protocol?: SASProtocol; + /** + * Optional. When the SAS will take effect. + * + * @type {Date} + * @memberof BlobSASSignatureValues + */ + startsOn?: Date; + /** + * Optional only when identifier is provided. The time after which the SAS will no longer work. + * + * @type {Date} + * @memberof BlobSASSignatureValues + */ + expiresOn?: Date; + /** + * Optional only when identifier is provided. + * Please refer to either {@link ContainerSASPermissions} or {@link BlobSASPermissions} depending on the resource + * being accessed for help constructing the permissions string. + * + * @type {BlobSASPermissions | ContainerSASPermissions} + * @memberof BlobSASSignatureValues + */ + permissions?: BlobSASPermissions | ContainerSASPermissions; + /** + * Optional. IP ranges allowed in this SAS. + * + * @type {SasIPRange} + * @memberof BlobSASSignatureValues + */ + ipRange?: SasIPRange; + /** + * The name of the container the SAS user may access. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + containerName: string; + /** + * Optional. The blob name of the SAS user may access. Required if snapshotTime or versionId is provided. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + blobName?: string; + /** + * Optional. Snapshot timestamp string the SAS user may access. Only supported from API version 2018-11-09. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + snapshotTime?: string; + /** + * Optional. VersionId of the blob version the SAS user may access. Only supported from API version 2019-10-10. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + versionId?: string; + /** + * Optional. The name of the access policy on the container this SAS references if any. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + identifier?: string; + /** + * Optional. The cache-control header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + cacheControl?: string; + /** + * Optional. The content-disposition header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentDisposition?: string; + /** + * Optional. The content-encoding header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentEncoding?: string; + /** + * Optional. The content-language header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentLanguage?: string; + /** + * Optional. The content-type header for the SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + contentType?: string; + /** + * Optional. Beginning in version 2020-02-10, specifies the Authorized AAD Object ID in GUID format. The AAD Object ID of a user + * authorized by the owner of the user delegation key to perform the action granted by the SAS. The Azure Storage service will + * ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission + * check for the user specified in this value will be performed. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + preauthorizedAgentObjectId?: string; + /** + * Optional. Beginning in version 2020-02-10, this is a GUID value that will be logged in the storage diagnostic logs and can be used to + * correlate SAS generation with storage resource access. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof BlobSASSignatureValues + */ + correlationId?: string; +} + +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + * + * @export + * @class BlobServiceClient + */ +export declare class BlobServiceClient extends StorageClient { + /** + * serviceContext provided by protocol layer. + * + * @private + * @type {Service} + * @memberof BlobServiceClient + */ + private serviceContext; + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + */ + static fromConnectionString(connectionString: string, options?: StoragePipelineOptions): BlobServiceClient; + /** + * Creates an instance of BlobServiceClient. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlobServiceClient + * + * Example using DefaultAzureCredential from `@azure/identity`: + * + * ```js + * const account = ""; + * + * const defaultAzureCredential = new DefaultAzureCredential(); + * + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * defaultAzureCredential + * ); + * ``` + * + * Example using an account name/key: + * + * ```js + * const account = "" + * const sharedKeyCredential = new StorageSharedKeyCredential(account, ""); + * + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * sharedKeyCredential + * ); + * ``` + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlobServiceClient. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlobServiceClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a {@link ContainerClient} object + * + * @param {string} containerName A container name + * @returns {ContainerClient} A new ContainerClient object for the given container name. + * @memberof BlobServiceClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName: string): ContainerClient; + /** + * Create a Blob container. + * + * @param {string} containerName Name of the container to create. + * @param {ContainerCreateOptions} [options] Options to configure Container Create operation. + * @returns {Promise<{ containerClient: ContainerClient; containerCreateResponse: ContainerCreateResponse }>} Container creation response and the corresponding container client. + * @memberof BlobServiceClient + */ + createContainer(containerName: string, options?: ContainerCreateOptions): Promise<{ + containerClient: ContainerClient; + containerCreateResponse: ContainerCreateResponse; + }>; + /** + * Deletes a Blob container. + * + * @param {string} containerName Name of the container to delete. + * @param {ContainerDeleteMethodOptions} [options] Options to configure Container Delete operation. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + deleteContainer(containerName: string, options?: ContainerDeleteMethodOptions): Promise; + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param {string} deletedContainerName Name of the previously deleted container. + * @param {string} deletedContainerVersion Version of the previously deleted container, used to uniquely identify the deleted container. + * @returns {Promise} Container deletion response. + * @memberof BlobServiceClient + */ + undeleteContainer(deletedContainerName: string, deletedContainerVersion: string, options?: ServiceUndeleteContainerOptions): Promise<{ + containerClient: ContainerClient; + containerUndeleteResponse: ContainerUndeleteResponse; + }>; + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * @param {ServiceGetPropertiesOptions} [options] Options to the Service Get Properties operation. + * @returns {Promise} Response data for the Service Get Properties operation. + * @memberof BlobServiceClient + */ + getProperties(options?: ServiceGetPropertiesOptions): Promise; + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties} + * + * @param {BlobServiceProperties} properties + * @param {ServiceSetPropertiesOptions} [options] Options to the Service Set Properties operation. + * @returns {Promise} Response data for the Service Set Properties operation. + * @memberof BlobServiceClient + */ + setProperties(properties: BlobServiceProperties, options?: ServiceSetPropertiesOptions): Promise; + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats} + * + * @param {ServiceGetStatisticsOptions} [options] Options to the Service Get Statistics operation. + * @returns {Promise} Response data for the Service Get Statistics operation. + * @memberof BlobServiceClient + */ + getStatistics(options?: ServiceGetStatisticsOptions): Promise; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * + * @param {ServiceGetAccountInfoOptions} [options] Options to the Service Get Account Info operation. + * @returns {Promise} Response data for the Service Get Account Info operation. + * @memberof BlobServiceClient + */ + getAccountInfo(options?: ServiceGetAccountInfoOptions): Promise; + /** + * Returns a list of the containers under the specified account. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to the Service List Container Segment operation. + * @returns {Promise} Response data for the Service List Container Segment operation. + * @memberof BlobServiceClient + */ + private listContainersSegment; + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {Promise} + * @memberof BlobServiceClient + */ + private findBlobsByTagsSegment; + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to find blobs by tags. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private findBlobsByTagsSegments; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @private + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobsByTagsSegmentOptions} [options={}] Options to findBlobsByTagsItems. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private findBlobsByTagsItems; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param {string} tagFilterSqlExpression The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param {ServiceFindBlobByTagsOptions} [options={}] Options to find blobs by tags. + * @returns {PagedAsyncIterableIterator} + * @memberof BlobServiceClient + */ + findBlobsByTags(tagFilterSqlExpression: string, options?: ServiceFindBlobByTagsOptions): PagedAsyncIterableIterator; + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private listSegments; + /** + * Returns an AsyncIterableIterator for Container Items + * + * @private + * @param {ServiceListContainersSegmentOptions} [options] Options to list containers operation. + * @returns {AsyncIterableIterator} + * @memberof BlobServiceClient + */ + private listItems; + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * Example using `for await` syntax: + * + * ```js + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * const iter = blobServiceClient.listContainers(); + * let containerItem = await iter.next(); + * while (!containerItem.done) { + * console.log(`Container ${i++}: ${containerItem.value.name}`); + * containerItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param {ServiceListContainersOptions} [options={}] Options to list containers. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof BlobServiceClient + */ + listContainers(options?: ServiceListContainersOptions): PagedAsyncIterableIterator; + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * + * @param {Date} startsOn The start time for the user delegation SAS. Must be within 7 days of the current time + * @param {Date} expiresOn The end time for the user delegation SAS. Must be within 7 days of the current time + * @returns {Promise} + * @memberof BlobServiceClient + */ + getUserDelegationKey(startsOn: Date, expiresOn: Date, options?: ServiceGetUserDelegationKeyOptions): Promise; + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * + * @returns {BlobBatchClient} A new BlobBatchClient object for this service. + * @memberof BlobServiceClient + */ + getBlobBatchClient(): BlobBatchClient; +} + +/** + * Storage Service Properties. + */ +export declare interface BlobServiceProperties { + blobAnalyticsLogging?: Logging; + hourMetrics?: Metrics; + minuteMetrics?: Metrics; + /** + * The set of CORS rules. + */ + cors?: CorsRule[]; + /** + * The default version to use for requests to the Blob service if an incoming request's version + * is not specified. Possible values include version 2008-10-27 and all more recent versions + */ + defaultServiceVersion?: string; + deleteRetentionPolicy?: RetentionPolicy; + staticWebsite?: StaticWebsite; +} + +/** + * Stats for the storage service. + */ +export declare interface BlobServiceStatistics { + geoReplication?: GeoReplication; +} + +/** + * Defines headers for SetHTTPHeaders operation. + */ +export declare interface BlobSetHTTPHeadersHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.setHTTPHeaders} operation. + * + * @export + * @interface BlobSetHTTPHeadersOptions + */ +export declare interface BlobSetHTTPHeadersOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetHTTPHeadersOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting blob HTTP headers. + * + * @type {BlobRequestConditions} + * @memberof BlobSetHTTPHeadersOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobSetHTTPHeadersOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Contains response data for the setHTTPHeaders operation. + */ +export declare type BlobSetHTTPHeadersResponse = BlobSetHTTPHeadersHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetHTTPHeadersHeaders; + }; +}; + +/** + * Defines headers for SetMetadata operation. + */ +export declare interface BlobSetMetadataHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only + * returned when the metadata was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.setMetadata} operation. + * + * @export + * @interface BlobSetMetadataOptions + */ +export declare interface BlobSetMetadataOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetMetadataOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting blob metadata. + * + * @type {BlobRequestConditions} + * @memberof BlobSetMetadataOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobSetMetadataOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlobSetMetadataOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the setMetadata operation. + */ +export declare type BlobSetMetadataResponse = BlobSetMetadataHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetMetadataHeaders; + }; +}; + +/** + * Defines headers for SetTags operation. + */ +export declare interface BlobSetTagsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.setTags} operation. + * + * @export + * @interface BlobSetTagsOptions + */ +export declare interface BlobSetTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetTagsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet for the blob to perform this operation. + * + * @type {TagConditions} + * @memberof BlobSetTagsOptions + */ + conditions?: TagConditions; +} + +/** + * Contains response data for the setTags operation. + */ +export declare type BlobSetTagsResponse = BlobSetTagsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetTagsHeaders; + }; +}; + +/** + * Defines headers for SetTier operation. + */ +export declare interface BlobSetTierHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and newer. + */ + version?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.setAccessTier} operation. + * + * @export + * @interface BlobSetTierOptions + */ +export declare interface BlobSetTierOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSetTierOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions & TagConditions} + * @memberof BlobSetTierOptions + */ + conditions?: LeaseAccessConditions & TagConditions; + /** + * Rehydrate Priority - possible values include 'High', 'Standard'. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier + * + * @type {RehydratePriority} + * @memberof BlobSetTierOptions + */ + rehydratePriority?: RehydratePriority; +} + +/** + * Contains response data for the setTier operation. + */ +export declare type BlobSetTierResponse = BlobSetTierHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobSetTierHeaders; + }; +}; + +/** + * Defines headers for StartCopyFromURL operation. + */ +export declare interface BlobStartCopyFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.beginCopyFromURL} operation. + * + * @export + * @interface BlobStartCopyFromURLOptions + */ +export declare interface BlobStartCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobStartCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the blob that are being copied. + * + * @type {Metadata} + * @memberof BlobStartCopyFromURLOptions + */ + metadata?: Metadata; + /** + * Conditions to meet for the destination blob when copying from a URL to the blob. + * + * @type {BlobRequestConditions} + * @memberof BlobStartCopyFromURLOptions + */ + conditions?: BlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {ModifiedAccessConditions} + * @memberof BlobStartCopyFromURLOptions + */ + sourceConditions?: ModifiedAccessConditions; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | PremiumPageBlobTier | string} + * @memberof BlobStartCopyFromURLOptions + */ + tier?: BlockBlobTier | PremiumPageBlobTier | string; + /** + * Rehydrate Priority - possible values include 'High', 'Standard'. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration#rehydrate-an-archived-blob-to-an-online-tier + * + * @type {RehydratePriority} + * @memberof BlobStartCopyFromURLOptions + */ + rehydratePriority?: RehydratePriority; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobStartCopyFromURLOptions + */ + tags?: Tags; + /** + * Overrides the sealed state of the destination blob. Default true. + * + * @type {boolean} + * @memberof BlobStartCopyFromURLOptions + */ + sealBlob?: boolean; +} + +/** + * Contains response data for the startCopyFromURL operation. + */ +export declare type BlobStartCopyFromURLResponse = BlobStartCopyFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobStartCopyFromURLHeaders; + }; +}; + +/** + * Options to configure the {@link BlobClient.syncCopyFromURL} operation. + * + * @export + * @interface BlobSyncCopyFromURLOptions + */ +export declare interface BlobSyncCopyFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobSyncCopyFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the snapshot. + * + * @type {Metadata} + * @memberof BlobSyncCopyFromURLOptions + */ + metadata?: Metadata; + /** + * Conditions to meet for the destination blob when copying from a URL to the blob. + * + * @type {BlobRequestConditions} + * @memberof BlobSyncCopyFromURLOptions + */ + conditions?: BlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof BlobSyncCopyFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * Specify the md5 calculated for the range of bytes that must be read from the copy source. + * + * @type {Uint8Array} + * @memberof BlobSyncCopyFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlobSyncCopyFromURLOptions + */ + tags?: Tags; +} + +/** + * An interface representing BlobTag. + */ +export declare interface BlobTag { + key: string; + value: string; +} + +/** + * Blob tags + */ +export declare interface BlobTags { + blobTagSet: BlobTag[]; +} + +/** + * Defines values for BlobType. + * Possible values include: 'BlockBlob', 'PageBlob', 'AppendBlob' + * @readonly + * @enum {string} + */ +export declare type BlobType = 'BlockBlob' | 'PageBlob' | 'AppendBlob'; + +/** + * Defines headers for Undelete operation. + */ +export declare interface BlobUndeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated. + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobClient.undelete} operation. + * + * @export + * @interface BlobUndeleteOptions + */ +export declare interface BlobUndeleteOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlobUndeleteOptions + */ + abortSignal?: AbortSignalLike; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlobUndeleteOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Contains response data for the undelete operation. + */ +export declare type BlobUndeleteResponse = BlobUndeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlobUndeleteHeaders; + }; +}; + +/** + * Response type for {@link BlockBlobClient.uploadFile}, {@link BlockBlobClient.uploadStream}, and + * {@link BlockBlobClient.uploadBrowserDate}. + * + * @export + */ +export declare type BlobUploadCommonResponse = BlockBlobUploadHeaders & { + /** + * The underlying HTTP response. + * + * @type {HttpResponse} + * @memberof BlobUploadCommonResponse + */ + _response: HttpResponse; +}; + +/** + * Represents a single block in a block blob. It describes the block's ID and size. + */ +export declare interface Block { + /** + * The base64 encoded block ID. + */ + name: string; + /** + * The block size in bytes. + */ + size: number; +} + +/** + * BlockBlobClient defines a set of operations applicable to block blobs. + * + * @export + * @class BlockBlobClient + * @extends {BlobClient} + */ +export declare class BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + * + * @private + * @type {Blobs} + * @memberof BlobClient + */ + private _blobContext; + /** + * blockBlobContext provided by protocol layer. + * + * @private + * @type {BlockBlobs} + * @memberof BlockBlobClient + */ + private blockBlobContext; + /** + * + * Creates an instance of BlockBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlockBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of BlockBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a block blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage block blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof BlockBlobClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of BlockBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a block blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage block blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof BlockBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {BlockBlobClient} A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof BlockBlobClient + */ + withSnapshot(snapshot: string): BlockBlobClient; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```js + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); + * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); + * console.log("Query blob content:", downloaded); + * + * async function streamToBuffer(readableStream) { + * return new Promise((resolve, reject) => { + * const chunks = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param {string} query + * @param {BlockBlobQueryOptions} [options={}] + * @returns {Promise} + * @memberof BlockBlobClient + */ + query(query: string, options?: BlockBlobQueryOptions): Promise; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to the Block Blob Upload operation. + * @returns {Promise} Response data for the Block Blob Upload operation. + * @memberof BlockBlobClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise; + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {HttpRequestBody} body Data to upload to the staging area. + * @param {number} contentLength Number of bytes to upload. + * @param {BlockBlobStageBlockOptions} [options] Options to the Block Blob Stage Block operation. + * @returns {Promise} Response data for the Block Blob Stage Block operation. + * @memberof BlockBlobClient + */ + stageBlock(blockId: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobStageBlockOptions): Promise; + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * + * @param {string} blockId A 64-byte value that is base64-encoded + * @param {string} sourceURL Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {number} [offset] From which position of the blob to download, >= 0 + * @param {number} [count] How much data to be downloaded, > 0. Will download to the end when undefined + * @param {BlockBlobStageBlockFromURLOptions} [options={}] Options to the Block Blob Stage Block From URL operation. + * @returns {Promise} Response data for the Block Blob Stage Block From URL operation. + * @memberof BlockBlobClient + */ + stageBlockFromURL(blockId: string, sourceURL: string, offset?: number, count?: number, options?: BlockBlobStageBlockFromURLOptions): Promise; + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * + * @param {string[]} blocks Array of 64-byte value that is base64-encoded + * @param {BlockBlobCommitBlockListOptions} [options] Options to the Block Blob Commit Block List operation. + * @returns {Promise} Response data for the Block Blob Commit Block List operation. + * @memberof BlockBlobClient + */ + commitBlockList(blocks: string[], options?: BlockBlobCommitBlockListOptions): Promise; + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * + * @param {BlockListType} listType Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param {BlockBlobGetBlockListOptions} [options] Options to the Block Blob Get Block List operation. + * @returns {Promise} Response data for the Block Blob Get Block List operation. + * @memberof BlockBlobClient + */ + getBlockList(listType: BlockListType, options?: BlockBlobGetBlockListOptions): Promise; + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @export + * @param {Buffer | Blob | ArrayBuffer | ArrayBufferView} data Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] + * @returns {Promise} + * @memberof BlockBlobClient + */ + uploadData(data: Buffer | Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise; + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * @deprecated Use {@link uploadData} instead. + * + * @export + * @param {Blob | ArrayBuffer | ArrayBufferView} browserData Blob, File, ArrayBuffer or ArrayBufferView + * @param {BlockBlobParallelUploadOptions} [options] Options to upload browser data. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadBrowserData(browserData: Blob | ArrayBuffer | ArrayBufferView, options?: BlockBlobParallelUploadOptions): Promise; + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param {(offset: number, size: number) => HttpRequestBody} bodyFactory + * @param {number} size size of the data to upload. + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + private uploadSeekableInternal; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size <= 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param {string} filePath Full path of local file + * @param {BlockBlobParallelUploadOptions} [options] Options to Upload to Block Blob operation. + * @returns {(Promise)} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadFile(filePath: string, options?: BlockBlobParallelUploadOptions): Promise; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param {Readable} stream Node.js Readable stream + * @param {number} bufferSize Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param {number} maxConcurrency Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param {BlockBlobUploadStreamOptions} [options] Options to Upload Stream to Block Blob operation. + * @returns {Promise} Response data for the Blob Upload operation. + * @memberof BlockBlobClient + */ + uploadStream(stream: Readable, bufferSize?: number, maxConcurrency?: number, options?: BlockBlobUploadStreamOptions): Promise; +} + +/** + * Defines headers for CommitBlockList operation. + */ +export declare interface BlockBlobCommitBlockListHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * This header is returned so that the client can check for message content integrity. This + * header refers to the content of the request, meaning, in this case, the list of blocks, and + * not the content of the blob itself. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. This + * header refers to the content of the request, meaning, in this case, the list of blocks, and + * not the content of the blob itself. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link BlockBlobClient.commitBlockList} operation. + * + * @export + * @interface BlockBlobCommitBlockListOptions + */ +export declare interface BlockBlobCommitBlockListOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobCommitBlockListOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when committing the block list. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobCommitBlockListOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when committing block list. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobCommitBlockListOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when committing block list. + * + * @type {Metadata} + * @memberof BlockBlobCommitBlockListOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobCommitBlockListOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobCommitBlockListOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobCommitBlockListOptions + */ + tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobCommitBlockListOptions + */ + tags?: Tags; +} + +/** + * Contains response data for the commitBlockList operation. + */ +export declare type BlockBlobCommitBlockListResponse = BlockBlobCommitBlockListHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobCommitBlockListHeaders; + }; +}; + +/** + * Defines headers for GetBlockList operation. + */ +export declare interface BlockBlobGetBlockListHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The media type of the body of the response. For Get Block List this is 'application/xml' + */ + contentType?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link BlockBlobClient.getBlockList} operation. + * + * @export + * @interface BlockBlobGetBlockListOptions + */ +export declare interface BlockBlobGetBlockListOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobGetBlockListOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions & TagConditions} + * @memberof BlockBlobGetBlockListOptions + */ + conditions?: LeaseAccessConditions & TagConditions; +} + +/** + * Contains response data for the getBlockList operation. + */ +export declare type BlockBlobGetBlockListResponse = BlockList & BlockBlobGetBlockListHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobGetBlockListHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlockList; + }; +}; + +/** + * Option interface for {@link BlockBlobClient.uploadFile} and {@link BlockBlobClient.uploadSeekableStream}. + * + * @export + * @interface BlockBlobParallelUploadOptions + */ +export declare interface BlockBlobParallelUploadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobParallelUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Destination block blob size in bytes. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + blockSize?: number; + /** + * Blob size threshold in bytes to start concurrency uploading. + * Default value is 256MB, blob size less than this option will + * be uploaded via one I/O operation without concurrency. + * You can customize a value less equal than the default value. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + maxSingleShotSize?: number; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobParallelUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Blob HTTP Headers. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobParallelUploadOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * Metadata of block blob. + * + * @type {{ [propertyName: string]: string }} + * @memberof BlockBlobParallelUploadOptions + */ + metadata?: { + [propertyName: string]: string; + }; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobParallelUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * Concurrency of parallel uploading. Must be >= 0. + * + * @type {number} + * @memberof BlockBlobParallelUploadOptions + */ + concurrency?: number; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobParallelUploadOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobParallelUploadOptions + */ + tags?: Tags; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobParallelUploadOptions + */ + tier?: BlockBlobTier | string; +} + +/** + * Options to configure {@link BlockBlobClient.query} operation. + * + * @export + * @interface BlockBlobQueryOptions + */ +export declare interface BlockBlobQueryOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Configurations for the query input. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration} + * @memberof BlockBlobQueryOptions + */ + inputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration; + /** + * Configurations for the query output. + * + * @type {BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration| BlobQueryArrowConfiguration} + * @memberof BlockBlobQueryOptions + */ + outputTextConfiguration?: BlobQueryJsonTextConfiguration | BlobQueryCsvTextConfiguration | BlobQueryArrowConfiguration; + /** + * Callback to receive events on the progress of query operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback to receive error events during the query operaiton. + * + * @memberof BlockBlobQueryOptions + */ + onError?: (error: BlobQueryError) => void; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; +} + +/** + * Defines headers for StageBlockFromURL operation. + */ +export declare interface BlockBlobStageBlockFromURLHeaders { + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link BlockBlobClient.stageBlockFromURL} operation. + * + * @export + * @interface BlockBlobStageBlockFromURLOptions + */ +export declare interface BlockBlobStageBlockFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobStageBlockFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Specifies the bytes of the source Blob/File to upload. + * If not specified, the entire content is uploaded as a single block. + * + * @type {Range} + * @memberof BlockBlobStageBlockFromURLOptions + */ + range?: Range; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlockBlobStageBlockFromURLOptions + */ + conditions?: LeaseAccessConditions; + /** + * An MD5 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * @type {Uint8Array} + * @memberof BlockBlobStageBlockFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobStageBlockFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobStageBlockFromURLOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the stageBlockFromURL operation. + */ +export declare type BlockBlobStageBlockFromURLResponse = BlockBlobStageBlockFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobStageBlockFromURLHeaders; + }; +}; + +/** + * Defines headers for StageBlock operation. + */ +export declare interface BlockBlobStageBlockHeaders { + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned + * when the block was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link BlockBlobClient.stageBlock} operation. + * + * @export + * @interface BlockBlobStageBlockOptions + */ +export declare interface BlockBlobStageBlockOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobStageBlockOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof BlockBlobStageBlockOptions + */ + conditions?: LeaseAccessConditions; + /** + * Callback to receive events on the progress of stage block operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobStageBlockOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the block content. This hash is used to verify the integrity of the block during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof BlockBlobStageBlockOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobStageBlockOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobStageBlockOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the stageBlock operation. + */ +export declare type BlockBlobStageBlockResponse = BlockBlobStageBlockHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobStageBlockHeaders; + }; +}; + +/** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ +export declare enum BlockBlobTier { + /** + * Optimized for storing data that is accessed frequently. + */ + Hot = "Hot", + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + Cool = "Cool", + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + Archive = "Archive" +} + +/** + * Defines headers for Upload operation. + */ +export declare interface BlockBlobUploadHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link BlockBlobClient.upload} operation. + * + * @export + * @interface BlockBlobUploadOptions + */ +export declare interface BlockBlobUploadOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when uploading to the block blob. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadOptions + */ + conditions?: BlobRequestConditions; + /** + * HTTP headers to set when uploading to a block blob. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobUploadOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when uploading to a block blob. + * + * @type {Metadata} + * @memberof BlockBlobUploadOptions + */ + metadata?: Metadata; + /** + * Callback to receive events on the progress of upload operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof BlockBlobUploadOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobUploadOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobUploadOptions + */ + tier?: BlockBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadOptions + */ + tags?: Tags; +} + +/** + * Contains response data for the upload operation. + */ +export declare type BlockBlobUploadResponse = BlockBlobUploadHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: BlockBlobUploadHeaders; + }; +}; + +/** + * Option interface for the {@link BlockBlobClient.uploadStream} operation. + * + * @export + * @interface BlockBlobUploadStreamOptions + */ +export declare interface BlockBlobUploadStreamOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof BlockBlobUploadStreamOptions + */ + abortSignal?: AbortSignalLike; + /** + * Blob HTTP Headers. + * + * @type {BlobHTTPHeaders} + * @memberof BlockBlobUploadStreamOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * Metadata of block blob. + * + * @type {{ [propertyName: string]: string }} + * @memberof BlockBlobUploadStreamOptions + */ + metadata?: { + [propertyName: string]: string; + }; + /** + * Access conditions headers. + * + * @type {BlobRequestConditions} + * @memberof BlockBlobUploadStreamOptions + */ + conditions?: BlobRequestConditions; + /** + * Progress updater. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof BlockBlobUploadStreamOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof BlockBlobUploadStreamOptions + */ + encryptionScope?: string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof BlockBlobUploadStreamOptions + */ + tags?: Tags; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {BlockBlobTier | string} + * @memberof BlockBlobUploadStreamOptions + */ + tier?: BlockBlobTier | string; +} + +/** + * An interface representing BlockList. + */ +export declare interface BlockList { + committedBlocks?: Block[]; + uncommittedBlocks?: Block[]; +} + +/** + * Defines values for BlockListType. + * Possible values include: 'committed', 'uncommitted', 'all' + * @readonly + * @enum {string} + */ +export declare type BlockListType = 'committed' | 'uncommitted' | 'all'; + +/** + * An interface for options common to every remote operation. + */ +export declare interface CommonOptions { + /** + * Options to configure spans created when tracing is enabled. + */ + tracingOptions?: OperationTracingOptions; +} + +/** + * Options to configure Container - Acquire Lease operation. + * + * @export + * @interface ContainerAcquireLeaseOptions + */ +export declare interface ContainerAcquireLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerAcquireLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when acquiring the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerAcquireLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Optional Parameters. + */ +export declare interface ContainerBreakLeaseOptionalParams extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time + * remaining on the lease. If longer, the time remaining on the lease is used. A new lease will + * not be available before the break period has expired, but the lease may be held for longer + * than the break period. If this header does not appear with a break operation, a fixed-duration + * lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + */ + breakPeriod?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; + /** + * Additional parameters for the operation + */ + modifiedAccessConditions?: ModifiedAccessConditionsModel; +} + +/** + * Options to configure Container - Break Lease operation. + * + * @export + * @interface ContainerBreakLeaseOptions + */ +export declare interface ContainerBreakLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerBreakLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when breaking the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerBreakLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Options to configure Container - Change Lease operation. + * + * @export + * @interface ContainerChangeLeaseOptions + */ +export declare interface ContainerChangeLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerChangeLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerChangeLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + * + * @export + * @class ContainerClient + */ +export declare class ContainerClient extends StorageClient { + /** + * containerContext provided by protocol layer. + * + * @private + * @type {Containers} + * @memberof ContainerClient + */ + private containerContext; + private _containerName; + /** + * The name of the container. + */ + get containerName(): string; + /** + * + * Creates an instance of ContainerClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof ContainerClient + */ + constructor(connectionString: string, containerName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of ContainerClient. + * This method accepts an encoded URL or non-encoded URL pointing to a page blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage page blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof ContainerClient + */ + constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of ContainerClient. + * This method accepts an encoded URL or non-encoded URL pointing to a page blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A URL string pointing to Azure Storage page blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob". You can + * append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/pageblob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof ContainerClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] Options to Container Create operation. + * @returns {Promise} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const containerClient = blobServiceClient.getContainerClient(""); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + create(options?: ContainerCreateOptions): Promise; + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * + * @param {ContainerCreateOptions} [options] + * @returns {Promise} + * @memberof ContainerClient + */ + createIfNotExists(options?: ContainerCreateOptions): Promise; + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param {ContainerExistsOptions} [options={}] + * @returns {Promise} + * @memberof ContainerClient + */ + exists(options?: ContainerExistsOptions): Promise; + /** + * Creates a {@link BlobClient} + * + * @param {string} blobName A blob name + * @returns {BlobClient} A new BlobClient object for the given blob name. + * @memberof ContainerClient + */ + getBlobClient(blobName: string): BlobClient; + /** + * Creates an {@link AppendBlobClient} + * + * @param {string} blobName An append blob name + * @returns {AppendBlobClient} + * @memberof ContainerClient + */ + getAppendBlobClient(blobName: string): AppendBlobClient; + /** + * Creates a {@link BlockBlobClient} + * + * @param {string} blobName A block blob name + * @returns {BlockBlobClient} + * @memberof ContainerClient + * + * Example usage: + * + * ```js + * const content = "Hello world!"; + * + * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + getBlockBlobClient(blobName: string): BlockBlobClient; + /** + * Creates a {@link PageBlobClient} + * + * @param {string} blobName A page blob name + * @returns {PageBlobClient} + * @memberof ContainerClient + */ + getPageBlobClient(blobName: string): PageBlobClient; + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param {ContainerGetPropertiesOptions} [options] Options to Container Get Properties operation. + * @returns {Promise} + * @memberof ContainerClient + */ + getProperties(options?: ContainerGetPropertiesOptions): Promise; + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + delete(options?: ContainerDeleteMethodOptions): Promise; + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * + * @param {ContainerDeleteMethodOptions} [options] Options to Container Delete operation. + * @returns {Promise} + * @memberof ContainerClient + */ + deleteIfExists(options?: ContainerDeleteMethodOptions): Promise; + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * + * @param {Metadata} [metadata] Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param {ContainerSetMetadataOptions} [options] Options to Container Set Metadata operation. + * @returns {Promise} + * @memberof ContainerClient + */ + setMetadata(metadata?: Metadata, options?: ContainerSetMetadataOptions): Promise; + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * + * @param {ContainerGetAccessPolicyOptions} [options] Options to Container Get Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + getAccessPolicy(options?: ContainerGetAccessPolicyOptions): Promise; + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * + * @param {PublicAccessType} [access] The level of public access to data in the container. + * @param {SignedIdentifier[]} [containerAcl] Array of elements each having a unique Id and details of the access policy. + * @param {ContainerSetAccessPolicyOptions} [options] Options to Container Set Access Policy operation. + * @returns {Promise} + * @memberof ContainerClient + */ + setAccessPolicy(access?: PublicAccessType, containerAcl?: SignedIdentifier[], options?: ContainerSetAccessPolicyOptions): Promise; + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param {string} [proposeLeaseId] Initial proposed lease Id. + * @returns {BlobLeaseClient} A new BlobLeaseClient object for managing leases on the container. + * @memberof ContainerClient + */ + getBlobLeaseClient(proposeLeaseId?: string): BlobLeaseClient; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {string} blobName Name of the block blob to create or update. + * @param {HttpRequestBody} body Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param {number} contentLength Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param {BlockBlobUploadOptions} [options] Options to configure the Block Blob Upload operation. + * @returns {Promise<{ blockBlobClient: BlockBlobClient; response: BlockBlobUploadResponse }>} Block Blob upload response data and the corresponding BlockBlobClient instance. + * @memberof ContainerClient + */ + uploadBlockBlob(blobName: string, body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<{ + blockBlobClient: BlockBlobClient; + response: BlockBlobUploadResponse; + }>; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * + * @param {string} blobName + * @param {ContainerDeleteBlobOptions} [options] Options to Blob Delete operation. + * @returns {Promise} Block blob deletion response data. + * @memberof ContainerClient + */ + deleteBlob(blobName: string, options?: ContainerDeleteBlobOptions): Promise; + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Flat Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + private listBlobFlatSegment; + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of the list to be returned with the next list operation. + * @param {ContainerListBlobsSegmentOptions} [options] Options to Container List Blob Hierarchy Segment operation. + * @returns {Promise} + * @memberof ContainerClient + */ + private listBlobHierarchySegment; + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @private + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listSegments; + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @private + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listItems; + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```js + * // Get the containerClient before you run these snippets, + * // Can be obtained from `blobServiceClient.getContainerClient("");` + * let i = 1; + * for await (const blob of containerClient.listBlobsFlat()) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let i = 1; + * let iter = containerClient.listBlobsFlat(); + * let blobItem = await iter.next(); + * while (!blobItem.done) { + * console.log(`Blob ${i++}: ${blobItem.value.name}`); + * blobItem = await iter.next(); + * } + * ``` + * + * Example using `byPage()`: + * + * ```js + * // passing optional maxPageSize in the page settings + * let i = 1; + * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * Example using paging with a marker: + * + * ```js + * let i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * + * // Passing next marker as continuationToken + * + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 blob names + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * ``` + * + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs. + * @returns {PagedAsyncIterableIterator} An asyncIterableIterator that supports paging. + * @memberof ContainerClient + */ + listBlobsFlat(options?: ContainerListBlobsOptions): PagedAsyncIterableIterator; + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {string} [marker] A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator} + * @memberof ContainerClient + */ + private listHierarchySegments; + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @private + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsSegmentOptions} [options] Options to list blobs operation. + * @returns {AsyncIterableIterator<{ kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem>} + * @memberof ContainerClient + */ + private listItemsByHierarchy; + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * Example using `for await` syntax: + * + * ```js + * for await (const item of containerClient.listBlobsByHierarchy("/")) { + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * } + * ``` + * + * Example using `iter.next()`: + * + * ```js + * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); + * let entity = await iter.next(); + * while (!entity.done) { + * let item = entity.value; + * if (item.kind === "prefix") { + * console.log(`\tBlobPrefix: ${item.name}`); + * } else { + * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); + * } + * entity = await iter.next(); + * } + * ```js + * + * Example using `byPage()`: + * + * ```js + * console.log("Listing blobs by hierarchy by page"); + * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { + * const segment = response.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * Example using paging with a max page size: + * + * ```js + * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * + * let i = 1; + * for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { + * console.log(`Page ${i++}`); + * const segment = response.segment; + * + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); + * } + * } + * ``` + * + * @param {string} delimiter The character or string used to define the virtual hierarchy + * @param {ContainerListBlobsOptions} [options={}] Options to list blobs operation. + * @returns {(PagedAsyncIterableIterator< + * { kind: "prefix" } & BlobPrefix | { kind: "blob" } & BlobItem, + * ContainerListBlobHierarchySegmentResponse + * >)} + * @memberof ContainerClient + */ + listBlobsByHierarchy(delimiter: string, options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<({ + kind: "prefix"; + } & BlobPrefix) | ({ + kind: "blob"; + } & BlobItem), ContainerListBlobHierarchySegmentResponse>; + private getContainerNameFromUrl; +} + +/** + * Defines headers for Create operation. + */ +export declare interface ContainerCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the {@link ContainerClient.createIfNotExists} operation. + * + * @export + * @interface ContainerCreateIfNotExistsResponse + */ +export declare interface ContainerCreateIfNotExistsResponse extends ContainerCreateResponse { + /** + * Indicate whether the container is successfully created. Is false when the container is not changed as it already exists. + * + * @type {boolean} + * @memberof ContainerCreateIfNotExistsResponse + */ + succeeded: boolean; +} + +/** + * Options to configure {@link ContainerClient.create} operation. + * + * @export + * @interface ContainerCreateOptions + */ +export declare interface ContainerCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * A collection of key-value string pair to associate with the container. + * + * @type {Metadata} + * @memberof ContainerCreateOptions + */ + metadata?: Metadata; + /** + * Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: + * - `container`: Specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. + * - `blob`: Specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. + * + * @type {PublicAccessType} + * @memberof ContainerCreateOptions + */ + access?: PublicAccessType; + /** + * Container encryption scope info. + * + * @type {ContainerEncryptionScope} + * @memberof ContainerCreateOptions + */ + containerEncryptionScope?: ContainerEncryptionScope; +} + +/** + * Contains response data for the create operation. + */ +export declare type ContainerCreateResponse = ContainerCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerCreateHeaders; + }; +}; + +/** + * Options to configure the {@link ContainerClient.deleteBlob} operation. + * + * @export + * @interface ContainerDeleteBlobOptions + */ +export declare interface ContainerDeleteBlobOptions extends BlobDeleteOptions { + /** + * An opaque DateTime value that, when present, specifies the version + * of the blob to delete. It's for service version 2019-10-10 and newer. + * + * @type {string} + * @memberof ContainerDeleteBlobOptions + */ + versionId?: string; +} + +/** + * Defines headers for Delete operation. + */ +export declare interface ContainerDeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the {@link ContainerClient.deleteIfExists} operation. + * + * @export + * @interface ContainerDeleteIfExistsResponse + */ +export declare interface ContainerDeleteIfExistsResponse extends ContainerDeleteResponse { + /** + * Indicate whether the container is successfully deleted. Is false if the container does not exist in the first place. + * + * @type {boolean} + * @memberof ContainerDeleteIfExistsResponse + */ + succeeded: boolean; +} + +/** + * Options to configure {@link ContainerClient.delete} operation. + * + * @export + * @interface ContainerDeleteMethodOptions + */ +export declare interface ContainerDeleteMethodOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerDeleteMethodOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when deleting the container. + * + * @type {ContainerRequestConditions} + * @memberof ContainerDeleteMethodOptions + */ + conditions?: ContainerRequestConditions; +} + +/** + * Contains response data for the deleteMethod operation. + */ +export declare type ContainerDeleteResponse = ContainerDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerDeleteHeaders; + }; +}; + +/** + * Additional parameters for create operation. + */ +export declare interface ContainerEncryptionScope { + /** + * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the + * container and use for all future writes. + */ + defaultEncryptionScope?: string; + /** + * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a + * different encryption scope than the scope set on the container. + */ + preventEncryptionScopeOverride?: boolean; +} + +/** + * Options to configure {@link ContainerClient.exists} operation. + * + * @export + * @interface ContainerExistsOptions + */ +export declare interface ContainerExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerDeleteMethodOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Defines headers for GetAccessPolicy operation. + */ +export declare interface ContainerGetAccessPolicyHeaders { + /** + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' + */ + blobPublicAccess?: PublicAccessType; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link ContainerClient.getAccessPolicy} operation. + * + * @export + * @interface ContainerGetAccessPolicyOptions + */ +export declare interface ContainerGetAccessPolicyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerGetAccessPolicyOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof ContainerGetAccessPolicyOptions + */ + conditions?: LeaseAccessConditions; +} + +/** + * Contains response data for the {@link ContainerClient.getAccessPolicy} operation. + */ +export declare type ContainerGetAccessPolicyResponse = { + signedIdentifiers: SignedIdentifier[]; +} & ContainerGetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerGetAccessPolicyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SignedIdentifierModel[]; + }; +}; + +/** + * Defines headers for GetProperties operation. + */ +export declare interface ContainerGetPropertiesHeaders { + metadata?: { + [propertyName: string]: string; + }; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * When a blob is leased, specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Lease state of the blob. Possible values include: 'available', 'leased', 'expired', + * 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * The current lease status of the blob. Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Indicated whether data in the container may be accessed publicly and the level of access. + * Possible values include: 'container', 'blob' + */ + blobPublicAccess?: PublicAccessType; + /** + * Indicates whether the container has an immutability policy set on it. + */ + hasImmutabilityPolicy?: boolean; + /** + * Indicates whether the container has a legal hold. + */ + hasLegalHold?: boolean; + /** + * The default encryption scope for the container. + */ + defaultEncryptionScope?: string; + /** + * Indicates whether the container's default encryption scope can be overriden. + */ + denyEncryptionScopeOverride?: boolean; + errorCode?: string; +} + +/** + * Options to configure {@link ContainerClient.getProperties} operation. + * + * @export + * @interface ContainerGetPropertiesOptions + */ +export declare interface ContainerGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {LeaseAccessConditions} + * @memberof ContainerGetPropertiesOptions + */ + conditions?: LeaseAccessConditions; +} + +/** + * Contains response data for the getProperties operation. + */ +export declare type ContainerGetPropertiesResponse = ContainerGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerGetPropertiesHeaders; + }; +}; + +/** + * An Azure Storage container + */ +export declare interface ContainerItem { + name: string; + deleted?: boolean; + version?: string; + properties: ContainerProperties; + metadata?: { + [propertyName: string]: string; + }; +} + +/** + * Defines headers for ListBlobFlatSegment operation. + */ +export declare interface ContainerListBlobFlatSegmentHeaders { + /** + * The media type of the body of the response. For List Blobs this is 'application/xml' + */ + contentType?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the listBlobFlatSegment operation. + */ +export declare type ContainerListBlobFlatSegmentResponse = ListBlobsFlatSegmentResponse & ContainerListBlobFlatSegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobFlatSegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsFlatSegmentResponseModel; + }; +}; + +/** + * Defines headers for ListBlobHierarchySegment operation. + */ +export declare interface ContainerListBlobHierarchySegmentHeaders { + /** + * The media type of the body of the response. For List Blobs this is 'application/xml' + */ + contentType?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the listBlobHierarchySegment operation. + */ +export declare type ContainerListBlobHierarchySegmentResponse = ListBlobsHierarchySegmentResponse & ContainerListBlobHierarchySegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerListBlobHierarchySegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListBlobsHierarchySegmentResponseModel; + }; +}; + +/** + * Options to configure Container - List Blobs operations. + * + * See: + * - {@link ContainerClient.listBlobsFlat} + * - {@link ContainerClient.listBlobsByHierarchy} + * + * @export + * @interface ContainerListBlobsOptions + */ +export declare interface ContainerListBlobsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerListBlobsOptions + */ + abortSignal?: AbortSignalLike; + /** + * Filters the results to return only containers + * whose name begins with the specified prefix. + */ + prefix?: string; + /** + * Specifies whether metadata related to any current or previous Copy Blob operation should be included in the response. + */ + includeCopy?: boolean; + /** + * Specifies whether soft deleted blobs should be included in the response. + */ + includeDeleted?: boolean; + /** + * Specifies whether blob metadata be returned in the response. + */ + includeMetadata?: boolean; + /** + * Specifies whether snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response. + */ + includeSnapshots?: boolean; + /** + * Specifies whether versions should be included in the enumeration. Versions are listed from oldest to newest in the response. + */ + includeVersions?: boolean; + /** + * Specifies whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, be included in the response. + */ + includeUncommitedBlobs?: boolean; + /** + * Specifies whether blob tags be returned in the response. + */ + includeTags?: boolean; +} + +/** + * Properties of a container + */ +export declare interface ContainerProperties { + lastModified: Date; + etag: string; + /** + * Possible values include: 'locked', 'unlocked' + */ + leaseStatus?: LeaseStatusType; + /** + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + */ + leaseState?: LeaseStateType; + /** + * Possible values include: 'infinite', 'fixed' + */ + leaseDuration?: LeaseDurationType; + /** + * Possible values include: 'container', 'blob' + */ + publicAccess?: PublicAccessType; + hasImmutabilityPolicy?: boolean; + hasLegalHold?: boolean; + defaultEncryptionScope?: string; + preventEncryptionScopeOverride?: boolean; + deletedOn?: Date; + remainingRetentionDays?: number; +} + +/** + * Options to configure Container - Release Lease operation. + * + * @export + * @interface ContainerReleaseLeaseOptions + */ +export declare interface ContainerReleaseLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerReleaseLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when releasing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerReleaseLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Options to configure Container - Renew Lease operation. + * + * @export + * @interface ContainerRenewLeaseOptions + */ +export declare interface ContainerRenewLeaseOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerRenewLeaseOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when renewing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof ContainerRenewLeaseOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Conditions to meet for the container. + */ +export declare interface ContainerRequestConditions extends LeaseAccessConditions, ModificationConditions { +} + +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + * + * @export + * @class ContainerSASPermissions + */ +export declare class ContainerSASPermissions { + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @static + * @param {string} permissions + * @returns {ContainerSASPermissions} + * @memberof ContainerSASPermissions + */ + static parse(permissions: string): ContainerSASPermissions; + /** + * Specifies Read access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + read: boolean; + /** + * Specifies Add access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + add: boolean; + /** + * Specifies Create access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + create: boolean; + /** + * Specifies Write access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + write: boolean; + /** + * Specifies Delete access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + delete: boolean; + /** + * Specifies Delete version access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + deleteVersion: boolean; + /** + * Specifies List access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + list: boolean; + /** + * Specfies Tag access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + tag: boolean; + /** + * Specifies Move access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + move: boolean; + /** + * Specifies Execute access granted. + * + * @type {boolean} + * @memberof ContainerSASPermissions + */ + execute: boolean; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * + * @returns {string} + * @memberof ContainerSASPermissions + */ + toString(): string; +} + +/** + * Defines headers for SetAccessPolicy operation. + */ +export declare interface ContainerSetAccessPolicyHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link ContainerClient.setAccessPolicy} operation. + * + * @export + * @interface ContainerSetAccessPolicyOptions + */ +export declare interface ContainerSetAccessPolicyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerSetAccessPolicyOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when setting the access policy. + * + * @type {ContainerRequestConditions} + * @memberof ContainerSetAccessPolicyOptions + */ + conditions?: ContainerRequestConditions; +} + +/** + * Contains response data for the setAccessPolicy operation. + */ +export declare type ContainerSetAccessPolicyResponse = ContainerSetAccessPolicyHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerSetAccessPolicyHeaders; + }; +}; + +/** + * Defines headers for SetMetadata operation. + */ +export declare interface ContainerSetMetadataHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link ContainerClient.setMetadata} operation. + * + * @export + * @interface ContainerSetMetadataOptions + */ +export declare interface ContainerSetMetadataOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ContainerSetMetadataOptions + */ + abortSignal?: AbortSignalLike; + /** + * If specified, contains the lease id that must be matched and lease with this id + * must be active in order for the operation to succeed. + * + * @type {ContainerRequestConditions} + * @memberof ContainerSetMetadataOptions + */ + conditions?: ContainerRequestConditions; +} + +/** + * Contains response data for the setMetadata operation. + */ +export declare type ContainerSetMetadataResponse = ContainerSetMetadataHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerSetMetadataHeaders; + }; +}; + +/** + * Defines headers for Restore operation. + */ +export declare interface ContainerUndeleteHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Contains response data for the restore operation. + */ +export declare type ContainerUndeleteResponse = ContainerUndeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ContainerUndeleteHeaders; + }; +}; + +/** + * Defines the operations from a {@link BlobClient} that are needed for the poller + * returned by {@link BlobClient.beginCopyFromURL} to work. + */ +export declare type CopyPollerBlobClient = Pick & { + startCopyFromURL(copySource: string, options?: BlobStartCopyFromURLOptions): Promise; +}; + +/** + * Defines values for CopyStatusType. + * Possible values include: 'pending', 'success', 'aborted', 'failed' + * @readonly + * @enum {string} + */ +export declare type CopyStatusType = 'pending' | 'success' | 'aborted' | 'failed'; + +/** + * CORS is an HTTP feature that enables a web application running under one domain to access + * resources in another domain. Web browsers implement a security restriction known as same-origin + * policy that prevents a web page from calling APIs in a different domain; CORS provides a secure + * way to allow one domain (the origin domain) to call APIs in another domain + */ +export declare interface CorsRule { + /** + * The origin domains that are permitted to make a request against the storage service via CORS. + * The origin domain is the domain from which the request originates. Note that the origin must + * be an exact case-sensitive match with the origin that the user age sends to the service. You + * can also use the wildcard character '*' to allow all origin domains to make requests via CORS. + */ + allowedOrigins: string; + /** + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma + * separated) + */ + allowedMethods: string; + /** + * the request headers that the origin domain may specify on the CORS request. + */ + allowedHeaders: string; + /** + * The response headers that may be sent in the response to the CORS request and exposed by the + * browser to the request issuer + */ + exposedHeaders: string; + /** + * The maximum amount time that a browser should cache the preflight OPTIONS request. + */ + maxAgeInSeconds: number; +} + +/** + * Additional parameters for a set of operations. + */ +export declare interface CpkInfo { + /** + * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If + * not specified, encryption is performed with the root account encryption key. For more + * information, see Encryption at Rest for Azure Storage Services. + */ + encryptionKey?: string; + /** + * The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key + * header is provided. + */ + encryptionKeySha256?: string; + /** + * The algorithm used to produce the encryption key hash. Currently, the only accepted value is + * "AES256". Must be provided if the x-ms-encryption-key header is provided. Possible values + * include: 'AES256' + */ + encryptionAlgorithm?: EncryptionAlgorithmType; +} + +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + * + * @export + * @abstract + * @class Credential + */ +export declare abstract class Credential implements RequestPolicyFactory { + /** + * Creates a RequestPolicy object. + * + * @param {RequestPolicy} _nextPolicy + * @param {RequestPolicyOptions} _options + * @returns {RequestPolicy} + * @memberof Credential + */ + create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy; +} + +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + * + * @export + * @abstract + * @class CredentialPolicy + * @extends {BaseRequestPolicy} + */ +export declare abstract class CredentialPolicy extends BaseRequestPolicy { + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof CredentialPolicy + */ + sendRequest(request: WebResource): Promise; + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @protected + * @abstract + * @param {WebResource} request + * @returns {WebResource} + * @memberof CredentialPolicy + */ + protected signRequest(request: WebResource): WebResource; +} + +/** + * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy. + */ +export declare type CredentialPolicyCreator = (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => CredentialPolicy; + +/** + * Defines values for DeleteSnapshotsOptionType. + * Possible values include: 'include', 'only' + * @readonly + * @enum {string} + */ +export declare type DeleteSnapshotsOptionType = 'include' | 'only'; +export { deserializationPolicy } + +/** + * Defines values for EncryptionAlgorithmType. + * Possible values include: 'AES256' + * @readonly + * @enum {string} + */ +export declare type EncryptionAlgorithmType = 'AES256'; + +/** + * Blob info from a Filter Blobs API call + */ +export declare interface FilterBlobItem { + name: string; + containerName: string; + tagValue: string; +} + +/** + * The result of a Filter Blobs API call + */ +export declare interface FilterBlobSegment { + serviceEndpoint: string; + where: string; + blobs: FilterBlobItem[]; + continuationToken?: string; +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * + * @param {AccountSASSignatureValues} accountSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + * @memberof AccountSASSignatureValues + */ +export declare function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters; + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * Fill in the required details before running the following snippets. + * + * Example usage: + * + * ```js + * // Generate service level SAS for a container + * const containerSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * permissions: ContainerSASPermissions.parse("racwdl"), // Required + * startsOn: new Date(), // Optional + * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2016-05-31" // Optional + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * Example using an identifier: + * + * ```js + * // Generate service level SAS for a container with identifier + * // startsOn & permissions are optional when identifier is provided + * const identifier = "unique-id"; + * await containerClient.setAccessPolicy(undefined, [ + * { + * accessPolicy: { + * expiresOn: new Date(new Date().valueOf() + 86400), // Date type + * permissions: ContainerSASPermissions.parse("racwdl").toString(), + * startsOn: new Date() // Date type + * }, + * id: identifier + * } + * ]); + * + * const containerSAS = generateBlobSASQueryParameters( + * { + * containerName, // Required + * identifier // Required + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * Example using a blob name: + * + * ```js + * // Generate service level SAS for a blob + * const blobSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * blobName, // Required + * permissions: BlobSASPermissions.parse("racwd"), // Required + * startsOn: new Date(), // Optional + * expiresOn: new Date(new Date().valueOf() + 86400), // Required. Date type + * cacheControl: "cache-control-override", // Optional + * contentDisposition: "content-disposition-override", // Optional + * contentEncoding: "content-encoding-override", // Optional + * contentLanguage: "content-language-override", // Optional + * contentType: "content-type-override", // Optional + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2016-05-31" // Optional + * }, + * sharedKeyCredential // StorageSharedKeyCredential - `new StorageSharedKeyCredential(account, accountKey)` + * ).toString(); + * ``` + * + * @export + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {StorageSharedKeyCredential} sharedKeyCredential + * @returns {SASQueryParameters} + */ +export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters; + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Creates an instance of SASQueryParameters. + * WARNING: identifier will be ignored when generating user delegation SAS, permissions and expiresOn are required. + * + * Example usage: + * + * ```js + * // Generate user delegation SAS for a container + * const userDelegationKey = await blobServiceClient.getUserDelegationKey(startsOn, expiresOn); + * const containerSAS = generateBlobSASQueryParameters({ + * containerName, // Required + * permissions: ContainerSASPermissions.parse("racwdl"), // Required + * startsOn, // Optional. Date type + * expiresOn, // Required. Date type + * ipRange: { start: "0.0.0.0", end: "255.255.255.255" }, // Optional + * protocol: SASProtocol.HttpsAndHttp, // Optional + * version: "2018-11-09" // Must >= 2018-11-09 to generate user delegation SAS + * }, + * userDelegationKey, // UserDelegationKey + * accountName + * ).toString(); + * ``` + * + * @export + * @param {BlobSASSignatureValues} blobSASSignatureValues + * @param {UserDelegationKey} userDelegationKey Return value of `blobServiceClient.getUserDelegationKey()` + * @param {string} accountName + * @returns {SASQueryParameters} + */ +export declare function generateBlobSASQueryParameters(blobSASSignatureValues: BlobSASSignatureValues, userDelegationKey: UserDelegationKey, accountName: string): SASQueryParameters; + +/** + * Geo-Replication information for the Secondary Storage Service + */ +export declare interface GeoReplication { + /** + * The status of the secondary location. Possible values include: 'live', 'bootstrap', + * 'unavailable' + */ + status: GeoReplicationStatusType; + /** + * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed + * to be available for read operations at the secondary. Primary writes after this point in time + * may or may not be available for reads. + */ + lastSyncOn: Date; +} + +/** + * Defines values for GeoReplicationStatusType. + * Possible values include: 'live', 'bootstrap', 'unavailable' + * @readonly + * @enum {string} + */ +export declare type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable'; +export { HttpHeaders } +export { HttpOperationResponse } +export { HttpRequestBody } +export { IHttpClient } + +/** + * The details for a specific lease. + */ +export declare interface Lease { + /** + * The ETag contains a value that you can use to + * perform operations conditionally. If the request version is 2011-08-18 or + * newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was + * last modified. Any operation that modifies the blob, including an update + * of the blob's metadata or properties, changes the last-modified time of + * the blob. + */ + lastModified?: Date; + /** + * Uniquely identifies a container's lease + */ + leaseId?: string; + /** + * Approximate time remaining in the lease + * period, in seconds. + */ + leaseTime?: number; + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used + * to execute the request. This header is returned for requests made against + * version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that + * indicates the time at which the response was initiated + */ + date?: Date; + /** + * Error code if any associated with the response that returned + * the Lease information. + */ + errorCode?: string; +} + +/** + * Additional parameters for a set of operations. + */ +export declare interface LeaseAccessConditions { + /** + * If specified, the operation only succeeds if the resource's lease is active and matches this + * ID. + */ + leaseId?: string; +} + +/** + * Defines values for LeaseDurationType. + * Possible values include: 'infinite', 'fixed' + * @readonly + * @enum {string} + */ +export declare type LeaseDurationType = 'infinite' | 'fixed'; + +/** + * Configures lease operations. + * + * @export + * @interface LeaseOperationOptions + */ +export declare interface LeaseOperationOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof LeaseOperationOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when changing the lease. + * + * @type {ModifiedAccessConditions} + * @memberof LeaseOperationOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Contains the response data for operations that create, modify, or delete a lease. + * + * See {@link BlobLeaseClient}. + */ +export declare type LeaseOperationResponse = Lease & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: Lease; + }; +}; + +/** + * Defines values for LeaseStateType. + * Possible values include: 'available', 'leased', 'expired', 'breaking', 'broken' + * @readonly + * @enum {string} + */ +export declare type LeaseStateType = 'available' | 'leased' | 'expired' | 'breaking' | 'broken'; + +/** + * Defines values for LeaseStatusType. + * Possible values include: 'locked', 'unlocked' + * @readonly + * @enum {string} + */ +export declare type LeaseStatusType = 'locked' | 'unlocked'; + +/** + * An enumeration of blobs + */ +export declare interface ListBlobsFlatSegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + segment: BlobFlatListSegment; + continuationToken?: string; +} + +/** + * An enumeration of blobs + */ +export declare interface ListBlobsFlatSegmentResponseModel { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + segment: BlobFlatListSegmentModel; + continuationToken?: string; +} + +/** + * An enumeration of blobs + */ +export declare interface ListBlobsHierarchySegmentResponse { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + delimiter?: string; + segment: BlobHierarchyListSegment; + continuationToken?: string; +} + +/** + * An enumeration of blobs + */ +export declare interface ListBlobsHierarchySegmentResponseModel { + serviceEndpoint: string; + containerName: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + delimiter?: string; + segment: BlobHierarchyListSegmentModel; + continuationToken?: string; +} + +/** + * Defines values for ListBlobsIncludeItem. + * Possible values include: 'copy', 'deleted', 'metadata', 'snapshots', 'uncommittedblobs', + * 'versions', 'tags' + * @readonly + * @enum {string} + */ +export declare type ListBlobsIncludeItem = 'copy' | 'deleted' | 'metadata' | 'snapshots' | 'uncommittedblobs' | 'versions' | 'tags'; + +/** + * Defines values for ListContainersIncludeType. + * Possible values include: 'metadata', 'deleted' + * @readonly + * @enum {string} + */ +export declare type ListContainersIncludeType = 'metadata' | 'deleted'; + +/** + * An enumeration of containers + */ +export declare interface ListContainersSegmentResponse { + serviceEndpoint: string; + prefix?: string; + marker?: string; + maxPageSize?: number; + containerItems: ContainerItem[]; + continuationToken?: string; +} + +/** + * The @azure/logger configuration for this package. + */ +export declare const logger: import("@azure/logger").AzureLogger; + +/** + * Azure Analytics Logging settings. + */ +export declare interface Logging { + /** + * The version of Storage Analytics to configure. + */ + version: string; + /** + * Indicates whether all delete requests should be logged. + */ + deleteProperty: boolean; + /** + * Indicates whether all read requests should be logged. + */ + read: boolean; + /** + * Indicates whether all write requests should be logged. + */ + write: boolean; + retentionPolicy: RetentionPolicy; +} + +/** + * Specifies HTTP options for conditional requests based on ETag matching. + */ +export declare interface MatchConditions { + /** + * Specify an ETag value to operate only on blobs with a matching value. + */ + ifMatch?: string; + /** + * Specify an ETag value to operate only on blobs without a matching value. + */ + ifNoneMatch?: string; +} + +/** + * A map of name-value pairs to associate with the resource. + */ +export declare interface Metadata { + /** + * A name-value pair. + */ + [propertyName: string]: string; +} + +/** + * a summary of request statistics grouped by API in hour or minute aggregates for blobs + */ +export declare interface Metrics { + /** + * The version of Storage Analytics to configure. + */ + version?: string; + /** + * Indicates whether metrics are enabled for the Blob service. + */ + enabled: boolean; + /** + * Indicates whether metrics should generate summary statistics for called API operations. + */ + includeAPIs?: boolean; + retentionPolicy?: RetentionPolicy; +} + +/** + * Specifies HTTP options for conditional requests based on modification time. + */ +export declare interface ModificationConditions { + /** + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + */ + ifModifiedSince?: Date; + /** + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. + */ + ifUnmodifiedSince?: Date; +} + +/** + * standard HTTP conditional headers and tags condition. + */ +export declare interface ModifiedAccessConditions extends MatchConditions, ModificationConditions, TagConditions { +} + +/** + * Additional parameters for a set of operations. + */ +export declare interface ModifiedAccessConditionsModel { + /** + * Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + */ + ifModifiedSince?: Date; + /** + * Specify this header value to operate only on a blob if it has not been modified since the + * specified date/time. + */ + ifUnmodifiedSince?: Date; + /** + * Specify an ETag value to operate only on blobs with a matching value. + */ + ifMatch?: string; + /** + * Specify an ETag value to operate only on blobs without a matching value. + */ + ifNoneMatch?: string; + /** + * Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + */ + ifTags?: string; +} + +/** + * Creates a new Pipeline object with Credential provided. + * + * @export + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [pipelineOptions] Optional. Options. + * @returns {Pipeline} A new Pipeline object. + */ +export declare function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline; + +/** + * Contains Object Replication Policy ID and the respective list of {@link ObjectReplicationRule}. + * This is used when retrieving the Object Replication Properties on the source blob. The policy id for the + * destination blob is set in ObjectReplicationDestinationPolicyId of the respective method responses + * (e.g. {@link BlobProperties.ObjectReplicationDestinationPolicyId}. + * + * @export + * @interface ObjectReplicationPolicy + */ +export declare interface ObjectReplicationPolicy { + /** + * The Object Replication Policy ID. + * + * @type {string} + * @memberof ObjectReplicationPolicy + */ + policyId: string; + /** + * The Rule ID(s) and respective Replication Status(s) that are under the Policy ID. + * + * @type {ObjectReplicationRule[]} + * @memberof ObjectReplicationPolicy + */ + rules: ObjectReplicationRule[]; +} + +/** + * Contains the Object Replication Rule ID and {@link ObjectReplicationStatus} of a blob. + * There can be more than one {@link ObjectReplicationRule} under a {@link ObjectReplicationPolicy}. + */ +export declare interface ObjectReplicationRule { + /** + * The Object Replication Rule ID. + * + * @type {string} + * @memberof ObjectReplicationRule + */ + ruleId: string; + /** + * The Replication Status + * + * @type {ObjectReplicationStatus} + * @memberof ObjectReplicationRule + */ + replicationStatus: ObjectReplicationStatus; +} + +/** + * Specifies the Replication Status of a blob. This is used when a storage account has + * Object Replication Policy(s) applied. See {@link ObjectReplicationPolicy} and {@link ObjectReplicationRule}. + */ +export declare type ObjectReplicationStatus = "complete" | "failed"; + +/** + * Defines headers for ClearPages operation. + */ +export declare interface PageBlobClearPagesHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link PageBlobClient.clearPages} operation. + * + * @export + * @interface PageBlobClearPagesOptions + */ +export declare interface PageBlobClearPagesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobClearPagesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when clearing pages. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobClearPagesOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobClearPagesOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobClearPagesOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the clearPages operation. + */ +export declare type PageBlobClearPagesResponse = PageBlobClearPagesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobClearPagesHeaders; + }; +}; + +/** + * PageBlobClient defines a set of operations applicable to page blobs. + * + * @export + * @class PageBlobClient + * @extends {BlobClient} + */ +export declare class PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + * + * @private + * @type {PageBlobs} + * @memberof PageBlobClient + */ + private pageBlobContext; + /** + * + * Creates an instance of PageBlobClient. + * + * @param {string} connectionString Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param {string} containerName Container name. + * @param {string} blobName Blob name. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof PageBlobClient + */ + constructor(connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions); + /** + * Creates an instance of PageBlobClient. + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * If a blob name includes ? or %, blob name must be encoded in the URL. + * + * @param {string} url A Client string pointing to Azure Storage blob service, such as + * "https://myaccount.blob.core.windows.net". You can append a SAS + * if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString". + * @param {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} credential Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param {StoragePipelineOptions} [options] Optional. Options to configure the HTTP pipeline. + * @memberof PageBlobClient + */ + constructor(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions); + /** + * Creates an instance of PageBlobClient. + * + * @param {string} url A URL string pointing to Azure Storage blob, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob". + * You can append a SAS if using AnonymousCredential, such as + * "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString". + * This method accepts an encoded URL or non-encoded URL pointing to a blob. + * Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped. + * However, if a blob name includes ? or %, blob name must be encoded in the URL. + * Such as a blob named "my?blob%", the URL should be "https://myaccount.blob.core.windows.net/mycontainer/my%3Fblob%25". + * @param {Pipeline} pipeline Call newPipeline() to create a default + * pipeline, or provide a customized pipeline. + * @memberof PageBlobClient + */ + constructor(url: string, pipeline: Pipeline); + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param {string} snapshot The snapshot timestamp. + * @returns {PageBlobClient} A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + * @memberof PageBlobClient + */ + withSnapshot(snapshot: string): PageBlobClient; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateOptions} [options] Options to the Page Blob Create operation. + * @returns {Promise} Response data for the Page Blob Create operation. + * @memberof PageBlobClient + */ + create(size: number, options?: PageBlobCreateOptions): Promise; + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * + * @param {number} size size of the page blob. + * @param {PageBlobCreateIfNotExistsOptions} [options] + * @returns {Promise} + * @memberof PageBlobClient + */ + createIfNotExists(size: number, options?: PageBlobCreateIfNotExistsOptions): Promise; + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {HttpRequestBody} body Data to upload + * @param {number} offset Offset of destination page blob + * @param {number} count Content length of the body, also number of bytes to be uploaded + * @param {PageBlobUploadPagesOptions} [options] Options to the Page Blob Upload Pages operation. + * @returns {Promise} Response data for the Page Blob Upload Pages operation. + * @memberof PageBlobClient + */ + uploadPages(body: HttpRequestBody, offset: number, count: number, options?: PageBlobUploadPagesOptions): Promise; + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * + * @param {string} sourceURL Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param {number} sourceOffset The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param {number} destOffset Offset of destination page blob + * @param {number} count Number of bytes to be uploaded from source page blob + * @param {PageBlobUploadPagesFromURLOptions} [options={}] + * @returns {Promise} + * @memberof PageBlobClient + */ + uploadPagesFromURL(sourceURL: string, sourceOffset: number, destOffset: number, count: number, options?: PageBlobUploadPagesFromURLOptions): Promise; + /** + * Frees the specified pages from the page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * + * @param {number} [offset] Starting byte position of the pages to clear. + * @param {number} [count] Number of bytes to clear. + * @param {PageBlobClearPagesOptions} [options] Options to the Page Blob Clear Pages operation. + * @returns {Promise} Response data for the Page Blob Clear Pages operation. + * @memberof PageBlobClient + */ + clearPages(offset?: number, count?: number, options?: PageBlobClearPagesOptions): Promise; + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} [offset] Starting byte position of the page ranges. + * @param {number} [count] Number of bytes to get. + * @param {PageBlobGetPageRangesOptions} [options] Options to the Page Blob Get Ranges operation. + * @returns {Promise} Response data for the Page Blob Get Ranges operation. + * @memberof PageBlobClient + */ + getPageRanges(offset?: number, count?: number, options?: PageBlobGetPageRangesOptions): Promise; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshot Timestamp of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + getPageRangesDiff(offset: number, count: number, prevSnapshot: string, options?: PageBlobGetPageRangesDiffOptions): Promise; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param {number} offset Starting byte position of the page blob + * @param {number} count Number of bytes to get ranges diff. + * @param {string} prevSnapshotUrl URL of snapshot to retrieve the difference. + * @param {PageBlobGetPageRangesDiffOptions} [options] Options to the Page Blob Get Page Ranges Diff operation. + * @returns {Promise} Response data for the Page Blob Get Page Range Diff operation. + * @memberof PageBlobClient + */ + getPageRangesDiffForManagedDisks(offset: number, count: number, prevSnapshotUrl: string, options?: PageBlobGetPageRangesDiffOptions): Promise; + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param {number} size Target size + * @param {PageBlobResizeOptions} [options] Options to the Page Blob Resize operation. + * @returns {Promise} Response data for the Page Blob Resize operation. + * @memberof PageBlobClient + */ + resize(size: number, options?: PageBlobResizeOptions): Promise; + /** + * Sets a page blob's sequence number. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * + * @param {SequenceNumberActionType} sequenceNumberAction Indicates how the service should modify the blob's sequence number. + * @param {number} [sequenceNumber] Required if sequenceNumberAction is max or update + * @param {PageBlobUpdateSequenceNumberOptions} [options] Options to the Page Blob Update Sequence Number operation. + * @returns {Promise} Response data for the Page Blob Update Sequence Number operation. + * @memberof PageBlobClient + */ + updateSequenceNumber(sequenceNumberAction: SequenceNumberActionType, sequenceNumber?: number, options?: PageBlobUpdateSequenceNumberOptions): Promise; + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * + * @param {string} copySource Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param {PageBlobStartCopyIncrementalOptions} [options] Options to the Page Blob Copy Incremental operation. + * @returns {Promise} Response data for the Page Blob Copy Incremental operation. + * @memberof PageBlobClient + */ + startCopyIncremental(copySource: string, options?: PageBlobStartCopyIncrementalOptions): Promise; +} + +/** + * Defines headers for CopyIncremental operation. + */ +export declare interface PageBlobCopyIncrementalHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * String identifier for this copy operation. Use with Get Blob Properties to check the status of + * this copy operation, or pass to Abort Copy Blob to abort a pending copy. + */ + copyId?: string; + /** + * State of the copy operation identified by x-ms-copy-id. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + */ + copyStatus?: CopyStatusType; + errorCode?: string; +} + +/** + * Contains response data for the copyIncremental operation. + */ +export declare type PageBlobCopyIncrementalResponse = PageBlobCopyIncrementalHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobCopyIncrementalHeaders; + }; +}; + +/** + * Defines headers for Create operation. + */ +export declare interface PageBlobCreateHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * A DateTime value returned by the service that uniquely identifies the blob. The value of this + * header indicates the blob version, and may be used in subsequent requests to access this + * version of the blob. + */ + versionId?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link PageBlobClient.createIfNotExists} operation. + * + * @export + * @interface PageBlobCreateIfNotExistsOptions + */ +export declare interface PageBlobCreateIfNotExistsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobCreateIfNotExistsOptions + */ + abortSignal?: AbortSignalLike; + /** + * A user-controlled value that can be used to track requests. + * The value must be between 0 and 2^63 - 1. The default value is 0. + * + * @type {number} + * @memberof PageBlobCreateIfNotExistsOptions + */ + blobSequenceNumber?: number; + /** + * HTTP headers to set when creating a page blob. + * + * @type {BlobHTTPHeaders} + * @memberof PageBlobCreateIfNotExistsOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof PageBlobCreateIfNotExistsOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobCreateIfNotExistsOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobCreateIfNotExistsOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {PremiumPageBlobTier | string} + * @memberof PageBlobCreateIfNotExistsOptions + */ + tier?: PremiumPageBlobTier | string; +} + +/** + * Contains response data for the {@link PageBlobClient.createIfNotExists} operation. + * + * @export + * @interface PageBlobCreateIfNotExistsResponse + */ +export declare interface PageBlobCreateIfNotExistsResponse extends PageBlobCreateResponse { + /** + * Indicate whether the blob is successfully created. Is false when the blob is not changed as it already exists. + * + * @type {boolean} + * @memberof PageBlobCreateIfNotExistsResponse + */ + succeeded: boolean; +} + +/** + * Options to configure the {@link PageBlobClient.create} operation. + * + * @export + * @interface PageBlobCreateOptions + */ +export declare interface PageBlobCreateOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobCreateOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when creating a page blob. + * + * @type {BlobRequestConditions} + * @memberof PageBlobCreateOptions + */ + conditions?: BlobRequestConditions; + /** + * A user-controlled value that can be used to track requests. + * The value must be between 0 and 2^63 - 1. The default value is 0. + * + * @type {number} + * @memberof PageBlobCreateOptions + */ + blobSequenceNumber?: number; + /** + * HTTP headers to set when creating a page blob. + * + * @type {BlobHTTPHeaders} + * @memberof PageBlobCreateOptions + */ + blobHTTPHeaders?: BlobHTTPHeaders; + /** + * A collection of key-value string pair to associate with the blob when creating append blobs. + * + * @type {Metadata} + * @memberof PageBlobCreateOptions + */ + metadata?: Metadata; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobCreateOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobCreateOptions + */ + encryptionScope?: string; + /** + * Access tier. + * More Details - https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers + * + * @type {PremiumPageBlobTier | string} + * @memberof PageBlobCreateOptions + */ + tier?: PremiumPageBlobTier | string; + /** + * Blob tags. + * + * @type {Tags} + * @memberof PageBlobCreateOptions + */ + tags?: Tags; +} + +/** + * Contains response data for the create operation. + */ +export declare type PageBlobCreateResponse = PageBlobCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobCreateHeaders; + }; +}; + +/** + * Defines headers for GetPageRangesDiff operation. + */ +export declare interface PageBlobGetPageRangesDiffHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link PageBlobClient.getRangesDiff} operation. + * + * @export + * @interface PageBlobGetPageRangesDiffOptions + */ +export declare interface PageBlobGetPageRangesDiffOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobGetPageRangesDiffOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting page ranges diff. + * + * @type {BlobRequestConditions} + * @memberof PageBlobGetPageRangesDiffOptions + */ + conditions?: BlobRequestConditions; + /** + * (unused) + * + * @type {string} + * @memberof PageBlobGetPageRangesDiffOptions + */ + range?: string; +} + +/** + * Contains response data for the {@link BlobClient.getPageRangesDiff} operation. + */ +export declare interface PageBlobGetPageRangesDiffResponse extends PageList, PageBlobGetPageRangesDiffHeaders { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobGetPageRangesDiffHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PageList; + }; +} + +/** + * Defines headers for GetPageRanges operation. + */ +export declare interface PageBlobGetPageRangesHeaders { + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * The size of the blob in bytes. + */ + blobContentLength?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link PageBlobClient.getPageRanges} operation. + * + * @export + * @interface PageBlobGetPageRangesOptions + */ +export declare interface PageBlobGetPageRangesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobGetPageRangesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when getting page ranges. + * + * @type {BlobRequestConditions} + * @memberof PageBlobGetPageRangesOptions + */ + conditions?: BlobRequestConditions; +} + +/** + * Contains response data for the {@link BlobClient.getPageRanges} operation. + */ +export declare interface PageBlobGetPageRangesResponse extends PageList, PageBlobGetPageRangesHeaders { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobGetPageRangesHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: PageList; + }; +} + +/** + * Conditions to add to the creation of this page blob. + */ +export declare interface PageBlobRequestConditions extends BlobRequestConditions, SequenceNumberAccessConditions { +} + +/** + * Defines headers for Resize operation. + */ +export declare interface PageBlobResizeHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link PageBlobClient.resize} operation. + * + * @export + * @interface PageBlobResizeOptions + */ +export declare interface PageBlobResizeOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobResizeOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when resizing a page blob. + * + * @type {BlobRequestConditions} + * @memberof PageBlobResizeOptions + */ + conditions?: BlobRequestConditions; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobResizeOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the resize operation. + */ +export declare type PageBlobResizeResponse = PageBlobResizeHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobResizeHeaders; + }; +}; + +/** + * Options to configure {@link PageBlobClient.startCopyIncremental} operation. + * + * @export + * @interface PageBlobStartCopyIncrementalOptions + */ +export declare interface PageBlobStartCopyIncrementalOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobStartCopyIncrementalOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when starting a copy incremental operation. + * + * @type {ModifiedAccessConditions} + * @memberof PageBlobStartCopyIncrementalOptions + */ + conditions?: ModifiedAccessConditions; +} + +/** + * Defines headers for UpdateSequenceNumber operation. + */ +export declare interface PageBlobUpdateSequenceNumberHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * The current sequence number for a page blob. This header is not returned for block blobs or + * append blobs + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure {@link PageBlobClient.updateSequenceNumber} operation. + * + * @export + * @interface PageBlobUpdateSequenceNumberOptions + */ +export declare interface PageBlobUpdateSequenceNumberOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUpdateSequenceNumberOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when updating sequence number. + * + * @type {BlobRequestConditions} + * @memberof PageBlobUpdateSequenceNumberOptions + */ + conditions?: BlobRequestConditions; +} + +/** + * Contains response data for the updateSequenceNumber operation. + */ +export declare type PageBlobUpdateSequenceNumberResponse = PageBlobUpdateSequenceNumberHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUpdateSequenceNumberHeaders; + }; +}; + +/** + * Defines headers for UploadPagesFromURL operation. + */ +export declare interface PageBlobUploadPagesFromURLHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned + * when the blob was encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure {@link PageBlobClient.uploadPagesFromURL} operation. + * + * @export + * @interface PageBlobUploadPagesFromURLOptions + */ +export declare interface PageBlobUploadPagesFromURLOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUploadPagesFromURLOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when updating sequence number. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobUploadPagesFromURLOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Conditions to meet for the source Azure Blob/File when copying from a URL to the blob. + * + * @type {MatchConditions & ModificationConditions} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceConditions?: MatchConditions & ModificationConditions; + /** + * An MD5 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content from the URI. + * This hash is used to verify the integrity of the content during transport of the data from the URI. + * When this is specified, the storage service compares the hash of the content that has arrived from the copy-source with this value. + * + * sourceContentMD5 and sourceContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesFromURLOptions + */ + sourceContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobUploadPagesFromURLOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobUploadPagesFromURLOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the uploadPagesFromURL operation. + */ +export declare type PageBlobUploadPagesFromURLResponse = PageBlobUploadPagesFromURLHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUploadPagesFromURLHeaders; + }; +}; + +/** + * Defines headers for UploadPages operation. + */ +export declare interface PageBlobUploadPagesHeaders { + /** + * The ETag contains a value that you can use to perform operations conditionally. If the request + * version is 2011-08-18 or newer, the ETag value will be in quotes. + */ + etag?: string; + /** + * Returns the date and time the container was last modified. Any operation that modifies the + * blob, including an update of the blob's metadata or properties, changes the last-modified time + * of the blob. + */ + lastModified?: Date; + /** + * If the blob has an MD5 hash and this operation is to read the full blob, this response header + * is returned so that the client can check for message content integrity. + */ + contentMD5?: Uint8Array; + /** + * This header is returned so that the client can check for message content integrity. The value + * of this header is computed by the Blob service; it is not necessarily the same value specified + * in the request headers. + */ + xMsContentCrc64?: Uint8Array; + /** + * The current sequence number for the page blob. + */ + blobSequenceNumber?: number; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * The value of this header is set to true if the contents of the request are successfully + * encrypted using the specified algorithm, and false otherwise. + */ + isServerEncrypted?: boolean; + /** + * The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned + * when the pages were encrypted with a customer-provided key. + */ + encryptionKeySha256?: string; + /** + * Returns the name of the encryption scope used to encrypt the blob contents and application + * metadata. Note that the absence of this header implies use of the default account encryption + * scope. + */ + encryptionScope?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link PageBlobClient.uploadPages} operation. + * + * @export + * @interface PageBlobUploadPagesOptions + */ +export declare interface PageBlobUploadPagesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof PageBlobUploadPagesOptions + */ + abortSignal?: AbortSignalLike; + /** + * Conditions to meet when uploading pages. + * + * @type {PageBlobRequestConditions} + * @memberof PageBlobUploadPagesOptions + */ + conditions?: PageBlobRequestConditions; + /** + * Callback to receive events on the progress of upload pages operation. + * + * @type {(progress: TransferProgressEvent) => void} + * @memberof PageBlobUploadPagesOptions + */ + onProgress?: (progress: TransferProgressEvent) => void; + /** + * An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesOptions + */ + transactionalContentMD5?: Uint8Array; + /** + * A CRC64 hash of the content. This hash is used to verify the integrity of the content during transport. + * When this is specified, the storage service compares the hash of the content that has arrived with this value. + * + * transactionalContentMD5 and transactionalContentCrc64 cannot be set at same time. + * + * @type {Uint8Array} + * @memberof PageBlobUploadPagesOptions + */ + transactionalContentCrc64?: Uint8Array; + /** + * Customer Provided Key Info. + * + * @type {CpkInfo} + * @memberof PageBlobUploadPagesOptions + */ + customerProvidedKey?: CpkInfo; + /** + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to + * encrypt the data provided in the request. If not specified, encryption is performed with the + * default account encryption scope. For more information, see Encryption at Rest for Azure + * Storage Services. + * + * @type {string} + * @memberof PageBlobUploadPagesOptions + */ + encryptionScope?: string; +} + +/** + * Contains response data for the uploadPages operation. + */ +export declare type PageBlobUploadPagesResponse = PageBlobUploadPagesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PageBlobUploadPagesHeaders; + }; +}; + +/** + * List of page ranges for a blob. + */ +export declare interface PageList { + /** + * Valid non-overlapping page ranges. + */ + pageRange?: Range[]; + /** + * Present if the prevSnapshot parameter was specified and there were cleared + * pages between the previous snapshot and the target snapshot. + */ + clearRange?: Range[]; +} + +/** + * The multipart/mixed response which contains the response for each subrequest. + */ +export declare interface ParsedBatchResponse { + /** + * The parsed sub responses. + */ + subResponses: BatchSubResponse[]; + /** + * The succeeded executed sub responses' count; + */ + subResponsesSucceededCount: number; + /** + * The failed executed sub responses' count; + */ + subResponsesFailedCount: number; +} + +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + * + * @export + * @class Pipeline + */ +export declare class Pipeline { + /** + * A list of chained request policy factories. + * + * @type {RequestPolicyFactory[]} + * @memberof Pipeline + */ + readonly factories: RequestPolicyFactory[]; + /** + * Configures pipeline logger and HTTP client. + * + * @type {PipelineOptions} + * @memberof Pipeline + */ + readonly options: PipelineOptions; + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param {RequestPolicyFactory[]} factories + * @param {PipelineOptions} [options={}] + * @memberof Pipeline + */ + constructor(factories: RequestPolicyFactory[], options?: PipelineOptions); + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns {ServiceClientOptions} The ServiceClientOptions object from this Pipeline. + * @memberof Pipeline + */ + toServiceClientOptions(): ServiceClientOptions; +} + +/** + * Option interface for Pipeline constructor. + * + * @export + * @interface PipelineOptions + */ +export declare interface PipelineOptions { + /** + * Optional. Configures the HTTP client to send requests and receive responses. + * + * @type {IHttpClient} + * @memberof PipelineOptions + */ + httpClient?: IHttpClient; +} +export { PollerLike } +export { PollOperationState } + +/** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ +export declare enum PremiumPageBlobTier { + /** + * P4 Tier. + */ + P4 = "P4", + /** + * P6 Tier. + */ + P6 = "P6", + /** + * P10 Tier. + */ + P10 = "P10", + /** + * P15 Tier. + */ + P15 = "P15", + /** + * P20 Tier. + */ + P20 = "P20", + /** + * P30 Tier. + */ + P30 = "P30", + /** + * P40 Tier. + */ + P40 = "P40", + /** + * P50 Tier. + */ + P50 = "P50", + /** + * P60 Tier. + */ + P60 = "P60", + /** + * P70 Tier. + */ + P70 = "P70", + /** + * P80 Tier. + */ + P80 = "P80" +} + +/** + * Defines values for PublicAccessType. + * Possible values include: 'container', 'blob' + * @readonly + * @enum {string} + */ +export declare type PublicAccessType = 'container' | 'blob'; + +/** + * Range for Blob Service Operations. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations + * + * @export + * @interface Range + */ +export declare interface Range { + /** + * StartByte, larger than or equal 0. + * + * @type {string} + * @memberof Range + */ + offset: number; + /** + * Optional. Count of bytes, larger than 0. + * If not provided, will return bytes from offset to the end. + * + * @type {string} + * @memberof Range + */ + count?: number; +} + +/** + * Defines values for RehydratePriority. + * Possible values include: 'High', 'Standard' + * @readonly + * @enum {string} + */ +export declare type RehydratePriority = 'High' | 'Standard'; +export { RequestPolicy } +export { RequestPolicyFactory } +export { RequestPolicyOptions } +export { RestError } + +/** + * the retention policy which determines how long the associated data should persist + */ +export declare interface RetentionPolicy { + /** + * Indicates whether a retention policy is enabled for the storage service + */ + enabled: boolean; + /** + * Indicates the number of days that metrics or logging or soft-deleted data should be retained. + * All data older than this value will be deleted + */ + days?: number; +} + +/** + * Allowed IP range for a SAS. + * + * @export + * @interface SasIPRange + */ +export declare interface SasIPRange { + /** + * Starting IP address in the IP range. + * If end IP doesn't provide, start IP will the only IP allowed. + * + * @type {string} + * @memberof SasIPRange + */ + start: string; + /** + * Optional. IP address that ends the IP range. + * If not provided, start IP will the only IP allowed. + * + * @type {string} + * @memberof SasIPRange + */ + end?: string; +} + +/** + * Protocols for generated SAS. + * + * @export + * @enum {number} + */ +export declare enum SASProtocol { + /** + * Protocol that allows HTTPS only + */ + Https = "https", + /** + * Protocol that allows both HTTPS and HTTP + */ + HttpsAndHttp = "https,http" +} + +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + * + * @export + * @class SASQueryParameters + */ +export declare class SASQueryParameters { + /** + * The storage API version. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly version: string; + /** + * Optional. The allowed HTTP protocol(s). + * + * @type {SASProtocol} + * @memberof SASQueryParameters + */ + readonly protocol?: SASProtocol; + /** + * Optional. The start time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParameters + */ + readonly startsOn?: Date; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParameters + */ + readonly expiresOn?: Date; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly permissions?: string; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly services?: string; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly resourceTypes?: string; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly identifier?: string; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly resource?: string; + /** + * The signature for the SAS token. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly signature: string; + /** + * Value for cache-control header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly cacheControl?: string; + /** + * Value for content-disposition header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentDisposition?: string; + /** + * Value for content-encoding header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentEncoding?: string; + /** + * Value for content-length header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentLanguage?: string; + /** + * Value for content-type header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly contentType?: string; + /** + * Inner value of getter ipRange. + * + * @private + * @type {SasIPRange} + * @memberof SASQueryParameters + */ + private readonly ipRangeInner?; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedOid?; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedTenantId?; + /** + * The date-time the key is active. + * Property of user delegation key. + * + * @private + * @type {Date} + * @memberof SASQueryParameters + */ + private readonly signedStartsOn?; + /** + * The date-time the key expires. + * Property of user delegation key. + * + * @private + * @type {Date} + * @memberof SASQueryParameters + */ + private readonly signedExpiresOn?; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedService?; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + * + * @private + * @type {string} + * @memberof SASQueryParameters + */ + private readonly signedVersion?; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly preauthorizedAgentObjectId?: string; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParameters + */ + readonly correlationId?: string; + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + * @type {(SasIPRange | undefined)} + * @memberof SASQueryParameters + */ + get ipRange(): SasIPRange | undefined; + /** + * Creates an instance of SASQueryParameters. + * + * @param {string} version Representing the storage version + * @param {string} signature Representing the signature for the SAS token + * @param {string} [permissions] Representing the storage permissions + * @param {string} [services] Representing the storage services being accessed (only for Account SAS) + * @param {string} [resourceTypes] Representing the storage resource types being accessed (only for Account SAS) + * @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s) + * @param {Date} [startsOn] Representing the start time for this SAS token + * @param {Date} [expiresOn] Representing the expiry time for this SAS token + * @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token + * @param {string} [identifier] Representing the signed identifier (only for Service SAS) + * @param {string} [resource] Representing the storage container or blob (only for Service SAS) + * @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS) + * @param {string} [contentDisposition] Representing the content-disposition header (only for Blob/File Service SAS) + * @param {string} [contentEncoding] Representing the content-encoding header (only for Blob/File Service SAS) + * @param {string} [contentLanguage] Representing the content-language header (only for Blob/File Service SAS) + * @param {string} [contentType] Representing the content-type header (only for Blob/File Service SAS) + * @param {userDelegationKey} [userDelegationKey] Representing the user delegation key properties + * @param {string} [preauthorizedAgentObjectId] Representing the authorized AAD Object ID (only for User Delegation SAS) + * @param {string} [correlationId] Representing the correlation ID (only for User Delegation SAS) + * @memberof SASQueryParameters + */ + constructor(version: string, signature: string, permissions?: string, services?: string, resourceTypes?: string, protocol?: SASProtocol, startsOn?: Date, expiresOn?: Date, ipRange?: SasIPRange, identifier?: string, resource?: string, cacheControl?: string, contentDisposition?: string, contentEncoding?: string, contentLanguage?: string, contentType?: string, userDelegationKey?: UserDelegationKey, preauthorizedAgentObjectId?: string, correlationId?: string); + /** + * Creates an instance of SASQueryParameters. + * + * @param {string} version Representing the storage version + * @param {string} signature Representing the signature for the SAS token + * @param {SASQueryParametersOptions} [options] Optional. Options to construct the SASQueryParameters. + * @memberof SASQueryParameters + */ + constructor(version: string, signature: string, options?: SASQueryParametersOptions); + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + * @returns {string} + * @memberof SASQueryParameters + */ + toString(): string; + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @private + * @param {string[]} queries + * @param {string} key + * @param {string} [value] + * @returns {void} + * @memberof SASQueryParameters + */ + private tryAppendQueryParameter; +} + +/** + * Options to construct {@link SASQueryParameters}. + * + * @export + * @interface SASQueryParametersOptions + */ +export declare interface SASQueryParametersOptions { + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + permissions?: string; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + services?: string; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + resourceTypes?: string; + /** + * Optional. The allowed HTTP protocol(s). + * + * @type {SASProtocol} + * @memberof SASQueryParametersOptions + */ + protocol?: SASProtocol; + /** + * Optional. The start time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParametersOptions + */ + startsOn?: Date; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + * + * @type {Date} + * @memberof SASQueryParametersOptions + */ + expiresOn?: Date; + /** + * Optional. IP ranges allowed in this SAS. + * + * @type {SasIPRange} + * @memberof SASQueryParametersOptions + */ + ipRange?: SasIPRange; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + identifier?: string; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + resource?: string; + /** + * Value for cache-control header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + cacheControl?: string; + /** + * Value for content-disposition header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentDisposition?: string; + /** + * Value for content-encoding header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentEncoding?: string; + /** + * Value for content-length header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentLanguage?: string; + /** + * Value for content-type header in Blob/File Service SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + contentType?: string; + /** + * User delegation key properties. + * + * @type {UserDelegationKey} + * @memberof SASQueryParametersOptions + */ + userDelegationKey?: UserDelegationKey; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + preauthorizedAgentObjectId?: string; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + * + * @type {string} + * @memberof SASQueryParametersOptions + */ + correlationId?: string; +} + +/** + * Additional parameters for a set of operations, such as: PageBlob_uploadPages, + * PageBlob_clearPages, PageBlob_uploadPagesFromURL. + */ +export declare interface SequenceNumberAccessConditions { + /** + * Specify this header value to operate only on a blob if it has a sequence number less than or + * equal to the specified. + */ + ifSequenceNumberLessThanOrEqualTo?: number; + /** + * Specify this header value to operate only on a blob if it has a sequence number less than the + * specified. + */ + ifSequenceNumberLessThan?: number; + /** + * Specify this header value to operate only on a blob if it has the specified sequence number. + */ + ifSequenceNumberEqualTo?: number; +} + +/** + * Defines values for SequenceNumberActionType. + * Possible values include: 'max', 'update', 'increment' + * @readonly + * @enum {string} + */ +export declare type SequenceNumberActionType = 'max' | 'update' | 'increment'; + +/** + * Defines headers for FilterBlobs operation. + */ +export declare interface ServiceFilterBlobsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobServiceClient.findBlobsByTags} operation. + * + * @export + * @interface ServiceFindBlobByTagsOptions + */ +export declare interface ServiceFindBlobByTagsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceListContainersOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the filterBlobs operation. + */ +export declare type ServiceFindBlobsByTagsSegmentResponse = FilterBlobSegment & ServiceFilterBlobsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceFilterBlobsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: FilterBlobSegment; + }; +}; + +/** + * Defines headers for GetAccountInfo operation. + */ +export declare interface ServiceGetAccountInfoHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + /** + * Identifies the sku name of the account. Possible values include: 'Standard_LRS', + * 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS' + */ + skuName?: SkuName; + /** + * Identifies the account kind. Possible values include: 'Storage', 'BlobStorage', 'StorageV2', + * 'FileStorage', 'BlockBlobStorage' + */ + accountKind?: AccountKind; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobServiceClient.getAccountInfo} operation. + * + * @export + * @interface ServiceGetAccountInfoOptions + */ +export declare interface ServiceGetAccountInfoOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetAccountInfoOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the getAccountInfo operation. + */ +export declare type ServiceGetAccountInfoResponse = ServiceGetAccountInfoHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetAccountInfoHeaders; + }; +}; + +/** + * Defines headers for GetProperties operation. + */ +export declare interface ServiceGetPropertiesHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobServiceClient.getProperties} operation. + * + * @export + * @interface ServiceGetPropertiesOptions + */ +export declare interface ServiceGetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetPropertiesOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the getProperties operation. + */ +export declare type ServiceGetPropertiesResponse = BlobServiceProperties & ServiceGetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetPropertiesHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobServiceProperties; + }; +}; + +/** + * Defines headers for GetStatistics operation. + */ +export declare interface ServiceGetStatisticsHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobServiceClient.getStatistics} operation. + * + * @export + * @interface ServiceGetStatisticsOptions + */ +export declare interface ServiceGetStatisticsOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetStatisticsOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the getStatistics operation. + */ +export declare type ServiceGetStatisticsResponse = BlobServiceStatistics & ServiceGetStatisticsHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetStatisticsHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: BlobServiceStatistics; + }; +}; + +/** + * Defines headers for GetUserDelegationKey operation. + */ +export declare interface ServiceGetUserDelegationKeyHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * UTC date/time value generated by the service that indicates the time at which the response was + * initiated + */ + date?: Date; + errorCode?: string; +} + +/** + * Options to configure the Service - Get User Delegation Key. + * + * @export + * @interface ServiceGetUserDelegationKeyOptions + */ +export declare interface ServiceGetUserDelegationKeyOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceGetStatisticsOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the {@link getUserDelegationKey} operation. + */ +export declare type ServiceGetUserDelegationKeyResponse = UserDelegationKey & ServiceGetUserDelegationKeyHeaders & { + /** + * The underlying HTTP response. + */ + _response: HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceGetUserDelegationKeyHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: UserDelegationKeyModel; + }; +}; + +/** + * Options to configure the {@link BlobServiceClient.listContainers} operation. + * + * @export + * @interface ServiceListContainersOptions + */ +export declare interface ServiceListContainersOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceListContainersOptions + */ + abortSignal?: AbortSignalLike; + /** + * Filters the results to return only containers + * whose name begins with the specified prefix. + */ + prefix?: string; + /** + * Specifies whether the container's metadata + * should be returned as part of the response body. + */ + includeMetadata?: boolean; + /** + * Specifies whether soft deleted containers should be included in the response. + * + * @type {boolean} + * @memberof ServiceListContainersOptions + */ + includeDeleted?: boolean; +} + +/** + * Defines headers for ListContainersSegment operation. + */ +export declare interface ServiceListContainersSegmentHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} + +/** + * Contains response data for the listContainersSegment operation. + */ +export declare type ServiceListContainersSegmentResponse = ListContainersSegmentResponse & ServiceListContainersSegmentHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceListContainersSegmentHeaders; + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListContainersSegmentResponse; + }; +}; + +/** + * Defines headers for SetProperties operation. + */ +export declare interface ServiceSetPropertiesHeaders { + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + errorCode?: string; +} + +/** + * Options to configure the {@link BlobServiceClient.setProperties} operation. + * + * @export + * @interface ServiceSetPropertiesOptions + */ +export declare interface ServiceSetPropertiesOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceSetPropertiesOptions + */ + abortSignal?: AbortSignalLike; +} + +/** + * Contains response data for the setProperties operation. + */ +export declare type ServiceSetPropertiesResponse = ServiceSetPropertiesHeaders & { + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSetPropertiesHeaders; + }; +}; + +/** + * Defines headers for SubmitBatch operation. + */ +export declare interface ServiceSubmitBatchHeaders { + /** + * The media type of the body of the response. For batch requests, this is multipart/mixed; + * boundary=batchresponse_GUID + */ + contentType?: string; + /** + * This header uniquely identifies the request that was made and can be used for troubleshooting + * the request. + */ + requestId?: string; + /** + * Indicates the version of the Blob service used to execute the request. This header is returned + * for requests made against version 2009-09-19 and above. + */ + version?: string; + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + */ + clientRequestId?: string; + errorCode?: string; +} + +/** + * Optional Parameters. + */ +export declare interface ServiceSubmitBatchOptionalParamsModel extends coreHttp.RequestOptionsBase { + /** + * The timeout parameter is expressed in seconds. For more information, see Setting + * Timeouts for Blob Service Operations. + */ + timeoutInSeconds?: number; + /** + * Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + */ + requestId?: string; +} + +/** + * Contains response data for the submitBatch operation. + */ +export declare type ServiceSubmitBatchResponseModel = ServiceSubmitBatchHeaders & { + /** + * BROWSER ONLY + * + * The response body as a browser Blob. + * Always undefined in node.js. + */ + blobBody?: Promise; + /** + * NODEJS ONLY + * + * The response body as a node.js Readable stream. + * Always undefined in the browser. + */ + readableStreamBody?: NodeJS.ReadableStream; + /** + * The underlying HTTP response. + */ + _response: coreHttp.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ServiceSubmitBatchHeaders; + }; +}; + +/** + * Options to configure {@link BlobServiceClient.undeleteContainer} operation. + * + * @export + * @interface ServiceUndeleteContainerOptions + */ +export declare interface ServiceUndeleteContainerOptions extends CommonOptions { + /** + * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation. + * For example, use the @azure/abort-controller to create an `AbortSignal`. + * + * @type {AbortSignalLike} + * @memberof ServiceUndeleteContainerOptions + */ + abortSignal?: AbortSignalLike; + /** + * Optional. Specifies the new name of the restored container. + * Will use its original name if this is not specified. + * + * @type {string} + * @memberof ServiceUndeleteContainerOptions + */ + destinationContainerName?: string; +} + +/** + * Signed identifier. + * + * @export + * @interface SignedIdentifier + */ +export declare interface SignedIdentifier { + /** + * @member {string} id a unique id + */ + id: string; + /** + * @member {AccessPolicy} accessPolicy + */ + accessPolicy: { + /** + * @member {Date} startsOn Optional. The date-time the policy is active + */ + startsOn?: Date; + /** + * @member {Date} expiresOn Optional. The date-time the policy expires + */ + expiresOn?: Date; + /** + * @member {string} permissions The permissions for the acl policy + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + */ + permissions?: string; + }; +} + +/** + * signed identifier + */ +export declare interface SignedIdentifierModel { + /** + * a unique id + */ + id: string; + accessPolicy: AccessPolicy; +} + +/** + * Defines values for SkuName. + * Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', + * 'Premium_LRS' + * @readonly + * @enum {string} + */ +export declare type SkuName = 'Standard_LRS' | 'Standard_GRS' | 'Standard_RAGRS' | 'Standard_ZRS' | 'Premium_LRS'; + +/** + * The properties that enable an account to host a static website + */ +export declare interface StaticWebsite { + /** + * Indicates whether this account is hosting a static website + */ + enabled: boolean; + /** + * The default name of the index page under each directory + */ + indexDocument?: string; + /** + * The absolute path of the custom 404 page + */ + errorDocument404Path?: string; + /** + * Absolute path of the default index page + */ + defaultIndexDocumentPath?: string; +} + +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + * + * @class StorageBrowserPolicy + * @extends {BaseRequestPolicy} + */ +export declare class StorageBrowserPolicy extends BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @memberof StorageBrowserPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions); + /** + * Sends out request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageBrowserPolicy + */ + sendRequest(request: WebResource): Promise; +} + +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + * + * @export + * @class StorageBrowserPolicyFactory + * @implements {RequestPolicyFactory} + */ +export declare class StorageBrowserPolicyFactory implements RequestPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageBrowserPolicy} + * @memberof StorageBrowserPolicyFactory + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy; +} + +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + * + * @export + * @class StorageClient + */ +declare abstract class StorageClient { + /** + * Encoded URL string value. + * + * @type {string} + * @memberof StorageClient + */ + readonly url: string; + readonly accountName: string; + /* Excluded from this release type: pipeline */ + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * + * @type {StorageSharedKeyCredential | AnonymousCredential | TokenCredential} + * @memberof StorageClient + */ + readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + * + * @protected + * @type {StorageClientContext} + * @memberof StorageClient + */ + protected readonly storageClientContext: StorageClientContext; + /** + * @protected + * @type {boolean} + * @memberof StorageClient + */ + protected readonly isHttps: boolean; + /** + * Creates an instance of StorageClient. + * @param {string} url url to resource + * @param {Pipeline} pipeline request policy pipeline. + * @memberof StorageClient + */ + protected constructor(url: string, pipeline: Pipeline); +} + +declare class StorageClientContext extends coreHttp.ServiceClient { + url: string; + version: string; + /** + * Initializes a new instance of the StorageClientContext class. + * @param url The URL of the service account, container, or blob that is the targe of the desired + * operation. + * @param [options] The parameter options + */ + constructor(url: string, options?: coreHttp.ServiceClientOptions); +} + +/** + * The OAuth scope to use with Azure Storage. + */ +export declare const StorageOAuthScopes: string | string[]; + +/** + * Options interface for the {@link newPipeline} function. + * + * @export + * @interface StoragePipelineOptions + */ +export declare interface StoragePipelineOptions { + /** + * Options to configure a proxy for outgoing requests. + */ + proxyOptions?: ProxyOptions; + /** + * Options for adding user agent details to outgoing requests. + * + * @type {UserAgentOptions} + * @memberof StoragePipelineOptions + */ + userAgentOptions?: UserAgentOptions; + /** + * Configures the built-in retry policy behavior. + * + * @type {StorageRetryOptions} + * @memberof StoragePipelineOptions + */ + retryOptions?: StorageRetryOptions; + /** + * Keep alive configurations. Default keep-alive is enabled. + * + * @type {KeepAliveOptions} + * @memberof StoragePipelineOptions + */ + keepAliveOptions?: KeepAliveOptions; + /** + * Configures the HTTP client to send requests and receive responses. + * + * @type {IHttpClient} + * @memberof StoragePipelineOptions + */ + httpClient?: IHttpClient; +} + +/** + * Storage Blob retry options interface. + * + * @export + * @interface StorageRetryOptions + */ +export declare interface StorageRetryOptions { + /** + * Optional. StorageRetryPolicyType, default is exponential retry policy. + * + * @type {StorageRetryPolicyType} + * @memberof StorageRetryOptions + */ + readonly retryPolicyType?: StorageRetryPolicyType; + /** + * Optional. Max try number of attempts, default is 4. + * A value of 1 means 1 try and no retries. + * A value smaller than 1 means default retry number of attempts. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly maxTries?: number; + /** + * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request. + * A value of zero or undefined means no default timeout on SDK client, Azure + * Storage server's default timeout policy will be used. + * + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly tryTimeoutInMs?: number; + /** + * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms). + * The delay increases (exponentially or linearly) with each retry up to a maximum specified by + * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly retryDelayInMs?: number; + /** + * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms). + * If you specify 0, then you must also specify 0 for retryDelayInMs. + * + * @type {number} + * @memberof StorageRetryOptions + */ + readonly maxRetryDelayInMs?: number; + /** + * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined + * (the default) then operations are not retried against another host. + * + * NOTE: Before setting this field, make sure you understand the issues around + * reading stale and potentially-inconsistent data at + * {@link https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs} + * + * @type {string} + * @memberof StorageRetryOptions + */ + readonly secondaryHost?: string; +} + +/** + * Retry policy with exponential retry and linear retry implemented. + * + * @class RetryPolicy + * @extends {BaseRequestPolicy} + */ +export declare class StorageRetryPolicy extends BaseRequestPolicy { + /** + * RetryOptions. + * + * @private + * @type {StorageRetryOptions} + * @memberof StorageRetryPolicy + */ + private readonly retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageRetryOptions} [retryOptions=DEFAULT_RETRY_OPTIONS] + * @memberof StorageRetryPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, retryOptions?: StorageRetryOptions); + /** + * Sends request. + * + * @param {WebResource} request + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + sendRequest(request: WebResource): Promise; + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @protected + * @param {WebResource} request + * @param {boolean} secondaryHas404 If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param {number} attempt How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + * @returns {Promise} + * @memberof StorageRetryPolicy + */ + protected attemptSendRequest(request: WebResource, secondaryHas404: boolean, attempt: number): Promise; + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @protected + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {HttpOperationResponse} [response] + * @param {RestError} [err] + * @returns {boolean} + * @memberof StorageRetryPolicy + */ + protected shouldRetry(isPrimaryRetry: boolean, attempt: number, response?: HttpOperationResponse, err?: RestError): boolean; + /** + * Delay a calculated time between retries. + * + * @private + * @param {boolean} isPrimaryRetry + * @param {number} attempt + * @param {AbortSignalLike} [abortSignal] + * @memberof StorageRetryPolicy + */ + private delay; +} + +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + * + * @export + * @class StorageRetryPolicyFactory + * @implements {RequestPolicyFactory} + */ +export declare class StorageRetryPolicyFactory implements RequestPolicyFactory { + private retryOptions?; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param {StorageRetryOptions} [retryOptions] + * @memberof StorageRetryPolicyFactory + */ + constructor(retryOptions?: StorageRetryOptions); + /** + * Creates a StorageRetryPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageRetryPolicy} + * @memberof StorageRetryPolicyFactory + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy; +} + +/** + * RetryPolicy types. + * + * @export + * @enum {number} + */ +export declare enum StorageRetryPolicyType { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + EXPONENTIAL = 0, + /** + * Linear retry. Retry time delay grows linearly. + */ + FIXED = 1 +} + +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + * + * @export + * @class StorageSharedKeyCredential + * @extends {Credential} + */ +export declare class StorageSharedKeyCredential extends Credential { + /** + * Azure Storage account name; readonly. + * + * @type {string} + * @memberof StorageSharedKeyCredential + */ + readonly accountName: string; + /** + * Azure Storage account key; readonly. + * + * @type {Buffer} + * @memberof StorageSharedKeyCredential + */ + private readonly accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param {string} accountName + * @param {string} accountKey + * @memberof StorageSharedKeyCredential + */ + constructor(accountName: string, accountKey: string); + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @returns {StorageSharedKeyCredentialPolicy} + * @memberof StorageSharedKeyCredential + */ + create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageSharedKeyCredentialPolicy; + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param {string} stringToSign + * @returns {string} + * @memberof StorageSharedKeyCredential + */ + computeHMACSHA256(stringToSign: string): string; +} + +/** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + * + * @export + * @class StorageSharedKeyCredentialPolicy + * @extends {CredentialPolicy} + */ +export declare class StorageSharedKeyCredentialPolicy extends CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + * + * @type {StorageSharedKeyCredential} + * @memberof StorageSharedKeyCredentialPolicy + */ + private readonly factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param {RequestPolicy} nextPolicy + * @param {RequestPolicyOptions} options + * @param {StorageSharedKeyCredential} factory + * @memberof StorageSharedKeyCredentialPolicy + */ + constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, factory: StorageSharedKeyCredential); + /** + * Signs request. + * + * @protected + * @param {WebResource} request + * @returns {WebResource} + * @memberof StorageSharedKeyCredentialPolicy + */ + protected signRequest(request: WebResource): WebResource; + /** + * Retrieve header value according to shared key sign rules. + * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @private + * @param {WebResource} request + * @param {string} headerName + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getHeaderValueToSign; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getCanonicalizedHeadersString; + /** + * Retrieves the webResource canonicalized resource string. + * + * @private + * @param {WebResource} request + * @returns {string} + * @memberof StorageSharedKeyCredentialPolicy + */ + private getCanonicalizedResourceString; +} + +/** + * Defines values for SyncCopyStatusType. + * Possible values include: 'success' + * @readonly + * @enum {string} + */ +export declare type SyncCopyStatusType = 'success'; + +/** + * Specifies HTTP options for conditional requests based on blob tags. + */ +export declare interface TagConditions { + /** + * Optional SQL statement to apply to the tags of the blob. + */ + tagConditions?: string; +} + +/** + * Blob tags. + */ +export declare type Tags = Record; + +/** + * A user delegation key. + */ +export declare interface UserDelegationKey { + /** + * The Azure Active Directory object ID in GUID format. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedObjectId: string; + /** + * The Azure Active Directory tenant ID in GUID format. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedTenantId: string; + /** + * The date-time the key is active. + * + * @type {Date} + * @memberof UserDelegationKey + */ + signedStartsOn: Date; + /** + * The date-time the key expires. + * + * @type {Date} + * @memberof UserDelegationKey + */ + signedExpiresOn: Date; + /** + * Abbreviation of the Azure Storage service that accepts the key. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedService: string; + /** + * The service version that created the key. + * + * @type {string} + * @memberof UserDelegationKey + */ + signedVersion: string; + /** + * The key as a base64 string. + * + * @type {string} + * @memberof UserDelegationKey + */ + value: string; +} + +/** + * A user delegation key + */ +export declare interface UserDelegationKeyModel { + /** + * The Azure Active Directory object ID in GUID format. + */ + signedObjectId: string; + /** + * The Azure Active Directory tenant ID in GUID format + */ + signedTenantId: string; + /** + * The date-time the key is active + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + signedStartsOn: string; + /** + * The date-time the key expires + * **NOTE: This entity will be treated as a string instead of a Date because the API can + * potentially deal with a higher precision value than what is supported by JavaScript.** + */ + signedExpiresOn: string; + /** + * Abbreviation of the Azure Storage service that accepts the key + */ + signedService: string; + /** + * The service version that created the key + */ + signedVersion: string; + /** + * The key as a base64 string + */ + value: string; +} +export { WebResource } + +export { } diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json index ce0bf0f62..edc5bb14c 100644 --- a/node_modules/@babel/code-frame/package.json +++ b/node_modules/@babel/code-frame/package.json @@ -1,21 +1,58 @@ { - "name": "@babel/code-frame", - "version": "7.5.5", - "description": "Generate errors that contain a code frame that point to source locations.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "publishConfig": { - "access": "public" + "_args": [ + [ + "@babel/code-frame@7.5.5", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@babel/code-frame@7.5.5", + "_id": "@babel/code-frame@7.5.5", + "_inBundle": false, + "_integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "_location": "/@babel/code-frame", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@babel/code-frame@7.5.5", + "name": "@babel/code-frame", + "escapedName": "@babel%2fcode-frame", + "scope": "@babel", + "rawSpec": "7.5.5", + "saveSpec": null, + "fetchSpec": "7.5.5" + }, + "_requiredBy": [ + "/eslint", + "/read-pkg/parse-json" + ], + "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "_spec": "7.5.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" }, - "repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame", - "main": "lib/index.js", "dependencies": { "@babel/highlight": "^7.0.0" }, + "description": "Generate errors that contain a code frame that point to source locations.", "devDependencies": { "chalk": "^2.0.0", "strip-ansi": "^4.0.0" }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43" -} \ No newline at end of file + "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/code-frame", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" + }, + "version": "7.5.5" +} diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json index c958a9e8d..48ac869d0 100644 --- a/node_modules/@babel/highlight/package.json +++ b/node_modules/@babel/highlight/package.json @@ -1,22 +1,58 @@ { - "name": "@babel/highlight", - "version": "7.5.0", - "description": "Syntax highlight JavaScript strings for output in terminals.", - "author": "suchipi ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "publishConfig": { - "access": "public" + "_args": [ + [ + "@babel/highlight@7.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@babel/highlight@7.5.0", + "_id": "@babel/highlight@7.5.0", + "_inBundle": false, + "_integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "_location": "/@babel/highlight", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@babel/highlight@7.5.0", + "name": "@babel/highlight", + "escapedName": "@babel%2fhighlight", + "scope": "@babel", + "rawSpec": "7.5.0", + "saveSpec": null, + "fetchSpec": "7.5.0" + }, + "_requiredBy": [ + "/@babel/code-frame" + ], + "_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "_spec": "7.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "suchipi", + "email": "me@suchipi.com" }, - "repository": "https://github.com/babel/babel/tree/master/packages/babel-highlight", - "main": "lib/index.js", "dependencies": { "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" }, + "description": "Syntax highlight JavaScript strings for output in terminals.", "devDependencies": { "strip-ansi": "^4.0.0" }, - "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4" -} \ No newline at end of file + "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/highlight", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" + }, + "version": "7.5.0" +} diff --git a/node_modules/@chrisgavin/safe-which/package.json b/node_modules/@chrisgavin/safe-which/package.json index c1cb30621..dd9987f2c 100644 --- a/node_modules/@chrisgavin/safe-which/package.json +++ b/node_modules/@chrisgavin/safe-which/package.json @@ -1,32 +1,61 @@ { - "name": "@chrisgavin/safe-which", - "version": "1.0.2", - "description": "A NodeJS library to guard against Windows binary planting attacks.", - "license": "MIT", - "homepage": "https://github.com/chrisgavin/safe-which/", - "publishConfig": { - "access": "public" - }, - "main": "./build/index.js", - "types": "./build/index.d.ts", - "scripts": { - "build": "tsc", - "pretest": "npm install && npm run build", - "test": "ava --verbose --serial ./src/**", - "prepublishOnly": "npm install && npm run build && npm version --allow-same-version=true --git-tag-version=false ${GITHUB_REF#refs/tags/}" - }, - "dependencies": {}, - "devDependencies": { - "@ava/typescript": "^1.1.1", - "@types/node": "^14.14.7", - "ava": "^3.13.0", - "typescript": "^3.8.3" + "_args": [ + [ + "@chrisgavin/safe-which@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "@chrisgavin/safe-which@1.0.2", + "_id": "@chrisgavin/safe-which@1.0.2", + "_inBundle": false, + "_integrity": "sha512-xImXYK6iJvLEDMevGCs5s05iKoFn3ARFShBswRFeWeHp6P1Z0jlYmKcK5+M2TtDoWuz45ay1unmNvV/8t66F2g==", + "_location": "/@chrisgavin/safe-which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@chrisgavin/safe-which@1.0.2", + "name": "@chrisgavin/safe-which", + "escapedName": "@chrisgavin%2fsafe-which", + "scope": "@chrisgavin", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@chrisgavin/safe-which/-/safe-which-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "ava": { "typescript": { "rewritePaths": { "./src/": "./build/" } } - } -} \ No newline at end of file + }, + "dependencies": {}, + "description": "A NodeJS library to guard against Windows binary planting attacks.", + "devDependencies": { + "@ava/typescript": "^1.1.1", + "@types/node": "^14.14.7", + "ava": "^3.13.0", + "typescript": "^3.8.3" + }, + "homepage": "https://github.com/chrisgavin/safe-which/", + "license": "MIT", + "main": "./build/index.js", + "name": "@chrisgavin/safe-which", + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "tsc", + "prepublishOnly": "npm install && npm run build && npm version --allow-same-version=true --git-tag-version=false ${GITHUB_REF#refs/tags/}", + "pretest": "npm install && npm run build", + "test": "ava --verbose --serial ./src/**" + }, + "types": "./build/index.d.ts", + "version": "1.0.2" +} diff --git a/node_modules/@concordance/react/node_modules/arrify/package.json b/node_modules/@concordance/react/node_modules/arrify/package.json index d60245659..44dd3ce4c 100644 --- a/node_modules/@concordance/react/node_modules/arrify/package.json +++ b/node_modules/@concordance/react/node_modules/arrify/package.json @@ -1,23 +1,53 @@ { - "name": "arrify", - "version": "1.0.1", - "description": "Convert a value to an array", - "license": "MIT", - "repository": "sindresorhus/arrify", + "_args": [ + [ + "arrify@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "arrify@1.0.1", + "_id": "arrify@1.0.1", + "_inBundle": false, + "_integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "_location": "/@concordance/react/arrify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "arrify@1.0.1", + "name": "arrify", + "escapedName": "arrify", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/@concordance/react" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/arrify#readme", "keywords": [ "array", "arr", @@ -26,8 +56,14 @@ "convert", "value" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "arrify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/@concordance/react/package.json b/node_modules/@concordance/react/package.json index f0ba9b96c..61e409fce 100644 --- a/node_modules/@concordance/react/package.json +++ b/node_modules/@concordance/react/package.json @@ -1,39 +1,63 @@ { - "name": "@concordance/react", - "version": "2.0.0", - "description": "Compare, format, diff and serialize React trees with Concordance", - "main": "index.js", - "files": [ - "lib", - "index.js" + "_args": [ + [ + "@concordance/react@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" + "_development": true, + "_from": "@concordance/react@2.0.0", + "_id": "@concordance/react@2.0.0", + "_inBundle": false, + "_integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==", + "_location": "/@concordance/react", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@concordance/react@2.0.0", + "name": "@concordance/react", + "escapedName": "@concordance%2freact", + "scope": "@concordance", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" }, - "scripts": { - "build:fixtures": "babel --presets=module:@babel/preset-react,module:ava/stage-4 --out-dir=test/fixtures/react --extensions=.jsx test/fixtures/react", - "lint": "as-i-preach", - "pretest": "npm run -s build:fixtures", - "test": "npm run -s lint && nyc ava" + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "as-i-preach": { + "allowDevDependencies": [ + "test/**/*.js", + "test/**/*.jsx" + ], + "ignore": [ + "test/fixtures/react/*.js" + ] }, - "repository": { - "type": "git", - "url": "git+https://github.com/concordancejs/react.git" + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net/" + }, + "ava": { + "babel": { + "testOptions": { + "presets": [ + "module:@babel/preset-react" + ] + } + } }, - "author": "Mark Wubben (https://novemberborn.net/)", - "license": "ISC", "bugs": { "url": "https://github.com/concordancejs/react/issues" }, - "homepage": "https://github.com/concordancejs/react#readme", - "keywords": [ - "concordance-plugin", - "concordance", - "react" - ], "dependencies": { "arrify": "^1.0.1" }, + "description": "Compare, format, diff and serialize React trees with Concordance", "devDependencies": { "@babel/cli": "^7.1.0", "@babel/core": "^7.1.0", @@ -46,24 +70,22 @@ "react": "^16.5.2", "react-test-renderer": "^16.5.2" }, - "as-i-preach": { - "allowDevDependencies": [ - "test/**/*.js", - "test/**/*.jsx" - ], - "ignore": [ - "test/fixtures/react/*.js" - ] - }, - "ava": { - "babel": { - "testOptions": { - "presets": [ - "module:@babel/preset-react" - ] - } - } + "engines": { + "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" }, + "files": [ + "lib", + "index.js" + ], + "homepage": "https://github.com/concordancejs/react#readme", + "keywords": [ + "concordance-plugin", + "concordance", + "react" + ], + "license": "ISC", + "main": "index.js", + "name": "@concordance/react", "nyc": { "reporter": [ "html", @@ -71,5 +93,16 @@ "text" ] }, - "standard-engine": "@novemberborn/as-i-preach" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/concordancejs/react.git" + }, + "scripts": { + "build:fixtures": "babel --presets=module:@babel/preset-react,module:ava/stage-4 --out-dir=test/fixtures/react --extensions=.jsx test/fixtures/react", + "lint": "as-i-preach", + "pretest": "npm run -s build:fixtures", + "test": "npm run -s lint && nyc ava" + }, + "standard-engine": "@novemberborn/as-i-preach", + "version": "2.0.0" +} diff --git a/node_modules/@eslint/eslintrc/node_modules/ignore/package.json b/node_modules/@eslint/eslintrc/node_modules/ignore/package.json index 873bff3ed..b86b1ef9d 100644 --- a/node_modules/@eslint/eslintrc/node_modules/ignore/package.json +++ b/node_modules/@eslint/eslintrc/node_modules/ignore/package.json @@ -1,48 +1,40 @@ { - "name": "ignore", - "version": "4.0.6", - "description": "Ignore is a manager and filter for .gitignore rules.", - "files": [ - "legacy.js", - "index.js", - "index.d.ts", - "LICENSE-MIT" + "_args": [ + [ + "ignore@4.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepublish": "npm run build", - "build": "babel -o legacy.js index.js", - "test:lint": "eslint .", - "test:tsc": "tsc ./test/ts/simple.ts", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js --coverage", - "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", - "test": "npm run test-no-cov", - "posttest": "tap --coverage-report=html && codecov" + "_development": true, + "_from": "ignore@4.0.6", + "_id": "ignore@4.0.6", + "_inBundle": false, + "_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "_location": "/@eslint/eslintrc/ignore", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ignore@4.0.6", + "name": "ignore", + "escapedName": "ignore", + "rawSpec": "4.0.6", + "saveSpec": null, + "fetchSpec": "4.0.6" }, - "repository": { - "type": "git", - "url": "git@github.com:kaelzhang/node-ignore.git" - }, - "keywords": [ - "ignore", - ".gitignore", - "gitignore", - "npmignore", - "rules", - "manager", - "filter", - "regexp", - "regex", - "fnmatch", - "glob", - "asterisks", - "regular-expression" + "_requiredBy": [ + "/@eslint/eslintrc" ], - "author": "kael", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "_spec": "4.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "kael" + }, "bugs": { "url": "https://github.com/kaelzhang/node-ignore/issues" }, + "description": "Ignore is a manager and filter for .gitignore rules.", "devDependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.7.0", @@ -60,5 +52,45 @@ }, "engines": { "node": ">= 4" - } -} \ No newline at end of file + }, + "files": [ + "legacy.js", + "index.js", + "index.d.ts", + "LICENSE-MIT" + ], + "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "keywords": [ + "ignore", + ".gitignore", + "gitignore", + "npmignore", + "rules", + "manager", + "filter", + "regexp", + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" + ], + "license": "MIT", + "name": "ignore", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" + }, + "scripts": { + "build": "babel -o legacy.js index.js", + "posttest": "tap --coverage-report=html && codecov", + "prepublish": "npm run build", + "test": "npm run test-no-cov", + "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", + "test:git": "tap test/git-check-ignore.js", + "test:ignore": "tap test/ignore.js --coverage", + "test:lint": "eslint .", + "test:tsc": "tsc ./test/ts/simple.ts" + }, + "version": "4.0.6" +} diff --git a/node_modules/@eslint/eslintrc/node_modules/strip-json-comments/package.json b/node_modules/@eslint/eslintrc/node_modules/strip-json-comments/package.json index ea6331861..63518e5b9 100644 --- a/node_modules/@eslint/eslintrc/node_modules/strip-json-comments/package.json +++ b/node_modules/@eslint/eslintrc/node_modules/strip-json-comments/package.json @@ -1,26 +1,57 @@ { - "name": "strip-json-comments", - "version": "3.1.1", - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "license": "MIT", - "repository": "sindresorhus/strip-json-comments", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "strip-json-comments@3.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "strip-json-comments@3.1.1", + "_id": "strip-json-comments@3.1.1", + "_inBundle": false, + "_integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "_location": "/@eslint/eslintrc/strip-json-comments", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-json-comments@3.1.1", + "name": "strip-json-comments", + "escapedName": "strip-json-comments", + "rawSpec": "3.1.1", + "saveSpec": null, + "fetchSpec": "3.1.1" + }, + "_requiredBy": [ + "/@eslint/eslintrc" + ], + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "_spec": "3.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" + }, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "devDependencies": { + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", "keywords": [ "json", "strip", @@ -38,10 +69,15 @@ "environment", "jsonc" ], - "devDependencies": { - "ava": "^1.4.1", - "matcha": "^0.7.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "strip-json-comments", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && ava && tsd" + }, + "version": "3.1.1" +} diff --git a/node_modules/@eslint/eslintrc/package.json b/node_modules/@eslint/eslintrc/package.json index 71830c09a..e1b612e02 100644 --- a/node_modules/@eslint/eslintrc/package.json +++ b/node_modules/@eslint/eslintrc/package.json @@ -1,46 +1,40 @@ { - "name": "@eslint/eslintrc", - "version": "0.1.3", - "description": "The legacy ESLintRC config file format for ESLint", - "main": "lib/index.js", - "files": [ - "lib", - "conf", - "LICENSE" + "_args": [ + [ + "@eslint/eslintrc@0.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "publishConfig": { - "access": "public" + "_development": true, + "_from": "@eslint/eslintrc@0.1.3", + "_id": "@eslint/eslintrc@0.1.3", + "_inBundle": false, + "_integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "_location": "/@eslint/eslintrc", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@eslint/eslintrc@0.1.3", + "name": "@eslint/eslintrc", + "escapedName": "@eslint%2feslintrc", + "scope": "@eslint", + "rawSpec": "0.1.3", + "saveSpec": null, + "fetchSpec": "0.1.3" }, - "scripts": { - "lint": "eslint .", - "test": "mocha tests/lib/shared", - "generate-release": "eslint-generate-release", - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" - }, - "repository": "eslint/eslintrc", - "keywords": [ - "ESLint", - "ESLintRC", - "Configuration" + "_requiredBy": [ + "/eslint" ], - "author": "Nicholas C. Zakas", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "_spec": "0.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Nicholas C. Zakas" + }, "bugs": { "url": "https://github.com/eslint/eslintrc/issues" }, - "homepage": "https://github.com/eslint/eslintrc#readme", - "devDependencies": { - "chai": "^4.2.0", - "eslint": "^7.7.0", - "eslint-config-eslint": "^6.0.0", - "eslint-plugin-jsdoc": "^22.1.0", - "eslint-plugin-node": "^11.1.0", - "eslint-release": "^3.1.2", - "mocha": "^8.1.1" - }, "dependencies": { "ajv": "^6.12.4", "debug": "^4.1.1", @@ -53,7 +47,48 @@ "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, + "description": "The legacy ESLintRC config file format for ESLint", + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^7.7.0", + "eslint-config-eslint": "^6.0.0", + "eslint-plugin-jsdoc": "^22.1.0", + "eslint-plugin-node": "^11.1.0", + "eslint-release": "^3.1.2", + "mocha": "^8.1.1" + }, "engines": { "node": "^10.12.0 || >=12.0.0" - } -} \ No newline at end of file + }, + "files": [ + "lib", + "conf", + "LICENSE" + ], + "homepage": "https://github.com/eslint/eslintrc#readme", + "keywords": [ + "ESLint", + "ESLintRC", + "Configuration" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "@eslint/eslintrc", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslintrc.git" + }, + "scripts": { + "generate-alpharelease": "eslint-generate-prerelease alpha", + "generate-betarelease": "eslint-generate-prerelease beta", + "generate-rcrelease": "eslint-generate-prerelease rc", + "generate-release": "eslint-generate-release", + "lint": "eslint .", + "publish-release": "eslint-publish-release", + "test": "mocha tests/lib/shared" + }, + "version": "0.1.3" +} diff --git a/node_modules/@nodelib/fs.scandir/package.json b/node_modules/@nodelib/fs.scandir/package.json index 5a32a9fea..8f26b8fa5 100644 --- a/node_modules/@nodelib/fs.scandir/package.json +++ b/node_modules/@nodelib/fs.scandir/package.json @@ -1,9 +1,43 @@ { - "name": "@nodelib/fs.scandir", - "version": "2.1.3", + "_args": [ + [ + "@nodelib/fs.scandir@2.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@nodelib/fs.scandir@2.1.3", + "_id": "@nodelib/fs.scandir@2.1.3", + "_inBundle": false, + "_integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "_location": "/@nodelib/fs.scandir", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@nodelib/fs.scandir@2.1.3", + "name": "@nodelib/fs.scandir", + "escapedName": "@nodelib%2ffs.scandir", + "scope": "@nodelib", + "rawSpec": "2.1.3", + "saveSpec": null, + "fetchSpec": "2.1.3" + }, + "_requiredBy": [ + "/@nodelib/fs.walk" + ], + "_resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "_spec": "2.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "dependencies": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + }, "description": "List files and directories inside the specified directory", - "license": "MIT", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", + "engines": { + "node": ">= 8" + }, + "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf", "keywords": [ "NodeLib", "fs", @@ -13,23 +47,22 @@ "readdir", "dirent" ], - "engines": { - "node": ">= 8" - }, + "license": "MIT", "main": "out/index.js", - "typings": "out/index.d.ts", + "name": "@nodelib/fs.scandir", + "repository": { + "type": "git", + "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir" + }, "scripts": { + "build": "npm run clean && npm run compile && npm run lint && npm test", "clean": "rimraf {tsconfig.tsbuildinfo,out}", - "lint": "eslint \"src/**/*.ts\" --cache", "compile": "tsc -b .", "compile:watch": "tsc -p . --watch --sourceMap", + "lint": "eslint \"src/**/*.ts\" --cache", "test": "mocha \"out/**/*.spec.js\" -s 0", - "build": "npm run clean && npm run compile && npm run lint && npm test", "watch": "npm run clean && npm run compile:watch" }, - "dependencies": { - "@nodelib/fs.stat": "2.0.3", - "run-parallel": "^1.1.9" - }, - "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf" -} \ No newline at end of file + "typings": "out/index.d.ts", + "version": "2.1.3" +} diff --git a/node_modules/@nodelib/fs.stat/package.json b/node_modules/@nodelib/fs.stat/package.json index 96a5ebb31..8cd993cd8 100644 --- a/node_modules/@nodelib/fs.stat/package.json +++ b/node_modules/@nodelib/fs.stat/package.json @@ -1,9 +1,40 @@ { - "name": "@nodelib/fs.stat", - "version": "2.0.3", + "_args": [ + [ + "@nodelib/fs.stat@2.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@nodelib/fs.stat@2.0.3", + "_id": "@nodelib/fs.stat@2.0.3", + "_inBundle": false, + "_integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "_location": "/@nodelib/fs.stat", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@nodelib/fs.stat@2.0.3", + "name": "@nodelib/fs.stat", + "escapedName": "@nodelib%2ffs.stat", + "scope": "@nodelib", + "rawSpec": "2.0.3", + "saveSpec": null, + "fetchSpec": "2.0.3" + }, + "_requiredBy": [ + "/@nodelib/fs.scandir", + "/fast-glob" + ], + "_resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "_spec": "2.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "description": "Get the status of a file with some features", - "license": "MIT", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", + "engines": { + "node": ">= 8" + }, + "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf", "keywords": [ "NodeLib", "fs", @@ -11,19 +42,22 @@ "file system", "stat" ], - "engines": { - "node": ">= 8" - }, + "license": "MIT", "main": "out/index.js", - "typings": "out/index.d.ts", + "name": "@nodelib/fs.stat", + "repository": { + "type": "git", + "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat" + }, "scripts": { + "build": "npm run clean && npm run compile && npm run lint && npm test", "clean": "rimraf {tsconfig.tsbuildinfo,out}", - "lint": "eslint \"src/**/*.ts\" --cache", "compile": "tsc -b .", "compile:watch": "tsc -p . --watch --sourceMap", + "lint": "eslint \"src/**/*.ts\" --cache", "test": "mocha \"out/**/*.spec.js\" -s 0", - "build": "npm run clean && npm run compile && npm run lint && npm test", "watch": "npm run clean && npm run compile:watch" }, - "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf" -} \ No newline at end of file + "typings": "out/index.d.ts", + "version": "2.0.3" +} diff --git a/node_modules/@nodelib/fs.walk/package.json b/node_modules/@nodelib/fs.walk/package.json index 9490845bf..e8062012a 100644 --- a/node_modules/@nodelib/fs.walk/package.json +++ b/node_modules/@nodelib/fs.walk/package.json @@ -1,9 +1,43 @@ { - "name": "@nodelib/fs.walk", - "version": "1.2.4", + "_args": [ + [ + "@nodelib/fs.walk@1.2.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@nodelib/fs.walk@1.2.4", + "_id": "@nodelib/fs.walk@1.2.4", + "_inBundle": false, + "_integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "_location": "/@nodelib/fs.walk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@nodelib/fs.walk@1.2.4", + "name": "@nodelib/fs.walk", + "escapedName": "@nodelib%2ffs.walk", + "scope": "@nodelib", + "rawSpec": "1.2.4", + "saveSpec": null, + "fetchSpec": "1.2.4" + }, + "_requiredBy": [ + "/fast-glob" + ], + "_resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "_spec": "1.2.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "dependencies": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + }, "description": "A library for efficiently walking a directory recursively", - "license": "MIT", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", + "engines": { + "node": ">= 8" + }, + "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf", "keywords": [ "NodeLib", "fs", @@ -13,23 +47,22 @@ "scanner", "crawler" ], - "engines": { - "node": ">= 8" - }, + "license": "MIT", "main": "out/index.js", - "typings": "out/index.d.ts", + "name": "@nodelib/fs.walk", + "repository": { + "type": "git", + "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk" + }, "scripts": { + "build": "npm run clean && npm run compile && npm run lint && npm test", "clean": "rimraf {tsconfig.tsbuildinfo,out}", - "lint": "eslint \"src/**/*.ts\" --cache", "compile": "tsc -b .", "compile:watch": "tsc -p . --watch --sourceMap", + "lint": "eslint \"src/**/*.ts\" --cache", "test": "mocha \"out/**/*.spec.js\" -s 0", - "build": "npm run clean && npm run compile && npm run lint && npm test", "watch": "npm run clean && npm run compile:watch" }, - "dependencies": { - "@nodelib/fs.scandir": "2.1.3", - "fastq": "^1.6.0" - }, - "gitHead": "3b1ef7554ad7c061b3580858101d483fba847abf" -} \ No newline at end of file + "typings": "out/index.d.ts", + "version": "1.2.4" +} diff --git a/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/auth-token/package.json index 6d9a77882..1ed8fb096 100644 --- a/node_modules/@octokit/auth-token/package.json +++ b/node_modules/@octokit/auth-token/package.json @@ -1,28 +1,40 @@ { - "name": "@octokit/auth-token", - "description": "GitHub API token authentication for browsers and Node.js", - "version": "2.4.2", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/auth-token@2.4.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "github", - "octokit", - "authentication", - "api" + "_from": "@octokit/auth-token@2.4.2", + "_id": "@octokit/auth-token@2.4.2", + "_inBundle": false, + "_integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", + "_location": "/@octokit/auth-token", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/auth-token@2.4.2", + "name": "@octokit/auth-token", + "escapedName": "@octokit%2fauth-token", + "scope": "@octokit", + "rawSpec": "2.4.2", + "saveSpec": null, + "fetchSpec": "2.4.2" + }, + "_requiredBy": [ + "/@octokit/core" ], - "homepage": "https://github.com/octokit/auth-token.js#readme", + "_resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", + "_spec": "2.4.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/auth-token.js/issues" }, - "repository": "https://github.com/octokit/auth-token.js", "dependencies": { "@octokit/types": "^5.0.0" }, + "description": "GitHub API token authentication for browsers and Node.js", "devDependencies": { "@octokit/core": "^2.2.0", "@octokit/request": "^5.3.0", @@ -38,11 +50,31 @@ "ts-jest": "^25.1.0", "typescript": "^3.7.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/auth-token.js#readme", + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/auth-token", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/auth-token.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "2.4.2" +} diff --git a/node_modules/@octokit/core/package.json b/node_modules/@octokit/core/package.json index a073a2b8f..911557acd 100644 --- a/node_modules/@octokit/core/package.json +++ b/node_modules/@octokit/core/package.json @@ -1,22 +1,36 @@ { - "name": "@octokit/core", - "description": "Extendable client for GitHub's REST & GraphQL APIs", - "version": "3.1.2", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/core@3.1.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "octokit", - "github", - "api", - "sdk", - "toolkit" + "_from": "@octokit/core@3.1.2", + "_id": "@octokit/core@3.1.2", + "_inBundle": false, + "_integrity": "sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw==", + "_location": "/@octokit/core", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/core@3.1.2", + "name": "@octokit/core", + "escapedName": "@octokit%2fcore", + "scope": "@octokit", + "rawSpec": "3.1.2", + "saveSpec": null, + "fetchSpec": "3.1.2" + }, + "_requiredBy": [ + "/@actions/github" ], - "repository": "https://github.com/octokit/core.js", + "_resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.1.2.tgz", + "_spec": "3.1.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/octokit/core.js/issues" + }, "dependencies": { "@octokit/auth-token": "^2.4.0", "@octokit/graphql": "^4.3.1", @@ -25,6 +39,7 @@ "before-after-hook": "^2.1.0", "universal-user-agent": "^6.0.0" }, + "description": "Extendable client for GitHub's REST & GraphQL APIs", "devDependencies": { "@octokit/auth": "^2.0.0", "@pika/pack": "^0.5.0", @@ -47,11 +62,32 @@ "ts-jest": "^26.1.3", "typescript": "^3.5.3" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/core.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "sdk", + "toolkit" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/core", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/core.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "3.1.2" +} diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json index dd823ea9b..c04d9ff98 100644 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json @@ -1,45 +1,61 @@ { - "name": "is-plain-object", - "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", - "version": "5.0.0", - "homepage": "https://github.com/jonschlinkert/is-plain-object", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Osman Nuri Okumuş (http://onokumus.com)", - "Steven Vachon (https://svachon.com)", - "(https://github.com/wtgtybhertgeghgtwtg)", - "Bogdan Chadkin (https://github.com/TrySound)" + "_args": [ + [ + "is-plain-object@5.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/is-plain-object", + "_from": "is-plain-object@5.0.0", + "_id": "is-plain-object@5.0.0", + "_inBundle": false, + "_integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "_location": "/@octokit/endpoint/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@5.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/is-plain-object/issues" }, - "license": "MIT", - "main": "dist/is-plain-object.js", - "module": "dist/is-plain-object.mjs", - "types": "is-plain-object.d.ts", - "files": [ - "is-plain-object.d.ts", - "dist" - ], - "exports": { - ".": { - "import": "./dist/is-plain-object.mjs", - "require": "./dist/is-plain-object.js" + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" }, - "./package.json": "./package.json" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "build": "rollup -c", - "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", - "test_node": "mocha -r esm", - "test": "npm run test_node && npm run build && npm run test_browser", - "prepare": "rollup -c" - }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + }, + { + "name": "Bogdan Chadkin", + "url": "https://github.com/TrySound" + } + ], + "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", "devDependencies": { "chai": "^4.2.0", "esm": "^3.2.22", @@ -48,6 +64,21 @@ "mocha-headless-chrome": "^3.1.0", "rollup": "^2.22.1" }, + "engines": { + "node": ">=0.10.0" + }, + "exports": { + ".": { + "import": "./dist/is-plain-object.mjs", + "require": "./dist/is-plain-object.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "is-plain-object.d.ts", + "dist" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", "keywords": [ "check", "is", @@ -62,6 +93,22 @@ "typeof", "value" ], + "license": "MIT", + "main": "dist/is-plain-object.js", + "module": "dist/is-plain-object.mjs", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "is-plain-object.d.ts", "verb": { "toc": false, "layout": "default", @@ -81,5 +128,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "5.0.0" +} diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json index 141e0b925..969300809 100644 --- a/node_modules/@octokit/endpoint/package.json +++ b/node_modules/@octokit/endpoint/package.json @@ -1,33 +1,42 @@ { - "name": "@octokit/endpoint", - "description": "Turns REST API endpoints into generic request options", - "version": "6.0.6", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/endpoint@6.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "octokit", - "github", - "api", - "rest" + "_from": "@octokit/endpoint@6.0.6", + "_id": "@octokit/endpoint@6.0.6", + "_inBundle": false, + "_integrity": "sha512-7Cc8olaCoL/mtquB7j/HTbPM+sY6Ebr4k2X2y4JoXpVKQ7r5xB4iGQE0IoO58wIPsUk4AzoT65AMEpymSbWTgQ==", + "_location": "/@octokit/endpoint", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/endpoint@6.0.6", + "name": "@octokit/endpoint", + "escapedName": "@octokit%2fendpoint", + "scope": "@octokit", + "rawSpec": "6.0.6", + "saveSpec": null, + "fetchSpec": "6.0.6" + }, + "_requiredBy": [ + "/@octokit/request" ], - "homepage": "https://github.com/octokit/endpoint.js#readme", + "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.6.tgz", + "_spec": "6.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/endpoint.js/issues" }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/endpoint.js.git" - }, "dependencies": { "@octokit/types": "^5.0.0", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" }, + "description": "Turns REST API endpoints into generic request options", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", @@ -41,11 +50,31 @@ "ts-jest": "^26.0.0", "typescript": "^4.0.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/endpoint.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/endpoint", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/endpoint.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "6.0.6" +} diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json index b694ee354..3bd5b7084 100644 --- a/node_modules/@octokit/graphql/package.json +++ b/node_modules/@octokit/graphql/package.json @@ -1,33 +1,42 @@ { - "name": "@octokit/graphql", - "description": "GitHub GraphQL API client for browsers and Node", - "version": "4.5.6", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/graphql@4.5.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "octokit", - "github", - "api", - "graphql" + "_from": "@octokit/graphql@4.5.6", + "_id": "@octokit/graphql@4.5.6", + "_inBundle": false, + "_integrity": "sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg==", + "_location": "/@octokit/graphql", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/graphql@4.5.6", + "name": "@octokit/graphql", + "escapedName": "@octokit%2fgraphql", + "scope": "@octokit", + "rawSpec": "4.5.6", + "saveSpec": null, + "fetchSpec": "4.5.6" + }, + "_requiredBy": [ + "/@octokit/core" ], - "homepage": "https://github.com/octokit/graphql.js#readme", + "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.6.tgz", + "_spec": "4.5.6", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/graphql.js/issues" }, - "repository": { - "type": "git", - "url": "https://github.com/octokit/graphql.js.git" - }, "dependencies": { "@octokit/request": "^5.3.0", "@octokit/types": "^5.0.0", "universal-user-agent": "^6.0.0" }, + "description": "GitHub GraphQL API client for browsers and Node", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", @@ -44,11 +53,31 @@ "ts-jest": "^25.1.0", "typescript": "^3.4.5" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/graphql.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/graphql", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/graphql.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "4.5.6" +} diff --git a/node_modules/@octokit/plugin-paginate-rest/package.json b/node_modules/@octokit/plugin-paginate-rest/package.json index 4509b30f1..e6d1d2a1d 100644 --- a/node_modules/@octokit/plugin-paginate-rest/package.json +++ b/node_modules/@octokit/plugin-paginate-rest/package.json @@ -1,27 +1,40 @@ { - "name": "@octokit/plugin-paginate-rest", - "description": "Octokit plugin to paginate REST API endpoint responses", - "version": "2.4.0", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/plugin-paginate-rest@2.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "github", - "api", - "sdk", - "toolkit" + "_from": "@octokit/plugin-paginate-rest@2.4.0", + "_id": "@octokit/plugin-paginate-rest@2.4.0", + "_inBundle": false, + "_integrity": "sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg==", + "_location": "/@octokit/plugin-paginate-rest", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/plugin-paginate-rest@2.4.0", + "name": "@octokit/plugin-paginate-rest", + "escapedName": "@octokit%2fplugin-paginate-rest", + "scope": "@octokit", + "rawSpec": "2.4.0", + "saveSpec": null, + "fetchSpec": "2.4.0" + }, + "_requiredBy": [ + "/@actions/github" ], - "repository": "https://github.com/octokit/plugin-paginate-rest.js", + "_resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz", + "_spec": "2.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/octokit/plugin-paginate-rest.js/issues" + }, "dependencies": { "@octokit/types": "^5.5.0" }, - "peerDependencies": { - "@octokit/core": ">=2" - }, + "description": "Octokit plugin to paginate REST API endpoint responses", "devDependencies": { "@octokit/core": "^3.0.0", "@octokit/plugin-rest-endpoint-methods": "^4.0.0", @@ -41,11 +54,34 @@ "ts-jest": "^26.0.0", "typescript": "^4.0.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/plugin-paginate-rest.js#readme", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/plugin-paginate-rest", + "peerDependencies": { + "@octokit/core": ">=2" + }, + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/plugin-paginate-rest.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "2.4.0" +} diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/package.json b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json index c18037861..a6524df60 100644 --- a/node_modules/@octokit/plugin-rest-endpoint-methods/package.json +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json @@ -1,25 +1,41 @@ { - "name": "@octokit/plugin-rest-endpoint-methods", - "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", - "version": "4.2.0", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/plugin-rest-endpoint-methods@4.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "github", - "api", - "sdk", - "toolkit" + "_from": "@octokit/plugin-rest-endpoint-methods@4.2.0", + "_id": "@octokit/plugin-rest-endpoint-methods@4.2.0", + "_inBundle": false, + "_integrity": "sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==", + "_location": "/@octokit/plugin-rest-endpoint-methods", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/plugin-rest-endpoint-methods@4.2.0", + "name": "@octokit/plugin-rest-endpoint-methods", + "escapedName": "@octokit%2fplugin-rest-endpoint-methods", + "scope": "@octokit", + "rawSpec": "4.2.0", + "saveSpec": null, + "fetchSpec": "4.2.0" + }, + "_requiredBy": [ + "/@actions/github" ], - "repository": "https://github.com/octokit/plugin-rest-endpoint-methods.js", + "_resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz", + "_spec": "4.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/octokit/plugin-rest-endpoint-methods.js/issues" + }, "dependencies": { "@octokit/types": "^5.5.0", "deprecation": "^2.3.1" }, + "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", "devDependencies": { "@gimenete/type-writer": "^0.1.5", "@octokit/core": "^3.0.0", @@ -47,11 +63,31 @@ "ts-jest": "^26.1.3", "typescript": "^4.0.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/plugin-rest-endpoint-methods.js#readme", + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/plugin-rest-endpoint-methods", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/plugin-rest-endpoint-methods.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "4.2.0" +} diff --git a/node_modules/@octokit/plugin-retry/package.json b/node_modules/@octokit/plugin-retry/package.json index 8915a50df..1f7e3e6ba 100644 --- a/node_modules/@octokit/plugin-retry/package.json +++ b/node_modules/@octokit/plugin-retry/package.json @@ -1,26 +1,41 @@ { - "name": "@octokit/plugin-retry", - "description": "Automatic retry plugin for octokit", - "version": "3.0.3", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/plugin-retry@3.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "homepage": "https://github.com/octokit/plugin-retry.js#readme", + "_from": "@octokit/plugin-retry@3.0.3", + "_id": "@octokit/plugin-retry@3.0.3", + "_inBundle": false, + "_integrity": "sha512-RFvcBg4JGyfWTWE35EIF7jf/eglIk5MuvfygzdIMLIVK3/4Ywz3X1x9Ri75nlyAmk53EpVWB4DwM/xEB1NXxXA==", + "_location": "/@octokit/plugin-retry", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/plugin-retry@3.0.3", + "name": "@octokit/plugin-retry", + "escapedName": "@octokit%2fplugin-retry", + "scope": "@octokit", + "rawSpec": "3.0.3", + "saveSpec": null, + "fetchSpec": "3.0.3" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.3.tgz", + "_spec": "3.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/plugin-retry.js/issues" }, - "repository": { - "type": "git", - "url": "https://github.com/octokit/plugin-retry.js.git" - }, "dependencies": { "@octokit/types": "^5.0.0", "bottleneck": "^2.15.3" }, + "description": "Automatic retry plugin for octokit", "devDependencies": { "@octokit/core": "^2.0.0", "@octokit/request-error": "^2.0.0", @@ -39,11 +54,25 @@ "ts-jest": "^26.0.0", "typescript": "^3.7.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/plugin-retry.js#readme", + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/plugin-retry", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/plugin-retry.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "3.0.3" +} diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json index c078ba7b0..a0ea50ab1 100644 --- a/node_modules/@octokit/request-error/package.json +++ b/node_modules/@octokit/request-error/package.json @@ -1,33 +1,42 @@ { - "name": "@octokit/request-error", - "description": "Error class for Octokit request errors", - "version": "2.0.2", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/request-error@2.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "octokit", - "github", - "api", - "error" + "_from": "@octokit/request-error@2.0.2", + "_id": "@octokit/request-error@2.0.2", + "_inBundle": false, + "_integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", + "_location": "/@octokit/request-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request-error@2.0.2", + "name": "@octokit/request-error", + "escapedName": "@octokit%2frequest-error", + "scope": "@octokit", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/@octokit/request" ], - "homepage": "https://github.com/octokit/request-error.js#readme", + "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/request-error.js/issues" }, - "repository": { - "type": "git", - "url": "https://github.com/octokit/request-error.js.git" - }, "dependencies": { "@octokit/types": "^5.0.1", "deprecation": "^2.0.0", "once": "^1.4.0" }, + "description": "Error class for Octokit request errors", "devDependencies": { "@pika/pack": "^0.5.0", "@pika/plugin-build-node": "^0.9.0", @@ -44,11 +53,31 @@ "ts-jest": "^25.1.0", "typescript": "^3.4.5" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request-error.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/request-error", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request-error.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "2.0.2" +} diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/package.json b/node_modules/@octokit/request/node_modules/is-plain-object/package.json index dd823ea9b..7a38f4f5d 100644 --- a/node_modules/@octokit/request/node_modules/is-plain-object/package.json +++ b/node_modules/@octokit/request/node_modules/is-plain-object/package.json @@ -1,45 +1,61 @@ { - "name": "is-plain-object", - "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", - "version": "5.0.0", - "homepage": "https://github.com/jonschlinkert/is-plain-object", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Osman Nuri Okumuş (http://onokumus.com)", - "Steven Vachon (https://svachon.com)", - "(https://github.com/wtgtybhertgeghgtwtg)", - "Bogdan Chadkin (https://github.com/TrySound)" + "_args": [ + [ + "is-plain-object@5.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/is-plain-object", + "_from": "is-plain-object@5.0.0", + "_id": "is-plain-object@5.0.0", + "_inBundle": false, + "_integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "_location": "/@octokit/request/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@5.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/is-plain-object/issues" }, - "license": "MIT", - "main": "dist/is-plain-object.js", - "module": "dist/is-plain-object.mjs", - "types": "is-plain-object.d.ts", - "files": [ - "is-plain-object.d.ts", - "dist" - ], - "exports": { - ".": { - "import": "./dist/is-plain-object.mjs", - "require": "./dist/is-plain-object.js" + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" }, - "./package.json": "./package.json" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "build": "rollup -c", - "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", - "test_node": "mocha -r esm", - "test": "npm run test_node && npm run build && npm run test_browser", - "prepare": "rollup -c" - }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + }, + { + "name": "Bogdan Chadkin", + "url": "https://github.com/TrySound" + } + ], + "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", "devDependencies": { "chai": "^4.2.0", "esm": "^3.2.22", @@ -48,6 +64,21 @@ "mocha-headless-chrome": "^3.1.0", "rollup": "^2.22.1" }, + "engines": { + "node": ">=0.10.0" + }, + "exports": { + ".": { + "import": "./dist/is-plain-object.mjs", + "require": "./dist/is-plain-object.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "is-plain-object.d.ts", + "dist" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", "keywords": [ "check", "is", @@ -62,6 +93,22 @@ "typeof", "value" ], + "license": "MIT", + "main": "dist/is-plain-object.js", + "module": "dist/is-plain-object.mjs", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "is-plain-object.d.ts", "verb": { "toc": false, "layout": "default", @@ -81,5 +128,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "5.0.0" +} diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json index 873c49878..57be221af 100644 --- a/node_modules/@octokit/request/package.json +++ b/node_modules/@octokit/request/package.json @@ -1,28 +1,37 @@ { - "name": "@octokit/request", - "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", - "version": "5.4.9", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/request@5.4.9", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "octokit", - "github", - "api", - "request" + "_from": "@octokit/request@5.4.9", + "_id": "@octokit/request@5.4.9", + "_inBundle": false, + "_integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==", + "_location": "/@octokit/request", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request@5.4.9", + "name": "@octokit/request", + "escapedName": "@octokit%2frequest", + "scope": "@octokit", + "rawSpec": "5.4.9", + "saveSpec": null, + "fetchSpec": "5.4.9" + }, + "_requiredBy": [ + "/@octokit/core", + "/@octokit/graphql" ], - "homepage": "https://github.com/octokit/request.js#readme", + "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz", + "_spec": "5.4.9", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/octokit/request.js/issues" }, - "repository": { - "type": "git", - "url": "https://github.com/octokit/request.js.git" - }, "dependencies": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.0.0", @@ -33,6 +42,7 @@ "once": "^1.4.0", "universal-user-agent": "^6.0.0" }, + "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", "devDependencies": { "@octokit/auth-app": "^2.1.2", "@pika/pack": "^0.5.0", @@ -54,11 +64,31 @@ "ts-jest": "^26.1.0", "typescript": "^4.0.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/request", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request.js.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "5.4.9" +} diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json index 4af23ddce..acbf10059 100644 --- a/node_modules/@octokit/types/package.json +++ b/node_modules/@octokit/types/package.json @@ -1,25 +1,49 @@ { - "name": "@octokit/types", - "description": "Shared TypeScript definitions for Octokit projects", - "version": "5.5.0", - "license": "MIT", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "@octokit/types@5.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "pika": true, - "sideEffects": false, - "keywords": [ - "github", - "api", - "sdk", - "toolkit", - "typescript" + "_from": "@octokit/types@5.5.0", + "_id": "@octokit/types@5.5.0", + "_inBundle": false, + "_integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==", + "_location": "/@octokit/types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/types@5.5.0", + "name": "@octokit/types", + "escapedName": "@octokit%2ftypes", + "scope": "@octokit", + "rawSpec": "5.5.0", + "saveSpec": null, + "fetchSpec": "5.5.0" + }, + "_requiredBy": [ + "/", + "/@octokit/auth-token", + "/@octokit/core", + "/@octokit/endpoint", + "/@octokit/graphql", + "/@octokit/plugin-paginate-rest", + "/@octokit/plugin-rest-endpoint-methods", + "/@octokit/plugin-retry", + "/@octokit/request", + "/@octokit/request-error" ], - "repository": "https://github.com/octokit/types.ts", + "_resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz", + "_spec": "5.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/octokit/types.ts/issues" + }, "dependencies": { "@types/node": ">= 8" }, + "description": "Shared TypeScript definitions for Octokit projects", "devDependencies": { "@octokit/graphql": "^4.2.2", "@pika/pack": "^0.5.0", @@ -39,11 +63,32 @@ "typedoc": "^0.19.0", "typescript": "^4.0.2" }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/types.ts#readme", + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/types", + "pika": true, "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/types.ts.git" + }, + "sideEffects": false, "source": "dist-src/index.js", "types": "dist-types/index.d.ts", - "main": "dist-node/index.js", - "module": "dist-web/index.js" -} \ No newline at end of file + "version": "5.5.0" +} diff --git a/node_modules/@opencensus/web-types/LICENSE b/node_modules/@opencensus/web-types/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/node_modules/@opencensus/web-types/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/node_modules/@opencensus/web-types/README.md b/node_modules/@opencensus/web-types/README.md new file mode 100644 index 000000000..aa69ecca6 --- /dev/null +++ b/node_modules/@opencensus/web-types/README.md @@ -0,0 +1,65 @@ +# OpenCensus Web types +[![Gitter chat][gitter-image]][gitter-url] + +*For overview and usage info see the main [OpenCensus Web readme][oc-web-readme-url].* + +This package provides TypeScript interfaces and enums for the OpenCensus core +trace and metrics model. These are copied from the OpenCensus Node +[@opencensus/core][opencensus-core-url] package. + +The library is in alpha stage and the API is subject to change. + +## Why not just depend on `@opencensus/core`? + +The `@opencensus/core` package includes some Node-specific dependencies +that make it difficult to import in web-specific packages. This will be +particularly true once OpenCensus Web supports building with Bazel (see +[rules_typescript](https://github.com/bazelbuild/rules_typescript) on GitHub). + +This package resolves these dependency issues by copying the `types.ts` and +supporting files from the `@opencensus/core`. It also uses a polyfill for the +`NodeJS.EventEmitter` type to avoid a dependency on the `@types/node` package. + +Having the types copied will also make it easier to adopt a build with using +Bazel (see [rules_typescript][rules-typescript-url]), [Tsickle][tsickle-url], +and [Closure][closure-url], which would result in more optimized +(smaller) JS binary sizes. + +## How to refresh the types + +To refresh the types for a new release (or a non-released commit) of +`@opencensus/core`, modify the `copytypes` command in the `package.json` file +with the git tag of the new release. You may need to also modify the list of +copied files or the patching logic in the `scripts/copy-types.js` file. + +Then run `npm run copytypes` to copy the types. + +## Usage + +Currently the primary intended usage of OpenCensus Web is to collect +spans from the resource timing waterfall of an initial page load +and trace on-page user interactions with a series of features like automatic tracing +for *clicks* and *route transitions*, *custom spans*, and browser [Performance API][performance-api] data. +See the [OpenCensus Web readme][oc-web-readme-url] for details. + +In the future we would like to support collecting spans for XHRs and other +operations made after the initial page load and then join those back to the +Resrouce Timing API information for more detailed network timings and events. + +## Useful links +- For more information on OpenCensus, visit: +- For more about OpenCensus Web: +- For help or feedback on this project, join us on [gitter][gitter-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[gitter-image]: https://badges.gitter.im/census-instrumentation/lobby.svg +[gitter-url]: https://gitter.im/census-instrumentation/lobby +[opencensus-core-url]: https://github.com/census-instrumentation/opencensus-node/tree/master/packages/opencensus-core +[oc-web-readme-url]: https://github.com/census-instrumentation/opencensus-web/blob/master/README.md +[license-url]: https://github.com/census-instrumentation/opencensus-web/blob/master/packages/opencensus-web-instrumentation-perf/LICENSE +[rules-typescript-url]: https://github.com/bazelbuild/rules_typescript +[tsickle-url]: https://github.com/angular/tsickle +[closure-url]: https://github.com/google/closure-compiler diff --git a/node_modules/@opencensus/web-types/build/src/common/types.d.ts b/node_modules/@opencensus/web-types/build/src/common/types.d.ts new file mode 100644 index 000000000..d4d9b77e6 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/common/types.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +export declare type LogFunction = (message: any, ...args: any[]) => void; +/** Defines a logger interface. */ +export interface Logger { + /** Logger verbosity level. If omitted, `debug` level is assumed. */ + level?: string; + error: LogFunction; + warn: LogFunction; + info: LogFunction; + debug: LogFunction; +} +/** Defines a logger options interface. */ +export interface LoggerOptions { + level?: string; +} diff --git a/node_modules/@opencensus/web-types/build/src/common/types.js b/node_modules/@opencensus/web-types/build/src/common/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/common/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/exporters/types.d.ts b/node_modules/@opencensus/web-types/build/src/exporters/types.d.ts new file mode 100644 index 000000000..5eae7b3ac --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/exporters/types.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { Measurement, View } from '../stats/types'; +import { TagKey, TagValue } from '../tags/types'; +import * as configTypes from '../trace/config/types'; +import * as modelTypes from '../trace/model/types'; +/** Defines a trace exporter interface. */ +export interface Exporter extends modelTypes.SpanEventListener { + /** + * Sends a list of root spans to the service. + * @param rootSpans A list of root spans to publish. + */ + publish(rootSpans: modelTypes.Span[]): Promise; +} +/** + * An interface that describes the possible events that will be emitted from a + * Stats instance. Stats exporters should implement this interface. + */ +export interface StatsEventListener { + /** + * Is called whenever a new view is registered + * @deprecated since version 0.0.9 - use {@link start} instead + * @param view The registered view + */ + onRegisterView(view: View): void; + /** + * Is called whenever a new measurement is recorded. + * @deprecated since version 0.0.9 - use {@link start} instead + * @param views The views related to the measurement + * @param measurement The recorded measurement + * @param tags The tags to which the value is applied + */ + onRecord(views: View[], measurement: Measurement, tags: Map): void; + /** + * Starts the exporter that polls Metric from Metrics library and send + * batched data to backend. + */ + start(): void; + /** Stops the exporter. */ + stop(): void; +} +export declare type ExporterConfig = configTypes.BufferConfig; diff --git a/node_modules/@opencensus/web-types/build/src/exporters/types.js b/node_modules/@opencensus/web-types/build/src/exporters/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/exporters/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/index.d.ts b/node_modules/@opencensus/web-types/build/src/index.d.ts new file mode 100644 index 000000000..e5d9d21f0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/index.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +export * from './common/types'; +export * from './exporters/types'; +export * from './node/types'; +export * from './trace/config/types'; +export * from './trace/instrumentation/types'; +export * from './trace/model/types'; +export * from './trace/propagation/types'; +export * from './trace/sampler/types'; +export * from './trace/types'; diff --git a/node_modules/@opencensus/web-types/build/src/index.js b/node_modules/@opencensus/web-types/build/src/index.js new file mode 100644 index 000000000..9e558232e --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/index.js @@ -0,0 +1,17 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +export * from './trace/model/types'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/metrics/export/types.d.ts b/node_modules/@opencensus/web-types/build/src/metrics/export/types.d.ts new file mode 100644 index 000000000..ff58c1982 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/metrics/export/types.d.ts @@ -0,0 +1,331 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** Properties of a Metric which has one or more timeseries */ +export interface Metric { + /** + * The descriptor of the Metric. This is an optimization for network wire + * size, from data-model perspective a Metric contains always + * a MetricDescriptor. + * In case of a streaming RPC can be sent only + * the first time a metric is reported to save network traffic. + */ + readonly descriptor: MetricDescriptor; + /** + * One or more timeseries for a single metric, where each timeseries has + * one or more points. + */ + readonly timeseries: TimeSeries[]; +} +/** Properties of a Metric type and its schema */ +export interface MetricDescriptor { + /** The metric type, including its DNS name prefix. It must be unique. */ + readonly name: string; + /** + * A detailed description of the metric, which can be used in documentation. + */ + readonly description: string; + /** + * The unit in which the metric value is reported. Follows the format + * described by http://unitsofmeasure.org/ucum.html. + */ + readonly unit: string; + /** MetricDescriptor type */ + readonly type: MetricDescriptorType; + /** The label keys associated with the metric descriptor. */ + readonly labelKeys: LabelKey[]; +} +/** + * The kind of metric. It describes how the data is reported. + * + * A gauge is an instantaneous measurement of a value. + * + * A cumulative measurement is a value accumulated over a time interval. In + * a time series, cumulative measurements should have the same start time, + * increasing values and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + */ +export declare enum MetricDescriptorType { + /** Do not use this default value. */ + UNSPECIFIED = 0, + /** Integer gauge. The value can go both up and down. */ + GAUGE_INT64 = 1, + /** Floating point gauge. The value can go both up and down. */ + GAUGE_DOUBLE = 2, + /** + * Distribution gauge measurement. The count and sum can go both up and + * down. Recorded values are always >= 0. + * Used in scenarios like a snapshot of time the current items in a queue + * have spent there. + */ + GAUGE_DISTRIBUTION = 3, + /** + * Integer cumulative measurement. The value cannot decrease, if resets + * then the start_time should also be reset. + */ + CUMULATIVE_INT64 = 4, + /** + * Floating point cumulative measurement. The value cannot decrease, if + * resets then the start_time should also be reset. Recorded values are + * always >= 0. + */ + CUMULATIVE_DOUBLE = 5, + /** + * Distribution cumulative measurement. The count and sum cannot decrease, + * if resets then the start_time should also be reset. + */ + CUMULATIVE_DISTRIBUTION = 6, + /** + * Some frameworks implemented Histograms as a summary of observations + * (usually things like request durations and response sizes). While it + * also provides a total count of observations and a sum of all observed + * values, it calculates configurable percentiles over a sliding time + * window. This is not recommended, since it cannot be aggregated. + */ + SUMMARY = 7 +} +/** Properties of a LabelKey associated with a MetricDescriptor. */ +export interface LabelKey { + /** The key for the label. */ + readonly key: string; + /** A human-readable description of what this label key represents. */ + readonly description: string; +} +/** + * A collection of data points that describes the time-varying values + * of a metric. + */ +export interface TimeSeries { + /** + * Must be present for cumulative metrics. The time when the cumulative value + * was reset to zero. Exclusive. The cumulative value is over the time + * interval (start_timestamp, timestamp]. If not specified, the backend can + * use the previous recorded value. + */ + readonly startTimestamp?: Timestamp; + /** + * The set of label values that uniquely identify this timeseries. Applies to + * all points. The order of label values must match that of label keys in the + * metric descriptor. + */ + readonly labelValues: LabelValue[]; + /** + * The data points of this timeseries. Point.value type MUST match the + * MetricDescriptor.type. + */ + readonly points: Point[]; +} +/** The LabelValue type. null value indicates an unset. */ +export interface LabelValue { + /** The value for the label. */ + readonly value: string | null; +} +/** A timestamped measurement. */ +export interface Point { + /** + * The moment when this point was recorded. Inclusive. + * If not specified, the timestamp will be decided by the backend. + */ + readonly timestamp: Timestamp; + /** + * The actual point value. + * 64-bit integer or 64-bit double-precision floating-point number + * or distribution value + * or summary value. This is not recommended, since it cannot be aggregated. + */ + readonly value: number | DistributionValue | SummaryValue; +} +/** + * Distribution contains summary statistics for a population of values. It + * optionally contains a histogram representing the distribution of those + * values across a set of buckets. + */ +export interface DistributionValue { + /** + * The number of values in the population. Must be non-negative. This value + * must equal the sum of the values in bucket_counts if a histogram is + * provided. + */ + readonly count: number; + /** + * The sum of the values in the population. If count is zero then this field + * must be zero. + */ + readonly sum: number; + /** + * The sum of squared deviations from the mean of the values in the + * population. For values x_i this is: + * + * Sum[i=1..n]((x_i - mean)^2) + * + * Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition + * describes Welford's method for accumulating this sum in one pass. + * + * If count is zero then this field must be zero. + */ + readonly sumOfSquaredDeviation: number; + /** + * Don't change bucket boundaries within a TimeSeries if your backend doesn't + * support this. To save network bandwidth this field can be sent only the + * first time a metric is sent when using a streaming RPC. + */ + readonly bucketOptions: BucketOptions; + /** DistributionValue buckets */ + readonly buckets: Bucket[]; +} +/** + * Properties of a BucketOptions. + * A Distribution may optionally contain a histogram of the values in the + * population. The bucket boundaries for that histogram are described by + * BucketOptions. + * + * If bucket_options has no type, then there is no histogram associated with + * the Distribution. + */ +export interface BucketOptions { + /** Bucket with explicit bounds. */ + readonly explicit: Explicit; +} +/** + * Properties of an Explicit. + * Specifies a set of buckets with arbitrary upper-bounds. + * This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket + * index i are: + * + * [0, bucket_bounds[i]) for i == 0 + * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1 + * [bucket_bounds[i-1], +infinity) for i == N-1 + */ +export interface Explicit { + /** The values must be strictly increasing and > 0. */ + readonly bounds: number[]; +} +/** Properties of a Bucket. */ +export interface Bucket { + /** + * The number of values in each bucket of the histogram, as described in + * bucket_bounds. + */ + readonly count: number; + /** + * If the distribution does not have a histogram, then omit this field. + */ + readonly exemplar?: Exemplar; +} +/** + * Exemplars are example points that may be used to annotate aggregated + * Distribution values. They are metadata that gives information about a + * particular value added to a Distribution bucket. + */ +export interface Exemplar { + /** + * Value of the exemplar point. It determines which bucket the exemplar + * belongs to. + */ + readonly value: number; + /** The observation (sampling) time of the above value. */ + readonly timestamp: Timestamp; + /** Contextual information about the example value. */ + readonly attachments: { + [key: string]: string; + }; +} +/** + * The start_timestamp only applies to the count and sum in the SummaryValue. + */ +export interface SummaryValue { + /** + * The total number of recorded values since start_time. Optional since + * some systems don't expose this. + */ + readonly count: number; + /** + * The total sum of recorded values since start_time. Optional since some + * systems don't expose this. If count is zero then this field must be zero. + * This field must be unset if the sum is not available. + */ + readonly sum: number; + /** Values calculated over an arbitrary time window. */ + readonly snapshot?: Snapshot; +} +/** + * The values in this message can be reset at arbitrary unknown times, with + * the requirement that all of them are reset at the same time. + */ +export interface Snapshot { + /** + * The number of values in the snapshot. Optional since some systems don't + * expose this. + */ + readonly count: number; + /** + * The sum of values in the snapshot. Optional since some systems don't + * expose this. If count is zero then this field must be zero or not set + * (if not supported). + */ + readonly sum: number; + /** + * A list of values at different percentiles of the distribution calculated + * from the current snapshot. The percentiles must be strictly increasing. + */ + readonly percentileValues: ValueAtPercentile[]; +} +/** + * Represents the value at a given percentile of a distribution. + */ +export interface ValueAtPercentile { + /** The percentile of a distribution. Must be in the interval (0.0, 100.0]. */ + readonly percentile: number; + /** The value at the given percentile of a distribution. */ + readonly value: number; +} +export interface Timestamp { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + */ + seconds: number | null; + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + */ + nanos: number | null; +} +/** + * Keeps a set of MetricProducer that is used by exporters to determine the + * metrics that need to be exported. + */ +export interface MetricProducerManager { + /** Adds the MetricProducer to the manager */ + add(metricProducer: MetricProducer): void; + /** Removes the MetricProducer to the manager */ + remove(metricProducer: MetricProducer): void; + /** Clears all MetricProducers */ + removeAll(): void; + /** Gets all registered MetricProducers that should be exported */ + getAllMetricProducer(): Set; +} +/** + * A MetricProducer producer that can be registered for exporting using + * MetricProducerManager. + */ +export interface MetricProducer { + /** Gets a collection of produced Metric`s to be exported */ + getMetrics(): Metric[]; +} diff --git a/node_modules/@opencensus/web-types/build/src/metrics/export/types.js b/node_modules/@opencensus/web-types/build/src/metrics/export/types.js new file mode 100644 index 000000000..a716892fd --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/metrics/export/types.js @@ -0,0 +1,67 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** + * The kind of metric. It describes how the data is reported. + * + * A gauge is an instantaneous measurement of a value. + * + * A cumulative measurement is a value accumulated over a time interval. In + * a time series, cumulative measurements should have the same start time, + * increasing values and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. + */ +export var MetricDescriptorType; +(function (MetricDescriptorType) { + /** Do not use this default value. */ + MetricDescriptorType[MetricDescriptorType["UNSPECIFIED"] = 0] = "UNSPECIFIED"; + /** Integer gauge. The value can go both up and down. */ + MetricDescriptorType[MetricDescriptorType["GAUGE_INT64"] = 1] = "GAUGE_INT64"; + /** Floating point gauge. The value can go both up and down. */ + MetricDescriptorType[MetricDescriptorType["GAUGE_DOUBLE"] = 2] = "GAUGE_DOUBLE"; + /** + * Distribution gauge measurement. The count and sum can go both up and + * down. Recorded values are always >= 0. + * Used in scenarios like a snapshot of time the current items in a queue + * have spent there. + */ + MetricDescriptorType[MetricDescriptorType["GAUGE_DISTRIBUTION"] = 3] = "GAUGE_DISTRIBUTION"; + /** + * Integer cumulative measurement. The value cannot decrease, if resets + * then the start_time should also be reset. + */ + MetricDescriptorType[MetricDescriptorType["CUMULATIVE_INT64"] = 4] = "CUMULATIVE_INT64"; + /** + * Floating point cumulative measurement. The value cannot decrease, if + * resets then the start_time should also be reset. Recorded values are + * always >= 0. + */ + MetricDescriptorType[MetricDescriptorType["CUMULATIVE_DOUBLE"] = 5] = "CUMULATIVE_DOUBLE"; + /** + * Distribution cumulative measurement. The count and sum cannot decrease, + * if resets then the start_time should also be reset. + */ + MetricDescriptorType[MetricDescriptorType["CUMULATIVE_DISTRIBUTION"] = 6] = "CUMULATIVE_DISTRIBUTION"; + /** + * Some frameworks implemented Histograms as a summary of observations + * (usually things like request durations and response sizes). While it + * also provides a total count of observations and a sum of all observed + * values, it calculates configurable percentiles over a sliding time + * window. This is not recommended, since it cannot be aggregated. + */ + MetricDescriptorType[MetricDescriptorType["SUMMARY"] = 7] = "SUMMARY"; +})(MetricDescriptorType || (MetricDescriptorType = {})); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/node/types.d.ts b/node_modules/@opencensus/web-types/build/src/node/types.d.ts new file mode 100644 index 000000000..edac19ddc --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/node/types.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** + * NodeJS.EventEmitter type included here so that this package does not + * need to take a dependency on the Node typings. + * See: + * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/events.d.ts + */ +export interface NodeJsEventEmitter { + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + eventNames(): Array; +} diff --git a/node_modules/@opencensus/web-types/build/src/node/types.js b/node_modules/@opencensus/web-types/build/src/node/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/node/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/stats/types.d.ts b/node_modules/@opencensus/web-types/build/src/stats/types.d.ts new file mode 100644 index 000000000..75c6c9b67 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/stats/types.d.ts @@ -0,0 +1,291 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { StatsEventListener } from '../exporters/types'; +import { Metric } from '../metrics/export/types'; +import { TagMap } from '../tags/tag-map'; +import { TagKey, TagValue } from '../tags/types'; +/** Default type for functions */ +declare type Func = (...args: any[]) => T; +/** Main interface for stats. */ +export interface Stats { + /** + * Creates a view. + * @param name The view name + * @param measure The view measure + * @param aggregation The view aggregation type + * @param tagKeys The view columns (tag keys) + * @param description The view description + * @param bucketBoundaries The view bucket boundaries for a distribution + * aggregation type + */ + createView(name: string, measure: Measure, aggregation: AggregationType, tagKeys: TagKey[], description: string, bucketBoundaries?: number[]): View; + /** + * Registers a view to listen to new measurements in its measure. + * @param view The view to be registered + */ + registerView(view: View): void; + /** + * Creates a measure of type Double. + * @param name The measure name + * @param unit The measure unit + * @param description The measure description + */ + createMeasureDouble(name: string, unit: MeasureUnit, description?: string): Measure; + /** + * Creates a measure of type Int64. Values must be integers up to + * Number.MAX_SAFE_INTERGER. + * @param name The measure name + * @param unit The measure unit + * @param description The measure description + */ + createMeasureInt64(name: string, unit: MeasureUnit, description?: string): Measure; + /** + * Updates all views with the new measurements. + * @param measurements A list of measurements to record + * @param tags optional The tags to which the value is applied. + * tags could either be explicitly passed to the method, or implicitly + * read from current execution context. + * @param attachments optional The contextual information associated with an + * example value. The contextual information is represented as key - value + * string pairs. + */ + record(measurements: Measurement[], tags?: TagMap, attachments?: { + [key: string]: string; + }): void; + /** + * Remove all registered Views and exporters from the stats. + */ + clear(): void; + /** + * Gets a collection of produced Metric`s to be exported. + * @returns The List of metrics. + */ + getMetrics(): Metric[]; + /** + * Registers an exporter to send stats data to a service. + * @param exporter An stats exporter + */ + registerExporter(exporter: StatsEventListener): void; + /** + * Unregisters an exporter. It should be called whenever the exporter is not + * needed anymore. + * @param exporter An stats exporter + */ + unregisterExporter(exporter: StatsEventListener): void; + /** + * Enters the scope of code where the given `TagMap` is in the current context + * (replacing the previous `TagMap`). + * @param tags The TagMap to be set to the current context. + * @param fn Callback function. + * @returns The callback return. + */ + withTagContext(tags: TagMap, fn: Func): T; + /** Gets the current tag context. */ + getCurrentTagContext(): TagMap; +} +/** + * Describes the type of the individual values/measurements recorded by an + * application. It includes information such as the type of measurement, the + * units of measurement and descriptive names for the data. This provides the + * fundamental type used for recording data. + */ +export interface Measure { + /** + * A string by which the measure will be referred to, e.g. + * "rpc_server_latency". Names MUST be unique within the library. + */ + readonly name: string; + /** Describes the measure, e.g. "RPC latency in seconds". */ + readonly description?: string; + /** + * Describes the unit used for the Measure. Follows the format described by + * http://unitsofmeasure.org/ucum.html. + */ + readonly unit: MeasureUnit; + /** The type used for this Measure. */ + readonly type: MeasureType; +} +/** + * Describes the unit used for the Measure. Should follows the format described + * by http://unitsofmeasure.org/ucum.html. + */ +export declare enum MeasureUnit { + UNIT = "1", + BYTE = "by", + KBYTE = "kb", + SEC = "s", + MS = "ms", + NS = "ns" +} +/** Describes the types of a Measure. It can be Int64 or a Double type. */ +export declare enum MeasureType { + INT64 = "INT64", + DOUBLE = "DOUBLE" +} +/** Describes a data point to be collected for a Measure. */ +export interface Measurement { + /** The measure to which the value is applied */ + readonly measure: Measure; + /** + * The recorded value. If the measure has type INT64, value must be an integer + * up to Number.MAX_SAFE_INTERGER. + */ + readonly value: number; +} +/** + * Defines how individual measurements are broken down by tags and aggregated. + */ +export interface View { + /** + * A string by which the View will be referred to, e.g. "rpc_latency". Names + * MUST be unique within the library. + */ + readonly name: string; + /** Describes the view, e.g. "RPC latency distribution" */ + readonly description: string; + /** The Measure to which this view is applied. */ + readonly measure: Measure; + /** + * An Aggregation describes how data collected is aggregated. + * There are four aggregation types: count, sum, lastValue and distirbution. + */ + readonly aggregation: AggregationType; + /** The start time for this view */ + readonly startTime: number; + /** + * The end time for this view - represents the last time a value was recorded + */ + endTime?: number; + /** true if the view was registered */ + registered: boolean; + /** + * Records a measurement in the proper view's row. This method is used by + * Stats. User should prefer using Stats.record() instead. + * + * Measurements with measurement type INT64 will have its value truncated. + * @param measurement The measurement to record + * @param tags The tags to which the value is applied + * @param attachments optional The contextual information associated with an + * example value. THe contextual information is represented as key - value + * string pairs. + */ + recordMeasurement(measurement: Measurement, tags: TagMap, attachments?: { + [key: string]: string; + }): void; + /** + * Returns a snapshot of an AggregationData for that tags/labels values. + * @param tagValues The desired data's tag values. + */ + getSnapshot(tagValues: Array): AggregationData; + /** Gets the view's tag keys */ + getColumns(): TagKey[]; + /** Gets view`s metric */ + getMetric(start: number): Metric; +} +/** + * Informs the type of the aggregation. It can be: count, sum, lastValue or + * distribution. + */ +export declare enum AggregationType { + COUNT = 0, + SUM = 1, + LAST_VALUE = 2, + DISTRIBUTION = 3 +} +/** Defines how data is collected and aggregated */ +export interface AggregationMetadata { + /** The aggregation type of the aggregation data */ + readonly type: AggregationType; + /** The tagValues that this AggregationData collects and aggregates */ + readonly tagValues: Array; + /** The latest timestamp a new data point was recorded */ + timestamp: number; +} +/** + * Data collected and aggregated with this AggregationData will be summed + * up. + */ +export interface SumData extends AggregationMetadata { + type: AggregationType.SUM; + /** The current accumulated value */ + value: number; +} +/** + * This AggregationData counts the number of measurements recorded. + */ +export interface CountData extends AggregationMetadata { + type: AggregationType.COUNT; + /** The current counted value */ + value: number; +} +/** + * This AggregationData represents the last recorded value. This is useful + * when giving support to Gauges. + */ +export interface LastValueData extends AggregationMetadata { + type: AggregationType.LAST_VALUE; + /** The last recorded value */ + value: number; +} +/** This AggregationData contains a histogram of the collected values. */ +export interface DistributionData extends AggregationMetadata { + type: AggregationType.DISTRIBUTION; + /** The first timestamp a datapoint was added */ + readonly startTime: number; + /** Get the total count of all recorded values in the histogram */ + count: number; + /** Sum of all recorded values in the histogram */ + sum: number; + /** Get the computed mean value of all recorded values in the histogram */ + mean: number; + /** + * Get the computed standard deviation of all recorded values in the + * histogram + */ + stdDeviation: number; + /** + * Get the computed sum of squared deviations of all recorded values in the + * histogram. + */ + sumOfSquaredDeviation: number; + /** Bucket distribution of the histogram */ + buckets: Bucket[]; + /** Buckets count */ + bucketCounts?: number[]; + /** If the distribution does not have a histogram, then omit this field. */ + exemplars?: StatsExemplar[]; +} +/** + * Exemplars are example points that may be used to annotate aggregated + * Distribution values. They are metadata that gives information about a + * particular value added to a Distribution bucket. + */ +export interface StatsExemplar { + /** + * Value of the exemplar point. It determines which bucket the exemplar + * belongs to. + */ + readonly value: number; + /** The observation (sampling) time of the above value. */ + readonly timestamp: number; + /** Contextual information about the example value. */ + readonly attachments: { + [key: string]: string; + }; +} +export declare type Bucket = number; +export declare type AggregationData = SumData | CountData | LastValueData | DistributionData; +export {}; diff --git a/node_modules/@opencensus/web-types/build/src/stats/types.js b/node_modules/@opencensus/web-types/build/src/stats/types.js new file mode 100644 index 000000000..e2cf251fd --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/stats/types.js @@ -0,0 +1,46 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** + * Describes the unit used for the Measure. Should follows the format described + * by http://unitsofmeasure.org/ucum.html. + */ +export var MeasureUnit; +(function (MeasureUnit) { + MeasureUnit["UNIT"] = "1"; + MeasureUnit["BYTE"] = "by"; + MeasureUnit["KBYTE"] = "kb"; + MeasureUnit["SEC"] = "s"; + MeasureUnit["MS"] = "ms"; + MeasureUnit["NS"] = "ns"; +})(MeasureUnit || (MeasureUnit = {})); +/** Describes the types of a Measure. It can be Int64 or a Double type. */ +export var MeasureType; +(function (MeasureType) { + MeasureType["INT64"] = "INT64"; + MeasureType["DOUBLE"] = "DOUBLE"; +})(MeasureType || (MeasureType = {})); +/** + * Informs the type of the aggregation. It can be: count, sum, lastValue or + * distribution. + */ +export var AggregationType; +(function (AggregationType) { + AggregationType[AggregationType["COUNT"] = 0] = "COUNT"; + AggregationType[AggregationType["SUM"] = 1] = "SUM"; + AggregationType[AggregationType["LAST_VALUE"] = 2] = "LAST_VALUE"; + AggregationType[AggregationType["DISTRIBUTION"] = 3] = "DISTRIBUTION"; +})(AggregationType || (AggregationType = {})); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/tags/tag-map.d.ts b/node_modules/@opencensus/web-types/build/src/tags/tag-map.d.ts new file mode 100644 index 000000000..5900f5cfe --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/tag-map.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { TagKey, TagMetadata, TagValue, TagValueWithMetadata } from './types'; +/** TagMap is maps of TagKey -> TagValueWithMetadata */ +export declare class TagMap { + private readonly registeredTags; + /** + * Adds the key/value pair regardless of whether the key is present. + * @param tagKey The TagKey which will be set. + * @param tagValue The TagValue to set for the given key. + * @param tagMetadata The TagMetadata associated with this Tag. + */ + set(tagKey: TagKey, tagValue: TagValue, tagMetadata?: TagMetadata): void; + /** + * Deletes a tag from the map if the key is in the map. + * @param tagKey The TagKey which will be removed. + */ + delete(tagKey: TagKey): void; + /** Gets the tags map without metadata. */ + readonly tags: Map; + /** Gets the tags map with metadata. */ + readonly tagsWithMetadata: Map; + /** + * Constructs a new TagValueWithMetadata using tagValue and tagMetadata. + * For backwards-compatibility this method still produces propagating Tags + * (UNLIMITED_PROPAGATION) if tagMetadata is not provided or missing. + */ + private getValueWithMetadata; +} diff --git a/node_modules/@opencensus/web-types/build/src/tags/tag-map.js b/node_modules/@opencensus/web-types/build/src/tags/tag-map.js new file mode 100644 index 000000000..2af089df9 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/tag-map.js @@ -0,0 +1,141 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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 __values = (this && this.__values) || function (o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +import { TagTtl, } from './types'; +import { isValidTagKey, isValidTagValue } from './validation'; +var UNLIMITED_PROPAGATION_MD = { + tagTtl: TagTtl.UNLIMITED_PROPAGATION, +}; +/** TagMap is maps of TagKey -> TagValueWithMetadata */ +var TagMap = /** @class */ (function () { + function TagMap() { + // A map mapping TagKey to to its respective TagValueWithMetadata. + this.registeredTags = new Map(); + } + /** + * Adds the key/value pair regardless of whether the key is present. + * @param tagKey The TagKey which will be set. + * @param tagValue The TagValue to set for the given key. + * @param tagMetadata The TagMetadata associated with this Tag. + */ + TagMap.prototype.set = function (tagKey, tagValue, tagMetadata) { + var e_1, _a; + if (!isValidTagKey(tagKey)) { + throw new Error("Invalid TagKey name: " + tagKey.name); + } + if (!isValidTagValue(tagValue)) { + throw new Error("Invalid TagValue: " + tagValue.value); + } + var existingKey; + try { + for (var _b = __values(this.registeredTags.keys()), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + if (key.name === tagKey.name) { + existingKey = key; + break; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + if (existingKey) + this.registeredTags.delete(existingKey); + var valueWithMetadata = this.getValueWithMetadata(tagValue, tagMetadata); + this.registeredTags.set(tagKey, valueWithMetadata); + }; + /** + * Deletes a tag from the map if the key is in the map. + * @param tagKey The TagKey which will be removed. + */ + TagMap.prototype.delete = function (tagKey) { + this.registeredTags.delete(tagKey); + }; + Object.defineProperty(TagMap.prototype, "tags", { + /** Gets the tags map without metadata. */ + get: function () { + var e_2, _a; + var tagsWithoutMetadata = new Map(); + try { + for (var _b = __values(this.registeredTags), _c = _b.next(); !_c.done; _c = _b.next()) { + var _d = __read(_c.value, 2), tagKey = _d[0], valueWithMetadata = _d[1]; + tagsWithoutMetadata.set(tagKey, valueWithMetadata.tagValue); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_2) throw e_2.error; } + } + return tagsWithoutMetadata; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TagMap.prototype, "tagsWithMetadata", { + /** Gets the tags map with metadata. */ + get: function () { + return this.registeredTags; + }, + enumerable: true, + configurable: true + }); + /** + * Constructs a new TagValueWithMetadata using tagValue and tagMetadata. + * For backwards-compatibility this method still produces propagating Tags + * (UNLIMITED_PROPAGATION) if tagMetadata is not provided or missing. + */ + TagMap.prototype.getValueWithMetadata = function (tagValue, tagMetadata) { + if (tagMetadata) { + return { tagValue: tagValue, tagMetadata: tagMetadata }; + } + return { tagValue: tagValue, tagMetadata: UNLIMITED_PROPAGATION_MD }; + }; + return TagMap; +}()); +export { TagMap }; +//# sourceMappingURL=tag-map.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/tags/types.d.ts b/node_modules/@opencensus/web-types/build/src/tags/types.d.ts new file mode 100644 index 000000000..fed06c721 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/types.d.ts @@ -0,0 +1,56 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** TagKey represents a tag key */ +export interface TagKey { + /** The name of the key. */ + readonly name: string; +} +/** TagValue represents a tag value */ +export interface TagValue { + /** The value of a tag. */ + readonly value: string; +} +/** TagValueWithMetadata holds a TagValue and a TagMetadata. */ +export interface TagValueWithMetadata { + /** The tag value */ + readonly tagValue: TagValue; + /** The metadata for the tag */ + readonly tagMetadata: TagMetadata; +} +/** + * TagMetadata contains properties associated with a Tag. + * Anytime a sender serializes a tag, sends it over the wire and receiver + * deserializes the tag then the tag is considered to have travelled one hop. + * There could be one or more proxy(ies) between sender and receiver. Proxies + * are treated as transparent entities and they do not create additional hops. + */ +export interface TagMetadata { + /** + * For now, only special values of TagTtl are supported. In future, + * additional properties may be added to address specific situations. + */ + readonly tagTtl: number; +} +/** TagTtl is an integer that represents number of hops a tag can propagate */ +export declare enum TagTtl { + /** + * NO_PROPAGATION is considered to have local scope and is used within the + * process it created. + */ + NO_PROPAGATION = 0, + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + UNLIMITED_PROPAGATION = -1 +} diff --git a/node_modules/@opencensus/web-types/build/src/tags/types.js b/node_modules/@opencensus/web-types/build/src/tags/types.js new file mode 100644 index 000000000..40fa209a8 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/types.js @@ -0,0 +1,27 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** TagTtl is an integer that represents number of hops a tag can propagate */ +export var TagTtl; +(function (TagTtl) { + /** + * NO_PROPAGATION is considered to have local scope and is used within the + * process it created. + */ + TagTtl[TagTtl["NO_PROPAGATION"] = 0] = "NO_PROPAGATION"; + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + TagTtl[TagTtl["UNLIMITED_PROPAGATION"] = -1] = "UNLIMITED_PROPAGATION"; +})(TagTtl || (TagTtl = {})); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/tags/validation.d.ts b/node_modules/@opencensus/web-types/build/src/tags/validation.d.ts new file mode 100644 index 000000000..ee4857208 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/validation.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { TagKey, TagValue } from './types'; +/** Determines whether the given String is a valid tag key. */ +export declare function isValidTagKey(tagKey: TagKey): boolean; +/** Determines whether the given String is a valid tag value. */ +export declare function isValidTagValue(tagValue: TagValue): boolean; diff --git a/node_modules/@opencensus/web-types/build/src/tags/validation.js b/node_modules/@opencensus/web-types/build/src/tags/validation.js new file mode 100644 index 000000000..ddf4f06b2 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/tags/validation.js @@ -0,0 +1,38 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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 nonPrintableCharsRegex = /[^\u0020-\u007e]/; +var TAG_KEY_MAX_LENGTH = 255; +/** Determines whether the given String is a valid tag key. */ +export function isValidTagKey(tagKey) { + if (!tagKey || !tagKey.name) { + return false; + } + return (isPrintableString(tagKey.name) && + tagKey.name.length > 0 && + tagKey.name.length <= TAG_KEY_MAX_LENGTH); +} +/** Determines whether the given String is a valid tag value. */ +export function isValidTagValue(tagValue) { + if (!tagValue || tagValue.value === null || tagValue.value === undefined) { + return false; + } + return (isPrintableString(tagValue.value) && + tagValue.value.length <= TAG_KEY_MAX_LENGTH); +} +function isPrintableString(name) { + return !nonPrintableCharsRegex.test(name); +} +//# sourceMappingURL=validation.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/config/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/config/types.d.ts new file mode 100644 index 000000000..21919321f --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/config/types.d.ts @@ -0,0 +1,88 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { Logger } from '../../common/types'; +import { Exporter } from '../../exporters/types'; +import { Stats } from '../../stats/types'; +import { PluginNames } from '../instrumentation/types'; +import { Attributes } from '../model/types'; +import { Propagation } from '../propagation/types'; +/** Interface configuration for a buffer. */ +export interface BufferConfig { + /** Maximum size of a buffer. */ + bufferSize?: number; + /** Max time for a buffer can wait before being sent */ + bufferTimeout?: number; + /** A logger object */ + logger?: Logger; +} +/** Defines tracer configuration parameters */ +export interface TracerConfig { + /** A set of default attributes each in the format [KEY]:[VALUE] */ + defaultAttributes?: Attributes; + /** Determines the sampling rate. Ranges from 0.0 to 1.0 */ + samplingRate?: number; + /** A logger object */ + logger?: Logger; + /** A propagation instance */ + propagation?: Propagation; + /** Trace Parameters */ + traceParams?: TraceParams; +} +/** Available configuration options. */ +export interface TracingConfig { + /** level of logger - 0:disable, 1: error, 2: warn, 3: info, 4: debug */ + logLevel?: number; + /** + * The maximum number of characters reported on a label value. + */ + maximumLabelValueSize?: number; + /** + * A list of trace instrumentations plugins to load. + * Each key is the name of the module to trace, and its + * value is the name of the package which has the plugin + * implementation. + * Ex.: + * plugins: { + * 'http': '@opencensus/opencensus-instrumentation-http', + * 'mongodb-core': '@opencensus/opencensus-instrumentation-mongodb-core', + * ... + * } + * Any user-provided value will be added to the default list. + * It will override any default plugin for the same key. + */ + plugins?: PluginNames; + /** An exporter object */ + exporter?: Exporter; + /** An instance of a logger */ + logger?: Logger; + /** An instance of a stats */ + stats?: Stats; +} +/** Global configuration of trace service */ +export interface TraceParams { + /** + * numberOfAnnontationEventsPerSpan is number of annotation events per + * span + */ + numberOfAnnontationEventsPerSpan?: number; + /** numberOfMessageEventsPerSpan is number of message events per span */ + numberOfMessageEventsPerSpan?: number; + /** numberOfAttributesPerSpan is number of attributes per span */ + numberOfAttributesPerSpan?: number; + /** numberOfLinksPerSpan is number of links per span */ + numberOfLinksPerSpan?: number; +} +export declare type Config = TracingConfig & TracerConfig & BufferConfig; diff --git a/node_modules/@opencensus/web-types/build/src/trace/config/types.js b/node_modules/@opencensus/web-types/build/src/trace/config/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/config/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.d.ts new file mode 100644 index 000000000..8f767dab0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.d.ts @@ -0,0 +1,66 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { Stats } from '../../stats/types'; +import { Span, TracerBase } from '../model/types'; +/** Interface Plugin to apply patch. */ +export interface Plugin { + /** + * Method that enables the instrumentation patch. + * + * @param moduleExports nodejs module exports from the module to patch + * @param tracer a tracer instance + * @param version version of the current instaled module to patch + * @param options plugin options + * @param basedir an optional module absolute path + * @param stats an optional stats instance + */ + enable(moduleExports: T, tracer: TracerBase, version: string, options: PluginConfig, basedir?: string, stats?: Stats): T; + /** Method to disable the instrumentation */ + disable(): void; +} +/** + * Function that can be provided to plugin in order to add custom + * attributes to spans + */ +export interface CustomAttributeFunction { + (span: Span, ...rest: any[]): void; +} +export interface PluginConfig { + [key: string]: any; + applyCustomAttributesOnSpan?: CustomAttributeFunction; +} +export interface NamedPluginConfig { + module: string; + config: PluginConfig; +} +/** + * Type PluginNames: each key should be the name of the module to trace, + * and its value should be the name of the package which has the + * plugin implementation. + */ +export interface PluginNames { + [pluginName: string]: string | NamedPluginConfig; +} +export interface PluginInternalFilesVersion { + [pluginName: string]: string; +} +/** + * Each key should be the name of the module to trace, and its value + * a mapping of a property name to a internal plugin file name. + */ +export interface PluginInternalFiles { + [versions: string]: PluginInternalFilesVersion; +} diff --git a/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.js b/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/instrumentation/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/model/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/model/types.d.ts new file mode 100644 index 000000000..ece40b755 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/model/types.d.ts @@ -0,0 +1,477 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import * as loggerTypes from '../../common/types'; +import * as configTypes from '../config/types'; +import { Propagation } from '../propagation/types'; +import * as samplerTypes from '../sampler/types'; +import { NodeJsEventEmitter } from '../../node/types'; +/** Default type for functions */ +export declare type Func = (...args: any[]) => T; +/** Maps a label to a string, number or boolean. */ +export interface Attributes { + [attributeKey: string]: string | number | boolean; +} +/** + * The status of a Span by providing a standard CanonicalCode in conjunction + * with an optional descriptive message. + */ +export interface Status { + /** The canonical code of this message. */ + code: CanonicalCode; + /** A developer-facing error message. */ + message?: string; +} +/** An enumeration of canonical status codes. */ +export declare enum CanonicalCode { + /** + * Not an error; returned on success + */ + OK = 0, + /** + * The operation was cancelled (typically by the caller). + */ + CANCELLED = 1, + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + UNKNOWN = 2, + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + INVALID_ARGUMENT = 3, + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + DEADLINE_EXCEEDED = 4, + /** + * Some requested entity (e.g., file or directory) was not found. + */ + NOT_FOUND = 5, + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + ALREADY_EXISTS = 6, + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + PERMISSION_DENIED = 7, + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + RESOURCE_EXHAUSTED = 8, + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + FAILED_PRECONDITION = 9, + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + ABORTED = 10, + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + OUT_OF_RANGE = 11, + /** + * Operation is not implemented or not supported/enabled in this service. + */ + UNIMPLEMENTED = 12, + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + INTERNAL = 13, + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + UNAVAILABLE = 14, + /** + * Unrecoverable data loss or corruption. + */ + DATA_LOSS = 15, + /** + * The request does not have valid authentication credentials for the + * operation. + */ + UNAUTHENTICATED = 16 +} +/** A text annotation with a set of attributes. */ +export interface Annotation { + /** A user-supplied message describing the event. */ + description: string; + /** A timestamp for the event event. */ + timestamp: number; + /** A set of attributes on the annotation. */ + attributes: Attributes; +} +/** An event describing a message sent/received between Spans. */ +export interface MessageEvent { + /** A timestamp for the event. */ + timestamp: number; + /** Indicates whether the message was sent or received. */ + type: MessageEventType; + /** + * An identifier for the MessageEvent's message that can be used to match + * SENT and RECEIVED MessageEvents. Message event ids should start with 1 for + * both sent and received messages and increment by 1 for each message + * sent/received. + */ + id: number; + /** The number of uncompressed bytes sent or received. */ + uncompressedSize?: number; + /** + * The number of compressed bytes sent or received. If zero or + * undefined, assumed to be the same size as uncompressed. + */ + compressedSize?: number; +} +/** + * A pointer from the current span to another span in the same trace or in a + * different trace. + */ +export interface Link { + /** The trace ID for a trace within a project. */ + traceId: string; + /** The span ID for a span within a trace. */ + spanId: string; + /** The relationship of the current span relative to the linked. */ + type: LinkType; + /** A set of attributes on the link. */ + attributes: Attributes; +} +/** Defines the trace options */ +export interface TraceOptions { + /** Root span name */ + name: string; + /** Trace context */ + spanContext?: SpanContext; + /** Span kind */ + kind?: SpanKind; + /** Determines the sampling rate. Ranges from 0.0 to 1.0 */ + samplingRate?: number; +} +/** Defines the span options */ +export interface SpanOptions { + /** Span name */ + name: string; + /** Span kind */ + kind?: SpanKind; + /** The new span's parent */ + childOf?: Span; +} +export declare type TraceState = string; +/** Defines the span context */ +export interface SpanContext { + /** Trace ID */ + traceId: string; + /** Span ID */ + spanId: string; + /** Options */ + options?: number; + /** TraceState */ + traceState?: TraceState; +} +/** Defines an end span event listener */ +export interface SpanEventListener { + /** Happens when a span is started */ + onStartSpan(span: Span): void; + /** Happens when a span is ended */ + onEndSpan(span: Span): void; +} +/** An event describing a message sent/received between Spans. */ +export declare enum MessageEventType { + /** Unknown event type. */ + UNSPECIFIED = 0, + /** Indicates a sent message. */ + SENT = 1, + /** Indicates a received message. */ + RECEIVED = 2 +} +/** + * Type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +export declare enum SpanKind { + /** Unspecified */ + UNSPECIFIED = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote network request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2 +} +/** + * Type of link. The relationship of the current span relative to the linked + * span. + */ +export declare enum LinkType { + /** + * The relationship of the two spans is unknown, or known but other + * than parent-child. + */ + UNSPECIFIED = 0, + /** The linked span is a child of the current span. */ + CHILD_LINKED_SPAN = 1, + /** The linked span is a parent of the current span. */ + PARENT_LINKED_SPAN = 2 +} +/** Interface for Span */ +export interface Span { + /** The Span ID of this span */ + readonly id: string; + /** If the parent span is in another process. */ + remoteParent: boolean; + /** The span ID of this span's parent. If it's a root span, must be empty */ + parentSpanId: string; + /** The resource name of the span */ + name: string; + /** Kind of span. */ + kind: SpanKind; + /** An object to log information to */ + logger: loggerTypes.Logger; + /** A final status for this span */ + status: Status; + /** A set of attributes, each in the format [KEY]:[VALUE] */ + attributes: Attributes; + /** A text annotation with a set of attributes. */ + annotations: Annotation[]; + /** An event describing a message sent/received between Spans. */ + messageEvents: MessageEvent[]; + /** Pointers from the current span to another span */ + links: Link[]; + /** Recursively gets the descendant spans. */ + allDescendants(): Span[]; + /** The list of immediate child spans. */ + spans: Span[]; + /** The number of direct children */ + numberOfChildren: number; + /** Trace id asscoiated with span. */ + readonly traceId: string; + /** Trace state associated with span */ + readonly traceState?: TraceState; + /** Indicates if span was started. */ + readonly started: boolean; + /** Indicates if span was ended. */ + readonly ended: boolean; + /** + * Gives a timestap that indicates the span's start time in RFC3339 UTC + * "Zulu" format. + */ + readonly startTime: Date; + /** + * Gives a timestap that indicates the span's end time in RFC3339 UTC + * "Zulu" format. + */ + readonly endTime: Date; + /** + * Gives a timestap that indicates the span's duration in RFC3339 UTC + * "Zulu" format. + */ + readonly duration: number; + /** Gives the TraceContext of the span. */ + readonly spanContext: SpanContext; + /** Trace Parameters */ + activeTraceParams: configTypes.TraceParams; + /** The number of dropped attributes. */ + droppedAttributesCount: number; + /** The number of dropped links. */ + droppedLinksCount: number; + /** The number of dropped annotations. */ + droppedAnnotationsCount: number; + /** The number of dropped message events. */ + droppedMessageEventsCount: number; + /** + * Adds an atribute to the span. + * @param key Describes the value added. + * @param value The result of an operation. + */ + addAttribute(key: string, value: string | number | boolean | object): void; + /** + * Adds an annotation to the span. + * @param description Describes the event. + * @param attributes A set of attributes on the annotation. + * @param timestamp A timestamp for this event. + */ + addAnnotation(description: string, attributes?: Attributes, timestamp?: number): void; + /** + * Adds a link to the span. + * @param traceId The trace ID for a trace within a project. + * @param spanId The span ID for a span within a trace. + * @param type The relationship of the current span relative to the linked. + * @param attributes A set of attributes on the link. + */ + addLink(traceId: string, spanId: string, type: LinkType, attributes?: Attributes): void; + /** + * Adds a message event to the span. + * @param type The type of message event. + * @param id An identifier for the message event. + * @param timestamp A timestamp for this event. + * @param uncompressedSize The number of uncompressed bytes sent or received. + * @param compressedSize The number of compressed bytes sent or received. If + * zero or undefined, assumed to be the same size as uncompressed. + */ + addMessageEvent(type: MessageEventType, id: number, timestamp?: number, uncompressedSize?: number, compressedSize?: number): void; + /** + * Sets a status to the span. + * @param code The canonical status code. + * @param message optional A developer-facing error message. + */ + setStatus(code: CanonicalCode, message?: string): void; + /** Starts a span. */ + start(): void; + /** Ends a span and all of its children, recursively. */ + end(): void; + /** Forces to end a span. */ + truncate(): void; + /** Starts a new Span instance as a child of this instance */ + startChildSpan(options?: SpanOptions): Span; +} +/** Interface for TracerBase */ +export interface TracerBase extends SpanEventListener { + /** A sampler that will decide if the span will be sampled or not */ + sampler: samplerTypes.Sampler; + /** A configuration for starting the tracer */ + logger: loggerTypes.Logger; + /** A configuration object for trace parameters */ + activeTraceParams: configTypes.TraceParams; + /** A propagation instance */ + readonly propagation: Propagation; + /** Get the eventListeners from tracer instance */ + readonly eventListeners: SpanEventListener[]; + /** Get the active status from tracer instance */ + readonly active: boolean; + /** + * Start a tracer instance + * @param config Configuration for tracer instace + * @returns A tracer instance started + */ + start(config: configTypes.TracerConfig): this; + /** Stop the tracer instance */ + stop(): this; + /** + * Start a new RootSpan to currentRootSpan + * @param options Options for tracer instance + * @param fn Callback function + * @returns The callback return + */ + startRootSpan(options: TraceOptions, fn: (root: Span) => T): T; + /** + * Register a OnEndSpanEventListener on the tracer instance + * @param listener An OnEndSpanEventListener instance + */ + registerSpanEventListener(listener: SpanEventListener): void; + /** + * Unregisters an end span event listener. + * @param listener The listener to unregister. + */ + unregisterSpanEventListener(listener: SpanEventListener): void; + /** + * Start a new Span instance to the currentRootSpan + * @param [options] A TraceOptions object to start a root span. + * @returns The new Span instance started + */ + startChildSpan(options?: SpanOptions): Span; + /** Sets the current root span. */ + setCurrentRootSpan(root: Span): void; +} +/** Interface for Tracer */ +export interface Tracer extends TracerBase { + /** Get and set the currentRootSpan to tracer instance */ + currentRootSpan: Span; + /** Clear the currentRootSpan from tracer instance */ + clearCurrentTrace(): void; + /** + * Binds the trace context to the given function. + * This is necessary in order to create child spans correctly in functions + * that are called asynchronously (for example, in a network response + * handler). + * @param fn A function to which to bind the trace context. + */ + wrap(fn: Func): Func; + /** + * Binds the trace context to the given event emitter. + * This is necessary in order to create child spans correctly in event + * handlers. + * @param emitter An event emitter whose handlers should have + * the trace context binded to them. + */ + wrapEmitter(emitter: NodeJsEventEmitter): void; +} diff --git a/node_modules/@opencensus/web-types/build/src/trace/model/types.js b/node_modules/@opencensus/web-types/build/src/trace/model/types.js new file mode 100644 index 000000000..5e5950fce --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/model/types.js @@ -0,0 +1,196 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** An enumeration of canonical status codes. */ +export var CanonicalCode; +(function (CanonicalCode) { + /** + * Not an error; returned on success + */ + CanonicalCode[CanonicalCode["OK"] = 0] = "OK"; + /** + * The operation was cancelled (typically by the caller). + */ + CanonicalCode[CanonicalCode["CANCELLED"] = 1] = "CANCELLED"; + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + CanonicalCode[CanonicalCode["UNKNOWN"] = 2] = "UNKNOWN"; + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT"; + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED"; + /** + * Some requested entity (e.g., file or directory) was not found. + */ + CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND"; + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS"; + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED"; + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED"; + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION"; + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED"; + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + CanonicalCode[CanonicalCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE"; + /** + * Operation is not implemented or not supported/enabled in this service. + */ + CanonicalCode[CanonicalCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED"; + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + CanonicalCode[CanonicalCode["INTERNAL"] = 13] = "INTERNAL"; + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["UNAVAILABLE"] = 14] = "UNAVAILABLE"; + /** + * Unrecoverable data loss or corruption. + */ + CanonicalCode[CanonicalCode["DATA_LOSS"] = 15] = "DATA_LOSS"; + /** + * The request does not have valid authentication credentials for the + * operation. + */ + CanonicalCode[CanonicalCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED"; +})(CanonicalCode || (CanonicalCode = {})); +/** An event describing a message sent/received between Spans. */ +export var MessageEventType; +(function (MessageEventType) { + /** Unknown event type. */ + MessageEventType[MessageEventType["UNSPECIFIED"] = 0] = "UNSPECIFIED"; + /** Indicates a sent message. */ + MessageEventType[MessageEventType["SENT"] = 1] = "SENT"; + /** Indicates a received message. */ + MessageEventType[MessageEventType["RECEIVED"] = 2] = "RECEIVED"; +})(MessageEventType || (MessageEventType = {})); +/** + * Type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +export var SpanKind; +(function (SpanKind) { + /** Unspecified */ + SpanKind[SpanKind["UNSPECIFIED"] = 0] = "UNSPECIFIED"; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote network request. + */ + SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; +})(SpanKind || (SpanKind = {})); +/** + * Type of link. The relationship of the current span relative to the linked + * span. + */ +export var LinkType; +(function (LinkType) { + /** + * The relationship of the two spans is unknown, or known but other + * than parent-child. + */ + LinkType[LinkType["UNSPECIFIED"] = 0] = "UNSPECIFIED"; + /** The linked span is a child of the current span. */ + LinkType[LinkType["CHILD_LINKED_SPAN"] = 1] = "CHILD_LINKED_SPAN"; + /** The linked span is a parent of the current span. */ + LinkType[LinkType["PARENT_LINKED_SPAN"] = 2] = "PARENT_LINKED_SPAN"; +})(LinkType || (LinkType = {})); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/propagation/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/propagation/types.d.ts new file mode 100644 index 000000000..516e1cac2 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/propagation/types.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import { SpanContext } from '../model/types'; +/** + * An transport and environment neutral API for getting request headers. + */ +export interface HeaderGetter { + getHeader(name: string): string | string[] | undefined; +} +/** + * A transport and environment neutral API for setting headers. + */ +export interface HeaderSetter { + setHeader(name: string, value: string): void; +} +/** + * Propagation interface + */ +export interface Propagation { + extract(getter: HeaderGetter): SpanContext | null; + inject(setter: HeaderSetter, spanContext: SpanContext): void; + generate(): SpanContext; +} diff --git a/node_modules/@opencensus/web-types/build/src/trace/propagation/types.js b/node_modules/@opencensus/web-types/build/src/trace/propagation/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/propagation/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/sampler/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/sampler/types.d.ts new file mode 100644 index 000000000..685559043 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/sampler/types.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +/** This interface represent a sampler . */ +export interface Sampler { + /** + * A string that uniquely describes the sampling behavior of this instance. + */ + readonly description: string; + /** + * Checks if trace belong the sample. + * @param traceId Used to check the probability. + * @returns a boolean. True if the traceId is in probability + * False if the traceId is not in probability. + */ + shouldSample(traceId: string): boolean; +} diff --git a/node_modules/@opencensus/web-types/build/src/trace/sampler/types.js b/node_modules/@opencensus/web-types/build/src/trace/sampler/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/sampler/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/build/src/trace/types.d.ts b/node_modules/@opencensus/web-types/build/src/trace/types.d.ts new file mode 100644 index 000000000..6e40a1c82 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/types.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +import * as exportersTypes from '../exporters/types'; +import * as configTypes from './config/types'; +import * as modelTypes from './model/types'; +/** Main interface for tracing. */ +export interface Tracing { + /** Object responsible for managing a trace. */ + readonly tracer: modelTypes.TracerBase; + /** Service to send collected traces to. */ + readonly exporter: exportersTypes.Exporter; + /** Gets active status */ + active: boolean; + /** + * Starts tracing. + * @param userConfig A configuration object to start tracing. + * @returns The started Tracing instance. + */ + start(userConfig?: configTypes.Config): Tracing; + /** Stops tracing. */ + stop(): void; + /** + * Registers an exporter to send the collected traces to. + * @param exporter The exporter to send the traces to. + * @returns The tracing object. + */ + registerExporter(exporter: exportersTypes.Exporter): Tracing; + /** + * Unregisters an exporter. + * @param exporter The exporter to stop sending traces to. + */ + unregisterExporter(exporter: exportersTypes.Exporter): Tracing; +} diff --git a/node_modules/@opencensus/web-types/build/src/trace/types.js b/node_modules/@opencensus/web-types/build/src/trace/types.js new file mode 100644 index 000000000..4ed8a17a0 --- /dev/null +++ b/node_modules/@opencensus/web-types/build/src/trace/types.js @@ -0,0 +1,16 @@ +/** + * Copyright 2019, OpenCensus 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 + * + * http://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. + */ +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/@opencensus/web-types/package.json b/node_modules/@opencensus/web-types/package.json new file mode 100644 index 000000000..fbfd56dda --- /dev/null +++ b/node_modules/@opencensus/web-types/package.json @@ -0,0 +1,86 @@ +{ + "_from": "@opencensus/web-types@0.0.7", + "_id": "@opencensus/web-types@0.0.7", + "_inBundle": false, + "_integrity": "sha512-xB+w7ZDAu3YBzqH44rCmG9/RlrOmFuDPt/bpf17eJr8eZSrLt7nc7LnWdxM9Mmoj/YKMHpxRg28txu3TcpiL+g==", + "_location": "/@opencensus/web-types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@opencensus/web-types@0.0.7", + "name": "@opencensus/web-types", + "escapedName": "@opencensus%2fweb-types", + "scope": "@opencensus", + "rawSpec": "0.0.7", + "saveSpec": null, + "fetchSpec": "0.0.7" + }, + "_requiredBy": [ + "/@azure/core-auth/@azure/core-tracing", + "/@azure/core-tracing" + ], + "_resolved": "https://registry.npmjs.org/@opencensus/web-types/-/web-types-0.0.7.tgz", + "_shasum": "4426de1fe5aa8f624db395d2152b902874f0570a", + "_spec": "@opencensus/web-types@0.0.7", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth/node_modules/@azure/core-tracing", + "author": { + "name": "OpenCensus Authors" + }, + "bugs": { + "url": "https://github.com/census-instrumentation/opencensus-web/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "OpenCensus Web types is a slightly-patched copy of the `types.ts` files from `@opencensus/core` so that they can be easily imported in web-specific packages.", + "devDependencies": { + "gts": "^1.0.0", + "rimraf": "^3.0.0", + "typescript": "^3.1.6" + }, + "engines": { + "node": ">=6.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.d.ts", + "doc", + "CHANGELOG.md", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/census-instrumentation/opencensus-web#readme", + "keywords": [ + "opencensus", + "browser", + "tracing", + "profiling", + "stats", + "metrics" + ], + "license": "Apache-2.0", + "main": "build/src/index.js", + "name": "@opencensus/web-types", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/census-instrumentation/opencensus-web.git" + }, + "scripts": { + "build": "npm run compile", + "check": "gts check", + "clean": "rimraf build/*", + "compile": "tsc -p .", + "copytypes": "node scripts/copy-types.js 'v0.0.13' && npm run fix", + "fix": "gts fix", + "posttest": "npm run check", + "prepare": "npm run compile", + "pretest": "npm run compile", + "test": "npm run compile && npm run check" + }, + "sideEffects": false, + "types": "build/src/index.d.ts", + "version": "0.0.7" +} diff --git a/node_modules/@opentelemetry/api/LICENSE b/node_modules/@opentelemetry/api/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/node_modules/@opentelemetry/api/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/node_modules/@opentelemetry/api/README.md b/node_modules/@opentelemetry/api/README.md new file mode 100644 index 000000000..b824c4ae3 --- /dev/null +++ b/node_modules/@opentelemetry/api/README.md @@ -0,0 +1,211 @@ +# OpenTelemetry API for JavaScript + +[![Gitter chat][gitter-image]][gitter-url] +[![NPM Published Version][npm-img]][npm-url] +[![dependencies][dependencies-image]][dependencies-url] +[![devDependencies][devDependencies-image]][devDependencies-url] +[![Apache License][license-image]][license-image] + +This package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser. + +## Quick Start + +To get started you need to install the SDK and plugins, create a TracerProvider and/or MeterProvider, and register it with the API. + +### Install Dependencies + +```sh +$ # Install tracing dependencies +$ npm install \ + @opentelemetry/api \ + @opentelemetry/core \ + @opentelemetry/node \ + @opentelemetry/tracing \ + @opentelemetry/exporter-jaeger \ # add exporters as needed + @opentelemetry/plugin-http # add plugins as needed + +$ # Install metrics dependencies +$ npm install \ + @opentelemetry/metrics \ + @opentelemetry/exporter-prometheus # add exporters as needed +``` + +> Note: this example is for node.js. See [examples/tracer-web](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a browser example. + +### Initialize the SDK + +Before any other module in your application is loaded, you must initialize the global tracer and meter providers. If you fail to initialize a provider, no-op implementations will be provided to any library which acquires them from the API. + +To collect traces and metrics, you will have to tell the SDK where to export telemetry data to. This example uses Jaeger and Prometheus, but exporters exist for [other tracing backends][other-tracing-backends]. If you're not sure if there is an exporter for your tracing backend, contact your tracing provider. + +#### Tracing + +```javascript +const { NodeTracerProvider } = require("@opentelemetry/node"); +const { SimpleSpanProcessor } = require("@opentelemetry/tracing"); +const { JaegerExporter } = require("@opentelemetry/exporter-jaeger"); + +const tracerProvider = new NodeTracerProvider(); + +/** + * The SimpleSpanProcessor does no batching and exports spans + * immediately when they end. For most production use cases, + * OpenTelemetry recommends use of the BatchSpanProcessor. + */ +tracerProvider.addSpanProcessor( + new SimpleSpanProcessor( + new JaegerExporter({ + serviceName: 'my-service' + }) + ) +); + +/** + * Registering the provider with the API allows it to be discovered + * and used by instrumentation libraries. The OpenTelemetry API provides + * methods to set global SDK implementations, but the default SDK provides + * a convenience method named `register` which registers same defaults + * for you. + * + * By default the NodeTracerProvider uses Trace Context for propagation + * and AsyncHooksScopeManager for context management. To learn about + * customizing this behavior, see API Registration Options below. + */ +tracerProvider.register(); +``` + +#### Metrics + +```javascript +const api = require("@opentelemetry/api"); +const { MeterProvider } = require("@opentelemetry/metrics"); +const { PrometheusExporter } = require("@opentelemetry/exporter-prometheus"); + +const meterProvider = new MeterProvider({ + // The Prometheus exporter runs an HTTP server which + // the Prometheus backend scrapes to collect metrics. + exporter: new PrometheusExporter({ startServer: true }), + interval: 1000, +}); + +/** + * Registering the provider with the API allows it to be discovered + * and used by instrumentation libraries. + */ +api.metrics.setGlobalMeterProvider(meterProvider); +``` + +## Version Compatibility + +Because the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API. + +## Advanced Use + +### API Registration Options + +If you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped. + +```javascript +const { B3Propagator } = require("@opentelemetry/core"); + +tracerProvider.register({ + // Use B3 Propagation + propagator: new B3Propagator(), + + // Skip registering a default context manager + contextManager: null, +}); +``` + +### API Methods + +If you are writing an instrumentation library, or prefer to call the API methods directly rather than using the `register` method on the Tracer/Meter Provider, OpenTelemetry provides direct access to the underlying API methods through the `@opentelemetry/api` package. API entry points are defined as global singleton objects `trace`, `metrics`, `propagation`, and `context` which contain methods used to initialize SDK implementations and acquire resources from the API. + +- [Trace API Documentation][trace-api-docs] +- [Metrics API Documentation][metrics-api-docs] +- [Propagation API Documentation][propagation-api-docs] +- [Context API Documentation][context-api-docs] + +```javascript +const api = require("@opentelemetry/api"); + +/* Initialize TracerProvider */ +api.trace.setGlobalTracerProvider(tracerProvider); +/* returns tracerProvider (no-op if a working provider has not been initialized) */ +api.trace.getTracerProvider(); +/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */ +api.trace.getTracer(name, version); + +/* Initialize MeterProvider */ +api.metrics.setGlobalMeterProvider(meterProvider); +/* returns meterProvider (no-op if a working provider has not been initialized) */ +api.metrics.getMeterProvider(); +/* returns a meter from the registered global meter provider (no-op if a working provider has not been initialized) */ +api.metrics.getMeter(name, version); + +/* Initialize Propagator */ +api.propagation.setGlobalPropagator(httpTraceContextPropagator); + +/* Initialize Context Manager */ +api.context.setGlobalContextManager(asyncHooksContextManager); +``` + +### Library Authors + +Library authors need only to depend on the `@opentelemetry/api` package and trust that the application owners which use their library will initialize an appropriate SDK. + +```javascript +const api = require("@opentelemetry/api"); + +const tracer = api.trace.getTracer("my-library-name", "0.2.3"); + +async function doSomething() { + const span = tracer.startSpan("doSomething", { parent: tracer.getCurrentSpan() }); + try { + const result = await doSomethingElse(); + span.end(); + return result; + } catch (err) { + span.setStatus({ + // use an appropriate status code here + code: api.CanonicalCode.INTERNAL, + message: err.message, + }); + span.end(); + return null; + } +} +``` + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us on [gitter][gitter-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg +[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-api +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api +[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-api +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-api&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/api +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg + +[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/traceapi.html +[metrics-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/metricsapi.html +[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/propagationapi.html +[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/contextapi.html + +[web]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web +[tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing +[node]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node +[metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics + +[other-tracing-backends]: https://github.com/open-telemetry/opentelemetry-js#trace-exporters diff --git a/node_modules/@opentelemetry/api/build/src/api/context.d.ts b/node_modules/@opentelemetry/api/build/src/api/context.d.ts new file mode 100644 index 000000000..bbcacb758 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/context.d.ts @@ -0,0 +1,37 @@ +import { Context, ContextManager } from '@opentelemetry/context-base'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Context API + */ +export declare class ContextAPI { + private static _instance?; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Context API */ + static getInstance(): ContextAPI; + /** + * Set the current context manager. Returns the initialized context manager + */ + setGlobalContextManager(contextManager: ContextManager): ContextManager; + /** + * Get the currently active context + */ + active(): Context; + /** + * Execute a function with an active context + * + * @param context context to be active during function execution + * @param fn function to execute in a context + */ + with ReturnType>(context: Context, fn: T): ReturnType; + /** + * Bind a context to a target function or event emitter + * + * @param target function or event emitter to bind + * @param context context to bind to the event emitter or function. Defaults to the currently active context + */ + bind(target: T, context?: Context): T; + private _getContextManager; + /** Disable and remove the global context manager */ + disable(): void; +} +//# sourceMappingURL=context.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/context.js b/node_modules/@opentelemetry/api/build/src/api/context.js new file mode 100644 index 000000000..adf3f9f6a --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/context.js @@ -0,0 +1,84 @@ +"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.ContextAPI = void 0; +var context_base_1 = require("@opentelemetry/context-base"); +var global_utils_1 = require("./global-utils"); +var NOOP_CONTEXT_MANAGER = new context_base_1.NoopContextManager(); +/** + * Singleton object which represents the entry point to the OpenTelemetry Context API + */ +var ContextAPI = /** @class */ (function () { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + function ContextAPI() { + } + /** Get the singleton instance of the Context API */ + ContextAPI.getInstance = function () { + if (!this._instance) { + this._instance = new ContextAPI(); + } + return this._instance; + }; + /** + * Set the current context manager. Returns the initialized context manager + */ + ContextAPI.prototype.setGlobalContextManager = function (contextManager) { + if (global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]) { + // global context manager has already been set + return this._getContextManager(); + } + global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, contextManager, NOOP_CONTEXT_MANAGER); + return contextManager; + }; + /** + * Get the currently active context + */ + ContextAPI.prototype.active = function () { + return this._getContextManager().active(); + }; + /** + * Execute a function with an active context + * + * @param context context to be active during function execution + * @param fn function to execute in a context + */ + ContextAPI.prototype.with = function (context, fn) { + return this._getContextManager().with(context, fn); + }; + /** + * Bind a context to a target function or event emitter + * + * @param target function or event emitter to bind + * @param context context to bind to the event emitter or function. Defaults to the currently active context + */ + ContextAPI.prototype.bind = function (target, context) { + if (context === void 0) { context = this.active(); } + return this._getContextManager().bind(target, context); + }; + ContextAPI.prototype._getContextManager = function () { + var _a, _b; + return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NOOP_CONTEXT_MANAGER); + }; + /** Disable and remove the global context manager */ + ContextAPI.prototype.disable = function () { + this._getContextManager().disable(); + delete global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]; + }; + return ContextAPI; +}()); +exports.ContextAPI = ContextAPI; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/context.js.map b/node_modules/@opentelemetry/api/build/src/api/context.js.map new file mode 100644 index 000000000..2a56cca28 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/api/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAIqC;AACrC,+CAKwB;AAExB,IAAM,oBAAoB,GAAG,IAAI,iCAAkB,EAAE,CAAC;AAEtD;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,oDAAoD;IACtC,sBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,4CAAuB,GAA9B,UACE,cAA8B;QAE9B,IAAI,sBAAO,CAAC,6CAA8B,CAAC,EAAE;YAC3C,8CAA8C;YAC9C,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAClC;QAED,sBAAO,CAAC,6CAA8B,CAAC,GAAG,yBAAU,CAClD,kDAAmC,EACnC,cAAc,EACd,oBAAoB,CACrB,CAAC;QAEF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,2BAAM,GAAb;QACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACI,yBAAI,GAAX,UACE,OAAgB,EAChB,EAAK;QAEL,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACI,yBAAI,GAAX,UAAe,MAAS,EAAE,OAAgC;QAAhC,wBAAA,EAAA,UAAmB,IAAI,CAAC,MAAM,EAAE;QACxD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAEO,uCAAkB,GAA1B;;QACE,OAAO,aACL,sBAAO,CAAC,6CAA8B,CAAC,+CAAvC,sBAAO,EACL,kDAAmC,oCAChC,oBAAoB,CAC1B,CAAC;IACJ,CAAC;IAED,oDAAoD;IAC7C,4BAAO,GAAd;QACE,IAAI,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,CAAC;QACpC,OAAO,sBAAO,CAAC,6CAA8B,CAAC,CAAC;IACjD,CAAC;IACH,iBAAC;AAAD,CAAC,AA9ED,IA8EC;AA9EY,gCAAU"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/global-utils.d.ts b/node_modules/@opentelemetry/api/build/src/api/global-utils.d.ts new file mode 100644 index 000000000..6936789ad --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/global-utils.d.ts @@ -0,0 +1,34 @@ +import { ContextManager } from '@opentelemetry/context-base'; +import { HttpTextPropagator } from '../context/propagation/HttpTextPropagator'; +import { MeterProvider } from '../metrics/MeterProvider'; +import { TracerProvider } from '../trace/tracer_provider'; +export declare const GLOBAL_CONTEXT_MANAGER_API_KEY: unique symbol; +export declare const GLOBAL_METRICS_API_KEY: unique symbol; +export declare const GLOBAL_PROPAGATION_API_KEY: unique symbol; +export declare const GLOBAL_TRACE_API_KEY: unique symbol; +declare type Get = (version: number) => T; +export declare const _global: Partial<{ + [GLOBAL_CONTEXT_MANAGER_API_KEY]: Get; + [GLOBAL_METRICS_API_KEY]: Get; + [GLOBAL_PROPAGATION_API_KEY]: Get; + [GLOBAL_TRACE_API_KEY]: Get; +}>; +/** + * Make a function which accepts a version integer and returns the instance of an API if the version + * is compatible, or a fallback version (usually NOOP) if it is not. + * + * @param requiredVersion Backwards compatibility version which is required to return the instance + * @param instance Instance which should be returned if the required version is compatible + * @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible + */ +export declare function makeGetter(requiredVersion: number, instance: T, fallback: T): Get; +/** + * A number which should be incremented each time a backwards incompatible + * change is made to the API. This number is used when an API package + * attempts to access the global API to ensure it is getting a compatible + * version. If the global API is not compatible with the API package + * attempting to get it, a NOOP API implementation will be returned. + */ +export declare const API_BACKWARDS_COMPATIBILITY_VERSION = 0; +export {}; +//# sourceMappingURL=global-utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/global-utils.js b/node_modules/@opentelemetry/api/build/src/api/global-utils.js new file mode 100644 index 000000000..0ba6f6553 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/global-utils.js @@ -0,0 +1,47 @@ +"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.API_BACKWARDS_COMPATIBILITY_VERSION = exports.makeGetter = exports._global = exports.GLOBAL_TRACE_API_KEY = exports.GLOBAL_PROPAGATION_API_KEY = exports.GLOBAL_METRICS_API_KEY = exports.GLOBAL_CONTEXT_MANAGER_API_KEY = void 0; +var platform_1 = require("../platform"); +exports.GLOBAL_CONTEXT_MANAGER_API_KEY = Symbol.for('io.opentelemetry.js.api.context'); +exports.GLOBAL_METRICS_API_KEY = Symbol.for('io.opentelemetry.js.api.metrics'); +exports.GLOBAL_PROPAGATION_API_KEY = Symbol.for('io.opentelemetry.js.api.propagation'); +exports.GLOBAL_TRACE_API_KEY = Symbol.for('io.opentelemetry.js.api.trace'); +exports._global = platform_1._globalThis; +/** + * Make a function which accepts a version integer and returns the instance of an API if the version + * is compatible, or a fallback version (usually NOOP) if it is not. + * + * @param requiredVersion Backwards compatibility version which is required to return the instance + * @param instance Instance which should be returned if the required version is compatible + * @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible + */ +function makeGetter(requiredVersion, instance, fallback) { + return function (version) { + return version === requiredVersion ? instance : fallback; + }; +} +exports.makeGetter = makeGetter; +/** + * A number which should be incremented each time a backwards incompatible + * change is made to the API. This number is used when an API package + * attempts to access the global API to ensure it is getting a compatible + * version. If the global API is not compatible with the API package + * attempting to get it, a NOOP API implementation will be returned. + */ +exports.API_BACKWARDS_COMPATIBILITY_VERSION = 0; +//# sourceMappingURL=global-utils.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/global-utils.js.map b/node_modules/@opentelemetry/api/build/src/api/global-utils.js.map new file mode 100644 index 000000000..7f5f41385 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/global-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global-utils.js","sourceRoot":"","sources":["../../../src/api/global-utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAMH,wCAA0C;AAE7B,QAAA,8BAA8B,GAAG,MAAM,CAAC,GAAG,CACtD,iCAAiC,CAClC,CAAC;AACW,QAAA,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAC9C,iCAAiC,CAClC,CAAC;AACW,QAAA,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAClD,qCAAqC,CACtC,CAAC;AACW,QAAA,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAUnE,QAAA,OAAO,GAAG,sBAAyB,CAAC;AAEjD;;;;;;;GAOG;AACH,SAAgB,UAAU,CACxB,eAAuB,EACvB,QAAW,EACX,QAAW;IAEX,OAAO,UAAC,OAAe;QACrB,OAAA,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;IAAjD,CAAiD,CAAC;AACtD,CAAC;AAPD,gCAOC;AAED;;;;;;GAMG;AACU,QAAA,mCAAmC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts b/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts new file mode 100644 index 000000000..2ceb8323f --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts @@ -0,0 +1,27 @@ +import { Meter } from '../metrics/Meter'; +import { MeterProvider } from '../metrics/MeterProvider'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Metrics API + */ +export declare class MetricsAPI { + private static _instance?; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Metrics API */ + static getInstance(): MetricsAPI; + /** + * Set the current global meter. Returns the initialized global meter provider. + */ + setGlobalMeterProvider(provider: MeterProvider): MeterProvider; + /** + * Returns the global meter provider. + */ + getMeterProvider(): MeterProvider; + /** + * Returns a meter from the global meter provider. + */ + getMeter(name: string, version?: string): Meter; + /** Remove the global meter provider */ + disable(): void; +} +//# sourceMappingURL=metrics.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/metrics.js b/node_modules/@opentelemetry/api/build/src/api/metrics.js new file mode 100644 index 000000000..0513c2ef9 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/metrics.js @@ -0,0 +1,66 @@ +"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; +var NoopMeterProvider_1 = require("../metrics/NoopMeterProvider"); +var global_utils_1 = require("./global-utils"); +/** + * Singleton object which represents the entry point to the OpenTelemetry Metrics API + */ +var MetricsAPI = /** @class */ (function () { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + function MetricsAPI() { + } + /** Get the singleton instance of the Metrics API */ + MetricsAPI.getInstance = function () { + if (!this._instance) { + this._instance = new MetricsAPI(); + } + return this._instance; + }; + /** + * Set the current global meter. Returns the initialized global meter provider. + */ + MetricsAPI.prototype.setGlobalMeterProvider = function (provider) { + if (global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]) { + // global meter provider has already been set + return this.getMeterProvider(); + } + global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, provider, NoopMeterProvider_1.NOOP_METER_PROVIDER); + return provider; + }; + /** + * Returns the global meter provider. + */ + MetricsAPI.prototype.getMeterProvider = function () { + var _a, _b; + return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopMeterProvider_1.NOOP_METER_PROVIDER); + }; + /** + * Returns a meter from the global meter provider. + */ + MetricsAPI.prototype.getMeter = function (name, version) { + return this.getMeterProvider().getMeter(name, version); + }; + /** Remove the global meter provider */ + MetricsAPI.prototype.disable = function () { + delete global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]; + }; + return MetricsAPI; +}()); +exports.MetricsAPI = MetricsAPI; +//# sourceMappingURL=metrics.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/metrics.js.map b/node_modules/@opentelemetry/api/build/src/api/metrics.js.map new file mode 100644 index 000000000..508549c36 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/metrics.js.map @@ -0,0 +1 @@ +{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/api/metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,kEAAmE;AACnE,+CAKwB;AAExB;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,oDAAoD;IACtC,sBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,2CAAsB,GAA7B,UAA8B,QAAuB;QACnD,IAAI,sBAAO,CAAC,qCAAsB,CAAC,EAAE;YACnC,6CAA6C;YAC7C,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;SAChC;QAED,sBAAO,CAAC,qCAAsB,CAAC,GAAG,yBAAU,CAC1C,kDAAmC,EACnC,QAAQ,EACR,uCAAmB,CACpB,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,qCAAgB,GAAvB;;QACE,OAAO,aACL,sBAAO,CAAC,qCAAsB,CAAC,+CAA/B,sBAAO,EAA2B,kDAAmC,oCACrE,uCAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,6BAAQ,GAAf,UAAgB,IAAY,EAAE,OAAgB;QAC5C,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,uCAAuC;IAChC,4BAAO,GAAd;QACE,OAAO,sBAAO,CAAC,qCAAsB,CAAC,CAAC;IACzC,CAAC;IACH,iBAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,gCAAU"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts b/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts new file mode 100644 index 000000000..c6f7f3494 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts @@ -0,0 +1,38 @@ +import { Context } from '@opentelemetry/context-base'; +import { GetterFunction } from '../context/propagation/getter'; +import { HttpTextPropagator } from '../context/propagation/HttpTextPropagator'; +import { SetterFunction } from '../context/propagation/setter'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Propagation API + */ +export declare class PropagationAPI { + private static _instance?; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Propagator API */ + static getInstance(): PropagationAPI; + /** + * Set the current propagator. Returns the initialized propagator + */ + setGlobalPropagator(propagator: HttpTextPropagator): HttpTextPropagator; + /** + * Inject context into a carrier to be propagated inter-process + * + * @param carrier carrier to inject context into + * @param setter Function used to set values on the carrier + * @param context Context carrying tracing data to inject. Defaults to the currently active context. + */ + inject(carrier: Carrier, setter?: SetterFunction, context?: Context): void; + /** + * Extract context from a carrier + * + * @param carrier Carrier to extract context from + * @param getter Function used to extract keys from a carrier + * @param context Context which the newly created context will inherit from. Defaults to the currently active context. + */ + extract(carrier: Carrier, getter?: GetterFunction, context?: Context): Context; + /** Remove the global propagator */ + disable(): void; + private _getGlobalPropagator; +} +//# sourceMappingURL=propagation.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/propagation.js b/node_modules/@opentelemetry/api/build/src/api/propagation.js new file mode 100644 index 000000000..8ba270978 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/propagation.js @@ -0,0 +1,85 @@ +"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.PropagationAPI = void 0; +var getter_1 = require("../context/propagation/getter"); +var NoopHttpTextPropagator_1 = require("../context/propagation/NoopHttpTextPropagator"); +var setter_1 = require("../context/propagation/setter"); +var context_1 = require("./context"); +var global_utils_1 = require("./global-utils"); +var contextApi = context_1.ContextAPI.getInstance(); +/** + * Singleton object which represents the entry point to the OpenTelemetry Propagation API + */ +var PropagationAPI = /** @class */ (function () { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + function PropagationAPI() { + } + /** Get the singleton instance of the Propagator API */ + PropagationAPI.getInstance = function () { + if (!this._instance) { + this._instance = new PropagationAPI(); + } + return this._instance; + }; + /** + * Set the current propagator. Returns the initialized propagator + */ + PropagationAPI.prototype.setGlobalPropagator = function (propagator) { + if (global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]) { + // global propagator has already been set + return this._getGlobalPropagator(); + } + global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, propagator, NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR); + return propagator; + }; + /** + * Inject context into a carrier to be propagated inter-process + * + * @param carrier carrier to inject context into + * @param setter Function used to set values on the carrier + * @param context Context carrying tracing data to inject. Defaults to the currently active context. + */ + PropagationAPI.prototype.inject = function (carrier, setter, context) { + if (setter === void 0) { setter = setter_1.defaultSetter; } + if (context === void 0) { context = contextApi.active(); } + return this._getGlobalPropagator().inject(context, carrier, setter); + }; + /** + * Extract context from a carrier + * + * @param carrier Carrier to extract context from + * @param getter Function used to extract keys from a carrier + * @param context Context which the newly created context will inherit from. Defaults to the currently active context. + */ + PropagationAPI.prototype.extract = function (carrier, getter, context) { + if (getter === void 0) { getter = getter_1.defaultGetter; } + if (context === void 0) { context = contextApi.active(); } + return this._getGlobalPropagator().extract(context, carrier, getter); + }; + /** Remove the global propagator */ + PropagationAPI.prototype.disable = function () { + delete global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]; + }; + PropagationAPI.prototype._getGlobalPropagator = function () { + var _a, _b; + return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR); + }; + return PropagationAPI; +}()); +exports.PropagationAPI = PropagationAPI; +//# sourceMappingURL=propagation.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/propagation.js.map b/node_modules/@opentelemetry/api/build/src/api/propagation.js.map new file mode 100644 index 000000000..f98211c6a --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/propagation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"propagation.js","sourceRoot":"","sources":["../../../src/api/propagation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,wDAA8E;AAE9E,wFAA0F;AAC1F,wDAA8E;AAC9E,qCAAuC;AACvC,+CAKwB;AAExB,IAAM,UAAU,GAA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aACL,sBAAO,CAAC,yCAA0B,CAAC,+CAAnC,sBAAO,EACL,kDAAmC,oCAChC,kDAAyB,CAC/B,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,AA7ED,IA6EC;AA7EY,wCAAc"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/trace.d.ts b/node_modules/@opentelemetry/api/build/src/api/trace.d.ts new file mode 100644 index 000000000..bc62e0623 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/trace.d.ts @@ -0,0 +1,27 @@ +import { Tracer } from '../trace/tracer'; +import { TracerProvider } from '../trace/tracer_provider'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Tracing API + */ +export declare class TraceAPI { + private static _instance?; + /** Empty private constructor prevents end users from constructing a new instance of the API */ + private constructor(); + /** Get the singleton instance of the Trace API */ + static getInstance(): TraceAPI; + /** + * Set the current global tracer. Returns the initialized global tracer provider + */ + setGlobalTracerProvider(provider: TracerProvider): TracerProvider; + /** + * Returns the global tracer provider. + */ + getTracerProvider(): TracerProvider; + /** + * Returns a tracer from the global tracer provider. + */ + getTracer(name: string, version?: string): Tracer; + /** Remove the global tracer provider */ + disable(): void; +} +//# sourceMappingURL=trace.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/trace.js b/node_modules/@opentelemetry/api/build/src/api/trace.js new file mode 100644 index 000000000..63bcc0334 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/trace.js @@ -0,0 +1,66 @@ +"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.TraceAPI = void 0; +var NoopTracerProvider_1 = require("../trace/NoopTracerProvider"); +var global_utils_1 = require("./global-utils"); +/** + * Singleton object which represents the entry point to the OpenTelemetry Tracing API + */ +var TraceAPI = /** @class */ (function () { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + function TraceAPI() { + } + /** Get the singleton instance of the Trace API */ + TraceAPI.getInstance = function () { + if (!this._instance) { + this._instance = new TraceAPI(); + } + return this._instance; + }; + /** + * Set the current global tracer. Returns the initialized global tracer provider + */ + TraceAPI.prototype.setGlobalTracerProvider = function (provider) { + if (global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]) { + // global tracer provider has already been set + return this.getTracerProvider(); + } + global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, provider, NoopTracerProvider_1.NOOP_TRACER_PROVIDER); + return this.getTracerProvider(); + }; + /** + * Returns the global tracer provider. + */ + TraceAPI.prototype.getTracerProvider = function () { + var _a, _b; + return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopTracerProvider_1.NOOP_TRACER_PROVIDER); + }; + /** + * Returns a tracer from the global tracer provider. + */ + TraceAPI.prototype.getTracer = function (name, version) { + return this.getTracerProvider().getTracer(name, version); + }; + /** Remove the global tracer provider */ + TraceAPI.prototype.disable = function () { + delete global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]; + }; + return TraceAPI; +}()); +exports.TraceAPI = TraceAPI; +//# sourceMappingURL=trace.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/api/trace.js.map b/node_modules/@opentelemetry/api/build/src/api/trace.js.map new file mode 100644 index 000000000..847ada1ba --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/api/trace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/api/trace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kEAAmE;AAGnE,+CAKwB;AAExB;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,kDAAkD;IACpC,oBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;SACjC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,0CAAuB,GAA9B,UAA+B,QAAwB;QACrD,IAAI,sBAAO,CAAC,mCAAoB,CAAC,EAAE;YACjC,8CAA8C;YAC9C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;SACjC;QAED,sBAAO,CAAC,mCAAoB,CAAC,GAAG,yBAAU,CACxC,kDAAmC,EACnC,QAAQ,EACR,yCAAoB,CACrB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,oCAAiB,GAAxB;;QACE,OAAO,aACL,sBAAO,CAAC,mCAAoB,CAAC,+CAA7B,sBAAO,EAAyB,kDAAmC,oCACnE,yCAAoB,CACrB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,4BAAS,GAAhB,UAAiB,IAAY,EAAE,OAAgB;QAC7C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,wCAAwC;IACjC,0BAAO,GAAd;QACE,OAAO,sBAAO,CAAC,mCAAoB,CAAC,CAAC;IACvC,CAAC;IACH,eAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts b/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts new file mode 100644 index 000000000..47b114fe6 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Logger.d.ts @@ -0,0 +1,9 @@ +export declare type LogFunction = (message: string, ...args: unknown[]) => void; +/** Defines a logger interface. */ +export interface Logger { + error: LogFunction; + warn: LogFunction; + info: LogFunction; + debug: LogFunction; +} +//# sourceMappingURL=Logger.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Logger.js b/node_modules/@opentelemetry/api/build/src/common/Logger.js new file mode 100644 index 000000000..438fef07d --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Logger.js @@ -0,0 +1,18 @@ +"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=Logger.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Logger.js.map b/node_modules/@opentelemetry/api/build/src/common/Logger.js.map new file mode 100644 index 000000000..86bbb763e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/common/Logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Time.d.ts b/node_modules/@opentelemetry/api/build/src/common/Time.d.ts new file mode 100644 index 000000000..8c961b334 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Time.d.ts @@ -0,0 +1,8 @@ +export declare type HrTime = [number, number]; +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +export declare type TimeInput = HrTime | number | Date; +//# sourceMappingURL=Time.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Time.js b/node_modules/@opentelemetry/api/build/src/common/Time.js new file mode 100644 index 000000000..1faaf6983 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Time.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Time.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/common/Time.js.map b/node_modules/@opentelemetry/api/build/src/common/Time.js.map new file mode 100644 index 000000000..2338e2463 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/common/Time.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../src/common/Time.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts new file mode 100644 index 000000000..422ae5e07 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.d.ts @@ -0,0 +1,44 @@ +import { Context } from '@opentelemetry/context-base'; +import { SetterFunction } from './setter'; +import { GetterFunction } from './getter'; +/** + * Injects `Context` into and extracts it from carriers that travel + * in-band across process boundaries. Encoding is expected to conform to the + * HTTP Header Field semantics. Values are often encoded as RPC/HTTP request + * headers. + * + * The carrier of propagated data on both the client (injector) and server + * (extractor) side is usually an object such as http headers. Propagation is + * usually implemented via library-specific request interceptors, where the + * client-side injects values and the server-side extracts them. + */ +export interface HttpTextPropagator { + /** + * Injects values from a given `Context` into a carrier. + * + * OpenTelemetry defines a common set of format values (HttpTextPropagator), + * and each has an expected `carrier` type. + * + * @param context the Context from which to extract values to transmit over + * the wire. + * @param carrier the carrier of propagation fields, such as http request + * headers. + * @param setter a function which accepts a carrier, key, and value, which + * sets the key on the carrier to the value. + */ + inject(context: Context, carrier: unknown, setter: SetterFunction): void; + /** + * Given a `Context` and a carrier, extract context values from a + * carrier and return a new context, created from the old context, with the + * extracted values. + * + * @param context the Context from which to extract values to transmit over + * the wire. + * @param carrier the carrier of propagation fields, such as http request + * headers. + * @param getter a function which accepts a carrier and a key, and returns + * the value from the carrier identified by the key. + */ + extract(context: Context, carrier: unknown, getter: GetterFunction): Context; +} +//# sourceMappingURL=HttpTextPropagator.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js new file mode 100644 index 000000000..dc184983e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js @@ -0,0 +1,18 @@ +"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=HttpTextPropagator.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js.map b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js.map new file mode 100644 index 000000000..07e32d08e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/HttpTextPropagator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HttpTextPropagator.js","sourceRoot":"","sources":["../../../../src/context/propagation/HttpTextPropagator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts new file mode 100644 index 000000000..5cbf15e25 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.d.ts @@ -0,0 +1,13 @@ +import { Context } from '@opentelemetry/context-base'; +import { HttpTextPropagator } from './HttpTextPropagator'; +/** + * No-op implementations of {@link HttpTextPropagator}. + */ +export declare class NoopHttpTextPropagator implements HttpTextPropagator { + /** Noop inject function does nothing */ + inject(context: Context, carrier: unknown, setter: Function): void; + /** Noop extract function does nothing and returns the input context */ + extract(context: Context, carrier: unknown, getter: Function): Context; +} +export declare const NOOP_HTTP_TEXT_PROPAGATOR: NoopHttpTextPropagator; +//# sourceMappingURL=NoopHttpTextPropagator.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js new file mode 100644 index 000000000..4b83ac1a0 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js @@ -0,0 +1,35 @@ +"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_HTTP_TEXT_PROPAGATOR = exports.NoopHttpTextPropagator = void 0; +/** + * No-op implementations of {@link HttpTextPropagator}. + */ +var NoopHttpTextPropagator = /** @class */ (function () { + function NoopHttpTextPropagator() { + } + /** Noop inject function does nothing */ + NoopHttpTextPropagator.prototype.inject = function (context, carrier, setter) { }; + /** Noop extract function does nothing and returns the input context */ + NoopHttpTextPropagator.prototype.extract = function (context, carrier, getter) { + return context; + }; + return NoopHttpTextPropagator; +}()); +exports.NoopHttpTextPropagator = NoopHttpTextPropagator; +exports.NOOP_HTTP_TEXT_PROPAGATOR = new NoopHttpTextPropagator(); +//# sourceMappingURL=NoopHttpTextPropagator.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js.map b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js.map new file mode 100644 index 000000000..31691fb65 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/NoopHttpTextPropagator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopHttpTextPropagator.js","sourceRoot":"","sources":["../../../../src/context/propagation/NoopHttpTextPropagator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH;;GAEG;AACH;IAAA;IAOA,CAAC;IANC,wCAAwC;IACxC,uCAAM,GAAN,UAAO,OAAgB,EAAE,OAAgB,EAAE,MAAgB,IAAS,CAAC;IACrE,uEAAuE;IACvE,wCAAO,GAAP,UAAQ,OAAgB,EAAE,OAAgB,EAAE,MAAgB;QAC1D,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,6BAAC;AAAD,CAAC,AAPD,IAOC;AAPY,wDAAsB;AAStB,QAAA,yBAAyB,GAAG,IAAI,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts new file mode 100644 index 000000000..b87f43570 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.d.ts @@ -0,0 +1,10 @@ +export declare type GetterFunction = (carrier: Carrier, key: string) => unknown; +/** + * Default getter which just does a simple property access. Returns + * undefined if the key is not set. + * + * @param carrier + * @param key + */ +export declare function defaultGetter(carrier: any, key: string): unknown; +//# sourceMappingURL=getter.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js new file mode 100644 index 000000000..ad22ef524 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js @@ -0,0 +1,30 @@ +"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.defaultGetter = void 0; +/** + * Default getter which just does a simple property access. Returns + * undefined if the key is not set. + * + * @param carrier + * @param key + */ +function defaultGetter(carrier, key) { + return carrier[key]; +} +exports.defaultGetter = defaultGetter; +//# sourceMappingURL=getter.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js.map b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js.map new file mode 100644 index 000000000..d81979f24 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/getter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../src/context/propagation/getter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,OAAY,EAAE,GAAW;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,sCAEC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts new file mode 100644 index 000000000..2f9d195f2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.d.ts @@ -0,0 +1,9 @@ +export declare type SetterFunction = (carrier: Carrier, key: string, value: unknown) => void; +/** + * Default setter which sets value via direct property access + * + * @param carrier + * @param key + */ +export declare function defaultSetter(carrier: any, key: string, value: unknown): void; +//# sourceMappingURL=setter.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js new file mode 100644 index 000000000..f55be0084 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js @@ -0,0 +1,29 @@ +"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.defaultSetter = void 0; +/** + * Default setter which sets value via direct property access + * + * @param carrier + * @param key + */ +function defaultSetter(carrier, key, value) { + carrier[key] = value; +} +exports.defaultSetter = defaultSetter; +//# sourceMappingURL=setter.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js.map b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js.map new file mode 100644 index 000000000..3d1514db9 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/context/propagation/setter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"setter.js","sourceRoot":"","sources":["../../../../src/context/propagation/setter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,OAAY,EAAE,GAAW,EAAE,KAAc;IACrE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AACvB,CAAC;AAFD,sCAEC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts new file mode 100644 index 000000000..037a2e107 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.d.ts @@ -0,0 +1,13 @@ +import { EntryValue } from './EntryValue'; +/** + * CorrelationContext represents collection of entries. Each key of + * CorrelationContext is associated with exactly one value. CorrelationContext + * is serializable, to facilitate propagating it not only inside the process + * but also across process boundaries. CorrelationContext is used to annotate + * telemetry with the name:value pair Entry. Those values can be used to add + * dimension to the metric or additional contest properties to logs and traces. + */ +export interface CorrelationContext { + [entryKey: string]: EntryValue; +} +//# sourceMappingURL=CorrelationContext.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js new file mode 100644 index 000000000..dc2be89c5 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js @@ -0,0 +1,18 @@ +"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=CorrelationContext.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js.map b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js.map new file mode 100644 index 000000000..06297541e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/CorrelationContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CorrelationContext.js","sourceRoot":"","sources":["../../../src/correlation_context/CorrelationContext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts new file mode 100644 index 000000000..9f137e0cb --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.d.ts @@ -0,0 +1,24 @@ +export interface EntryValue { + /** `String` value of the `EntryValue`. */ + value: string; + /** + * ttl is an integer that represents number of hops an entry can + * propagate. + */ + ttl?: EntryTtl; +} +/** + * EntryTtl is an integer that represents number of hops an entry can propagate. + * + * For now, ONLY special values (0 and -1) are supported. + */ +export declare enum EntryTtl { + /** + * NO_PROPAGATION is considered to have local context and is used within the + * process it created. + */ + NO_PROPAGATION = 0, + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + UNLIMITED_PROPAGATION = -1 +} +//# sourceMappingURL=EntryValue.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js new file mode 100644 index 000000000..bd05de48b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EntryTtl = void 0; +/** + * EntryTtl is an integer that represents number of hops an entry can propagate. + * + * For now, ONLY special values (0 and -1) are supported. + */ +var EntryTtl; +(function (EntryTtl) { + /** + * NO_PROPAGATION is considered to have local context and is used within the + * process it created. + */ + EntryTtl[EntryTtl["NO_PROPAGATION"] = 0] = "NO_PROPAGATION"; + /** UNLIMITED_PROPAGATION can propagate unlimited hops. */ + EntryTtl[EntryTtl["UNLIMITED_PROPAGATION"] = -1] = "UNLIMITED_PROPAGATION"; +})(EntryTtl = exports.EntryTtl || (exports.EntryTtl = {})); +//# sourceMappingURL=EntryValue.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js.map b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js.map new file mode 100644 index 000000000..0dfb87d80 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/correlation_context/EntryValue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EntryValue.js","sourceRoot":"","sources":["../../../src/correlation_context/EntryValue.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,IAAY,QASX;AATD,WAAY,QAAQ;IAClB;;;OAGG;IACH,2DAAkB,CAAA;IAElB,0DAA0D;IAC1D,0EAA0B,CAAA;AAC5B,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/index.d.ts b/node_modules/@opentelemetry/api/build/src/index.d.ts new file mode 100644 index 000000000..e25af266b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/index.d.ts @@ -0,0 +1,58 @@ +export * from './common/Logger'; +export * from './common/Time'; +export * from './context/propagation/getter'; +export * from './context/propagation/HttpTextPropagator'; +export * from './context/propagation/NoopHttpTextPropagator'; +export * from './context/propagation/setter'; +export * from './correlation_context/CorrelationContext'; +export * from './correlation_context/EntryValue'; +export * from './metrics/BatchObserverResult'; +export * from './metrics/BoundInstrument'; +export * from './metrics/Meter'; +export * from './metrics/MeterProvider'; +export * from './metrics/Metric'; +export * from './metrics/NoopMeter'; +export * from './metrics/NoopMeterProvider'; +export * from './metrics/Observation'; +export * from './metrics/ObserverResult'; +export * from './trace/attributes'; +export * from './trace/Event'; +export * from './trace/instrumentation/Plugin'; +export * from './trace/link_context'; +export * from './trace/link'; +export * from './trace/NoopSpan'; +export * from './trace/NoopTracer'; +export * from './trace/NoopTracerProvider'; +export * from './trace/Sampler'; +export * from './trace/SamplingResult'; +export * from './trace/span_context'; +export * from './trace/span_kind'; +export * from './trace/span'; +export * from './trace/SpanOptions'; +export * from './trace/status'; +export * from './trace/TimedEvent'; +export * from './trace/trace_flags'; +export * from './trace/trace_state'; +export * from './trace/tracer_provider'; +export * from './trace/tracer'; +export { Context } from '@opentelemetry/context-base'; +import { ContextAPI } from './api/context'; +/** Entrypoint for context API */ +export declare const context: ContextAPI; +import { TraceAPI } from './api/trace'; +/** Entrypoint for trace API */ +export declare const trace: TraceAPI; +import { MetricsAPI } from './api/metrics'; +/** Entrypoint for metrics API */ +export declare const metrics: MetricsAPI; +import { PropagationAPI } from './api/propagation'; +/** Entrypoint for propagation API */ +export declare const propagation: PropagationAPI; +declare const _default: { + trace: TraceAPI; + metrics: MetricsAPI; + context: ContextAPI; + propagation: PropagationAPI; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/index.js b/node_modules/@opentelemetry/api/build/src/index.js new file mode 100644 index 000000000..ff9dc7301 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/index.js @@ -0,0 +1,86 @@ +"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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.propagation = exports.metrics = exports.trace = exports.context = void 0; +__exportStar(require("./common/Logger"), exports); +__exportStar(require("./common/Time"), exports); +__exportStar(require("./context/propagation/getter"), exports); +__exportStar(require("./context/propagation/HttpTextPropagator"), exports); +__exportStar(require("./context/propagation/NoopHttpTextPropagator"), exports); +__exportStar(require("./context/propagation/setter"), exports); +__exportStar(require("./correlation_context/CorrelationContext"), exports); +__exportStar(require("./correlation_context/EntryValue"), exports); +__exportStar(require("./metrics/BatchObserverResult"), exports); +__exportStar(require("./metrics/BoundInstrument"), exports); +__exportStar(require("./metrics/Meter"), exports); +__exportStar(require("./metrics/MeterProvider"), exports); +__exportStar(require("./metrics/Metric"), exports); +__exportStar(require("./metrics/NoopMeter"), exports); +__exportStar(require("./metrics/NoopMeterProvider"), exports); +__exportStar(require("./metrics/Observation"), exports); +__exportStar(require("./metrics/ObserverResult"), exports); +__exportStar(require("./trace/attributes"), exports); +__exportStar(require("./trace/Event"), exports); +__exportStar(require("./trace/instrumentation/Plugin"), exports); +__exportStar(require("./trace/link_context"), exports); +__exportStar(require("./trace/link"), exports); +__exportStar(require("./trace/NoopSpan"), exports); +__exportStar(require("./trace/NoopTracer"), exports); +__exportStar(require("./trace/NoopTracerProvider"), exports); +__exportStar(require("./trace/Sampler"), exports); +__exportStar(require("./trace/SamplingResult"), exports); +__exportStar(require("./trace/span_context"), exports); +__exportStar(require("./trace/span_kind"), exports); +__exportStar(require("./trace/span"), exports); +__exportStar(require("./trace/SpanOptions"), exports); +__exportStar(require("./trace/status"), exports); +__exportStar(require("./trace/TimedEvent"), exports); +__exportStar(require("./trace/trace_flags"), exports); +__exportStar(require("./trace/trace_state"), exports); +__exportStar(require("./trace/tracer_provider"), exports); +__exportStar(require("./trace/tracer"), exports); +var context_base_1 = require("@opentelemetry/context-base"); +Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_base_1.Context; } }); +var context_1 = require("./api/context"); +/** Entrypoint for context API */ +exports.context = context_1.ContextAPI.getInstance(); +var trace_1 = require("./api/trace"); +/** Entrypoint for trace API */ +exports.trace = trace_1.TraceAPI.getInstance(); +var metrics_1 = require("./api/metrics"); +/** Entrypoint for metrics API */ +exports.metrics = metrics_1.MetricsAPI.getInstance(); +var propagation_1 = require("./api/propagation"); +/** Entrypoint for propagation API */ +exports.propagation = propagation_1.PropagationAPI.getInstance(); +exports.default = { + trace: exports.trace, + metrics: exports.metrics, + context: exports.context, + propagation: exports.propagation, +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/index.js.map b/node_modules/@opentelemetry/api/build/src/index.js.map new file mode 100644 index 000000000..47fa23ebb --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,kDAAgC;AAChC,gDAA8B;AAC9B,+DAA6C;AAC7C,2EAAyD;AACzD,+EAA6D;AAC7D,+DAA6C;AAC7C,2EAAyD;AACzD,mEAAiD;AACjD,gEAA8C;AAC9C,4DAA0C;AAC1C,kDAAgC;AAChC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,qDAAmC;AACnC,gDAA8B;AAC9B,iEAA+C;AAC/C,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,qDAAmC;AACnC,6DAA2C;AAC3C,kDAAgC;AAChC,yDAAuC;AACvC,uDAAqC;AACrC,oDAAkC;AAClC,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,iDAA+B;AAE/B,4DAAsD;AAA7C,uGAAA,OAAO,OAAA;AAEhB,yCAA2C;AAC3C,iCAAiC;AACpB,QAAA,OAAO,GAAG,oBAAU,CAAC,WAAW,EAAE,CAAC;AAEhD,qCAAuC;AACvC,+BAA+B;AAClB,QAAA,KAAK,GAAG,gBAAQ,CAAC,WAAW,EAAE,CAAC;AAE5C,yCAA2C;AAC3C,iCAAiC;AACpB,QAAA,OAAO,GAAG,oBAAU,CAAC,WAAW,EAAE,CAAC;AAEhD,iDAAmD;AACnD,qCAAqC;AACxB,QAAA,WAAW,GAAG,4BAAc,CAAC,WAAW,EAAE,CAAC;AAExD,kBAAe;IACb,KAAK,eAAA;IACL,OAAO,iBAAA;IACP,OAAO,iBAAA;IACP,WAAW,qBAAA;CACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.d.ts new file mode 100644 index 000000000..ac964ad97 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.d.ts @@ -0,0 +1,15 @@ +import { Labels } from './Metric'; +import { Observation } from './Observation'; +/** + * Interface that is being used in callback function for Observer Metric + * for batch + */ +export interface BatchObserverResult { + /** + * Used to observe (update) observations for certain labels + * @param labels + * @param observations + */ + observe(labels: Labels, observations: Observation[]): void; +} +//# sourceMappingURL=BatchObserverResult.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js new file mode 100644 index 000000000..28b83616c --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js @@ -0,0 +1,18 @@ +"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=BatchObserverResult.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js.map b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js.map new file mode 100644 index 000000000..e75a573fb --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BatchObserverResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BatchObserverResult.js","sourceRoot":"","sources":["../../../src/metrics/BatchObserverResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts new file mode 100644 index 000000000..40f03280a --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.d.ts @@ -0,0 +1,29 @@ +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +/** An Instrument for Counter Metric. */ +export interface BoundCounter { + /** + * Adds the given value to the current value. Values cannot be negative. + * @param value the value to add. + */ + add(value: number): void; +} +/** ValueRecorder to report instantaneous measurement of a value. */ +export interface BoundValueRecorder { + /** + * Records the given value to this value recorder. + * @param value to record. + * @param correlationContext the correlationContext associated with the + * values. + * @param spanContext the {@link SpanContext} that identifies the {@link Span} + * which the values are associated with. + */ + record(value: number): void; + record(value: number, correlationContext: CorrelationContext): void; + record(value: number, correlationContext: CorrelationContext, spanContext: SpanContext): void; +} +/** An Instrument for Base Observer */ +export interface BoundBaseObserver { + update(value: number): void; +} +//# sourceMappingURL=BoundInstrument.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js new file mode 100644 index 000000000..2be1b29e8 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js @@ -0,0 +1,18 @@ +"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=BoundInstrument.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js.map b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js.map new file mode 100644 index 000000000..6c63352cb --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/BoundInstrument.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BoundInstrument.js","sourceRoot":"","sources":["../../../src/metrics/BoundInstrument.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts new file mode 100644 index 000000000..1a10cb855 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts @@ -0,0 +1,60 @@ +import { BatchObserverResult } from './BatchObserverResult'; +import { MetricOptions, Counter, ValueRecorder, ValueObserver, BatchObserver, BatchMetricOptions, UpDownCounter } from './Metric'; +import { ObserverResult } from './ObserverResult'; +/** + * An interface to allow the recording metrics. + * + * {@link Metric}s are used for recording pre-defined aggregation (`Counter`), + * or raw values (`ValueRecorder`) in which the aggregation and labels + * for the exported metric are deferred. + */ +export interface Meter { + /** + * Creates and returns a new `ValueRecorder`. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createValueRecorder(name: string, options?: MetricOptions): ValueRecorder; + /** + * Creates a new `Counter` metric. Generally, this kind of metric when the + * value is a quantity, the sum is of primary interest, and the event count + * and value distribution are not of primary interest. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createCounter(name: string, options?: MetricOptions): Counter; + /** + * Creates a new `UpDownCounter` metric. UpDownCounter is a synchronous + * instrument and very similar to Counter except that Add(increment) + * supports negative increments. It is generally useful for capturing changes + * in an amount of resources used, or any quantity that rises and falls + * during a request. + * Example uses for UpDownCounter: + *
    + *
  1. count the number of active requests.
  2. + *
  3. count memory in use by instrumenting new and delete.
  4. + *
  5. count queue size by instrumenting enqueue and dequeue.
  6. + *
  7. count semaphore up and down operations.
  8. + *
+ * + * @param name the name of the metric. + * @param [options] the metric options. + */ + createUpDownCounter(name: string, options?: MetricOptions): UpDownCounter; + /** + * Creates a new `ValueObserver` metric. + * @param name the name of the metric. + * @param [options] the metric options. + * @param [callback] the observer callback + */ + createValueObserver(name: string, options?: MetricOptions, callback?: (observerResult: ObserverResult) => void): ValueObserver; + /** + * Creates a new `BatchObserver` metric, can be used to update many metrics + * at the same time and when operations needs to be async + * @param name the name of the metric. + * @param callback the batch observer callback + * @param [options] the metric batch options. + */ + createBatchObserver(name: string, callback: (batchObserverResult: BatchObserverResult) => void, options?: BatchMetricOptions): BatchObserver; +} +//# sourceMappingURL=Meter.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Meter.js b/node_modules/@opentelemetry/api/build/src/metrics/Meter.js new file mode 100644 index 000000000..56b930c6e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Meter.js @@ -0,0 +1,18 @@ +"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=Meter.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Meter.js.map b/node_modules/@opentelemetry/api/build/src/metrics/Meter.js.map new file mode 100644 index 000000000..4324185b7 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Meter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Meter.js","sourceRoot":"","sources":["../../../src/metrics/Meter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts new file mode 100644 index 000000000..65bc4d6cd --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts @@ -0,0 +1,16 @@ +import { Meter } from './Meter'; +/** + * A registry for creating named {@link Meter}s. + */ +export interface MeterProvider { + /** + * Returns a Meter, creating one if one with the given name and version is + * not already created. + * + * @param name The name of the meter or instrumentation library. + * @param version The version of the meter or instrumentation library. + * @returns Meter A Meter with the given name and version + */ + getMeter(name: string, version?: string): Meter; +} +//# sourceMappingURL=MeterProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js new file mode 100644 index 000000000..e94205e7c --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js @@ -0,0 +1,18 @@ +"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=MeterProvider.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js.map b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js.map new file mode 100644 index 000000000..f43348c3c --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/MeterProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts new file mode 100644 index 000000000..6f8752c50 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts @@ -0,0 +1,139 @@ +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +import { BoundBaseObserver, BoundCounter, BoundValueRecorder } from './BoundInstrument'; +import { Logger } from '../common/Logger'; +/** + * Options needed for metric creation + */ +export interface MetricOptions { + /** The name of the component that reports the Metric. */ + component?: string; + /** + * The description of the Metric. + * @default '' + */ + description?: string; + /** + * The unit of the Metric values. + * @default '1' + */ + unit?: string; + /** The map of constant labels for the Metric. */ + constantLabels?: Map; + /** + * Indicates the metric is a verbose metric that is disabled by default + * @default false + */ + disabled?: boolean; + /** + * (Measure only, default true) Asserts that this metric will only accept + * non-negative values (e.g. disk usage). + */ + absolute?: boolean; + /** + * Indicates the type of the recorded value. + * @default {@link ValueType.DOUBLE} + */ + valueType?: ValueType; + /** + * User provided logger. + */ + logger?: Logger; +} +export interface BatchMetricOptions extends MetricOptions { + /** + * Indicates how long the batch metric should wait to update before cancel + */ + maxTimeoutUpdateMS?: number; +} +/** The Type of value. It describes how the data is reported. */ +export declare enum ValueType { + INT = 0, + DOUBLE = 1 +} +/** + * Metric represents a base class for different types of metric + * pre aggregations. + */ +export interface Metric { + /** + * Clears all bound instruments from the Metric. + */ + clear(): void; +} +/** + * UnboundMetric represents a base class for different types of metric + * pre aggregations without label value bound yet. + */ +export interface UnboundMetric extends Metric { + /** + * Returns a Instrument associated with specified Labels. + * It is recommended to keep a reference to the Instrument instead of always + * calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + bind(labels: Labels): T; + /** + * Removes the Instrument from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + unbind(labels: Labels): void; +} +/** + * Counter is the most common synchronous instrument. This instrument supports + * an `Add(increment)` function for reporting a sum, and is restricted to + * non-negative increments. The default aggregation is Sum, as for any additive + * instrument. + * + * Example uses for Counter: + *
    + *
  1. count the number of bytes received.
  2. + *
  3. count the number of requests completed.
  4. + *
  5. count the number of accounts created.
  6. + *
  7. count the number of checkpoints run.
  8. + *
  9. count the number of 5xx errors.
  10. + *
      + */ +export interface Counter extends UnboundMetric { + /** + * Adds the given value to the current value. Values cannot be negative. + */ + add(value: number, labels?: Labels): void; +} +export interface UpDownCounter extends UnboundMetric { + /** + * Adds the given value to the current value. Values can be negative. + */ + add(value: number, labels?: Labels): void; +} +export interface ValueRecorder extends UnboundMetric { + /** + * Records the given value to this value recorder. + */ + record(value: number, labels?: Labels): void; + record(value: number, labels: Labels, correlationContext: CorrelationContext): void; + record(value: number, labels: Labels, correlationContext: CorrelationContext, spanContext: SpanContext): void; +} +/** Base interface for the Observer metrics. */ +export interface BaseObserver extends UnboundMetric { + observation: (value: number) => { + value: number; + observer: BaseObserver; + }; +} +/** Base interface for the ValueObserver metrics. */ +export declare type ValueObserver = BaseObserver; +/** Base interface for the UpDownSumObserver metrics. */ +export declare type UpDownSumObserver = BaseObserver; +/** Base interface for the SumObserver metrics. */ +export declare type SumObserver = BaseObserver; +/** Base interface for the Batch Observer metrics. */ +export declare type BatchObserver = Metric; +/** + * key-value pairs passed by the user. + */ +export declare type Labels = { + [key: string]: string; +}; +//# sourceMappingURL=Metric.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Metric.js b/node_modules/@opentelemetry/api/build/src/metrics/Metric.js new file mode 100644 index 000000000..4966c3d51 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Metric.js @@ -0,0 +1,25 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Metric.js.map b/node_modules/@opentelemetry/api/build/src/metrics/Metric.js.map new file mode 100644 index 000000000..2456e100f --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Metric.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Metric.js","sourceRoot":"","sources":["../../../src/metrics/Metric.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAgEH,gEAAgE;AAChE,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,6CAAM,CAAA;AACR,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts new file mode 100644 index 000000000..d42a785b8 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts @@ -0,0 +1,100 @@ +import { BatchObserverResult } from './BatchObserverResult'; +import { Meter } from './Meter'; +import { MetricOptions, UnboundMetric, Labels, Counter, ValueRecorder, ValueObserver, BatchObserver, UpDownCounter, BaseObserver } from './Metric'; +import { BoundValueRecorder, BoundCounter, BoundBaseObserver } from './BoundInstrument'; +import { CorrelationContext } from '../correlation_context/CorrelationContext'; +import { SpanContext } from '../trace/span_context'; +import { ObserverResult } from './ObserverResult'; +/** + * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses + * constant NoopMetrics for all of its methods. + */ +export declare class NoopMeter implements Meter { + constructor(); + /** + * Returns constant noop value recorder. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createValueRecorder(name: string, options?: MetricOptions): ValueRecorder; + /** + * Returns a constant noop counter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createCounter(name: string, options?: MetricOptions): Counter; + /** + * Returns a constant noop UpDownCounter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + createUpDownCounter(name: string, options?: MetricOptions): UpDownCounter; + /** + * Returns constant noop value observer. + * @param name the name of the metric. + * @param [options] the metric options. + * @param [callback] the value observer callback + */ + createValueObserver(name: string, options?: MetricOptions, callback?: (observerResult: ObserverResult) => void): ValueObserver; + /** + * Returns constant noop batch observer. + * @param name the name of the metric. + * @param callback the batch observer callback + */ + createBatchObserver(name: string, callback: (batchObserverResult: BatchObserverResult) => void): BatchObserver; +} +export declare class NoopMetric implements UnboundMetric { + private readonly _instrument; + constructor(instrument: T); + /** + * Returns a Bound Instrument associated with specified Labels. + * It is recommended to keep a reference to the Bound Instrument instead of + * always calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + bind(labels: Labels): T; + /** + * Removes the Binding from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + unbind(labels: Labels): void; + /** + * Clears all timeseries from the Metric. + */ + clear(): void; +} +export declare class NoopCounterMetric extends NoopMetric implements Counter { + add(value: number, labels: Labels): void; +} +export declare class NoopValueRecorderMetric extends NoopMetric implements ValueRecorder { + record(value: number, labels: Labels, correlationContext?: CorrelationContext, spanContext?: SpanContext): void; +} +export declare class NoopBaseObserverMetric extends NoopMetric implements BaseObserver { + observation(): { + observer: BaseObserver; + value: number; + }; +} +export declare class NoopBatchObserverMetric extends NoopMetric implements BatchObserver { +} +export declare class NoopBoundCounter implements BoundCounter { + add(value: number): void; +} +export declare class NoopBoundValueRecorder implements BoundValueRecorder { + record(value: number, correlationContext?: CorrelationContext, spanContext?: SpanContext): void; +} +export declare class NoopBoundBaseObserver implements BoundBaseObserver { + update(value: number): void; +} +export declare const NOOP_METER: NoopMeter; +export declare const NOOP_BOUND_COUNTER: NoopBoundCounter; +export declare const NOOP_COUNTER_METRIC: NoopCounterMetric; +export declare const NOOP_BOUND_VALUE_RECORDER: NoopBoundValueRecorder; +export declare const NOOP_VALUE_RECORDER_METRIC: NoopValueRecorderMetric; +export declare const NOOP_BOUND_BASE_OBSERVER: NoopBoundBaseObserver; +export declare const NOOP_VALUE_OBSERVER_METRIC: NoopBaseObserverMetric; +export declare const NOOP_UP_DOWN_SUM_OBSERVER_METRIC: NoopBaseObserverMetric; +export declare const NOOP_SUM_OBSERVER_METRIC: NoopBaseObserverMetric; +export declare const NOOP_BATCH_OBSERVER_METRIC: NoopBatchObserverMetric; +//# sourceMappingURL=NoopMeter.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js new file mode 100644 index 000000000..ebcfc643f --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js @@ -0,0 +1,200 @@ +"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 __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NOOP_BATCH_OBSERVER_METRIC = exports.NOOP_SUM_OBSERVER_METRIC = exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = exports.NOOP_VALUE_OBSERVER_METRIC = exports.NOOP_BOUND_BASE_OBSERVER = exports.NOOP_VALUE_RECORDER_METRIC = exports.NOOP_BOUND_VALUE_RECORDER = exports.NOOP_COUNTER_METRIC = exports.NOOP_BOUND_COUNTER = exports.NOOP_METER = exports.NoopBoundBaseObserver = exports.NoopBoundValueRecorder = exports.NoopBoundCounter = exports.NoopBatchObserverMetric = exports.NoopBaseObserverMetric = exports.NoopValueRecorderMetric = 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. + */ +var NoopMeter = /** @class */ (function () { + function NoopMeter() { + } + /** + * Returns constant noop value recorder. + * @param name the name of the metric. + * @param [options] the metric options. + */ + NoopMeter.prototype.createValueRecorder = function (name, options) { + return exports.NOOP_VALUE_RECORDER_METRIC; + }; + /** + * Returns a constant noop counter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + NoopMeter.prototype.createCounter = function (name, options) { + return exports.NOOP_COUNTER_METRIC; + }; + /** + * Returns a constant noop UpDownCounter. + * @param name the name of the metric. + * @param [options] the metric options. + */ + NoopMeter.prototype.createUpDownCounter = function (name, options) { + return exports.NOOP_COUNTER_METRIC; + }; + /** + * Returns constant noop value observer. + * @param name the name of the metric. + * @param [options] the metric options. + * @param [callback] the value observer callback + */ + NoopMeter.prototype.createValueObserver = function (name, options, callback) { + return exports.NOOP_VALUE_OBSERVER_METRIC; + }; + /** + * Returns constant noop batch observer. + * @param name the name of the metric. + * @param callback the batch observer callback + */ + NoopMeter.prototype.createBatchObserver = function (name, callback) { + return exports.NOOP_BATCH_OBSERVER_METRIC; + }; + return NoopMeter; +}()); +exports.NoopMeter = NoopMeter; +var NoopMetric = /** @class */ (function () { + function NoopMetric(instrument) { + this._instrument = instrument; + } + /** + * Returns a Bound Instrument associated with specified Labels. + * It is recommended to keep a reference to the Bound Instrument instead of + * always calling this method for every operations. + * @param labels key-values pairs that are associated with a specific metric + * that you want to record. + */ + NoopMetric.prototype.bind = function (labels) { + return this._instrument; + }; + /** + * Removes the Binding from the metric, if it is present. + * @param labels key-values pairs that are associated with a specific metric. + */ + NoopMetric.prototype.unbind = function (labels) { + return; + }; + /** + * Clears all timeseries from the Metric. + */ + NoopMetric.prototype.clear = function () { + return; + }; + return NoopMetric; +}()); +exports.NoopMetric = NoopMetric; +var NoopCounterMetric = /** @class */ (function (_super) { + __extends(NoopCounterMetric, _super); + function NoopCounterMetric() { + return _super !== null && _super.apply(this, arguments) || this; + } + NoopCounterMetric.prototype.add = function (value, labels) { + this.bind(labels).add(value); + }; + return NoopCounterMetric; +}(NoopMetric)); +exports.NoopCounterMetric = NoopCounterMetric; +var NoopValueRecorderMetric = /** @class */ (function (_super) { + __extends(NoopValueRecorderMetric, _super); + function NoopValueRecorderMetric() { + return _super !== null && _super.apply(this, arguments) || this; + } + NoopValueRecorderMetric.prototype.record = function (value, labels, correlationContext, spanContext) { + if (typeof correlationContext === 'undefined') { + this.bind(labels).record(value); + } + else if (typeof spanContext === 'undefined') { + this.bind(labels).record(value, correlationContext); + } + else { + this.bind(labels).record(value, correlationContext, spanContext); + } + }; + return NoopValueRecorderMetric; +}(NoopMetric)); +exports.NoopValueRecorderMetric = NoopValueRecorderMetric; +var NoopBaseObserverMetric = /** @class */ (function (_super) { + __extends(NoopBaseObserverMetric, _super); + function NoopBaseObserverMetric() { + return _super !== null && _super.apply(this, arguments) || this; + } + NoopBaseObserverMetric.prototype.observation = function () { + return { + observer: this, + value: 0, + }; + }; + return NoopBaseObserverMetric; +}(NoopMetric)); +exports.NoopBaseObserverMetric = NoopBaseObserverMetric; +var NoopBatchObserverMetric = /** @class */ (function (_super) { + __extends(NoopBatchObserverMetric, _super); + function NoopBatchObserverMetric() { + return _super !== null && _super.apply(this, arguments) || this; + } + return NoopBatchObserverMetric; +}(NoopMetric)); +exports.NoopBatchObserverMetric = NoopBatchObserverMetric; +var NoopBoundCounter = /** @class */ (function () { + function NoopBoundCounter() { + } + NoopBoundCounter.prototype.add = function (value) { + return; + }; + return NoopBoundCounter; +}()); +exports.NoopBoundCounter = NoopBoundCounter; +var NoopBoundValueRecorder = /** @class */ (function () { + function NoopBoundValueRecorder() { + } + NoopBoundValueRecorder.prototype.record = function (value, correlationContext, spanContext) { + return; + }; + return NoopBoundValueRecorder; +}()); +exports.NoopBoundValueRecorder = NoopBoundValueRecorder; +var NoopBoundBaseObserver = /** @class */ (function () { + function NoopBoundBaseObserver() { + } + NoopBoundBaseObserver.prototype.update = function (value) { }; + return NoopBoundBaseObserver; +}()); +exports.NoopBoundBaseObserver = NoopBoundBaseObserver; +exports.NOOP_METER = new NoopMeter(); +exports.NOOP_BOUND_COUNTER = new NoopBoundCounter(); +exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(exports.NOOP_BOUND_COUNTER); +exports.NOOP_BOUND_VALUE_RECORDER = new NoopBoundValueRecorder(); +exports.NOOP_VALUE_RECORDER_METRIC = new NoopValueRecorderMetric(exports.NOOP_BOUND_VALUE_RECORDER); +exports.NOOP_BOUND_BASE_OBSERVER = new NoopBoundBaseObserver(); +exports.NOOP_VALUE_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER); +exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER); +exports.NOOP_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER); +exports.NOOP_BATCH_OBSERVER_METRIC = new NoopBatchObserverMetric(); +//# sourceMappingURL=NoopMeter.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js.map b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js.map new file mode 100644 index 000000000..3797b0a59 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopMeter.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAwBH;;;GAGG;AACH;IACE;IAAe,CAAC;IAEhB;;;;OAIG;IACH,uCAAmB,GAAnB,UAAoB,IAAY,EAAE,OAAuB;QACvD,OAAO,kCAA0B,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,iCAAa,GAAb,UAAc,IAAY,EAAE,OAAuB;QACjD,OAAO,2BAAmB,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,uCAAmB,GAAnB,UAAoB,IAAY,EAAE,OAAuB;QACvD,OAAO,2BAAmB,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,uCAAmB,GAAnB,UACE,IAAY,EACZ,OAAuB,EACvB,QAAmD;QAEnD,OAAO,kCAA0B,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,uCAAmB,GAAnB,UACE,IAAY,EACZ,QAA4D;QAE5D,OAAO,kCAA0B,CAAC;IACpC,CAAC;IACH,gBAAC;AAAD,CAAC,AAvDD,IAuDC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AEW,QAAA,0BAA0B,GAAG,IAAI,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts new file mode 100644 index 000000000..70cc8c8ce --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts @@ -0,0 +1,11 @@ +import { Meter } from './Meter'; +import { MeterProvider } from './MeterProvider'; +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +export declare class NoopMeterProvider implements MeterProvider { + getMeter(_name?: string, _version?: string): Meter; +} +export declare const NOOP_METER_PROVIDER: NoopMeterProvider; +//# sourceMappingURL=NoopMeterProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js new file mode 100644 index 000000000..ba40c7186 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js @@ -0,0 +1,34 @@ +"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; +var NoopMeter_1 = require("./NoopMeter"); +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +var NoopMeterProvider = /** @class */ (function () { + function NoopMeterProvider() { + } + NoopMeterProvider.prototype.getMeter = function (_name, _version) { + return NoopMeter_1.NOOP_METER; + }; + return NoopMeterProvider; +}()); +exports.NoopMeterProvider = NoopMeterProvider; +exports.NOOP_METER_PROVIDER = new NoopMeterProvider(); +//# sourceMappingURL=NoopMeterProvider.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js.map b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js.map new file mode 100644 index 000000000..7da9a7fa2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopMeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeterProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yCAAyC;AAEzC;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,oCAAQ,GAAR,UAAS,KAAc,EAAE,QAAiB;QACxC,OAAO,sBAAU,CAAC;IACpB,CAAC;IACH,wBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,8CAAiB;AAMjB,QAAA,mBAAmB,GAAG,IAAI,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Observation.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/Observation.d.ts new file mode 100644 index 000000000..6aa1aaaac --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Observation.d.ts @@ -0,0 +1,9 @@ +import { BaseObserver } from './Metric'; +/** + * Interface for updating value of certain value observer + */ +export interface Observation { + observer: BaseObserver; + value: number; +} +//# sourceMappingURL=Observation.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Observation.js b/node_modules/@opentelemetry/api/build/src/metrics/Observation.js new file mode 100644 index 000000000..d0637b465 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Observation.js @@ -0,0 +1,18 @@ +"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=Observation.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/Observation.js.map b/node_modules/@opentelemetry/api/build/src/metrics/Observation.js.map new file mode 100644 index 000000000..6ae284dc0 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/Observation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Observation.js","sourceRoot":"","sources":["../../../src/metrics/Observation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts new file mode 100644 index 000000000..8143d0183 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.d.ts @@ -0,0 +1,8 @@ +import { Labels } from './Metric'; +/** + * Interface that is being used in callback function for Observer Metric + */ +export interface ObserverResult { + observe(value: number, labels: Labels): void; +} +//# sourceMappingURL=ObserverResult.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js new file mode 100644 index 000000000..8e815ca3e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js @@ -0,0 +1,18 @@ +"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=ObserverResult.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js.map b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js.map new file mode 100644 index 000000000..31fbc4a05 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/metrics/ObserverResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ObserverResult.js","sourceRoot":"","sources":["../../../src/metrics/ObserverResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.d.ts b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.d.ts new file mode 100644 index 000000000..e3c83e5d2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.d.ts @@ -0,0 +1,3 @@ +/** only globals that common to node and browsers are allowed */ +export declare const _globalThis: typeof globalThis; +//# sourceMappingURL=globalThis.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js new file mode 100644 index 000000000..a9a0beeef --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js @@ -0,0 +1,22 @@ +"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._globalThis = void 0; +/** only globals that common to node and browsers are allowed */ +// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef +exports._globalThis = typeof globalThis === 'object' ? globalThis : window; +//# sourceMappingURL=globalThis.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js.map b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js.map new file mode 100644 index 000000000..50296053b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../../src/platform/browser/globalThis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gEAAgE;AAChE,8EAA8E;AACjE,QAAA,WAAW,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/index.d.ts b/node_modules/@opentelemetry/api/build/src/platform/browser/index.d.ts new file mode 100644 index 000000000..ba20e1232 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/index.d.ts @@ -0,0 +1,2 @@ +export * from './globalThis'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/index.js b/node_modules/@opentelemetry/api/build/src/platform/browser/index.js new file mode 100644 index 000000000..098f2ed3e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/index.js @@ -0,0 +1,29 @@ +"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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./globalThis"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/browser/index.js.map b/node_modules/@opentelemetry/api/build/src/platform/browser/index.js.map new file mode 100644 index 000000000..ba4fad8d0 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/browser/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,+CAA6B"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/index.d.ts b/node_modules/@opentelemetry/api/build/src/platform/index.d.ts new file mode 100644 index 000000000..90595da96 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/index.d.ts @@ -0,0 +1,2 @@ +export * from './node'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/index.js b/node_modules/@opentelemetry/api/build/src/platform/index.js new file mode 100644 index 000000000..fe31d7da3 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/index.js @@ -0,0 +1,29 @@ +"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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./node"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/index.js.map b/node_modules/@opentelemetry/api/build/src/platform/index.js.map new file mode 100644 index 000000000..0c4df7b75 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yCAAuB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.d.ts b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.d.ts new file mode 100644 index 000000000..e3c83e5d2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.d.ts @@ -0,0 +1,3 @@ +/** only globals that common to node and browsers are allowed */ +export declare const _globalThis: typeof globalThis; +//# sourceMappingURL=globalThis.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js new file mode 100644 index 000000000..82c4e3949 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js @@ -0,0 +1,22 @@ +"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._globalThis = void 0; +/** only globals that common to node and browsers are allowed */ +// eslint-disable-next-line node/no-unsupported-features/es-builtins +exports._globalThis = typeof globalThis === 'object' ? globalThis : global; +//# sourceMappingURL=globalThis.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js.map b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js.map new file mode 100644 index 000000000..300675b3b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../../src/platform/node/globalThis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gEAAgE;AAChE,oEAAoE;AACvD,QAAA,WAAW,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/index.d.ts b/node_modules/@opentelemetry/api/build/src/platform/node/index.d.ts new file mode 100644 index 000000000..ba20e1232 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/index.d.ts @@ -0,0 +1,2 @@ +export * from './globalThis'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/index.js b/node_modules/@opentelemetry/api/build/src/platform/node/index.js new file mode 100644 index 000000000..098f2ed3e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/index.js @@ -0,0 +1,29 @@ +"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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./globalThis"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/platform/node/index.js.map b/node_modules/@opentelemetry/api/build/src/platform/node/index.js.map new file mode 100644 index 000000000..3bb702ccc --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/platform/node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,+CAA6B"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts b/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts new file mode 100644 index 000000000..98ef28cd4 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Event.d.ts @@ -0,0 +1,9 @@ +import { Attributes } from './attributes'; +/** A text annotation with a set of attributes. */ +export interface Event { + /** The name of the event. */ + name: string; + /** The attributes of the event. */ + attributes?: Attributes; +} +//# sourceMappingURL=Event.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Event.js b/node_modules/@opentelemetry/api/build/src/trace/Event.js new file mode 100644 index 000000000..4c7168dc0 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Event.js @@ -0,0 +1,18 @@ +"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=Event.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Event.js.map b/node_modules/@opentelemetry/api/build/src/trace/Event.js.map new file mode 100644 index 000000000..c102d7a36 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Event.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/trace/Event.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts new file mode 100644 index 000000000..5adbdb8c7 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.d.ts @@ -0,0 +1,26 @@ +import { TimeInput } from '../common/Time'; +import { Attributes } from './attributes'; +import { Span } from './span'; +import { SpanContext } from './span_context'; +import { Status } from './status'; +export declare const INVALID_TRACE_ID = "0"; +export declare const INVALID_SPAN_ID = "0"; +/** + * The NoopSpan is the default {@link Span} that is used when no Span + * implementation is available. All operations are no-op including context + * propagation. + */ +export declare class NoopSpan implements Span { + private readonly _spanContext; + constructor(_spanContext?: SpanContext); + context(): SpanContext; + setAttribute(key: string, value: unknown): this; + setAttributes(attributes: Attributes): this; + addEvent(name: string, attributes?: Attributes): this; + setStatus(status: Status): this; + updateName(name: string): this; + end(endTime?: TimeInput): void; + isRecording(): boolean; +} +export declare const NOOP_SPAN: NoopSpan; +//# sourceMappingURL=NoopSpan.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js new file mode 100644 index 000000000..8959ed562 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js @@ -0,0 +1,71 @@ +"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_SPAN = exports.NoopSpan = exports.INVALID_SPAN_ID = exports.INVALID_TRACE_ID = void 0; +var trace_flags_1 = require("./trace_flags"); +exports.INVALID_TRACE_ID = '0'; +exports.INVALID_SPAN_ID = '0'; +var INVALID_SPAN_CONTEXT = { + traceId: exports.INVALID_TRACE_ID, + spanId: exports.INVALID_SPAN_ID, + traceFlags: trace_flags_1.TraceFlags.NONE, +}; +/** + * The NoopSpan is the default {@link Span} that is used when no Span + * implementation is available. All operations are no-op including context + * propagation. + */ +var NoopSpan = /** @class */ (function () { + function NoopSpan(_spanContext) { + if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; } + this._spanContext = _spanContext; + } + // Returns a SpanContext. + NoopSpan.prototype.context = function () { + return this._spanContext; + }; + // By default does nothing + NoopSpan.prototype.setAttribute = function (key, value) { + return this; + }; + // By default does nothing + NoopSpan.prototype.setAttributes = function (attributes) { + return this; + }; + // By default does nothing + NoopSpan.prototype.addEvent = function (name, attributes) { + return this; + }; + // By default does nothing + NoopSpan.prototype.setStatus = function (status) { + return this; + }; + // By default does nothing + NoopSpan.prototype.updateName = function (name) { + return this; + }; + // By default does nothing + NoopSpan.prototype.end = function (endTime) { }; + // isRecording always returns false for noopSpan. + NoopSpan.prototype.isRecording = function () { + return false; + }; + return NoopSpan; +}()); +exports.NoopSpan = NoopSpan; +exports.NOOP_SPAN = new NoopSpan(); +//# sourceMappingURL=NoopSpan.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js.map b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js.map new file mode 100644 index 000000000..fbf8c1964 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopSpan.js","sourceRoot":"","sources":["../../../src/trace/NoopSpan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH,6CAA2C;AAE9B,QAAA,gBAAgB,GAAG,GAAG,CAAC;AACvB,QAAA,eAAe,GAAG,GAAG,CAAC;AACnC,IAAM,oBAAoB,GAAgB;IACxC,OAAO,EAAE,wBAAgB;IACzB,MAAM,EAAE,uBAAe;IACvB,UAAU,EAAE,wBAAU,CAAC,IAAI;CAC5B,CAAC;AAEF;;;;GAIG;AACH;IACE,kBACmB,YAAgD;QAAhD,6BAAA,EAAA,mCAAgD;QAAhD,iBAAY,GAAZ,YAAY,CAAoC;IAChE,CAAC;IAEJ,yBAAyB;IACzB,0BAAO,GAAP;QACE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,0BAA0B;IAC1B,+BAAY,GAAZ,UAAa,GAAW,EAAE,KAAc;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,gCAAa,GAAb,UAAc,UAAsB;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,2BAAQ,GAAR,UAAS,IAAY,EAAE,UAAuB;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,4BAAS,GAAT,UAAU,MAAc;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,6BAAU,GAAV,UAAW,IAAY;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,sBAAG,GAAH,UAAI,OAAmB,IAAS,CAAC;IAEjC,iDAAiD;IACjD,8BAAW,GAAX;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IACH,eAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,4BAAQ;AA4CR,QAAA,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts new file mode 100644 index 000000000..10da09771 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts @@ -0,0 +1,12 @@ +import { Span, SpanOptions, Tracer } from '..'; +/** + * No-op implementations of {@link Tracer}. + */ +export declare class NoopTracer implements Tracer { + getCurrentSpan(): Span; + startSpan(name: string, options?: SpanOptions): Span; + withSpan ReturnType>(span: Span, fn: T): ReturnType; + bind(target: T, span?: Span): T; +} +export declare const NOOP_TRACER: NoopTracer; +//# sourceMappingURL=NoopTracer.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js new file mode 100644 index 000000000..22cd381e8 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js @@ -0,0 +1,43 @@ +"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_TRACER = exports.NoopTracer = void 0; +var NoopSpan_1 = require("./NoopSpan"); +/** + * No-op implementations of {@link Tracer}. + */ +var NoopTracer = /** @class */ (function () { + function NoopTracer() { + } + NoopTracer.prototype.getCurrentSpan = function () { + return NoopSpan_1.NOOP_SPAN; + }; + // startSpan starts a noop span. + NoopTracer.prototype.startSpan = function (name, options) { + return NoopSpan_1.NOOP_SPAN; + }; + NoopTracer.prototype.withSpan = function (span, fn) { + return fn(); + }; + NoopTracer.prototype.bind = function (target, span) { + return target; + }; + return NoopTracer; +}()); +exports.NoopTracer = NoopTracer; +exports.NOOP_TRACER = new NoopTracer(); +//# sourceMappingURL=NoopTracer.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js.map b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js.map new file mode 100644 index 000000000..1600722fc --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopTracer.js","sourceRoot":"","sources":["../../../src/trace/NoopTracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uCAAuC;AAEvC;;GAEG;AACH;IAAA;IAoBA,CAAC;IAnBC,mCAAc,GAAd;QACE,OAAO,oBAAS,CAAC;IACnB,CAAC;IAED,gCAAgC;IAChC,8BAAS,GAAT,UAAU,IAAY,EAAE,OAAqB;QAC3C,OAAO,oBAAS,CAAC;IACnB,CAAC;IAED,6BAAQ,GAAR,UACE,IAAU,EACV,EAAK;QAEL,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,yBAAI,GAAJ,UAAQ,MAAS,EAAE,IAAW;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,gCAAU;AAsBV,QAAA,WAAW,GAAG,IAAI,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts new file mode 100644 index 000000000..6682b2543 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts @@ -0,0 +1,13 @@ +import { Tracer } from './tracer'; +import { TracerProvider } from './tracer_provider'; +/** + * An implementation of the {@link TracerProvider} which returns an impotent + * Tracer for all calls to `getTracer`. + * + * All operations are no-op. + */ +export declare class NoopTracerProvider implements TracerProvider { + getTracer(_name?: string, _version?: string): Tracer; +} +export declare const NOOP_TRACER_PROVIDER: NoopTracerProvider; +//# sourceMappingURL=NoopTracerProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js new file mode 100644 index 000000000..aba6186ec --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js @@ -0,0 +1,36 @@ +"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_TRACER_PROVIDER = exports.NoopTracerProvider = void 0; +var NoopTracer_1 = require("./NoopTracer"); +/** + * 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) { + return NoopTracer_1.NOOP_TRACER; + }; + return NoopTracerProvider; +}()); +exports.NoopTracerProvider = NoopTracerProvider; +exports.NOOP_TRACER_PROVIDER = new NoopTracerProvider(); +//# sourceMappingURL=NoopTracerProvider.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js.map b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js.map new file mode 100644 index 000000000..7b68c4f11 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopTracerProvider.js","sourceRoot":"","sources":["../../../src/trace/NoopTracerProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAA2C;AAI3C;;;;;GAKG;AACH;IAAA;IAIA,CAAC;IAHC,sCAAS,GAAT,UAAU,KAAc,EAAE,QAAiB;QACzC,OAAO,wBAAW,CAAC;IACrB,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,gDAAkB;AAMlB,QAAA,oBAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts b/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts new file mode 100644 index 000000000..58afac1cb --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts @@ -0,0 +1,31 @@ +import { SpanContext } from './span_context'; +import { SpanKind } from './span_kind'; +import { Attributes } from './attributes'; +import { Link } from './link'; +import { SamplingResult } from './SamplingResult'; +/** + * This interface represent a sampler. Sampling is a mechanism to control the + * noise and overhead introduced by OpenTelemetry by reducing the number of + * samples of traces collected and sent to the backend. + */ +export interface Sampler { + /** + * Checks whether span needs to be created and tracked. + * + * @param parentContext Parent span context. Typically taken from the wire. + * Can be null. + * @param traceId of the span to be created. It can be different from the + * traceId in the {@link SpanContext}. Typically in situations when the + * span to be created starts a new trace. + * @param spanName of the span to be created. + * @param spanKind of the span to be created. + * @param attributes Initial set of Attributes for the Span being constructed. + * @param links Collection of links that will be associated with the Span to + * be created. Typically useful for batch operations. + * @returns a {@link SamplingResult}. + */ + shouldSample(parentContext: SpanContext | undefined, traceId: string, spanName: string, spanKind: SpanKind, attributes: Attributes, links: Link[]): SamplingResult; + /** Returns the sampler name or short description with the configuration. */ + toString(): string; +} +//# sourceMappingURL=Sampler.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Sampler.js b/node_modules/@opentelemetry/api/build/src/trace/Sampler.js new file mode 100644 index 000000000..6034482e4 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Sampler.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/Sampler.js.map b/node_modules/@opentelemetry/api/build/src/trace/Sampler.js.map new file mode 100644 index 000000000..38fd38a06 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/Sampler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Sampler.js","sourceRoot":"","sources":["../../../src/trace/Sampler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.d.ts b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.d.ts new file mode 100644 index 000000000..22152880c --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.d.ts @@ -0,0 +1,39 @@ +import { Attributes } from './attributes'; +/** + * A sampling decision that determines how a {@link Span} will be recorded + * and collected. + */ +export declare enum SamplingDecision { + /** + * `Span.isRecording() === false`, span will not be recorded and all events + * and attributes will be dropped. + */ + NOT_RECORD = 0, + /** + * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} + * MUST NOT be set. + */ + RECORD = 1, + /** + * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} + * MUST be set. + */ + RECORD_AND_SAMPLED = 2 +} +/** + * A sampling result contains a decision for a {@link Span} and additional + * attributes the sampler would like to added to the Span. + */ +export interface SamplingResult { + /** + * A sampling decision, refer to {@link SamplingDecision} for details. + */ + decision: SamplingDecision; + /** + * The list of attributes returned by SamplingResult MUST be immutable. + * Caller may call {@link Sampler}.shouldSample any number of times and + * can safely cache the returned value. + */ + attributes?: Readonly; +} +//# sourceMappingURL=SamplingResult.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js new file mode 100644 index 000000000..d102e82b3 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js @@ -0,0 +1,41 @@ +"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.SamplingDecision = void 0; +/** + * A sampling decision that determines how a {@link Span} will be recorded + * and collected. + */ +var SamplingDecision; +(function (SamplingDecision) { + /** + * `Span.isRecording() === false`, span will not be recorded and all events + * and attributes will be dropped. + */ + SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; + /** + * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} + * MUST NOT be set. + */ + SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; + /** + * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} + * MUST be set. + */ + SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; +})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); +//# sourceMappingURL=SamplingResult.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js.map b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js.map new file mode 100644 index 000000000..63b2c651c --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SamplingResult.js","sourceRoot":"","sources":["../../../src/trace/SamplingResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH;;;GAGG;AACH,IAAY,gBAgBX;AAhBD,WAAY,gBAAgB;IAC1B;;;OAGG;IACH,mEAAU,CAAA;IACV;;;OAGG;IACH,2DAAM,CAAA;IACN;;;OAGG;IACH,mFAAkB,CAAA;AACpB,CAAC,EAhBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAgB3B"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts new file mode 100644 index 000000000..342bdc12b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts @@ -0,0 +1,35 @@ +import { Attributes } from './attributes'; +import { Link } from './link'; +import { SpanKind } from './span_kind'; +import { Span } from './span'; +import { SpanContext } from './span_context'; +/** + * Options needed for span creation + */ +export interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: Attributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** + * This option is NOT RECOMMENDED for normal use and should ONLY be used + * if your application manages context manually without the global context + * manager, or you are trying to override the parent extracted from context. + * + * A parent `SpanContext` (or `Span`, for convenience) that the newly-started + * span will be the child of. This overrides the parent span extracted from + * the currently active context. + * + * A null value here should prevent the SDK from extracting a parent from + * the current context, forcing the new span to be a root span. + */ + parent?: Span | SpanContext | null; + /** A manually specified start time for the created `Span` object. */ + startTime?: number; +} +//# sourceMappingURL=SpanOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js new file mode 100644 index 000000000..cb582305b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js.map b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js.map new file mode 100644 index 000000000..e83fd8ee1 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SpanOptions.js","sourceRoot":"","sources":["../../../src/trace/SpanOptions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts new file mode 100644 index 000000000..c46cb9d55 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.d.ts @@ -0,0 +1,10 @@ +import { Event } from './Event'; +import { HrTime } from '../common/Time'; +/** + * Represents a timed event. + * A timed event is an event with a timestamp. + */ +export interface TimedEvent extends Event { + time: HrTime; +} +//# sourceMappingURL=TimedEvent.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js new file mode 100644 index 000000000..09cec6d2a --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js @@ -0,0 +1,18 @@ +"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=TimedEvent.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js.map b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js.map new file mode 100644 index 000000000..ef38d1013 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/TimedEvent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TimedEvent.js","sourceRoot":"","sources":["../../../src/trace/TimedEvent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts b/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts new file mode 100644 index 000000000..84ad24850 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts @@ -0,0 +1,4 @@ +export interface Attributes { + [attributeKey: string]: unknown; +} +//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/attributes.js b/node_modules/@opentelemetry/api/build/src/trace/attributes.js new file mode 100644 index 000000000..378452bb2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/attributes.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/attributes.js.map b/node_modules/@opentelemetry/api/build/src/trace/attributes.js.map new file mode 100644 index 000000000..8ab191534 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/attributes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/trace/attributes.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts new file mode 100644 index 000000000..976fced2e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.d.ts @@ -0,0 +1,71 @@ +import { Logger } from '../../common/Logger'; +import { TracerProvider } from '../tracer_provider'; +/** Interface Plugin to apply patch. */ +export interface Plugin { + /** + * Contains all supported versions. + * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format. + * If the version is not supported, we won't apply instrumentation patch (see `enable` method). + * If omitted, all versions of the module will be patched. + */ + supportedVersions?: string[]; + /** + * Name of the module that the plugin instrument. + */ + moduleName: string; + /** + * Method that enables the instrumentation patch. + * @param moduleExports The value of the `module.exports` property that would + * normally be exposed by the required module. ex: `http`, `https` etc. + * @param TracerProvider a tracer provider. + * @param logger a logger instance. + * @param [config] an object to configure the plugin. + */ + enable(moduleExports: T, TracerProvider: TracerProvider, logger: Logger, config?: PluginConfig): T; + /** Method to disable the instrumentation */ + disable(): void; +} +export interface PluginConfig { + /** + * Whether to enable the plugin. + * @default true + */ + enabled?: boolean; + /** + * Path of the trace plugin to load. + * @default '@opentelemetry/plugin-http' in case of http. + */ + path?: string; + /** + * Request methods that match any string in ignoreMethods will not be traced. + */ + ignoreMethods?: string[]; + /** + * URLs that partially match any regex in ignoreUrls will not be traced. + * In addition, URLs that are _exact matches_ of strings in ignoreUrls will + * also not be traced. + */ + ignoreUrls?: Array; + /** + * List of internal files that need patch and are not exported by + * default. + */ + internalFilesExports?: PluginInternalFiles; + /** + * If true, additional information about query parameters and + * results will be attached (as `attributes`) to spans representing + * database operations. + */ + enhancedDatabaseReporting?: boolean; +} +export interface PluginInternalFilesVersion { + [pluginName: string]: string; +} +/** + * Each key should be the name of the module to trace, and its value + * a mapping of a property name to a internal plugin file name. + */ +export interface PluginInternalFiles { + [versions: string]: PluginInternalFilesVersion; +} +//# sourceMappingURL=Plugin.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js new file mode 100644 index 000000000..524c82cf2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js @@ -0,0 +1,18 @@ +"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=Plugin.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js.map b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js.map new file mode 100644 index 000000000..23c8d5af7 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/instrumentation/Plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../../src/trace/instrumentation/Plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link.d.ts b/node_modules/@opentelemetry/api/build/src/trace/link.d.ts new file mode 100644 index 000000000..eea81403f --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link.d.ts @@ -0,0 +1,24 @@ +import { Attributes } from './attributes'; +import { LinkContext } from './link_context'; +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +export interface Link { + /** The {@link LinkContext} of a linked span. */ + context: LinkContext; + /** A set of {@link Attributes} on the link. */ + attributes?: Attributes; +} +//# sourceMappingURL=link.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link.js b/node_modules/@opentelemetry/api/build/src/trace/link.js new file mode 100644 index 000000000..8036a6346 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link.js.map b/node_modules/@opentelemetry/api/build/src/trace/link.js.map new file mode 100644 index 000000000..c14c524e1 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/trace/link.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts b/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts new file mode 100644 index 000000000..569e88a5b --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link_context.d.ts @@ -0,0 +1,6 @@ +import { SpanContext } from './span_context'; +/** + * A pointer to another span. + */ +export declare type LinkContext = Pick; +//# sourceMappingURL=link_context.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link_context.js b/node_modules/@opentelemetry/api/build/src/trace/link_context.js new file mode 100644 index 000000000..8f81d1476 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link_context.js @@ -0,0 +1,18 @@ +"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_context.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/link_context.js.map b/node_modules/@opentelemetry/api/build/src/trace/link_context.js.map new file mode 100644 index 000000000..764ba58a2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/link_context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"link_context.js","sourceRoot":"","sources":["../../../src/trace/link_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span.d.ts b/node_modules/@opentelemetry/api/build/src/trace/span.d.ts new file mode 100644 index 000000000..36a75faf9 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span.d.ts @@ -0,0 +1,90 @@ +import { Attributes } from './attributes'; +import { SpanContext } from './span_context'; +import { Status } from './status'; +import { TimeInput } from '../common/Time'; +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +export interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + context(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. + */ + setAttribute(key: string, value: unknown): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + */ + setAttributes(attributes: Attributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: Attributes | TimeInput, startTime?: TimeInput): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link CanonicalCode.OK}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the Status to set. + */ + setStatus(status: Status): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; +} +//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span.js b/node_modules/@opentelemetry/api/build/src/trace/span.js new file mode 100644 index 000000000..b50af4627 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span.js.map b/node_modules/@opentelemetry/api/build/src/trace/span.js.map new file mode 100644 index 000000000..d748c2026 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/trace/span.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts b/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts new file mode 100644 index 000000000..eb676ad58 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts @@ -0,0 +1,54 @@ +import { TraceFlags } from './trace_flags'; +import { TraceState } from './trace_state'; +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link CorrelationContext}. + */ +export interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * SAMPLED = 0x1 and NONE = 0x0; + */ + traceFlags: TraceFlags; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} +//# sourceMappingURL=span_context.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_context.js b/node_modules/@opentelemetry/api/build/src/trace/span_context.js new file mode 100644 index 000000000..4b7976ce7 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_context.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map b/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map new file mode 100644 index 000000000..3c0c4b972 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts b/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts new file mode 100644 index 000000000..a89846f65 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts @@ -0,0 +1,27 @@ +export declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} +//# sourceMappingURL=span_kind.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_kind.js b/node_modules/@opentelemetry/api/build/src/trace/span_kind.js new file mode 100644 index 000000000..9c06e2c25 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_kind.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SpanKind = void 0; +/* + * 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 SpanKind; +(function (SpanKind) { + /** Default value. Indicates that the span is used internally. */ + SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; +})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); +//# sourceMappingURL=span_kind.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map b/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map new file mode 100644 index 000000000..00ed3864e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span_kind.js","sourceRoot":"","sources":["../../../src/trace/span_kind.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,iEAAiE;IACjE,+CAAY,CAAA;IAEZ;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;;OAIG;IACH,+CAAY,CAAA;IAEZ;;;;OAIG;IACH,+CAAY,CAAA;AACd,CAAC,EA7BW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6BnB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/status.d.ts b/node_modules/@opentelemetry/api/build/src/trace/status.d.ts new file mode 100644 index 000000000..7be41f2c2 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/status.d.ts @@ -0,0 +1,143 @@ +export interface Status { + /** The canonical code of this message. */ + code: CanonicalCode; + /** A developer-facing error message. */ + message?: string; +} +/** + * An enumeration of canonical status codes. + */ +export declare enum CanonicalCode { + /** + * Not an error; returned on success + */ + OK = 0, + /** + * The operation was cancelled (typically by the caller). + */ + CANCELLED = 1, + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + UNKNOWN = 2, + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + INVALID_ARGUMENT = 3, + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + DEADLINE_EXCEEDED = 4, + /** + * Some requested entity (e.g., file or directory) was not found. + */ + NOT_FOUND = 5, + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + ALREADY_EXISTS = 6, + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + PERMISSION_DENIED = 7, + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + RESOURCE_EXHAUSTED = 8, + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + FAILED_PRECONDITION = 9, + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + ABORTED = 10, + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + OUT_OF_RANGE = 11, + /** + * Operation is not implemented or not supported/enabled in this service. + */ + UNIMPLEMENTED = 12, + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + INTERNAL = 13, + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + UNAVAILABLE = 14, + /** + * Unrecoverable data loss or corruption. + */ + DATA_LOSS = 15, + /** + * The request does not have valid authentication credentials for the + * operation. + */ + UNAUTHENTICATED = 16 +} +//# sourceMappingURL=status.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/status.js b/node_modules/@opentelemetry/api/build/src/trace/status.js new file mode 100644 index 000000000..df6fb3462 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/status.js @@ -0,0 +1,141 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CanonicalCode = void 0; +/** + * An enumeration of canonical status codes. + */ +var CanonicalCode; +(function (CanonicalCode) { + /** + * Not an error; returned on success + */ + CanonicalCode[CanonicalCode["OK"] = 0] = "OK"; + /** + * The operation was cancelled (typically by the caller). + */ + CanonicalCode[CanonicalCode["CANCELLED"] = 1] = "CANCELLED"; + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + CanonicalCode[CanonicalCode["UNKNOWN"] = 2] = "UNKNOWN"; + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT"; + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED"; + /** + * Some requested entity (e.g., file or directory) was not found. + */ + CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND"; + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS"; + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED"; + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED"; + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION"; + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED"; + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + CanonicalCode[CanonicalCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE"; + /** + * Operation is not implemented or not supported/enabled in this service. + */ + CanonicalCode[CanonicalCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED"; + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + CanonicalCode[CanonicalCode["INTERNAL"] = 13] = "INTERNAL"; + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + CanonicalCode[CanonicalCode["UNAVAILABLE"] = 14] = "UNAVAILABLE"; + /** + * Unrecoverable data loss or corruption. + */ + CanonicalCode[CanonicalCode["DATA_LOSS"] = 15] = "DATA_LOSS"; + /** + * The request does not have valid authentication credentials for the + * operation. + */ + CanonicalCode[CanonicalCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED"; +})(CanonicalCode = exports.CanonicalCode || (exports.CanonicalCode = {})); +//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/status.js.map b/node_modules/@opentelemetry/api/build/src/trace/status.js.map new file mode 100644 index 000000000..c52b255e8 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/status.js.map @@ -0,0 +1 @@ +{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,aAoIX;AApID,WAAY,aAAa;IACvB;;OAEG;IACH,6CAAM,CAAA;IACN;;OAEG;IACH,2DAAa,CAAA;IACb;;;;;;OAMG;IACH,uDAAW,CAAA;IACX;;;;;OAKG;IACH,yEAAoB,CAAA;IACpB;;;;;;OAMG;IACH,2EAAqB,CAAA;IACrB;;OAEG;IACH,2DAAa,CAAA;IACb;;;OAGG;IACH,qEAAkB,CAAA;IAClB;;;;;;;OAOG;IACH,2EAAqB,CAAA;IACrB;;;OAGG;IACH,6EAAsB,CAAA;IACtB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,+EAAuB,CAAA;IACvB;;;;;;OAMG;IACH,wDAAY,CAAA;IACZ;;;;;;;;;;;;;;;;OAgBG;IACH,kEAAiB,CAAA;IACjB;;OAEG;IACH,oEAAkB,CAAA;IAClB;;;;OAIG;IACH,0DAAa,CAAA;IACb;;;;;;;OAOG;IACH,gEAAgB,CAAA;IAChB;;OAEG;IACH,4DAAc,CAAA;IACd;;;OAGG;IACH,wEAAoB,CAAA;AACtB,CAAC,EApIW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAoIxB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts new file mode 100644 index 000000000..11288ba95 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts @@ -0,0 +1,7 @@ +export declare enum TraceFlags { + /** Represents no flag set. */ + NONE = 0, + /** Bit to represent whether trace is sampled in trace flags. */ + SAMPLED = 1 +} +//# sourceMappingURL=trace_flags.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js new file mode 100644 index 000000000..f8d4dd8a9 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TraceFlags = void 0; +/* + * 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 TraceFlags; +(function (TraceFlags) { + /** Represents no flag set. */ + TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; + /** Bit to represent whether trace is sampled in trace flags. */ + TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; +})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); +//# sourceMappingURL=trace_flags.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map new file mode 100644 index 000000000..ac688e9ba --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace_flags.js","sourceRoot":"","sources":["../../../src/trace/trace_flags.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAA8B;IAC9B,2CAAU,CAAA;IACV,gEAAgE;IAChE,iDAAkB,CAAA;AACpB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts b/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts new file mode 100644 index 000000000..13426fc27 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts @@ -0,0 +1,37 @@ +export interface TraceState { + /** + * Adds or updates the TraceState that has the given `key` if it is + * present. The new State will always be added in the front of the + * list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): void; + /** + * Removes the TraceState Entry that has the given `key` if it is present. + * + * @param key the key for the TraceState Entry to be removed. + */ + unset(key: string): void; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} +//# sourceMappingURL=trace_state.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_state.js b/node_modules/@opentelemetry/api/build/src/trace/trace_state.js new file mode 100644 index 000000000..fa76ad93e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_state.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=trace_state.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map b/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map new file mode 100644 index 000000000..e26e17e2e --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts b/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts new file mode 100644 index 000000000..0b103b580 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts @@ -0,0 +1,65 @@ +import { Context } from '@opentelemetry/context-base'; +import { Span } from './span'; +import { SpanOptions } from './SpanOptions'; +/** + * Tracer provides an interface for creating {@link Span}s and propagating + * context in-process. + * + * Users may choose to use manual or automatic Context propagation. Because of + * that this class offers APIs to facilitate both usages. + */ +export interface Tracer { + /** + * Returns the current Span from the current context if available. + * + * If there is no Span associated with the current context, `undefined` is + * returned. + * + * To install a {@link Span} to the current Context use + * {@link Tracer.withSpan}. + * + * @returns Span The currently active Span + */ + getCurrentSpan(): Span | undefined; + /** + * Starts a new {@link Span}. Start the span without setting it as the current + * span in this tracer's context. + * + * This method do NOT modify the current Context. To install a {@link + * Span} to the current Context use {@link Tracer.withSpan}. + * + * @param name The name of the span + * @param [options] SpanOptions used for span creation + * @param [context] Context to use to extract parent + * @returns Span The newly created span + * @example + * const span = tracer.startSpan('op'); + * span.setAttribute('key', 'value'); + * span.end(); + */ + startSpan(name: string, options?: SpanOptions, context?: Context): Span; + /** + * Executes the function given by fn within the context provided by Span. + * + * This is a convenience method for creating spans attached to the tracer's + * context. Applications that need more control over the span lifetime should + * use {@link Tracer.startSpan} instead. + * + * @param span The span that provides the context + * @param fn The function to be executed inside the provided context + * @example + * tracer.withSpan(span, () => { + * tracer.getCurrentSpan().addEvent("parent's event"); + * doSomeOtherWork(); // Here "span" is the current Span. + * }); + */ + withSpan ReturnType>(span: Span, fn: T): ReturnType; + /** + * Bind a span as the target's context or propagate the current one. + * + * @param target Any object to which a context need to be set + * @param [context] Optionally specify the context which you want to bind + */ + bind(target: T, context?: Span): T; +} +//# sourceMappingURL=tracer.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer.js b/node_modules/@opentelemetry/api/build/src/trace/tracer.js new file mode 100644 index 000000000..d710ef9ac --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map b/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map new file mode 100644 index 000000000..4dad3ddd3 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/trace/tracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts new file mode 100644 index 000000000..0d13436c7 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts @@ -0,0 +1,19 @@ +import { Tracer } from './tracer'; +/** + * A registry for creating named {@link Tracer}s. + */ +export interface TracerProvider { + /** + * Returns a Tracer, creating one if one with the given name and version is + * not already created. + * + * This function may return different Tracer types (e.g. + * {@link NoopTracerProvider} vs. a functional tracer). + * + * @param name The name of the tracer or instrumentation library. + * @param version The version of the tracer or instrumentation library. + * @returns Tracer A Tracer with the given name and version + */ + getTracer(name: string, version?: string): Tracer; +} +//# sourceMappingURL=tracer_provider.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js new file mode 100644 index 000000000..4c511db95 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map new file mode 100644 index 000000000..925bfa807 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracer_provider.js","sourceRoot":"","sources":["../../../src/trace/tracer_provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/version.d.ts b/node_modules/@opentelemetry/api/build/src/version.d.ts new file mode 100644 index 000000000..1cbb3ffee --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/version.d.ts @@ -0,0 +1,2 @@ +export declare const VERSION = "0.10.2"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/version.js b/node_modules/@opentelemetry/api/build/src/version.js new file mode 100644 index 000000000..270e2dd92 --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/version.js @@ -0,0 +1,21 @@ +"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.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.10.2'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/build/src/version.js.map b/node_modules/@opentelemetry/api/build/src/version.js.map new file mode 100644 index 000000000..bfad0dcda --- /dev/null +++ b/node_modules/@opentelemetry/api/build/src/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/LICENSE b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/README.md b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/README.md new file mode 100644 index 000000000..a0eb48c24 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/README.md @@ -0,0 +1,41 @@ +# OpenTelemetry Base Context Manager + +[![Gitter chat][gitter-image]][gitter-url] +[![NPM Published Version][npm-img]][npm-url] +[![dependencies][dependencies-image]][dependencies-url] +[![devDependencies][devDependencies-image]][devDependencies-url] +[![Apache License][license-image]][license-image] + +This package provides the ContextManager interface (which is used by concrete implementations) and a no-op implementation (which is used internally when no context propagation is defined). It's intended for use both on the server and in the browser. + +## What is a Context Manager + +To understand why they exists, we'll need to understand how Javascript works: when you make native function call (networks, setInterval etc) you generally call C++ code that will later callback your own code. + +A common issue when tracing a request in javascript is to link the function that have made the native call to the callback that the native code called when the response is there. Imagine you want to track for which user you made the request, you need some sort of "context/context aware storage". + +ContextManager's aim to offer exactly that, it's API offer to store an object in the current context (`with()`) and if needed, `bind()` to a specific function call to find it back when the callback fire, which can later get retrieved using `active()`. + +This package only include the interface and a Noop implementation, for more information please see the [async-hooks based ContextManager][ah-context-manager] for NodeJS. + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us on [gitter][gitter-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg +[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-context-base +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-context-base +[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-context-base +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-context-base&type=dev +[ah-context-manager]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-context-async-hooks +[npm-url]: https://www.npmjs.com/package/@opentelemetry/context-base +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fcontext-base.svg diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts new file mode 100644 index 000000000..4c990215a --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts @@ -0,0 +1,10 @@ +import * as types from './types'; +import { Context } from './context'; +export declare class NoopContextManager implements types.ContextManager { + active(): Context; + with ReturnType>(context: Context, fn: T): ReturnType; + bind(target: T, context?: Context): T; + enable(): this; + disable(): this; +} +//# sourceMappingURL=NoopContextManager.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js new file mode 100644 index 000000000..a36735318 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js @@ -0,0 +1,41 @@ +"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.NoopContextManager = void 0; +var context_1 = require("./context"); +var NoopContextManager = /** @class */ (function () { + function NoopContextManager() { + } + NoopContextManager.prototype.active = function () { + return context_1.Context.ROOT_CONTEXT; + }; + NoopContextManager.prototype.with = function (context, fn) { + return fn(); + }; + NoopContextManager.prototype.bind = function (target, context) { + return target; + }; + NoopContextManager.prototype.enable = function () { + return this; + }; + NoopContextManager.prototype.disable = function () { + return this; + }; + return NoopContextManager; +}()); +exports.NoopContextManager = NoopContextManager; +//# sourceMappingURL=NoopContextManager.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js.map b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js.map new file mode 100644 index 000000000..ad638456b --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NoopContextManager.js","sourceRoot":"","sources":["../../src/NoopContextManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,qCAAoC;AAEpC;IAAA;IAuBA,CAAC;IAtBC,mCAAM,GAAN;QACE,OAAO,iBAAO,CAAC,YAAY,CAAC;IAC9B,CAAC;IAED,iCAAI,GAAJ,UACE,OAAgB,EAChB,EAAK;QAEL,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,iCAAI,GAAJ,UAAQ,MAAS,EAAE,OAAiB;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mCAAM,GAAN;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oCAAO,GAAP;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IACH,yBAAC;AAAD,CAAC,AAvBD,IAuBC;AAvBY,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.d.ts b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.d.ts new file mode 100644 index 000000000..dcdbcaa3a --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.d.ts @@ -0,0 +1,42 @@ +export declare class Context { + private _currentContext; + /** The root context is used as the default parent context when there is no active context */ + static readonly ROOT_CONTEXT: Context; + /** + * This is another identifier to the root context which allows developers to easily search the + * codebase for direct uses of context which need to be removed in later PRs. + * + * It's existence is temporary and it should be removed when all references are fixed. + */ + static readonly TODO: Context; + /** Get a key to uniquely identify a context value */ + static createKey(description: string): symbol; + /** + * Construct a new context which inherits values from an optional parent context. + * + * @param parentContext a context from which to inherit values + */ + private constructor(); + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} +//# sourceMappingURL=context.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js new file mode 100644 index 000000000..55177503c --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Context = void 0; +/* + * 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 Context = /** @class */ (function () { + /** + * Construct a new context which inherits values from an optional parent context. + * + * @param parentContext a context from which to inherit values + */ + function Context(parentContext) { + this._currentContext = parentContext ? new Map(parentContext) : new Map(); + } + /** Get a key to uniquely identify a context value */ + Context.createKey = function (description) { + return Symbol(description); + }; + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + Context.prototype.getValue = function (key) { + return this._currentContext.get(key); + }; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + Context.prototype.setValue = function (key, value) { + var context = new Context(this._currentContext); + context._currentContext.set(key, value); + return context; + }; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + Context.prototype.deleteValue = function (key) { + var context = new Context(this._currentContext); + context._currentContext.delete(key); + return context; + }; + /** The root context is used as the default parent context when there is no active context */ + Context.ROOT_CONTEXT = new Context(); + /** + * This is another identifier to the root context which allows developers to easily search the + * codebase for direct uses of context which need to be removed in later PRs. + * + * It's existence is temporary and it should be removed when all references are fixed. + */ + Context.TODO = Context.ROOT_CONTEXT; + return Context; +}()); +exports.Context = Context; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js.map b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js.map new file mode 100644 index 000000000..45674b3d6 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH;IAmBE;;;;OAIG;IACH,iBAAoB,aAAoC;QACtD,IAAI,CAAC,eAAe,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;IAC5E,CAAC;IAZD,qDAAqD;IACvC,iBAAS,GAAvB,UAAwB,WAAmB;QACzC,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;IAWD;;;;OAIG;IACH,0BAAQ,GAAR,UAAS,GAAW;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACH,0BAAQ,GAAR,UAAS,GAAW,EAAE,KAAc;QAClC,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClD,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,6BAAW,GAAX,UAAY,GAAW;QACrB,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClD,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC;IACjB,CAAC;IAzDD,6FAA6F;IACtE,oBAAY,GAAG,IAAI,OAAO,EAAE,CAAC;IAEpD;;;;;OAKG;IACoB,YAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAiDrD,cAAC;CAAA,AA7DD,IA6DC;AA7DY,0BAAO"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.d.ts b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.d.ts new file mode 100644 index 000000000..a39b579a8 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.d.ts @@ -0,0 +1,4 @@ +export * from './types'; +export * from './context'; +export * from './NoopContextManager'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js new file mode 100644 index 000000000..4b288ee68 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js @@ -0,0 +1,31 @@ +"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" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./types"), exports); +__exportStar(require("./context"), exports); +__exportStar(require("./NoopContextManager"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js.map b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js.map new file mode 100644 index 000000000..5522fa285 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,0CAAwB;AACxB,4CAA0B;AAC1B,uDAAqC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.d.ts b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.d.ts new file mode 100644 index 000000000..2d20f61ea --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.d.ts @@ -0,0 +1,28 @@ +import { Context } from './context'; +export interface ContextManager { + /** + * Get the current active context + */ + active(): Context; + /** + * Run the fn callback with object set as the current active context + * @param context Any object to set as the current active context + * @param fn A callback to be immediately run within a specific context + */ + with ReturnType>(context: Context, fn: T): ReturnType; + /** + * Bind an object as the current context (or a specific one) + * @param target Any object to which a context need to be set + * @param [context] Optionally specify the context which you want to assign + */ + bind(target: T, context?: Context): T; + /** + * Enable context management + */ + enable(): this; + /** + * Disable context management + */ + disable(): this; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js new file mode 100644 index 000000000..c428c6d09 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js @@ -0,0 +1,18 @@ +"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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js.map b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js.map new file mode 100644 index 000000000..1045f5b60 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.d.ts b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.d.ts new file mode 100644 index 000000000..1cbb3ffee --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.d.ts @@ -0,0 +1,2 @@ +export declare const VERSION = "0.10.2"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js new file mode 100644 index 000000000..270e2dd92 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js @@ -0,0 +1,21 @@ +"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.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.10.2'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js.map b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js.map new file mode 100644 index 000000000..bfad0dcda --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/build/src/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/package.json b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/package.json new file mode 100644 index 000000000..e9ad12a81 --- /dev/null +++ b/node_modules/@opentelemetry/api/node_modules/@opentelemetry/context-base/package.json @@ -0,0 +1,94 @@ +{ + "_from": "@opentelemetry/context-base@^0.10.2", + "_id": "@opentelemetry/context-base@0.10.2", + "_inBundle": false, + "_integrity": "sha512-hZNKjKOYsckoOEgBziGMnBcX0M7EtstnCmwz5jZUOUYwlZ+/xxX6z3jPu1XVO2Jivk0eLfuP9GP+vFD49CMetw==", + "_location": "/@opentelemetry/api/@opentelemetry/context-base", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@opentelemetry/context-base@^0.10.2", + "name": "@opentelemetry/context-base", + "escapedName": "@opentelemetry%2fcontext-base", + "scope": "@opentelemetry", + "rawSpec": "^0.10.2", + "saveSpec": null, + "fetchSpec": "^0.10.2" + }, + "_requiredBy": [ + "/@opentelemetry/api" + ], + "_resolved": "https://registry.npmjs.org/@opentelemetry/context-base/-/context-base-0.10.2.tgz", + "_shasum": "55bea904b2b91aa8a8675df9eaba5961bddb1def", + "_spec": "@opentelemetry/context-base@^0.10.2", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@opentelemetry/api", + "author": { + "name": "OpenTelemetry Authors" + }, + "bugs": { + "url": "https://github.com/open-telemetry/opentelemetry-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "OpenTelemetry Base Context Manager", + "devDependencies": { + "@types/mocha": "8.0.0", + "@types/node": "14.0.27", + "codecov": "3.7.2", + "gts": "2.0.2", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "3.0.2", + "ts-mocha": "7.0.0", + "ts-node": "8.10.2", + "typescript": "3.9.7" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.js.map", + "build/src/**/*.d.ts", + "doc", + "LICENSE", + "README.md" + ], + "gitHead": "b247e69034a7888a842fe75e0a5ff06f8bea44a8", + "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", + "keywords": [ + "opentelemetry", + "nodejs", + "browser", + "tracing", + "profiling", + "metrics", + "stats" + ], + "license": "Apache-2.0", + "main": "build/src/index.js", + "name": "@opentelemetry/context-base", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/open-telemetry/opentelemetry-js.git" + }, + "scripts": { + "clean": "rimraf build/*", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "compile": "npm run version:update && tsc -p .", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "precompile": "tsc --version", + "prepare": "npm run compile", + "tdd": "npm run test -- --watch-extensions ts --watch", + "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", + "version:update": "node ../../scripts/version-update.js", + "watch": "tsc -w" + }, + "types": "build/src/index.d.ts", + "version": "0.10.2" +} diff --git a/node_modules/@opentelemetry/api/package.json b/node_modules/@opentelemetry/api/package.json new file mode 100644 index 000000000..15ae2a6a5 --- /dev/null +++ b/node_modules/@opentelemetry/api/package.json @@ -0,0 +1,117 @@ +{ + "_from": "@opentelemetry/api@^0.10.2", + "_id": "@opentelemetry/api@0.10.2", + "_inBundle": false, + "_integrity": "sha512-GtpMGd6vkzDMYcpu2t9LlhEgMy/SzBwRnz48EejlRArYqZzqSzAsKmegUK7zHgl+EOIaK9mKHhnRaQu3qw20cA==", + "_location": "/@opentelemetry/api", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@opentelemetry/api@^0.10.2", + "name": "@opentelemetry/api", + "escapedName": "@opentelemetry%2fapi", + "scope": "@opentelemetry", + "rawSpec": "^0.10.2", + "saveSpec": null, + "fetchSpec": "^0.10.2" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/core-tracing", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-0.10.2.tgz", + "_shasum": "9647b881f3e1654089ff7ea59d587b2d35060654", + "_spec": "@opentelemetry/api@^0.10.2", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "OpenTelemetry Authors" + }, + "browser": { + "./src/platform/index.ts": "./src/platform/browser/index.ts", + "./build/src/platform/index.js": "./build/src/platform/browser/index.js" + }, + "bugs": { + "url": "https://github.com/open-telemetry/opentelemetry-js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@opentelemetry/context-base": "^0.10.2" + }, + "deprecated": false, + "description": "Public API for OpenTelemetry", + "devDependencies": { + "@types/mocha": "8.0.0", + "@types/node": "14.0.27", + "@types/webpack-env": "1.15.2", + "codecov": "3.7.2", + "gts": "2.0.2", + "istanbul-instrumenter-loader": "3.0.1", + "karma": "5.1.1", + "karma-chrome-launcher": "3.1.0", + "karma-coverage-istanbul-reporter": "3.0.3", + "karma-mocha": "2.0.1", + "karma-spec-reporter": "0.0.32", + "karma-webpack": "4.0.2", + "linkinator": "2.1.1", + "mocha": "7.2.0", + "nyc": "15.1.0", + "ts-loader": "8.0.1", + "ts-mocha": "7.0.0", + "typedoc": "0.17.8", + "typescript": "3.9.7", + "webpack": "4.44.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.js.map", + "build/src/**/*.d.ts", + "doc", + "LICENSE", + "README.md" + ], + "gitHead": "b247e69034a7888a842fe75e0a5ff06f8bea44a8", + "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", + "keywords": [ + "opentelemetry", + "nodejs", + "browser", + "tracing", + "profiling", + "metrics", + "stats", + "monitoring" + ], + "license": "Apache-2.0", + "main": "build/src/index.js", + "name": "@opentelemetry/api", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/open-telemetry/opentelemetry-js.git" + }, + "scripts": { + "build": "npm run compile", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "compile": "npm run version:update && tsc -p .", + "docs": "typedoc --tsconfig tsconfig.json --exclude test/**/*.ts", + "docs-test": "linkinator docs/out --silent --skip david-dm.org", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "precompile": "tsc --version", + "prepare": "npm run compile", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", + "test:browser": "nyc karma start --single-run", + "version:update": "node ../../scripts/version-update.js", + "watch": "tsc -w" + }, + "types": "build/src/index.d.ts", + "version": "0.10.2" +} diff --git a/node_modules/@opentelemetry/context-base/LICENSE b/node_modules/@opentelemetry/context-base/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + http://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. diff --git a/node_modules/@opentelemetry/context-base/README.md b/node_modules/@opentelemetry/context-base/README.md new file mode 100644 index 000000000..efba88984 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/README.md @@ -0,0 +1,39 @@ +# OpenTelemetry Base Context Manager +[![Gitter chat][gitter-image]][gitter-url] +[![NPM Published Version][npm-img]][npm-url] +[![dependencies][dependencies-image]][dependencies-url] +[![devDependencies][devDependencies-image]][devDependencies-url] +[![Apache License][license-image]][license-image] + +This package provides the ContextManager interface (which is used by concrete implementations) and a no-op implementation (which is used internally when no context propagation is defined). It's intended for use both on the server and in the browser. + +## What is a Context Manager ? + +To understand why they exists, we'll need to understand how Javascript works: when you make native function call (networks, setInterval etc) you generally call C++ code that will later callback your own code. + +A common issue when tracing a request in javascript is to link the function that have made the native call to the callback that the native code called when the response is there. Imagine you want to track for which user you made the request, you need some sort of "context/context aware storage". + +ContextManager's aim to offer exactly that, it's API offer to store an object in the current context (`with()`) and if needed, `bind()` to a specific function call to find it back when the callback fire, which can later get retrieved using `active()`. + +This package only include the interface and a Noop implementation, for more information please see the [async-hooks based ContextManager][ah-context-manager] for NodeJS. + +## Useful links +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us on [gitter][gitter-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[gitter-image]: https://badges.gitter.im/open-telemetry/opentelemetry-js.svg +[gitter-url]: https://gitter.im/open-telemetry/opentelemetry-node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge +[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/master/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[dependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/status.svg?path=packages/opentelemetry-context-base +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-context-base +[devDependencies-image]: https://david-dm.org/open-telemetry/opentelemetry-js/dev-status.svg?path=packages/opentelemetry-context-base +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-context-base&type=dev +[ah-context-manager]: https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-context-async-hooks +[npm-url]: https://www.npmjs.com/package/@opentelemetry/context-base +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fcontext-base.svg diff --git a/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts b/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts new file mode 100644 index 000000000..28c6ae9da --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.d.ts @@ -0,0 +1,24 @@ +/*! + * Copyright 2019, 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. + */ +import * as types from './types'; +import { Context } from './context'; +export declare class NoopContextManager implements types.ContextManager { + active(): Context; + with ReturnType>(context: Context, fn: T): ReturnType; + bind(target: T, context?: Context): T; + enable(): this; + disable(): this; +} diff --git a/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js b/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js new file mode 100644 index 000000000..cd83f4bce --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/NoopContextManager.js @@ -0,0 +1,37 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +const context_1 = require("./context"); +class NoopContextManager { + active() { + return context_1.Context.ROOT_CONTEXT; + } + with(context, fn) { + return fn(); + } + bind(target, context) { + return target; + } + enable() { + return this; + } + disable() { + return this; + } +} +exports.NoopContextManager = NoopContextManager; +//# sourceMappingURL=NoopContextManager.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/context-base/build/src/context.d.ts b/node_modules/@opentelemetry/context-base/build/src/context.d.ts new file mode 100644 index 000000000..06ede0401 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/context.d.ts @@ -0,0 +1,61 @@ +/*! + * Copyright 2020, 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. + */ +/** + * Class which stores and manages current context values. All methods which + * update context such as get and delete do not modify an existing context, + * but create a new one with updated values. + */ +export declare class Context { + private _currentContext; + /** The root context is used as the default parent context when there is no active context */ + static readonly ROOT_CONTEXT: Context; + /** + * This is another identifier to the root context which allows developers to easily search the + * codebase for direct uses of context which need to be removed in later PRs. + * + * It's existence is temporary and it should be removed when all references are fixed. + */ + static readonly TODO: Context; + /** Get a key to uniquely identify a context value */ + static createKey(description: string): symbol; + /** + * Construct a new context which inherits values from an optional parent context. + * + * @param parentContext a context from which to inherit values + */ + private constructor(); + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} diff --git a/node_modules/@opentelemetry/context-base/build/src/context.js b/node_modules/@opentelemetry/context-base/build/src/context.js new file mode 100644 index 000000000..09ca82f66 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/context.js @@ -0,0 +1,78 @@ +"use strict"; +/*! + * Copyright 2020, 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 }); +/** + * Class which stores and manages current context values. All methods which + * update context such as get and delete do not modify an existing context, + * but create a new one with updated values. + */ +class Context { + /** + * Construct a new context which inherits values from an optional parent context. + * + * @param parentContext a context from which to inherit values + */ + constructor(parentContext) { + this._currentContext = parentContext ? new Map(parentContext) : new Map(); + } + /** Get a key to uniquely identify a context value */ + static createKey(description) { + return Symbol(description); + } + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key) { + return this._currentContext.get(key); + } + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key, value) { + const context = new Context(this._currentContext); + context._currentContext.set(key, value); + return context; + } + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key) { + const context = new Context(this._currentContext); + context._currentContext.delete(key); + return context; + } +} +exports.Context = Context; +/** The root context is used as the default parent context when there is no active context */ +Context.ROOT_CONTEXT = new Context(); +/** + * This is another identifier to the root context which allows developers to easily search the + * codebase for direct uses of context which need to be removed in later PRs. + * + * It's existence is temporary and it should be removed when all references are fixed. + */ +Context.TODO = Context.ROOT_CONTEXT; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/context-base/build/src/index.d.ts b/node_modules/@opentelemetry/context-base/build/src/index.d.ts new file mode 100644 index 000000000..b1b317f2e --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/index.d.ts @@ -0,0 +1,18 @@ +/*! + * Copyright 2019, 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. + */ +export * from './types'; +export * from './context'; +export * from './NoopContextManager'; diff --git a/node_modules/@opentelemetry/context-base/build/src/index.js b/node_modules/@opentelemetry/context-base/build/src/index.js new file mode 100644 index 000000000..5551ab370 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/index.js @@ -0,0 +1,23 @@ +"use strict"; +/*! + * Copyright 2019, 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. + */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./context")); +__export(require("./NoopContextManager")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/context-base/build/src/types.d.ts b/node_modules/@opentelemetry/context-base/build/src/types.d.ts new file mode 100644 index 000000000..e2fd8121a --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/types.d.ts @@ -0,0 +1,42 @@ +/*! + * Copyright 2019, 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. + */ +import { Context } from './context'; +export interface ContextManager { + /** + * Get the current active context + */ + active(): Context; + /** + * Run the fn callback with object set as the current active context + * @param context Any object to set as the current active context + * @param fn A callback to be immediately run within a specific context + */ + with ReturnType>(context: Context, fn: T): ReturnType; + /** + * Bind an object as the current context (or a specific one) + * @param target Any object to which a context need to be set + * @param [context] Optionally specify the context which you want to assign + */ + bind(target: T, context?: Context): T; + /** + * Enable context management + */ + enable(): this; + /** + * Disable context management + */ + disable(): this; +} diff --git a/node_modules/@opentelemetry/context-base/build/src/types.js b/node_modules/@opentelemetry/context-base/build/src/types.js new file mode 100644 index 000000000..2eeefa216 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/types.js @@ -0,0 +1,18 @@ +"use strict"; +/*! + * Copyright 2019, 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 \ No newline at end of file diff --git a/node_modules/@opentelemetry/context-base/build/src/version.d.ts b/node_modules/@opentelemetry/context-base/build/src/version.d.ts new file mode 100644 index 000000000..ece496a1b --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/version.d.ts @@ -0,0 +1,16 @@ +/*! + * Copyright 2019, 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. + */ +export declare const VERSION = "0.6.1"; diff --git a/node_modules/@opentelemetry/context-base/build/src/version.js b/node_modules/@opentelemetry/context-base/build/src/version.js new file mode 100644 index 000000000..2230c1214 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/build/src/version.js @@ -0,0 +1,20 @@ +"use strict"; +/*! + * Copyright 2019, 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 }); +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.6.1'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/@opentelemetry/context-base/package.json b/node_modules/@opentelemetry/context-base/package.json new file mode 100644 index 000000000..0c2bb3ad6 --- /dev/null +++ b/node_modules/@opentelemetry/context-base/package.json @@ -0,0 +1,94 @@ +{ + "_from": "@opentelemetry/context-base@^0.6.1", + "_id": "@opentelemetry/context-base@0.6.1", + "_inBundle": false, + "_integrity": "sha512-5bHhlTBBq82ti3qPT15TRxkYTFPPQWbnkkQkmHPtqiS1XcTB69cEKd3Jm7Cfi/vkPoyxapmePE9tyA7EzLt8SQ==", + "_location": "/@opentelemetry/context-base", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@opentelemetry/context-base@^0.6.1", + "name": "@opentelemetry/context-base", + "escapedName": "@opentelemetry%2fcontext-base", + "scope": "@opentelemetry", + "rawSpec": "^0.6.1", + "saveSpec": null, + "fetchSpec": "^0.6.1" + }, + "_requiredBy": [ + "/@azure/core-auth/@opentelemetry/api" + ], + "_resolved": "https://registry.npmjs.org/@opentelemetry/context-base/-/context-base-0.6.1.tgz", + "_shasum": "b260e454ee4f9635ea024fc83be225e397f15363", + "_spec": "@opentelemetry/context-base@^0.6.1", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/core-auth/node_modules/@opentelemetry/api", + "author": { + "name": "OpenTelemetry Authors" + }, + "bugs": { + "url": "https://github.com/open-telemetry/opentelemetry-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "OpenTelemetry Base Context Manager", + "devDependencies": { + "@types/mocha": "^7.0.0", + "@types/node": "^12.6.8", + "codecov": "^3.6.1", + "gts": "^1.1.0", + "mocha": "^6.1.0", + "nyc": "^15.0.0", + "rimraf": "^3.0.0", + "ts-mocha": "^6.0.0", + "ts-node": "^8.6.2", + "tslint-consistent-codestyle": "^1.16.0", + "tslint-microsoft-contrib": "^6.2.0", + "typescript": "3.7.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.d.ts", + "doc", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", + "keywords": [ + "opentelemetry", + "nodejs", + "browser", + "tracing", + "profiling", + "metrics", + "stats" + ], + "license": "Apache-2.0", + "main": "build/src/index.js", + "name": "@opentelemetry/context-base", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/open-telemetry/opentelemetry-js.git" + }, + "scripts": { + "clean": "rimraf build/*", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", + "compile": "npm run version:update && tsc -p .", + "lint": "gts check", + "lint:fix": "gts fix", + "precompile": "tsc --version", + "prepare": "npm run compile", + "tdd": "npm run test -- --watch-extensions ts --watch", + "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", + "version:update": "node ../../scripts/version-update.js", + "watch": "tsc -w" + }, + "types": "build/src/index.d.ts", + "version": "0.6.1" +} diff --git a/node_modules/@sindresorhus/is/package.json b/node_modules/@sindresorhus/is/package.json index 66fc8bad1..38279571b 100644 --- a/node_modules/@sindresorhus/is/package.json +++ b/node_modules/@sindresorhus/is/package.json @@ -1,27 +1,66 @@ { - "name": "@sindresorhus/is", - "version": "0.14.0", - "description": "Type check values: `is.string('🦄') //=> true`", - "license": "MIT", - "repository": "sindresorhus/is", + "_args": [ + [ + "@sindresorhus/is@0.14.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@sindresorhus/is@0.14.0", + "_id": "@sindresorhus/is@0.14.0", + "_inBundle": false, + "_integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "_location": "/@sindresorhus/is", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sindresorhus/is@0.14.0", + "name": "@sindresorhus/is", + "escapedName": "@sindresorhus%2fis", + "scope": "@sindresorhus", + "rawSpec": "0.14.0", + "saveSpec": null, + "fetchSpec": "0.14.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "_spec": "0.14.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "main": "dist/index.js", + "bugs": { + "url": "https://github.com/sindresorhus/is/issues" + }, + "description": "Type check values: `is.string('🦄') //=> true`", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.1.0", + "@types/jsdom": "^11.12.0", + "@types/node": "^10.12.10", + "@types/tempy": "^0.2.0", + "@types/zen-observable": "^0.8.0", + "ava": "^0.25.0", + "del-cli": "^1.1.0", + "jsdom": "^11.6.2", + "rxjs": "^6.3.3", + "tempy": "^0.2.1", + "tslint": "^5.9.1", + "tslint-xo": "^0.10.0", + "typescript": "^3.2.1", + "zen-observable": "^0.8.8" + }, "engines": { "node": ">=6" }, - "scripts": { - "lint": "tslint --format stylish --project .", - "build": "del dist && tsc", - "test": "npm run lint && npm run build && ava dist/tests", - "prepublish": "npm run build && del dist/tests" - }, "files": [ "dist" ], + "homepage": "https://github.com/sindresorhus/is#readme", "keywords": [ "type", "types", @@ -43,21 +82,19 @@ "verify", "compare" ], - "devDependencies": { - "@sindresorhus/tsconfig": "^0.1.0", - "@types/jsdom": "^11.12.0", - "@types/node": "^10.12.10", - "@types/tempy": "^0.2.0", - "@types/zen-observable": "^0.8.0", - "ava": "^0.25.0", - "del-cli": "^1.1.0", - "jsdom": "^11.6.2", - "rxjs": "^6.3.3", - "tempy": "^0.2.1", - "tslint": "^5.9.1", - "tslint-xo": "^0.10.0", - "typescript": "^3.2.1", - "zen-observable": "^0.8.8" + "license": "MIT", + "main": "dist/index.js", + "name": "@sindresorhus/is", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is.git" }, - "types": "dist/index.d.ts" -} \ No newline at end of file + "scripts": { + "build": "del dist && tsc", + "lint": "tslint --format stylish --project .", + "prepublish": "npm run build && del dist/tests", + "test": "npm run lint && npm run build && ava dist/tests" + }, + "types": "dist/index.d.ts", + "version": "0.14.0" +} diff --git a/node_modules/@sinonjs/commons/package.json b/node_modules/@sinonjs/commons/package.json index 652657481..6518f4925 100644 --- a/node_modules/@sinonjs/commons/package.json +++ b/node_modules/@sinonjs/commons/package.json @@ -1,33 +1,46 @@ { - "name": "@sinonjs/commons", - "version": "1.8.0", - "description": "Simple functions shared among the sinon end user libraries", - "main": "lib/index.js", - "scripts": { - "lint": "eslint .", - "precommit": "lint-staged", - "test": "mocha --recursive -R dot \"lib/**/*.test.js\"", - "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", - "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", - "preversion": "npm run test-check-coverage", - "version": "changes --commits --footer", - "postversion": "git push --follow-tags && npm publish" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/sinonjs/commons.git" + "_args": [ + [ + "@sinonjs/commons@1.8.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@sinonjs/commons@1.8.0", + "_id": "@sinonjs/commons@1.8.0", + "_inBundle": false, + "_integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", + "_location": "/@sinonjs/commons", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sinonjs/commons@1.8.0", + "name": "@sinonjs/commons", + "escapedName": "@sinonjs%2fcommons", + "scope": "@sinonjs", + "rawSpec": "1.8.0", + "saveSpec": null, + "fetchSpec": "1.8.0" }, + "_requiredBy": [ + "/@sinonjs/fake-timers", + "/@sinonjs/formatio", + "/@sinonjs/samsam", + "/nise", + "/sinon" + ], + "_resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", + "_spec": "1.8.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": "", - "license": "BSD-3-Clause", "bugs": { "url": "https://github.com/sinonjs/commons/issues" }, - "homepage": "https://github.com/sinonjs/commons#readme", - "lint-staged": { - "*.js": [ - "eslint" - ] + "dependencies": { + "type-detect": "4.0.8" }, + "description": "Simple functions shared among the sinon end user libraries", "devDependencies": { "@sinonjs/referee-sinon": "7.0.2", "@studio/changes": "^2.0.0", @@ -47,7 +60,28 @@ "nyc": "15.0.0", "prettier": "^1.14.3" }, - "dependencies": { - "type-detect": "4.0.8" - } -} \ No newline at end of file + "homepage": "https://github.com/sinonjs/commons#readme", + "license": "BSD-3-Clause", + "lint-staged": { + "*.js": [ + "eslint" + ] + }, + "main": "lib/index.js", + "name": "@sinonjs/commons", + "repository": { + "type": "git", + "url": "git+https://github.com/sinonjs/commons.git" + }, + "scripts": { + "lint": "eslint .", + "postversion": "git push --follow-tags && npm publish", + "precommit": "lint-staged", + "preversion": "npm run test-check-coverage", + "test": "mocha --recursive -R dot \"lib/**/*.test.js\"", + "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", + "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", + "version": "changes --commits --footer" + }, + "version": "1.8.0" +} diff --git a/node_modules/@sinonjs/fake-timers/package.json b/node_modules/@sinonjs/fake-timers/package.json index 5eb0d458d..1e346322d 100644 --- a/node_modules/@sinonjs/fake-timers/package.json +++ b/node_modules/@sinonjs/fake-timers/package.json @@ -1,39 +1,45 @@ { - "name": "@sinonjs/fake-timers", - "description": "Fake JavaScript timers", - "version": "6.0.1", - "homepage": "http://github.com/sinonjs/fake-timers", - "author": "Christian Johansen", - "repository": { - "type": "git", - "url": "http://github.com/sinonjs/fake-timers.git" + "_args": [ + [ + "@sinonjs/fake-timers@6.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@sinonjs/fake-timers@6.0.1", + "_id": "@sinonjs/fake-timers@6.0.1", + "_inBundle": false, + "_integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "_location": "/@sinonjs/fake-timers", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sinonjs/fake-timers@6.0.1", + "name": "@sinonjs/fake-timers", + "escapedName": "@sinonjs%2ffake-timers", + "scope": "@sinonjs", + "rawSpec": "6.0.1", + "saveSpec": null, + "fetchSpec": "6.0.1" + }, + "_requiredBy": [ + "/nise", + "/sinon" + ], + "_resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "_spec": "6.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Christian Johansen" }, "bugs": { - "mail": "christian@cjohansen.no", "url": "http://github.com/sinonjs/fake-timers/issues" }, - "license": "BSD-3-Clause", - "scripts": { - "lint": "eslint .", - "test-node": "mocha test/ integration-test/ -R dot --check-leaks", - "test-headless": "mochify --no-detect-globals --timeout=10000", - "test-check-coverage": "npm run test-coverage && nyc check-coverage", - "test-cloud": "mochify --wd --no-detect-globals --timeout=10000", - "test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node", - "test": "npm run lint && npm run test-node && npm run test-headless", - "bundle": "browserify --no-detect-globals -s FakeTimers -o fake-timers.js src/fake-timers-src.js", - "prepublishOnly": "npm run bundle", - "preversion": "./scripts/preversion.sh", - "version": "./scripts/version.sh", - "postversion": "./scripts/postversion.sh" + "dependencies": { + "@sinonjs/commons": "^1.7.0" }, - "lint-staged": { - "*.js": "eslint" - }, - "files": [ - "src/", - "fake-timers.js" - ], + "description": "Fake JavaScript timers", "devDependencies": { "@sinonjs/referee-sinon": "6.0.1", "browserify": "16.5.0", @@ -72,16 +78,23 @@ ] } }, - "module": "./fake-timers.js", - "main": "./src/fake-timers-src.js", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - }, + "files": [ + "src/", + "fake-timers.js" + ], + "homepage": "http://github.com/sinonjs/fake-timers", "husky": { "hooks": { "pre-commit": "run-p lint test-node" } }, + "license": "BSD-3-Clause", + "lint-staged": { + "*.js": "eslint" + }, + "main": "./src/fake-timers-src.js", + "module": "./fake-timers.js", + "name": "@sinonjs/fake-timers", "nyc": { "branches": 85, "lines": 92, @@ -92,5 +105,24 @@ "coverage/**", "fake-timers.js" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/sinonjs/fake-timers.git" + }, + "scripts": { + "bundle": "browserify --no-detect-globals -s FakeTimers -o fake-timers.js src/fake-timers-src.js", + "lint": "eslint .", + "postversion": "./scripts/postversion.sh", + "prepublishOnly": "npm run bundle", + "preversion": "./scripts/preversion.sh", + "test": "npm run lint && npm run test-node && npm run test-headless", + "test-check-coverage": "npm run test-coverage && nyc check-coverage", + "test-cloud": "mochify --wd --no-detect-globals --timeout=10000", + "test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node", + "test-headless": "mochify --no-detect-globals --timeout=10000", + "test-node": "mocha test/ integration-test/ -R dot --check-leaks", + "version": "./scripts/version.sh" + }, + "version": "6.0.1" +} diff --git a/node_modules/@sinonjs/formatio/package.json b/node_modules/@sinonjs/formatio/package.json index 4998b4c54..84bc2a57a 100644 --- a/node_modules/@sinonjs/formatio/package.json +++ b/node_modules/@sinonjs/formatio/package.json @@ -1,35 +1,45 @@ { - "name": "@sinonjs/formatio", - "version": "5.0.1", - "description": "Human-readable object formatting", - "homepage": "https://sinonjs.github.io/formatio/", - "author": "Christian Johansen", - "license": "BSD-3-Clause", - "main": "./lib/formatio", - "repository": { - "type": "git", - "url": "https://github.com/sinonjs/formatio.git" - }, - "files": [ - "lib/**/*[^test].js" + "_args": [ + [ + "@sinonjs/formatio@5.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "build": "npm run build:dist-folder && npm run build:bundle", - "build:bundle": "rollup -c > dist/formatio.js", - "build:dist-folder": "mkdirp dist", - "lint": "eslint .", - "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", - "test": "mocha 'lib/**/*.test.js'", - "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", - "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", - "preversion": "npm run test-check-coverage", - "version": "changes --commits --footer", - "postversion": "git push --follow-tags && npm publish --access public" + "_development": true, + "_from": "@sinonjs/formatio@5.0.1", + "_id": "@sinonjs/formatio@5.0.1", + "_inBundle": false, + "_integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "_location": "/@sinonjs/formatio", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sinonjs/formatio@5.0.1", + "name": "@sinonjs/formatio", + "escapedName": "@sinonjs%2fformatio", + "scope": "@sinonjs", + "rawSpec": "5.0.1", + "saveSpec": null, + "fetchSpec": "5.0.1" + }, + "_requiredBy": [ + "/sinon" + ], + "_resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "_spec": "5.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Christian Johansen" + }, + "bugs": { + "url": "https://github.com/sinonjs/formatio/issues" }, "dependencies": { "@sinonjs/commons": "^1", "@sinonjs/samsam": "^5.0.2" }, + "description": "Human-readable object formatting", "devDependencies": { "@sinonjs/referee": "^4.0.0", "@studio/changes": "^2.0.0", @@ -46,5 +56,30 @@ "prettier": "^1.18.2", "rollup": "1.31.0", "rollup-plugin-commonjs": "10.1.0" - } -} \ No newline at end of file + }, + "files": [ + "lib/**/*[^test].js" + ], + "homepage": "https://sinonjs.github.io/formatio/", + "license": "BSD-3-Clause", + "main": "./lib/formatio", + "name": "@sinonjs/formatio", + "repository": { + "type": "git", + "url": "git+https://github.com/sinonjs/formatio.git" + }, + "scripts": { + "build": "npm run build:dist-folder && npm run build:bundle", + "build:bundle": "rollup -c > dist/formatio.js", + "build:dist-folder": "mkdirp dist", + "lint": "eslint .", + "postversion": "git push --follow-tags && npm publish --access public", + "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", + "preversion": "npm run test-check-coverage", + "test": "mocha 'lib/**/*.test.js'", + "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", + "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", + "version": "changes --commits --footer" + }, + "version": "5.0.1" +} diff --git a/node_modules/@sinonjs/samsam/package.json b/node_modules/@sinonjs/samsam/package.json index 5db8e9bc1..42dcfb058 100644 --- a/node_modules/@sinonjs/samsam/package.json +++ b/node_modules/@sinonjs/samsam/package.json @@ -1,50 +1,51 @@ { - "name": "@sinonjs/samsam", - "version": "5.0.3", - "description": "Value identification and comparison functions", - "homepage": "http://sinonjs.github.io/samsam/", - "author": "Christian Johansen", - "license": "BSD-3-Clause", - "main": "./lib/samsam", - "repository": { - "type": "git", - "url": "https://github.com/sinonjs/samsam.git" + "_args": [ + [ + "@sinonjs/samsam@5.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@sinonjs/samsam@5.0.3", + "_id": "@sinonjs/samsam@5.0.3", + "_inBundle": false, + "_integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "_location": "/@sinonjs/samsam", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sinonjs/samsam@5.0.3", + "name": "@sinonjs/samsam", + "escapedName": "@sinonjs%2fsamsam", + "scope": "@sinonjs", + "rawSpec": "5.0.3", + "saveSpec": null, + "fetchSpec": "5.0.3" }, - "lint-staged": { - "*.js": "eslint" - }, - "scripts": { - "benchmark": "node lib/deep-equal-benchmark.js", - "build": "run-s build:dist-folder build:bundle", - "build:bundle": "rollup -c", - "build:dist-folder": "mkdirp dist", - "jsdoc": "jsdoc -c jsdoc.conf.json", - "lint": "eslint .", - "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", - "test": "mocha ./lib/*.test.js", - "test-cloud": "npm run test-headless -- --wd", - "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", - "test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test", - "test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"", - "preversion": "npm run test-check-coverage", - "version": "changes --commits --footer", - "postversion": "git push --follow-tags && npm publish --access public" + "_requiredBy": [ + "/@sinonjs/formatio", + "/sinon" + ], + "_resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", + "_spec": "5.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Christian Johansen" }, "browser": { "jsdom": false, "jsdom-global": false }, - "files": [ - "dist/", - "docs/", - "lib/", - "!lib/**/*.test.js" - ], + "bugs": { + "url": "https://github.com/sinonjs/samsam/issues" + }, "dependencies": { "@sinonjs/commons": "^1.6.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" }, + "description": "Value identification and comparison functions", "devDependencies": { "@sinonjs/referee": "^4.0.0", "@studio/changes": "^2.0.0", @@ -76,6 +77,19 @@ "rollup": "^1.23.0", "rollup-plugin-commonjs": "^10.1.0" }, + "files": [ + "dist/", + "docs/", + "lib/", + "!lib/**/*.test.js" + ], + "homepage": "http://sinonjs.github.io/samsam/", + "license": "BSD-3-Clause", + "lint-staged": { + "*.js": "eslint" + }, + "main": "./lib/samsam", + "name": "@sinonjs/samsam", "nyc": { "exclude": [ "**/*.test.js", @@ -87,5 +101,27 @@ "rollup.config.js", "lib/deep-equal-benchmark.js" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sinonjs/samsam.git" + }, + "scripts": { + "benchmark": "node lib/deep-equal-benchmark.js", + "build": "run-s build:dist-folder build:bundle", + "build:bundle": "rollup -c", + "build:dist-folder": "mkdirp dist", + "jsdoc": "jsdoc -c jsdoc.conf.json", + "lint": "eslint .", + "postversion": "git push --follow-tags && npm publish --access public", + "prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", + "preversion": "npm run test-check-coverage", + "test": "mocha ./lib/*.test.js", + "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", + "test-cloud": "npm run test-headless -- --wd", + "test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test", + "test-headless": "mochify --no-detect-globals --recursive -R dot --plugin [ proxyquire-universal ] \"./lib/*.test.js\"", + "version": "changes --commits --footer" + }, + "version": "5.0.3" +} diff --git a/node_modules/@sinonjs/text-encoding/package.json b/node_modules/@sinonjs/text-encoding/package.json index edb635a03..7d9d4f449 100644 --- a/node_modules/@sinonjs/text-encoding/package.json +++ b/node_modules/@sinonjs/text-encoding/package.json @@ -1,37 +1,97 @@ { - "name": "@sinonjs/text-encoding", - "author": "Joshua Bell ", - "contributors": [ - "Joshua Bell ", - "Rick Eyre ", - "Eugen Podaru ", - "Filip Dupanović ", - "Anne van Kesteren ", - "Author: Francis Avila ", - "Michael J. Ryan ", - "Pierre Queinnec ", - "Zack Weinberg " + "_args": [ + [ + "@sinonjs/text-encoding@0.7.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@sinonjs/text-encoding@0.7.1", + "_id": "@sinonjs/text-encoding@0.7.1", + "_inBundle": false, + "_integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "_location": "/@sinonjs/text-encoding", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@sinonjs/text-encoding@0.7.1", + "name": "@sinonjs/text-encoding", + "escapedName": "@sinonjs%2ftext-encoding", + "scope": "@sinonjs", + "rawSpec": "0.7.1", + "saveSpec": null, + "fetchSpec": "0.7.1" + }, + "_requiredBy": [ + "/nise" + ], + "_resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "_spec": "0.7.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Joshua Bell", + "email": "inexorabletash@gmail.com" + }, + "bugs": { + "url": "https://github.com/inexorabletash/text-encoding/issues" + }, + "contributors": [ + { + "name": "Joshua Bell", + "email": "inexorabletash@gmail.com" + }, + { + "name": "Rick Eyre", + "email": "rick.eyre@outlook.com" + }, + { + "name": "Eugen Podaru", + "email": "eugen.podaru@live.com" + }, + { + "name": "Filip Dupanović", + "email": "filip.dupanovic@gmail.com" + }, + { + "name": "Anne van Kesteren", + "email": "annevk@annevk.nl" + }, + { + "name": "Author: Francis Avila", + "email": "francisga@gmail.com" + }, + { + "name": "Michael J. Ryan", + "email": "tracker1@gmail.com" + }, + { + "name": "Pierre Queinnec", + "email": "pierre@queinnec.org" + }, + { + "name": "Zack Weinberg", + "email": "zackw@panix.com" + } ], - "version": "0.7.1", "description": "Polyfill for the Encoding Living Standard's API.", - "main": "index.js", "files": [ "index.js", "lib/encoding.js", "lib/encoding-indexes.js" ], - "repository": { - "type": "git", - "url": "https://github.com/inexorabletash/text-encoding.git" - }, + "homepage": "https://github.com/inexorabletash/text-encoding", "keywords": [ "encoding", "decoding", "living standard" ], - "bugs": { - "url": "https://github.com/inexorabletash/text-encoding/issues" + "license": "(Unlicense OR Apache-2.0)", + "main": "index.js", + "name": "@sinonjs/text-encoding", + "repository": { + "type": "git", + "url": "git+https://github.com/inexorabletash/text-encoding.git" }, - "homepage": "https://github.com/inexorabletash/text-encoding", - "license": "(Unlicense OR Apache-2.0)" -} \ No newline at end of file + "version": "0.7.1" +} diff --git a/node_modules/@szmarczak/http-timer/package.json b/node_modules/@szmarczak/http-timer/package.json index cf366a763..af5b15b99 100755 --- a/node_modules/@szmarczak/http-timer/package.json +++ b/node_modules/@szmarczak/http-timer/package.json @@ -1,47 +1,79 @@ { - "name": "@szmarczak/http-timer", - "version": "1.1.2", + "_args": [ + [ + "@szmarczak/http-timer@1.1.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@szmarczak/http-timer@1.1.2", + "_id": "@szmarczak/http-timer@1.1.2", + "_inBundle": false, + "_integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "_location": "/@szmarczak/http-timer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@szmarczak/http-timer@1.1.2", + "name": "@szmarczak/http-timer", + "escapedName": "@szmarczak%2fhttp-timer", + "scope": "@szmarczak", + "rawSpec": "1.1.2", + "saveSpec": null, + "fetchSpec": "1.1.2" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "_spec": "1.1.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Szymon Marczak" + }, + "bugs": { + "url": "https://github.com/szmarczak/http-timer/issues" + }, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, "description": "Timings for HTTP requests", - "main": "source", + "devDependencies": { + "ava": "^0.25.0", + "coveralls": "^3.0.2", + "nyc": "^12.0.2", + "p-event": "^2.1.0", + "xo": "^0.22.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && nyc ava", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, "files": [ "source" ], + "homepage": "https://github.com/szmarczak/http-timer#readme", "keywords": [ "http", "https", "timer", "timings" ], + "license": "MIT", + "main": "source", + "name": "@szmarczak/http-timer", "repository": { "type": "git", "url": "git+https://github.com/szmarczak/http-timer.git" }, - "author": "Szymon Marczak", - "license": "MIT", - "bugs": { - "url": "https://github.com/szmarczak/http-timer/issues" + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" }, - "homepage": "https://github.com/szmarczak/http-timer#readme", + "version": "1.1.2", "xo": { "rules": { "unicorn/filename-case": "camelCase" } - }, - "devDependencies": { - "ava": "^0.25.0", - "coveralls": "^3.0.2", - "p-event": "^2.1.0", - "nyc": "^12.0.2", - "xo": "^0.22.0" - }, - "dependencies": { - "defer-to-connect": "^1.0.1" } -} \ No newline at end of file +} diff --git a/node_modules/@types/color-name/package.json b/node_modules/@types/color-name/package.json index de213731b..33c2eb572 100644 --- a/node_modules/@types/color-name/package.json +++ b/node_modules/@types/color-name/package.json @@ -1,23 +1,62 @@ { - "name": "@types/color-name", - "version": "1.1.1", - "description": "TypeScript definitions for color-name", - "license": "MIT", + "_args": [ + [ + "@types/color-name@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/color-name@1.1.1", + "_id": "@types/color-name@1.1.1", + "_inBundle": false, + "_integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "_location": "/@types/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/color-name@1.1.1", + "name": "@types/color-name", + "escapedName": "@types%2fcolor-name", + "scope": "@types", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/ava/ansi-styles", + "/boxen/ansi-styles", + "/eslint/ansi-styles", + "/ora/ansi-styles", + "/slice-ansi/ansi-styles", + "/update-notifier/ansi-styles", + "/wrap-ansi/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Junyoung Clare Jang", - "url": "https://github.com/Ailrun", - "githubUsername": "Ailrun" + "url": "https://github.com/Ailrun" } ], + "dependencies": {}, + "description": "TypeScript definitions for color-name", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", - "types": "index", + "name": "@types/color-name", "repository": { "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "2.0", + "types": "index", "typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "1.1.1" +} diff --git a/node_modules/@types/events/package.json b/node_modules/@types/events/package.json index 511653a8c..5403e7187 100644 --- a/node_modules/@types/events/package.json +++ b/node_modules/@types/events/package.json @@ -1,28 +1,60 @@ { - "name": "@types/events", - "version": "3.0.0", - "description": "TypeScript definitions for events", - "license": "MIT", + "_args": [ + [ + "@types/events@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/events@3.0.0", + "_id": "@types/events@3.0.0", + "_inBundle": false, + "_integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "_location": "/@types/events", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/events@3.0.0", + "name": "@types/events", + "escapedName": "@types%2fevents", + "scope": "@types", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/@types/glob" + ], + "_resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Yasunori Ohoka", - "url": "https://github.com/yasupeke", - "githubUsername": "yasupeke" + "url": "https://github.com/yasupeke" }, { "name": "Shenwei Wang", - "url": "https://github.com/weareoutman", - "githubUsername": "weareoutman" + "url": "https://github.com/weareoutman" } ], + "dependencies": {}, + "description": "TypeScript definitions for events", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", - "types": "index", + "name": "@types/events", "repository": { "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "2.0", + "types": "index", "typesPublisherContentHash": "ae078136220837864b64cc7c1c5267ca1ceb809166fb74569e637bc7de9f2e12", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "3.0.0" +} diff --git a/node_modules/@types/glob/package.json b/node_modules/@types/glob/package.json index 599e299a4..281e0478a 100644 --- a/node_modules/@types/glob/package.json +++ b/node_modules/@types/glob/package.json @@ -1,36 +1,67 @@ { - "name": "@types/glob", - "version": "7.1.1", - "description": "TypeScript definitions for Glob", - "license": "MIT", + "_args": [ + [ + "@types/glob@7.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/glob@7.1.1", + "_id": "@types/glob@7.1.1", + "_inBundle": false, + "_integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "_location": "/@types/glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/glob@7.1.1", + "name": "@types/glob", + "escapedName": "@types%2fglob", + "scope": "@types", + "rawSpec": "7.1.1", + "saveSpec": null, + "fetchSpec": "7.1.1" + }, + "_requiredBy": [ + "/del/globby" + ], + "_resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "_spec": "7.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "vvakame", - "url": "https://github.com/vvakame", - "githubUsername": "vvakame" + "url": "https://github.com/vvakame" }, { "name": "voy", - "url": "https://github.com/voy", - "githubUsername": "voy" + "url": "https://github.com/voy" }, { "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff", - "githubUsername": "ajafff" + "url": "https://github.com/ajafff" } ], - "main": "", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, "dependencies": { "@types/events": "*", "@types/minimatch": "*", "@types/node": "*" }, + "description": "TypeScript definitions for Glob", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/glob", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.0", "typesPublisherContentHash": "43019f2af91c7a4ca3453c4b806a01c521ca3008ffe1bfefd37c5f9d6135660e", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "7.1.1" +} diff --git a/node_modules/@types/json-schema/package.json b/node_modules/@types/json-schema/package.json index 7e1d206a9..1f0fb3f0c 100644 --- a/node_modules/@types/json-schema/package.json +++ b/node_modules/@types/json-schema/package.json @@ -1,44 +1,73 @@ { - "name": "@types/json-schema", - "version": "7.0.6", - "description": "TypeScript definitions for json-schema 4.0, 6.0 and", - "license": "MIT", + "_args": [ + [ + "@types/json-schema@7.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/json-schema@7.0.6", + "_id": "@types/json-schema@7.0.6", + "_inBundle": false, + "_integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", + "_location": "/@types/json-schema", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/json-schema@7.0.6", + "name": "@types/json-schema", + "escapedName": "@types%2fjson-schema", + "scope": "@types", + "rawSpec": "7.0.6", + "saveSpec": null, + "fetchSpec": "7.0.6" + }, + "_requiredBy": [ + "/@typescript-eslint/experimental-utils" + ], + "_resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "_spec": "7.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Boris Cherny", - "url": "https://github.com/bcherny", - "githubUsername": "bcherny" + "url": "https://github.com/bcherny" }, { "name": "Cyrille Tuzi", - "url": "https://github.com/cyrilletuzi", - "githubUsername": "cyrilletuzi" + "url": "https://github.com/cyrilletuzi" }, { "name": "Lucian Buzzo", - "url": "https://github.com/lucianbuzzo", - "githubUsername": "lucianbuzzo" + "url": "https://github.com/lucianbuzzo" }, { "name": "Roland Groza", - "url": "https://github.com/rolandjitsu", - "githubUsername": "rolandjitsu" + "url": "https://github.com/rolandjitsu" }, { "name": "Jason Kwok", - "url": "https://github.com/JasonHK", - "githubUsername": "JasonHK" + "url": "https://github.com/JasonHK" } ], + "dependencies": {}, + "description": "TypeScript definitions for json-schema 4.0, 6.0 and", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", - "types": "index.d.ts", + "name": "@types/json-schema", "repository": { "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/json-schema" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "3.1", + "types": "index.d.ts", "typesPublisherContentHash": "bb4b22e70ee94bf7b787307444fcee2f57a8869f012a460ed8f15b5b6985ed70", - "typeScriptVersion": "3.1" -} \ No newline at end of file + "version": "7.0.6" +} diff --git a/node_modules/@types/json5/package.json b/node_modules/@types/json5/package.json index d31e7361f..6113d35b0 100644 --- a/node_modules/@types/json5/package.json +++ b/node_modules/@types/json5/package.json @@ -1,16 +1,53 @@ { - "name": "@types/json5", - "version": "0.0.29", + "_args": [ + [ + "@types/json5@0.0.29", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/json5@0.0.29", + "_id": "@types/json5@0.0.29", + "_inBundle": false, + "_integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "_location": "/@types/json5", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/json5@0.0.29", + "name": "@types/json5", + "escapedName": "@types%2fjson5", + "scope": "@types", + "rawSpec": "0.0.29", + "saveSpec": null, + "fetchSpec": "0.0.29" + }, + "_requiredBy": [ + "/tsconfig-paths" + ], + "_resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "_spec": "0.0.29", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jason Swearingen", + "email": "https://jasonswearingen.github.io" + }, + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "dependencies": {}, "description": "TypeScript definitions for JSON5", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", "license": "MIT", - "author": "Jason Swearingen ", "main": "", + "name": "@types/json5", "repository": { "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typesPublisherContentHash": "1ed77f2bfd59d290798abf89db281c36565f4a78d97d4e9caab25319d54c6331", "typings": "index.d.ts", - "typesPublisherContentHash": "1ed77f2bfd59d290798abf89db281c36565f4a78d97d4e9caab25319d54c6331" -} \ No newline at end of file + "version": "0.0.29" +} diff --git a/node_modules/@types/jszip/package.json b/node_modules/@types/jszip/package.json index 5712e3e9d..4a6cd0acf 100644 --- a/node_modules/@types/jszip/package.json +++ b/node_modules/@types/jszip/package.json @@ -1,31 +1,63 @@ { - "name": "@types/jszip", - "version": "3.1.6", - "description": "TypeScript definitions for JSZip", - "license": "MIT", + "_args": [ + [ + "@types/jszip@3.1.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/jszip@3.1.6", + "_id": "@types/jszip@3.1.6", + "_inBundle": false, + "_integrity": "sha512-m8uFcI+O2EupCfbEVQWsBM/4nhbegjOHL7cQgBpM95FeF98kdFJXzy9/8yhx4b3lCRl/gMBhcvyh30Qt3X+XPQ==", + "_location": "/@types/jszip", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/jszip@3.1.6", + "name": "@types/jszip", + "escapedName": "@types%2fjszip", + "scope": "@types", + "rawSpec": "3.1.6", + "saveSpec": null, + "fetchSpec": "3.1.6" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.6.tgz", + "_spec": "3.1.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "mzeiher", - "url": "https://github.com/mzeiher", - "githubUsername": "mzeiher" + "url": "https://github.com/mzeiher" }, { "name": "forabi", - "url": "https://github.com/forabi", - "githubUsername": "forabi" + "url": "https://github.com/forabi" } ], - "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/jszip" - }, - "scripts": {}, "dependencies": { "@types/node": "*" }, + "description": "TypeScript definitions for JSZip", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/jszip", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/jszip" + }, + "scripts": {}, + "typeScriptVersion": "2.3", + "types": "index", "typesPublisherContentHash": "b39880f7d79a626d32182cc6886711e3db5e4728ace6005cbfd57457fee69d85", - "typeScriptVersion": "2.3" -} \ No newline at end of file + "version": "3.1.6" +} diff --git a/node_modules/@types/long/package.json b/node_modules/@types/long/package.json index 71fc5eae5..b7551d1d0 100644 --- a/node_modules/@types/long/package.json +++ b/node_modules/@types/long/package.json @@ -1,22 +1,55 @@ { - "name": "@types/long", - "version": "4.0.0", - "description": "TypeScript definitions for long.js", - "license": "MIT", + "_args": [ + [ + "@types/long@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/long@4.0.0", + "_id": "@types/long@4.0.0", + "_inBundle": false, + "_integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==", + "_location": "/@types/long", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/long@4.0.0", + "name": "@types/long", + "escapedName": "@types%2flong", + "scope": "@types", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Peter Kooijmans", - "url": "https://github.com/peterkooijmans", - "githubUsername": "peterkooijmans" + "url": "https://github.com/peterkooijmans" } ], + "dependencies": {}, + "description": "TypeScript definitions for long.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", + "name": "@types/long", "repository": { "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "2.0", "typesPublisherContentHash": "cc3246302180c8c161d2e2c0c3f0a419226efa475d2cd5afbe51986d60cd8287", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "4.0.0" +} diff --git a/node_modules/@types/minimatch/package.json b/node_modules/@types/minimatch/package.json index 85e258799..08ef5b14d 100644 --- a/node_modules/@types/minimatch/package.json +++ b/node_modules/@types/minimatch/package.json @@ -1,27 +1,59 @@ { - "name": "@types/minimatch", - "version": "3.0.3", - "description": "TypeScript definitions for Minimatch", - "license": "MIT", + "_args": [ + [ + "@types/minimatch@3.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/minimatch@3.0.3", + "_id": "@types/minimatch@3.0.3", + "_inBundle": false, + "_integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "_location": "/@types/minimatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/minimatch@3.0.3", + "name": "@types/minimatch", + "escapedName": "@types%2fminimatch", + "scope": "@types", + "rawSpec": "3.0.3", + "saveSpec": null, + "fetchSpec": "3.0.3" + }, + "_requiredBy": [ + "/@types/glob" + ], + "_resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "_spec": "3.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "vvakame", - "url": "https://github.com/vvakame", - "githubUsername": "vvakame" + "url": "https://github.com/vvakame" }, { "name": "Shant Marouti", - "url": "https://github.com/shantmarouti", - "githubUsername": "shantmarouti" + "url": "https://github.com/shantmarouti" } ], + "dependencies": {}, + "description": "TypeScript definitions for Minimatch", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", + "name": "@types/minimatch", "repository": { "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "2.0", "typesPublisherContentHash": "e768e36348874adcc93ac67e9c3c7b5fcbd39079c0610ec16e410b8f851308d1", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "3.0.3" +} diff --git a/node_modules/@types/nock/package.json b/node_modules/@types/nock/package.json index 04a7fbeda..7d82ff7ab 100644 --- a/node_modules/@types/nock/package.json +++ b/node_modules/@types/nock/package.json @@ -1,14 +1,51 @@ { - "name": "@types/nock", - "version": "11.1.0", - "typings": null, - "description": "Stub TypeScript definitions entry for nock, which provides its own types definitions", - "main": "", - "scripts": {}, + "_args": [ + [ + "@types/nock@11.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/nock@11.1.0", + "_id": "@types/nock@11.1.0", + "_inBundle": false, + "_integrity": "sha512-jI/ewavBQ7X5178262JQR0ewicPAcJhXS/iFaNJl0VHLfyosZ/kwSrsa6VNQNSO8i9d8SqdRgOtZSOKJ/+iNMw==", + "_location": "/@types/nock", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/nock@11.1.0", + "name": "@types/nock", + "escapedName": "@types%2fnock", + "scope": "@types", + "rawSpec": "11.1.0", + "saveSpec": null, + "fetchSpec": "11.1.0" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/@types/nock/-/nock-11.1.0.tgz", + "_spec": "11.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": "", - "repository": "https://github.com/nock/nock", - "license": "MIT", + "bugs": { + "url": "https://github.com/nock/nock/issues" + }, "dependencies": { "nock": "*" - } -} \ No newline at end of file + }, + "description": "Stub TypeScript definitions entry for nock, which provides its own types definitions", + "homepage": "https://github.com/nock/nock#readme", + "license": "MIT", + "main": "", + "name": "@types/nock", + "repository": { + "type": "git", + "url": "git+https://github.com/nock/nock.git" + }, + "scripts": {}, + "typings": null, + "version": "11.1.0" +} diff --git a/node_modules/@types/node-fetch/LICENSE b/node_modules/@types/node-fetch/LICENSE new file mode 100644 index 000000000..9e841e7a2 --- /dev/null +++ b/node_modules/@types/node-fetch/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/node-fetch/README.md b/node_modules/@types/node-fetch/README.md new file mode 100644 index 000000000..e0f50fc48 --- /dev/null +++ b/node_modules/@types/node-fetch/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/node-fetch` + +# Summary +This package contains type definitions for node-fetch (https://github.com/bitinn/node-fetch). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch. + +### Additional Details + * Last updated: Thu, 23 Apr 2020 19:30:58 GMT + * Dependencies: [@types/form-data](https://npmjs.com/package/@types/form-data), [@types/node](https://npmjs.com/package/@types/node) + * Global values: none + +# Credits +These definitions were written by [Torsten Werner](https://github.com/torstenwerner), [Niklas Lindgren](https://github.com/nikcorg), [Vinay Bedre](https://github.com/vinaybedre), [Antonio Román](https://github.com/kyranet), [Andrew Leedham](https://github.com/AndrewLeedham), [Jason Li](https://github.com/JasonLi914), [Brandon Wilson](https://github.com/wilsonianb), [Steve Faulkner](https://github.com/southpolesteve), [ExE Boss](https://github.com/ExE-Boss), [Alex Savin](https://github.com/alexandrusavin), [Alexis Tyler](https://github.com/OmgImAlexis), and [Jakub Kisielewski](https://github.com/kbkk). diff --git a/node_modules/@types/node-fetch/externals.d.ts b/node_modules/@types/node-fetch/externals.d.ts new file mode 100644 index 000000000..6695fc470 --- /dev/null +++ b/node_modules/@types/node-fetch/externals.d.ts @@ -0,0 +1,21 @@ +// `AbortSignal` is defined here to prevent a dependency on a particular +// implementation like the `abort-controller` package, and to avoid requiring +// the `dom` library in `tsconfig.json`. + +export interface AbortSignal { + aborted: boolean; + + addEventListener: (type: "abort", listener: ((this: AbortSignal, event: any) => any), options?: boolean | { + capture?: boolean, + once?: boolean, + passive?: boolean + }) => void; + + removeEventListener: (type: "abort", listener: ((this: AbortSignal, event: any) => any), options?: boolean | { + capture?: boolean + }) => void; + + dispatchEvent: (event: any) => boolean; + + onabort?: null | ((this: AbortSignal, event: any) => void); +} diff --git a/node_modules/@types/node-fetch/index.d.ts b/node_modules/@types/node-fetch/index.d.ts new file mode 100644 index 000000000..ac01cea4e --- /dev/null +++ b/node_modules/@types/node-fetch/index.d.ts @@ -0,0 +1,223 @@ +// Type definitions for node-fetch 2.5 +// Project: https://github.com/bitinn/node-fetch +// Definitions by: Torsten Werner +// Niklas Lindgren +// Vinay Bedre +// Antonio Román +// Andrew Leedham +// Jason Li +// Brandon Wilson +// Steve Faulkner +// ExE Boss +// Alex Savin +// Alexis Tyler +// Jakub Kisielewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import FormData = require('form-data'); +import { Agent } from "http"; +import { URLSearchParams, URL } from "url"; +import { AbortSignal } from "./externals"; + +export class Request extends Body { + constructor(input: RequestInfo, init?: RequestInit); + clone(): Request; + context: RequestContext; + headers: Headers; + method: string; + redirect: RequestRedirect; + referrer: string; + url: string; + + // node-fetch extensions to the whatwg/fetch spec + agent?: Agent | ((parsedUrl: URL) => Agent); + compress: boolean; + counter: number; + follow: number; + hostname: string; + port?: number; + protocol: string; + size: number; + timeout: number; +} + +export interface RequestInit { + // whatwg/fetch standard options + body?: BodyInit; + headers?: HeadersInit; + method?: string; + redirect?: RequestRedirect; + signal?: AbortSignal | null; + + // node-fetch extensions + agent?: Agent | ((parsedUrl: URL) => Agent); // =null http.Agent instance, allows custom proxy, certificate etc. + compress?: boolean; // =true support gzip/deflate content encoding. false to disable + follow?: number; // =20 maximum redirect count. 0 to not follow redirect + size?: number; // =0 maximum response body size in bytes. 0 to disable + timeout?: number; // =0 req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies) + + // node-fetch does not support mode, cache or credentials options +} + +export type RequestContext = + "audio" + | "beacon" + | "cspreport" + | "download" + | "embed" + | "eventsource" + | "favicon" + | "fetch" + | "font" + | "form" + | "frame" + | "hyperlink" + | "iframe" + | "image" + | "imageset" + | "import" + | "internal" + | "location" + | "manifest" + | "object" + | "ping" + | "plugin" + | "prefetch" + | "script" + | "serviceworker" + | "sharedworker" + | "style" + | "subresource" + | "track" + | "video" + | "worker" + | "xmlhttprequest" + | "xslt"; +export type RequestMode = "cors" | "no-cors" | "same-origin"; +export type RequestRedirect = "error" | "follow" | "manual"; +export type RequestCredentials = "omit" | "include" | "same-origin"; + +export type RequestCache = + "default" + | "force-cache" + | "no-cache" + | "no-store" + | "only-if-cached" + | "reload"; + +export class Headers implements Iterable<[string, string]> { + constructor(init?: HeadersInit); + forEach(callback: (value: string, name: string) => void): void; + append(name: string, value: string): void; + delete(name: string): void; + get(name: string): string | null; + has(name: string): boolean; + raw(): { [k: string]: string[] }; + set(name: string, value: string): void; + + // Iterable methods + entries(): IterableIterator<[string, string]>; + keys(): IterableIterator; + values(): IterableIterator<[string]>; + [Symbol.iterator](): Iterator<[string, string]>; +} + +type BlobPart = ArrayBuffer | ArrayBufferView | Blob | string; + +interface BlobOptions { + type?: string; + endings?: "transparent" | "native"; +} + +export class Blob { + constructor(blobParts?: BlobPart[], options?: BlobOptions); + readonly type: string; + readonly size: number; + slice(start?: number, end?: number): Blob; +} + +export class Body { + constructor(body?: any, opts?: { size?: number; timeout?: number }); + arrayBuffer(): Promise; + blob(): Promise; + body: NodeJS.ReadableStream; + bodyUsed: boolean; + buffer(): Promise; + json(): Promise; + size: number; + text(): Promise; + textConverted(): Promise; + timeout: number; +} + +interface SystemError extends Error { + code?: string; +} + +export class FetchError extends Error { + name: "FetchError"; + constructor(message: string, type: string, systemError?: SystemError); + type: string; + code?: string; + errno?: string; +} + +export class Response extends Body { + constructor(body?: BodyInit, init?: ResponseInit); + static error(): Response; + static redirect(url: string, status: number): Response; + clone(): Response; + headers: Headers; + ok: boolean; + redirected: boolean; + status: number; + statusText: string; + type: ResponseType; + url: string; +} + +export type ResponseType = + "basic" + | "cors" + | "default" + | "error" + | "opaque" + | "opaqueredirect"; + +export interface ResponseInit { + headers?: HeadersInit; + size?: number; + status?: number; + statusText?: string; + timeout?: number; + url?: string; +} + +interface URLLike { + href: string; +} + +export type HeadersInit = Headers | string[][] | { [key: string]: string }; +// HeaderInit is exported to support backwards compatibility. See PR #34382 +export type HeaderInit = HeadersInit; +export type BodyInit = + ArrayBuffer + | ArrayBufferView + | NodeJS.ReadableStream + | string + | URLSearchParams + | FormData; +export type RequestInfo = string | URLLike | Request; + +declare function fetch( + url: RequestInfo, + init?: RequestInit +): Promise; + +declare namespace fetch { + function isRedirect(code: number): boolean; +} + +export default fetch; diff --git a/node_modules/@types/node-fetch/node_modules/form-data/License b/node_modules/@types/node-fetch/node_modules/form-data/License new file mode 100644 index 000000000..c7ff12a2f --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/License @@ -0,0 +1,19 @@ +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/node_modules/@types/node-fetch/node_modules/form-data/README.md b/node_modules/@types/node-fetch/node_modules/form-data/README.md new file mode 100644 index 000000000..42f630f23 --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/README.md @@ -0,0 +1,351 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/v3.0.0.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v3.0.0.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. +- Starting version `3.x` FormData has dropped support for `node@4.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/@types/node-fetch/node_modules/form-data/README.md.bak b/node_modules/@types/node-fetch/node_modules/form-data/README.md.bak new file mode 100644 index 000000000..e9195bdb4 --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/README.md.bak @@ -0,0 +1,351 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. +- Starting version `3.x` FormData has dropped support for `node@4.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/@types/node-fetch/node_modules/form-data/index.d.ts b/node_modules/@types/node-fetch/node_modules/form-data/index.d.ts new file mode 100644 index 000000000..6e5204546 --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/index.d.ts @@ -0,0 +1,61 @@ +// Definitions by: Carlos Ballesteros Velasco +// Leon Yu +// BendingBender +// Maple Miao + +/// +import * as stream from 'stream'; +import * as http from 'http'; + +export = FormData; + +// Extracted because @types/node doesn't export interfaces. +interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: stream.Readable, size: number): void; + destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; +} + +interface Options extends ReadableOptions { + writable?: boolean; + readable?: boolean; + dataSize?: number; + maxDataSize?: number; + pauseStreams?: boolean; +} + +declare class FormData extends stream.Readable { + constructor(options?: Options); + append(key: string, value: any, options?: FormData.AppendOptions | string): void; + getHeaders(userHeaders?: FormData.Headers): FormData.Headers; + submit( + params: string | FormData.SubmitOptions, + callback?: (error: Error | null, response: http.IncomingMessage) => void + ): http.ClientRequest; + getBuffer(): Buffer; + getBoundary(): string; + getLength(callback: (err: Error | null, length: number) => void): void; + getLengthSync(): number; + hasKnownLength(): boolean; +} + +declare namespace FormData { + interface Headers { + [key: string]: any; + } + + interface AppendOptions { + header?: string | Headers; + knownLength?: number; + filename?: string; + filepath?: string; + contentType?: string; + } + + interface SubmitOptions extends http.RequestOptions { + protocol?: 'https:' | 'http:'; + } +} diff --git a/node_modules/@types/node-fetch/node_modules/form-data/lib/browser.js b/node_modules/@types/node-fetch/node_modules/form-data/lib/browser.js new file mode 100644 index 000000000..09e7c70e6 --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/lib/browser.js @@ -0,0 +1,2 @@ +/* eslint-env browser */ +module.exports = typeof self == 'object' ? self.FormData : window.FormData; diff --git a/node_modules/@types/node-fetch/node_modules/form-data/lib/form_data.js b/node_modules/@types/node-fetch/node_modules/form-data/lib/form_data.js new file mode 100644 index 000000000..ddfae2e34 --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/lib/form_data.js @@ -0,0 +1,494 @@ +var CombinedStream = require('combined-stream'); +var util = require('util'); +var path = require('path'); +var http = require('http'); +var https = require('https'); +var parseUrl = require('url').parse; +var fs = require('fs'); +var mime = require('mime-types'); +var asynckit = require('asynckit'); +var populate = require('./populate.js'); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; diff --git a/node_modules/@types/node-fetch/node_modules/form-data/lib/populate.js b/node_modules/@types/node-fetch/node_modules/form-data/lib/populate.js new file mode 100644 index 000000000..4d35738dd --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/lib/populate.js @@ -0,0 +1,10 @@ +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; diff --git a/node_modules/@types/node-fetch/node_modules/form-data/package.json b/node_modules/@types/node-fetch/node_modules/form-data/package.json new file mode 100644 index 000000000..5b649564c --- /dev/null +++ b/node_modules/@types/node-fetch/node_modules/form-data/package.json @@ -0,0 +1,101 @@ +{ + "_from": "form-data@^3.0.0", + "_id": "form-data@3.0.0", + "_inBundle": false, + "_integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "_location": "/@types/node-fetch/form-data", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "form-data@^3.0.0", + "name": "form-data", + "escapedName": "form-data", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@types/node-fetch" + ], + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "_shasum": "31b7e39c85f1355b7139ee0c647cf0de7f83c682", + "_spec": "form-data@^3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@types/node-fetch", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "browser": "./lib/browser", + "bugs": { + "url": "https://github.com/form-data/form-data/issues" + }, + "bundleDependencies": false, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "deprecated": false, + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "devDependencies": { + "@types/node": "^12.0.10", + "browserify": "^13.1.1", + "browserify-istanbul": "^2.0.0", + "coveralls": "^3.0.4", + "cross-spawn": "^6.0.5", + "eslint": "^6.0.1", + "fake": "^0.2.2", + "far": "^0.0.7", + "formidable": "^1.0.17", + "in-publish": "^2.0.0", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "obake": "^0.1.2", + "pkgfiles": "^2.3.0", + "pre-commit": "^1.1.3", + "puppeteer": "^1.19.0", + "request": "^2.88.0", + "rimraf": "^2.7.1", + "tape": "^4.6.2", + "typescript": "^3.5.2" + }, + "engines": { + "node": ">= 6" + }, + "homepage": "https://github.com/form-data/form-data#readme", + "license": "MIT", + "main": "./lib/form_data", + "name": "form-data", + "pre-commit": [ + "lint", + "ci-test", + "check" + ], + "repository": { + "type": "git", + "url": "git://github.com/form-data/form-data.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", + "check": "istanbul check-coverage coverage/coverage*.json", + "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", + "ci-test": "npm run test && npm run browser && npm run report", + "debug": "verbose=1 ./test/run.js", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "postpublish": "npm run restore-readme", + "posttest": "istanbul report lcov text", + "predebug": "rimraf coverage test/tmp", + "prepublish": "in-publish && npm run update-readme || not-in-publish", + "pretest": "rimraf coverage test/tmp", + "report": "istanbul report lcov text", + "restore-readme": "mv README.md.bak README.md", + "test": "istanbul cover test/run.js", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" + }, + "typings": "./index.d.ts", + "version": "3.0.0" +} diff --git a/node_modules/@types/node-fetch/package.json b/node_modules/@types/node-fetch/package.json new file mode 100644 index 000000000..babde39ba --- /dev/null +++ b/node_modules/@types/node-fetch/package.json @@ -0,0 +1,105 @@ +{ + "_from": "@types/node-fetch@^2.3.7", + "_id": "@types/node-fetch@2.5.7", + "_inBundle": false, + "_integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", + "_location": "/@types/node-fetch", + "_phantomChildren": { + "asynckit": "0.4.0", + "combined-stream": "1.0.8", + "mime-types": "2.1.27" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@types/node-fetch@^2.3.7", + "name": "@types/node-fetch", + "escapedName": "@types%2fnode-fetch", + "scope": "@types", + "rawSpec": "^2.3.7", + "saveSpec": null, + "fetchSpec": "^2.3.7" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/ms-rest-js" + ], + "_resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", + "_shasum": "20a2afffa882ab04d44ca786449a276f9f6bbf3c", + "_spec": "@types/node-fetch@^2.3.7", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/ms-rest-js", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Torsten Werner", + "url": "https://github.com/torstenwerner" + }, + { + "name": "Niklas Lindgren", + "url": "https://github.com/nikcorg" + }, + { + "name": "Vinay Bedre", + "url": "https://github.com/vinaybedre" + }, + { + "name": "Antonio Román", + "url": "https://github.com/kyranet" + }, + { + "name": "Andrew Leedham", + "url": "https://github.com/AndrewLeedham" + }, + { + "name": "Jason Li", + "url": "https://github.com/JasonLi914" + }, + { + "name": "Brandon Wilson", + "url": "https://github.com/wilsonianb" + }, + { + "name": "Steve Faulkner", + "url": "https://github.com/southpolesteve" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss" + }, + { + "name": "Alex Savin", + "url": "https://github.com/alexandrusavin" + }, + { + "name": "Alexis Tyler", + "url": "https://github.com/OmgImAlexis" + }, + { + "name": "Jakub Kisielewski", + "url": "https://github.com/kbkk" + } + ], + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + }, + "deprecated": false, + "description": "TypeScript definitions for node-fetch", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/node-fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node-fetch" + }, + "scripts": {}, + "typeScriptVersion": "2.8", + "types": "index.d.ts", + "typesPublisherContentHash": "108c44e190ea37e4618fa6c4d6835aedecb20ddd8433a81984ee5cdfdd915b01", + "version": "2.5.7" +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index f3863a09b..2419344da 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,217 +1,223 @@ { - "name": "@types/node", - "version": "12.12.14", - "description": "TypeScript definitions for Node.js", - "license": "MIT", + "_args": [ + [ + "@types/node@12.12.14", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "@types/node@12.12.14", + "_id": "@types/node@12.12.14", + "_inBundle": false, + "_integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==", + "_location": "/@types/node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/node@12.12.14", + "name": "@types/node", + "escapedName": "@types%2fnode", + "scope": "@types", + "rawSpec": "12.12.14", + "saveSpec": null, + "fetchSpec": "12.12.14" + }, + "_requiredBy": [ + "#DEV:/", + "/@octokit/types", + "/@types/glob", + "/@types/jszip", + "/@types/node-fetch", + "/@types/semver", + "/@types/tunnel" + ], + "_resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", + "_spec": "12.12.14", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Microsoft TypeScript", - "url": "https://github.com/Microsoft", - "githubUsername": "Microsoft" + "url": "https://github.com/Microsoft" }, { "name": "DefinitelyTyped", - "url": "https://github.com/DefinitelyTyped", - "githubUsername": "DefinitelyTyped" + "url": "https://github.com/DefinitelyTyped" }, { "name": "Alberto Schiabel", - "url": "https://github.com/jkomyno", - "githubUsername": "jkomyno" + "url": "https://github.com/jkomyno" }, { "name": "Alexander T.", - "url": "https://github.com/a-tarasyuk", - "githubUsername": "a-tarasyuk" + "url": "https://github.com/a-tarasyuk" }, { "name": "Alvis HT Tang", - "url": "https://github.com/alvis", - "githubUsername": "alvis" + "url": "https://github.com/alvis" }, { "name": "Andrew Makarov", - "url": "https://github.com/r3nya", - "githubUsername": "r3nya" + "url": "https://github.com/r3nya" }, { "name": "Benjamin Toueg", - "url": "https://github.com/btoueg", - "githubUsername": "btoueg" + "url": "https://github.com/btoueg" }, { "name": "Bruno Scheufler", - "url": "https://github.com/brunoscheufler", - "githubUsername": "brunoscheufler" + "url": "https://github.com/brunoscheufler" }, { "name": "Chigozirim C.", - "url": "https://github.com/smac89", - "githubUsername": "smac89" + "url": "https://github.com/smac89" }, { "name": "Christian Vaagland Tellnes", - "url": "https://github.com/tellnes", - "githubUsername": "tellnes" + "url": "https://github.com/tellnes" }, { "name": "David Junger", - "url": "https://github.com/touffy", - "githubUsername": "touffy" + "url": "https://github.com/touffy" }, { "name": "Deividas Bakanas", - "url": "https://github.com/DeividasBakanas", - "githubUsername": "DeividasBakanas" + "url": "https://github.com/DeividasBakanas" }, { "name": "Eugene Y. Q. Shen", - "url": "https://github.com/eyqs", - "githubUsername": "eyqs" + "url": "https://github.com/eyqs" }, { "name": "Flarna", - "url": "https://github.com/Flarna", - "githubUsername": "Flarna" + "url": "https://github.com/Flarna" }, { "name": "Hannes Magnusson", - "url": "https://github.com/Hannes-Magnusson-CK", - "githubUsername": "Hannes-Magnusson-CK" + "url": "https://github.com/Hannes-Magnusson-CK" }, { "name": "Hoàng Văn Khải", - "url": "https://github.com/KSXGitHub", - "githubUsername": "KSXGitHub" + "url": "https://github.com/KSXGitHub" }, { "name": "Huw", - "url": "https://github.com/hoo29", - "githubUsername": "hoo29" + "url": "https://github.com/hoo29" }, { "name": "Kelvin Jin", - "url": "https://github.com/kjin", - "githubUsername": "kjin" + "url": "https://github.com/kjin" }, { "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff", - "githubUsername": "ajafff" + "url": "https://github.com/ajafff" }, { "name": "Lishude", - "url": "https://github.com/islishude", - "githubUsername": "islishude" + "url": "https://github.com/islishude" }, { "name": "Mariusz Wiktorczyk", - "url": "https://github.com/mwiktorczyk", - "githubUsername": "mwiktorczyk" + "url": "https://github.com/mwiktorczyk" }, { "name": "Mohsen Azimi", - "url": "https://github.com/mohsen1", - "githubUsername": "mohsen1" + "url": "https://github.com/mohsen1" }, { "name": "Nicolas Even", - "url": "https://github.com/n-e", - "githubUsername": "n-e" + "url": "https://github.com/n-e" }, { "name": "Nicolas Voigt", - "url": "https://github.com/octo-sniffle", - "githubUsername": "octo-sniffle" + "url": "https://github.com/octo-sniffle" }, { "name": "Nikita Galkin", - "url": "https://github.com/galkin", - "githubUsername": "galkin" + "url": "https://github.com/galkin" }, { "name": "Parambir Singh", - "url": "https://github.com/parambirs", - "githubUsername": "parambirs" + "url": "https://github.com/parambirs" }, { "name": "Sebastian Silbermann", - "url": "https://github.com/eps1lon", - "githubUsername": "eps1lon" + "url": "https://github.com/eps1lon" }, { "name": "Simon Schick", - "url": "https://github.com/SimonSchick", - "githubUsername": "SimonSchick" + "url": "https://github.com/SimonSchick" }, { "name": "Thomas den Hollander", - "url": "https://github.com/ThomasdenH", - "githubUsername": "ThomasdenH" + "url": "https://github.com/ThomasdenH" }, { "name": "Wilco Bakker", - "url": "https://github.com/WilcoBakker", - "githubUsername": "WilcoBakker" + "url": "https://github.com/WilcoBakker" }, { "name": "wwwy3y3", - "url": "https://github.com/wwwy3y3", - "githubUsername": "wwwy3y3" + "url": "https://github.com/wwwy3y3" }, { "name": "Zane Hannan AU", - "url": "https://github.com/ZaneHannanAU", - "githubUsername": "ZaneHannanAU" + "url": "https://github.com/ZaneHannanAU" }, { "name": "Samuel Ainsworth", - "url": "https://github.com/samuela", - "githubUsername": "samuela" + "url": "https://github.com/samuela" }, { "name": "Kyle Uehlein", - "url": "https://github.com/kuehlein", - "githubUsername": "kuehlein" + "url": "https://github.com/kuehlein" }, { "name": "Jordi Oliveras Rovira", - "url": "https://github.com/j-oliveras", - "githubUsername": "j-oliveras" + "url": "https://github.com/j-oliveras" }, { "name": "Thanik Bhongbhibhat", - "url": "https://github.com/bhongy", - "githubUsername": "bhongy" + "url": "https://github.com/bhongy" }, { "name": "Marcin Kopacz", - "url": "https://github.com/chyzwar", - "githubUsername": "chyzwar" + "url": "https://github.com/chyzwar" }, { "name": "Trivikram Kamat", - "url": "https://github.com/trivikr", - "githubUsername": "trivikr" + "url": "https://github.com/trivikr" }, { "name": "Minh Son Nguyen", - "url": "https://github.com/nguymin4", - "githubUsername": "nguymin4" + "url": "https://github.com/nguymin4" }, { "name": "Junxiao Shi", - "url": "https://github.com/yoursunny", - "githubUsername": "yoursunny" + "url": "https://github.com/yoursunny" }, { "name": "Ilia Baryshnikov", - "url": "https://github.com/qwelias", - "githubUsername": "qwelias" + "url": "https://github.com/qwelias" } ], + "dependencies": {}, + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", + "name": "@types/node", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "typeScriptVersion": "2.8", "types": "index.d.ts", + "typesPublisherContentHash": "305a8ff81632f0e70287898475e87d6aedbd683a5e37cb775f9ea845625cfa06", "typesVersions": { ">=3.2.0-0": { "*": [ @@ -219,13 +225,5 @@ ] } }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "305a8ff81632f0e70287898475e87d6aedbd683a5e37cb775f9ea845625cfa06", - "typeScriptVersion": "2.8" -} \ No newline at end of file + "version": "12.12.14" +} diff --git a/node_modules/@types/normalize-package-data/package.json b/node_modules/@types/normalize-package-data/package.json index 830641a9d..6f4c21821 100755 --- a/node_modules/@types/normalize-package-data/package.json +++ b/node_modules/@types/normalize-package-data/package.json @@ -1,22 +1,55 @@ { - "name": "@types/normalize-package-data", - "version": "2.4.0", - "description": "TypeScript definitions for normalize-package-data", - "license": "MIT", + "_args": [ + [ + "@types/normalize-package-data@2.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/normalize-package-data@2.4.0", + "_id": "@types/normalize-package-data@2.4.0", + "_inBundle": false, + "_integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "_location": "/@types/normalize-package-data", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/normalize-package-data@2.4.0", + "name": "@types/normalize-package-data", + "escapedName": "@types%2fnormalize-package-data", + "scope": "@types", + "rawSpec": "2.4.0", + "saveSpec": null, + "fetchSpec": "2.4.0" + }, + "_requiredBy": [ + "/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "_spec": "2.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Jeff Dickey", - "url": "https://github.com/jdxcode", - "githubUsername": "jdxcode" + "url": "https://github.com/jdxcode" } ], + "dependencies": {}, + "description": "TypeScript definitions for normalize-package-data", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", + "name": "@types/normalize-package-data", "repository": { "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, "scripts": {}, - "dependencies": {}, + "typeScriptVersion": "2.0", "typesPublisherContentHash": "5d2101e9e55c73e1d649a6c311e0d40bdfaa25bb06bb75ea6f3bb0d149c1303b", - "typeScriptVersion": "2.0" -} \ No newline at end of file + "version": "2.4.0" +} diff --git a/node_modules/@types/semver/package.json b/node_modules/@types/semver/package.json index eb5d0f55c..4cd273371 100644 --- a/node_modules/@types/semver/package.json +++ b/node_modules/@types/semver/package.json @@ -1,51 +1,79 @@ { - "name": "@types/semver", - "version": "7.2.0", - "description": "TypeScript definitions for semver", - "license": "MIT", + "_args": [ + [ + "@types/semver@7.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/semver@7.2.0", + "_id": "@types/semver@7.2.0", + "_inBundle": false, + "_integrity": "sha512-TbB0A8ACUWZt3Y6bQPstW9QNbhNeebdgLX4T/ZfkrswAfUzRiXrgd9seol+X379Wa589Pu4UEx9Uok0D4RjRCQ==", + "_location": "/@types/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/semver@7.2.0", + "name": "@types/semver", + "escapedName": "@types%2fsemver", + "scope": "@types", + "rawSpec": "7.2.0", + "saveSpec": null, + "fetchSpec": "7.2.0" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.2.0.tgz", + "_spec": "7.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "Bart van der Schoor", - "url": "https://github.com/Bartvds", - "githubUsername": "Bartvds" + "url": "https://github.com/Bartvds" }, { "name": "BendingBender", - "url": "https://github.com/BendingBender", - "githubUsername": "BendingBender" + "url": "https://github.com/BendingBender" }, { "name": "Lucian Buzzo", - "url": "https://github.com/LucianBuzzo", - "githubUsername": "LucianBuzzo" + "url": "https://github.com/LucianBuzzo" }, { "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff", - "githubUsername": "ajafff" + "url": "https://github.com/ajafff" }, { "name": "ExE Boss", - "url": "https://github.com/ExE-Boss", - "githubUsername": "ExE-Boss" + "url": "https://github.com/ExE-Boss" }, { "name": "Piotr Błażejewicz", - "url": "https://github.com/peterblazejewicz", - "githubUsername": "peterblazejewicz" + "url": "https://github.com/peterblazejewicz" } ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/semver" - }, - "scripts": {}, "dependencies": { "@types/node": "*" }, + "description": "TypeScript definitions for semver", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/semver", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/semver" + }, + "scripts": {}, + "typeScriptVersion": "2.9", + "types": "index.d.ts", "typesPublisherContentHash": "a85c812786f6121af7012f9234a35445623e4933797ddf4b52584d65deaec9ef", - "typeScriptVersion": "2.9" -} \ No newline at end of file + "version": "7.2.0" +} diff --git a/node_modules/@types/sinon/package.json b/node_modules/@types/sinon/package.json index c48789752..7d466af71 100644 --- a/node_modules/@types/sinon/package.json +++ b/node_modules/@types/sinon/package.json @@ -1,67 +1,98 @@ { - "name": "@types/sinon", - "version": "7.5.2", - "description": "TypeScript definitions for Sinon", - "license": "MIT", + "_args": [ + [ + "@types/sinon@7.5.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@types/sinon@7.5.2", + "_id": "@types/sinon@7.5.2", + "_inBundle": false, + "_integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", + "_location": "/@types/sinon", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/sinon@7.5.2", + "name": "@types/sinon", + "escapedName": "@types%2fsinon", + "scope": "@types", + "rawSpec": "7.5.2", + "saveSpec": null, + "fetchSpec": "7.5.2" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "_spec": "7.5.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, "contributors": [ { "name": "William Sears", - "url": "https://github.com/mrbigdog2u", - "githubUsername": "mrbigdog2u" + "url": "https://github.com/mrbigdog2u" }, { "name": "Jonathan Little", - "url": "https://github.com/rationull", - "githubUsername": "rationull" + "url": "https://github.com/rationull" }, { "name": "Lukas Spieß", - "url": "https://github.com/lumaxis", - "githubUsername": "lumaxis" + "url": "https://github.com/lumaxis" }, { "name": "Nico Jansen", - "url": "https://github.com/nicojs", - "githubUsername": "nicojs" + "url": "https://github.com/nicojs" }, { "name": "James Garbutt", - "url": "https://github.com/43081j", - "githubUsername": "43081j" + "url": "https://github.com/43081j" }, { "name": "Josh Goldberg", - "url": "https://github.com/joshuakgoldberg", - "githubUsername": "joshuakgoldberg" + "url": "https://github.com/joshuakgoldberg" }, { "name": "Greg Jednaszewski", - "url": "https://github.com/gjednaszewski", - "githubUsername": "gjednaszewski" + "url": "https://github.com/gjednaszewski" }, { "name": "John Wood", - "url": "https://github.com/johnjesse", - "githubUsername": "johnjesse" + "url": "https://github.com/johnjesse" }, { "name": "Alec Flett", - "url": "https://github.com/alecf", - "githubUsername": "alecf" + "url": "https://github.com/alecf" }, { "name": "Simon Schick", - "url": "https://github.com/SimonSchick", - "githubUsername": "SimonSchick" + "url": "https://github.com/SimonSchick" }, { "name": "Roey Berman", - "url": "https://github.com/bergundy", - "githubUsername": "bergundy" + "url": "https://github.com/bergundy" } ], + "dependencies": {}, + "description": "TypeScript definitions for Sinon", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", "main": "", + "name": "@types/sinon", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/sinon" + }, + "scripts": {}, + "typeScriptVersion": "2.8", "types": "index.d.ts", + "typesPublisherContentHash": "6e0d06aaa3706e565221de95281d8cbf6a06a29c4151df20618abe3b435c3447", "typesVersions": { ">=3.1.0-0": { "*": [ @@ -69,13 +100,5 @@ ] } }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/sinon" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "6e0d06aaa3706e565221de95281d8cbf6a06a29c4151df20618abe3b435c3447", - "typeScriptVersion": "2.8" -} \ No newline at end of file + "version": "7.5.2" +} diff --git a/node_modules/@types/tunnel/LICENSE b/node_modules/@types/tunnel/LICENSE new file mode 100644 index 000000000..4b1ad51b2 --- /dev/null +++ b/node_modules/@types/tunnel/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/tunnel/README.md b/node_modules/@types/tunnel/README.md new file mode 100644 index 000000000..e0c26f407 --- /dev/null +++ b/node_modules/@types/tunnel/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/tunnel` + +# Summary +This package contains type definitions for tunnel ( https://github.com/koichik/node-tunnel/ ). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tunnel + +Additional Details + * Last updated: Wed, 12 Jun 2019 23:18:04 GMT + * Dependencies: @types/node + * Global values: none + +# Credits +These definitions were written by BendingBender . diff --git a/node_modules/@types/tunnel/index.d.ts b/node_modules/@types/tunnel/index.d.ts new file mode 100644 index 000000000..132fe905f --- /dev/null +++ b/node_modules/@types/tunnel/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for tunnel 0.0 +// Project: https://github.com/koichik/node-tunnel/ +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +import { Agent } from 'http'; + +export function httpOverHttp(options?: HttpOptions): Agent; +export function httpsOverHttp(options?: HttpsOverHttpOptions): Agent; +export function httpOverHttps(options?: HttpOverHttpsOptions): Agent; +export function httpsOverHttps(options?: HttpsOverHttpsOptions): Agent; + +export interface HttpOptions { + maxSockets?: number; + proxy?: ProxyOptions; +} + +export interface HttpsOverHttpOptions extends HttpOptions { + ca?: Buffer[]; + key?: Buffer; + cert?: Buffer; +} + +export interface HttpOverHttpsOptions extends HttpOptions { + proxy?: HttpsProxyOptions; +} + +export interface HttpsOverHttpsOptions extends HttpsOverHttpOptions { + proxy?: HttpsProxyOptions; +} + +export interface ProxyOptions { + host: string; + port: number; + localAddress?: string; + proxyAuth?: string; + headers?: { [key: string]: any }; +} + +export interface HttpsProxyOptions extends ProxyOptions { + ca?: Buffer[]; + servername?: string; + key?: Buffer; + cert?: Buffer; +} diff --git a/node_modules/@types/tunnel/package.json b/node_modules/@types/tunnel/package.json new file mode 100644 index 000000000..33527eba5 --- /dev/null +++ b/node_modules/@types/tunnel/package.json @@ -0,0 +1,56 @@ +{ + "_from": "@types/tunnel@0.0.1", + "_id": "@types/tunnel@0.0.1", + "_inBundle": false, + "_integrity": "sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==", + "_location": "/@types/tunnel", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/tunnel@0.0.1", + "name": "@types/tunnel", + "escapedName": "@types%2ftunnel", + "scope": "@types", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/ms-rest-js" + ], + "_resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.1.tgz", + "_shasum": "0d72774768b73df26f25df9184273a42da72b19c", + "_spec": "@types/tunnel@0.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/ms-rest-js", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "BendingBender", + "url": "https://github.com/BendingBender" + } + ], + "dependencies": { + "@types/node": "*" + }, + "deprecated": false, + "description": "TypeScript definitions for tunnel", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/tunnel", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/tunnel" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "types": "index", + "typesPublisherContentHash": "4e4e986c9a2912a1a62a77408f4d955f05c87bee95736b8b2c62d81b0a01e995", + "version": "0.0.1" +} diff --git a/node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils/package.json b/node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils/package.json index dbe0a2098..278e33520 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils/package.json +++ b/node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils/package.json @@ -1,35 +1,43 @@ { - "name": "tsutils", - "version": "3.17.1", - "description": "utilities for working with typescript's AST", - "scripts": { - "compile": "rm -rf {,util,typeguard,test/**}/*.js; ttsc -p .", - "lint:tslint": "wotan -m @fimbul/valtyr", - "lint:wotan": "wotan", - "lint": "run-p lint:*", - "test": "mocha test/*Tests.js && tslint --test 'test/rules/**/tslint.json'", - "verify": "run-s compile lint coverage", - "prepublishOnly": "run-s verify", - "coverage": "nyc run-s test", - "report-coverage": "cat ./coverage/lcov.info | coveralls", - "github-release": "GITHUB_TOKEN=$(cat ~/github_token.txt) github-release-from-changelog", - "postpublish": "git push origin master --tags; run-s github-release" - }, - "repository": { - "type": "git", - "url": "https://github.com/ajafff/tsutils" - }, - "keywords": [ - "typescript", - "ts", - "ast", - "typeguard", - "utils", - "helper", - "node" + "_args": [ + [ + "tsutils@3.17.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Klaus Meinhardt", - "license": "MIT", + "_development": true, + "_from": "tsutils@3.17.1", + "_id": "tsutils@3.17.1", + "_inBundle": false, + "_integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "_location": "/@typescript-eslint/eslint-plugin/tsutils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "tsutils@3.17.1", + "name": "tsutils", + "escapedName": "tsutils", + "rawSpec": "3.17.1", + "saveSpec": null, + "fetchSpec": "3.17.1" + }, + "_requiredBy": [ + "/@typescript-eslint/eslint-plugin" + ], + "_resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "_spec": "3.17.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Klaus Meinhardt" + }, + "bugs": { + "url": "https://github.com/ajafff/tsutils/issues" + }, + "dependencies": { + "tslib": "^1.8.1" + }, + "description": "utilities for working with typescript's AST", "devDependencies": { "@fimbul/mithotyn": "^0.17.0", "@fimbul/valtyr": "^0.20.0", @@ -49,13 +57,40 @@ "ttypescript": "^1.5.5", "typescript": "^3.6.0-dev.20190804" }, + "engines": { + "node": ">= 6" + }, + "homepage": "https://github.com/ajafff/tsutils#readme", + "keywords": [ + "typescript", + "ts", + "ast", + "typeguard", + "utils", + "helper", + "node" + ], + "license": "MIT", + "name": "tsutils", "peerDependencies": { "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" }, - "dependencies": { - "tslib": "^1.8.1" + "repository": { + "type": "git", + "url": "git+https://github.com/ajafff/tsutils.git" }, - "engines": { - "node": ">= 6" - } -} \ No newline at end of file + "scripts": { + "compile": "rm -rf {,util,typeguard,test/**}/*.js; ttsc -p .", + "coverage": "nyc run-s test", + "github-release": "GITHUB_TOKEN=$(cat ~/github_token.txt) github-release-from-changelog", + "lint": "run-p lint:*", + "lint:tslint": "wotan -m @fimbul/valtyr", + "lint:wotan": "wotan", + "postpublish": "git push origin master --tags; run-s github-release", + "prepublishOnly": "run-s verify", + "report-coverage": "cat ./coverage/lcov.info | coveralls", + "test": "mocha test/*Tests.js && tslint --test 'test/rules/**/tslint.json'", + "verify": "run-s compile lint coverage" + }, + "version": "3.17.1" +} diff --git a/node_modules/@typescript-eslint/eslint-plugin/package.json b/node_modules/@typescript-eslint/eslint-plugin/package.json index a6a1ba32e..3378ba3cf 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/package.json +++ b/node_modules/@typescript-eslint/eslint-plugin/package.json @@ -1,46 +1,39 @@ { - "name": "@typescript-eslint/eslint-plugin", - "version": "4.1.0", - "description": "TypeScript plugin for ESLint", - "keywords": [ - "eslint", - "eslintplugin", - "eslint-plugin", - "typescript" + "_args": [ + [ + "@typescript-eslint/eslint-plugin@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": "^10.12.0 || >=12.0.0" + "_development": true, + "_from": "@typescript-eslint/eslint-plugin@4.1.0", + "_id": "@typescript-eslint/eslint-plugin@4.1.0", + "_inBundle": false, + "_integrity": "sha512-U+nRJx8XDUqJxYF0FCXbpmD9nWt/xHDDG0zsw1vrVYAmEAuD/r49iowfurjSL2uTA2JsgtpsyG7mjO7PHf2dYw==", + "_location": "/@typescript-eslint/eslint-plugin", + "_phantomChildren": { + "tslib": "1.11.1" }, - "files": [ - "dist", - "docs", - "package.json", - "README.md", - "LICENSE" + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/eslint-plugin@4.1.0", + "name": "@typescript-eslint/eslint-plugin", + "escapedName": "@typescript-eslint%2feslint-plugin", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/eslint-plugin-github" ], - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/eslint-plugin" - }, + "_resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, - "license": "MIT", - "main": "dist/index.js", - "scripts": { - "build": "tsc -b tsconfig.build.json", - "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", - "check:configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "generate:configs": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-configs.ts", - "generate:rules-lists": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-rules-lists.ts", - "lint": "eslint . --ext .js,.ts --ignore-path ../../.eslintignore", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, "dependencies": { "@typescript-eslint/experimental-utils": "4.1.0", "@typescript-eslint/scope-manager": "4.1.0", @@ -50,6 +43,7 @@ "semver": "^7.3.2", "tsutils": "^3.17.1" }, + "description": "TypeScript plugin for ESLint", "devDependencies": { "@types/debug": "*", "@types/marked": "^1.1.0", @@ -59,6 +53,31 @@ "prettier": "*", "typescript": "*" }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "files": [ + "dist", + "docs", + "package.json", + "README.md", + "LICENSE" + ], + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin", + "typescript" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@typescript-eslint/eslint-plugin", "peerDependencies": { "@typescript-eslint/parser": "^4.0.0", "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" @@ -68,9 +87,23 @@ "optional": true } }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/eslint-plugin" }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "scripts": { + "build": "tsc -b tsconfig.build.json", + "check:configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", + "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "generate:configs": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-configs.ts", + "generate:rules-lists": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-rules-lists.ts", + "lint": "eslint . --ext .js,.ts --ignore-path ../../.eslintignore", + "postclean": "rimraf dist", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/experimental-utils/package.json b/node_modules/@typescript-eslint/experimental-utils/package.json index 623041ed2..ac77d433a 100644 --- a/node_modules/@typescript-eslint/experimental-utils/package.json +++ b/node_modules/@typescript-eslint/experimental-utils/package.json @@ -1,12 +1,49 @@ { - "name": "@typescript-eslint/experimental-utils", - "version": "4.1.0", - "description": "(Experimental) Utilities for working with TypeScript + ESLint together", - "keywords": [ - "eslint", - "typescript", - "estree" + "_args": [ + [ + "@typescript-eslint/experimental-utils@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "@typescript-eslint/experimental-utils@4.1.0", + "_id": "@typescript-eslint/experimental-utils@4.1.0", + "_inBundle": false, + "_integrity": "sha512-paEYLA37iqRIDPeQwAmoYSiZ3PiHsaAc3igFeBTeqRHgPnHjHLJ9OGdmP6nwAkF65p2QzEsEBtpjNUBWByNWzA==", + "_location": "/@typescript-eslint/experimental-utils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/experimental-utils@4.1.0", + "name": "@typescript-eslint/experimental-utils", + "escapedName": "@typescript-eslint%2fexperimental-utils", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/eslint-plugin" + ], + "_resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.1.0", + "@typescript-eslint/types": "4.1.0", + "@typescript-eslint/typescript-estree": "4.1.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "description": "(Experimental) Utilities for working with TypeScript + ESLint together", + "devDependencies": { + "typescript": "*" + }, "engines": { "node": "^10.12.0 || >=12.0.0" }, @@ -17,45 +54,39 @@ "README.md", "LICENSE" ], - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/experimental-utils" - }, - "bugs": { - "url": "https://github.com/typescript-eslint/typescript-eslint/issues" - }, - "license": "MIT", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist && rimraf _ts3.4", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, - "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.1.0", - "@typescript-eslint/types": "4.1.0", - "@typescript-eslint/typescript-estree": "4.1.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - }, - "peerDependencies": { - "eslint": "*" - }, - "devDependencies": { - "typescript": "*" - }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@typescript-eslint/experimental-utils", + "peerDependencies": { + "eslint": "*" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/experimental-utils" + }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist && rimraf _ts3.4", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -63,5 +94,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/parser/package.json b/node_modules/@typescript-eslint/parser/package.json index 31c5850c3..06619619c 100644 --- a/node_modules/@typescript-eslint/parser/package.json +++ b/node_modules/@typescript-eslint/parser/package.json @@ -1,26 +1,66 @@ { - "name": "@typescript-eslint/parser", - "version": "4.1.0", + "_args": [ + [ + "@typescript-eslint/parser@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "@typescript-eslint/parser@4.1.0", + "_id": "@typescript-eslint/parser@4.1.0", + "_inBundle": false, + "_integrity": "sha512-hM/WNCQTzDHgS0Ke3cR9zPndL3OTKr9OoN9CL3UqulsAjYDrglSwIIgswSmHBcSbOzLmgaMARwrQEbIumIglvQ==", + "_location": "/@typescript-eslint/parser", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/parser@4.1.0", + "name": "@typescript-eslint/parser", + "escapedName": "@typescript-eslint%2fparser", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "#DEV:/", + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "dependencies": { + "@typescript-eslint/scope-manager": "4.1.0", + "@typescript-eslint/types": "4.1.0", + "@typescript-eslint/typescript-estree": "4.1.0", + "debug": "^4.1.1" + }, "description": "An ESLint custom parser which leverages TypeScript ESTree", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "devDependencies": { + "@types/glob": "*", + "@typescript-eslint/experimental-utils": "4.1.0", + "@typescript-eslint/shared-fixtures": "4.1.0", + "glob": "*", + "typescript": "*" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, "files": [ "dist", "README.md", "LICENSE" ], - "engines": { - "node": "^10.12.0 || >=12.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/parser" - }, - "bugs": { - "url": "https://github.com/typescript-eslint/typescript-eslint/issues" - }, - "license": "BSD-2-Clause", + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", "keywords": [ "ast", "ecmascript", @@ -30,41 +70,33 @@ "syntax", "eslint" ], - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, + "license": "BSD-2-Clause", + "main": "dist/index.js", + "name": "@typescript-eslint/parser", "peerDependencies": { "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" }, - "dependencies": { - "@typescript-eslint/scope-manager": "4.1.0", - "@typescript-eslint/types": "4.1.0", - "@typescript-eslint/typescript-estree": "4.1.0", - "debug": "^4.1.1" - }, - "devDependencies": { - "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.1.0", - "@typescript-eslint/shared-fixtures": "4.1.0", - "glob": "*", - "typescript": "*" - }, "peerDependenciesMeta": { "typescript": { "optional": true } }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/parser" }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -72,5 +104,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/scope-manager/package.json b/node_modules/@typescript-eslint/scope-manager/package.json index 8af22e772..1fa596ab8 100644 --- a/node_modules/@typescript-eslint/scope-manager/package.json +++ b/node_modules/@typescript-eslint/scope-manager/package.json @@ -1,47 +1,44 @@ { - "name": "@typescript-eslint/scope-manager", - "version": "4.1.0", - "description": "TypeScript scope analyser for ESLint", - "keywords": [ - "eslint", - "typescript", - "estree" + "_args": [ + [ + "@typescript-eslint/scope-manager@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "_development": true, + "_from": "@typescript-eslint/scope-manager@4.1.0", + "_id": "@typescript-eslint/scope-manager@4.1.0", + "_inBundle": false, + "_integrity": "sha512-HD1/u8vFNnxwiHqlWKC/Pigdn0Mvxi84Y6GzbZ5f5sbLrFKu0al02573Er+D63Sw67IffVUXR0uR8rpdfdk+vA==", + "_location": "/@typescript-eslint/scope-manager", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/scope-manager@4.1.0", + "name": "@typescript-eslint/scope-manager", + "escapedName": "@typescript-eslint%2fscope-manager", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" }, - "files": [ - "dist", - "package.json", - "README.md", - "LICENSE" + "_requiredBy": [ + "/@typescript-eslint/eslint-plugin", + "/@typescript-eslint/experimental-utils", + "/@typescript-eslint/parser" ], - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/scope-manager" - }, + "_resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, - "license": "MIT", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-lib.ts", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, "dependencies": { "@typescript-eslint/types": "4.1.0", "@typescript-eslint/visitor-keys": "4.1.0" }, + "description": "TypeScript scope analyser for ESLint", "devDependencies": { "@types/glob": "*", "@typescript-eslint/typescript-estree": "4.1.0", @@ -53,10 +50,46 @@ "rimraf": "*", "typescript": "*" }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "files": [ + "dist", + "package.json", + "README.md", + "LICENSE" + ], "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@typescript-eslint/scope-manager", + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/scope-manager" + }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-lib.ts", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -64,5 +97,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/types/package.json b/node_modules/@typescript-eslint/types/package.json index 2e42e476a..9b35be473 100644 --- a/node_modules/@typescript-eslint/types/package.json +++ b/node_modules/@typescript-eslint/types/package.json @@ -1,12 +1,42 @@ { - "name": "@typescript-eslint/types", - "version": "4.1.0", - "description": "Types for the TypeScript-ESTree AST spec", - "keywords": [ - "eslint", - "typescript", - "estree" + "_args": [ + [ + "@typescript-eslint/types@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "@typescript-eslint/types@4.1.0", + "_id": "@typescript-eslint/types@4.1.0", + "_inBundle": false, + "_integrity": "sha512-rkBqWsO7m01XckP9R2YHVN8mySOKKY2cophGM8K5uDK89ArCgahItQYdbg/3n8xMxzu2elss+an1TphlUpDuJw==", + "_location": "/@typescript-eslint/types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/types@4.1.0", + "name": "@typescript-eslint/types", + "escapedName": "@typescript-eslint%2ftypes", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/experimental-utils", + "/@typescript-eslint/parser", + "/@typescript-eslint/scope-manager", + "/@typescript-eslint/typescript-estree", + "/@typescript-eslint/visitor-keys" + ], + "_resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "description": "Types for the TypeScript-ESTree AST spec", "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" }, @@ -16,31 +46,36 @@ "README.md", "LICENSE" ], - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/visitor-keys" - }, - "bugs": { - "url": "https://github.com/typescript-eslint/typescript-eslint/issues" - }, - "license": "MIT", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@typescript-eslint/types", + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/visitor-keys" + }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -48,5 +83,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json b/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json index bf95095ee..a28f3d70d 100644 --- a/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json +++ b/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json @@ -1,28 +1,71 @@ { - "name": "globby", - "version": "11.0.1", - "description": "User-friendly glob matching", - "license": "MIT", - "repository": "sindresorhus/globby", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "globby@11.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "globby@11.0.1", + "_id": "globby@11.0.1", + "_inBundle": false, + "_integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "_location": "/@typescript-eslint/typescript-estree/globby", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "globby@11.0.1", + "name": "globby", + "escapedName": "globby", + "rawSpec": "11.0.1", + "saveSpec": null, + "fetchSpec": "11.0.1" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree" + ], + "_resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "_spec": "11.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/globby/issues" + }, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "description": "User-friendly glob matching", + "devDependencies": { + "ava": "^2.1.0", + "get-stream": "^5.1.0", + "glob-stream": "^6.1.0", + "globby": "github:sindresorhus/globby#master", + "matcha": "^0.7.0", + "rimraf": "^3.0.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=10" }, - "scripts": { - "bench": "npm update glob-stream fast-glob && matcha bench.js", - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "gitignore.js", "stream-utils.js" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/globby#readme", "keywords": [ "all", "array", @@ -56,27 +99,20 @@ "gitignore", "git" ], - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" + "license": "MIT", + "name": "globby", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/globby.git" }, - "devDependencies": { - "ava": "^2.1.0", - "get-stream": "^5.1.0", - "glob-stream": "^6.1.0", - "globby": "sindresorhus/globby#master", - "matcha": "^0.7.0", - "rimraf": "^3.0.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" + "scripts": { + "bench": "npm update glob-stream fast-glob && matcha bench.js", + "test": "xo && ava && tsd" }, + "version": "11.0.1", "xo": { "ignores": [ "fixtures" ] } -} \ No newline at end of file +} diff --git a/node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils/package.json b/node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils/package.json index dbe0a2098..bae301427 100644 --- a/node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils/package.json +++ b/node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils/package.json @@ -1,35 +1,43 @@ { - "name": "tsutils", - "version": "3.17.1", - "description": "utilities for working with typescript's AST", - "scripts": { - "compile": "rm -rf {,util,typeguard,test/**}/*.js; ttsc -p .", - "lint:tslint": "wotan -m @fimbul/valtyr", - "lint:wotan": "wotan", - "lint": "run-p lint:*", - "test": "mocha test/*Tests.js && tslint --test 'test/rules/**/tslint.json'", - "verify": "run-s compile lint coverage", - "prepublishOnly": "run-s verify", - "coverage": "nyc run-s test", - "report-coverage": "cat ./coverage/lcov.info | coveralls", - "github-release": "GITHUB_TOKEN=$(cat ~/github_token.txt) github-release-from-changelog", - "postpublish": "git push origin master --tags; run-s github-release" - }, - "repository": { - "type": "git", - "url": "https://github.com/ajafff/tsutils" - }, - "keywords": [ - "typescript", - "ts", - "ast", - "typeguard", - "utils", - "helper", - "node" + "_args": [ + [ + "tsutils@3.17.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Klaus Meinhardt", - "license": "MIT", + "_development": true, + "_from": "tsutils@3.17.1", + "_id": "tsutils@3.17.1", + "_inBundle": false, + "_integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "_location": "/@typescript-eslint/typescript-estree/tsutils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "tsutils@3.17.1", + "name": "tsutils", + "escapedName": "tsutils", + "rawSpec": "3.17.1", + "saveSpec": null, + "fetchSpec": "3.17.1" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree" + ], + "_resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "_spec": "3.17.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Klaus Meinhardt" + }, + "bugs": { + "url": "https://github.com/ajafff/tsutils/issues" + }, + "dependencies": { + "tslib": "^1.8.1" + }, + "description": "utilities for working with typescript's AST", "devDependencies": { "@fimbul/mithotyn": "^0.17.0", "@fimbul/valtyr": "^0.20.0", @@ -49,13 +57,40 @@ "ttypescript": "^1.5.5", "typescript": "^3.6.0-dev.20190804" }, + "engines": { + "node": ">= 6" + }, + "homepage": "https://github.com/ajafff/tsutils#readme", + "keywords": [ + "typescript", + "ts", + "ast", + "typeguard", + "utils", + "helper", + "node" + ], + "license": "MIT", + "name": "tsutils", "peerDependencies": { "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" }, - "dependencies": { - "tslib": "^1.8.1" + "repository": { + "type": "git", + "url": "git+https://github.com/ajafff/tsutils.git" }, - "engines": { - "node": ">= 6" - } -} \ No newline at end of file + "scripts": { + "compile": "rm -rf {,util,typeguard,test/**}/*.js; ttsc -p .", + "coverage": "nyc run-s test", + "github-release": "GITHUB_TOKEN=$(cat ~/github_token.txt) github-release-from-changelog", + "lint": "run-p lint:*", + "lint:tslint": "wotan -m @fimbul/valtyr", + "lint:wotan": "wotan", + "postpublish": "git push origin master --tags; run-s github-release", + "prepublishOnly": "run-s verify", + "report-coverage": "cat ./coverage/lcov.info | coveralls", + "test": "mocha test/*Tests.js && tslint --test 'test/rules/**/tslint.json'", + "verify": "run-s compile lint coverage" + }, + "version": "3.17.1" +} diff --git a/node_modules/@typescript-eslint/typescript-estree/package.json b/node_modules/@typescript-eslint/typescript-estree/package.json index a04c3ac78..19def9baf 100644 --- a/node_modules/@typescript-eslint/typescript-estree/package.json +++ b/node_modules/@typescript-eslint/typescript-estree/package.json @@ -1,45 +1,46 @@ { - "name": "@typescript-eslint/typescript-estree", - "version": "4.1.0", - "description": "A parser that converts TypeScript source code into an ESTree compatible form", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "files": [ - "dist", - "README.md", - "LICENSE" + "_args": [ + [ + "@typescript-eslint/typescript-estree@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": "^10.12.0 || >=12.0.0" + "_development": true, + "_from": "@typescript-eslint/typescript-estree@4.1.0", + "_id": "@typescript-eslint/typescript-estree@4.1.0", + "_inBundle": false, + "_integrity": "sha512-r6et57qqKAWU173nWyw31x7OfgmKfMEcjJl9vlJEzS+kf9uKNRr4AVTRXfTCwebr7bdiVEkfRY5xGnpPaNPe4Q==", + "_location": "/@typescript-eslint/typescript-estree", + "_phantomChildren": { + "array-union": "2.1.0", + "dir-glob": "3.0.1", + "fast-glob": "3.2.2", + "ignore": "5.1.4", + "merge2": "1.3.0", + "slash": "3.0.0", + "tslib": "1.11.1" }, - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/typescript-estree" + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/typescript-estree@4.1.0", + "name": "@typescript-eslint/typescript-estree", + "escapedName": "@typescript-eslint%2ftypescript-estree", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" }, + "_requiredBy": [ + "/@typescript-eslint/experimental-utils", + "/@typescript-eslint/parser" + ], + "_resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, - "license": "BSD-2-Clause", - "keywords": [ - "ast", - "estree", - "ecmascript", - "javascript", - "typescript", - "parser", - "syntax" - ], - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, "dependencies": { "@typescript-eslint/types": "4.1.0", "@typescript-eslint/visitor-keys": "4.1.0", @@ -50,6 +51,7 @@ "semver": "^7.3.2", "tsutils": "^3.17.1" }, + "description": "A parser that converts TypeScript source code into an ESTree compatible form", "devDependencies": { "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.11.3", @@ -68,15 +70,53 @@ "tmp": "^0.2.1", "typescript": "*" }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "ast", + "estree", + "ecmascript", + "javascript", + "typescript", + "parser", + "syntax" + ], + "license": "BSD-2-Clause", + "main": "dist/index.js", + "name": "@typescript-eslint/typescript-estree", "peerDependenciesMeta": { "typescript": { "optional": true } }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/typescript-estree" }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -84,5 +124,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/@typescript-eslint/visitor-keys/package.json b/node_modules/@typescript-eslint/visitor-keys/package.json index 71c92882a..9bf4ab56a 100644 --- a/node_modules/@typescript-eslint/visitor-keys/package.json +++ b/node_modules/@typescript-eslint/visitor-keys/package.json @@ -1,12 +1,46 @@ { - "name": "@typescript-eslint/visitor-keys", - "version": "4.1.0", - "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", - "keywords": [ - "eslint", - "typescript", - "estree" + "_args": [ + [ + "@typescript-eslint/visitor-keys@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "@typescript-eslint/visitor-keys@4.1.0", + "_id": "@typescript-eslint/visitor-keys@4.1.0", + "_inBundle": false, + "_integrity": "sha512-+taO0IZGCtCEsuNTTF2Q/5o8+fHrlml8i9YsZt2AiDCdYEJzYlsmRY991l/6f3jNXFyAWepdQj7n8Na6URiDRQ==", + "_location": "/@typescript-eslint/visitor-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@typescript-eslint/visitor-keys@4.1.0", + "name": "@typescript-eslint/visitor-keys", + "escapedName": "@typescript-eslint%2fvisitor-keys", + "scope": "@typescript-eslint", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/scope-manager", + "/@typescript-eslint/typescript-estree" + ], + "_resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "dependencies": { + "@typescript-eslint/types": "4.1.0", + "eslint-visitor-keys": "^2.0.0" + }, + "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", + "devDependencies": { + "@types/eslint-visitor-keys": "^1.0.0" + }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" }, @@ -16,38 +50,36 @@ "README.md", "LICENSE" ], - "repository": { - "type": "git", - "url": "https://github.com/typescript-eslint/typescript-eslint.git", - "directory": "packages/visitor-keys" - }, - "bugs": { - "url": "https://github.com/typescript-eslint/typescript-eslint/issues" - }, - "license": "MIT", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsc -b tsconfig.build.json", - "postbuild": "downlevel-dts dist _ts3.4/dist", - "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist", - "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", - "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", - "test": "jest --coverage", - "typecheck": "tsc -p tsconfig.json --noEmit" - }, - "dependencies": { - "@typescript-eslint/types": "4.1.0", - "eslint-visitor-keys": "^2.0.0" - }, - "devDependencies": { - "@types/eslint-visitor-keys": "^1.0.0" - }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "gitHead": "00a24706222254774121ee62038e67d0efa993e7", + "homepage": "https://github.com/typescript-eslint/typescript-eslint#readme", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@typescript-eslint/visitor-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/visitor-keys" + }, + "scripts": { + "build": "tsc -b tsconfig.build.json", + "clean": "tsc -b tsconfig.build.json --clean", + "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", + "lint": "eslint . --ext .js,.ts --ignore-path='../../.eslintignore'", + "postbuild": "downlevel-dts dist _ts3.4/dist", + "postclean": "rimraf dist", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "types": "dist/index.d.ts", "typesVersions": { "<3.8": { "*": [ @@ -55,5 +87,5 @@ ] } }, - "gitHead": "00a24706222254774121ee62038e67d0efa993e7" -} \ No newline at end of file + "version": "4.1.0" +} diff --git a/node_modules/abort-controller/LICENSE b/node_modules/abort-controller/LICENSE new file mode 100644 index 000000000..c914149a6 --- /dev/null +++ b/node_modules/abort-controller/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/abort-controller/README.md b/node_modules/abort-controller/README.md new file mode 100644 index 000000000..9de3e45fc --- /dev/null +++ b/node_modules/abort-controller/README.md @@ -0,0 +1,98 @@ +# abort-controller + +[![npm version](https://img.shields.io/npm/v/abort-controller.svg)](https://www.npmjs.com/package/abort-controller) +[![Downloads/month](https://img.shields.io/npm/dm/abort-controller.svg)](http://www.npmtrends.com/abort-controller) +[![Build Status](https://travis-ci.org/mysticatea/abort-controller.svg?branch=master)](https://travis-ci.org/mysticatea/abort-controller) +[![Coverage Status](https://codecov.io/gh/mysticatea/abort-controller/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/abort-controller) +[![Dependency Status](https://david-dm.org/mysticatea/abort-controller.svg)](https://david-dm.org/mysticatea/abort-controller) + +An implementation of [WHATWG AbortController interface](https://dom.spec.whatwg.org/#interface-abortcontroller). + +```js +import AbortController from "abort-controller" + +const controller = new AbortController() +const signal = controller.signal + +signal.addEventListener("abort", () => { + console.log("aborted!") +}) + +controller.abort() +``` + +> https://jsfiddle.net/1r2994qp/1/ + +## 💿 Installation + +Use [npm](https://www.npmjs.com/) to install then use a bundler. + +``` +npm install abort-controller +``` + +Or download from [`dist` directory](./dist). + +- [dist/abort-controller.mjs](dist/abort-controller.mjs) ... ES modules version. +- [dist/abort-controller.js](dist/abort-controller.js) ... Common JS version. +- [dist/abort-controller.umd.js](dist/abort-controller.umd.js) ... UMD (Universal Module Definition) version. This is transpiled by [Babel](https://babeljs.io/) for IE 11. + +## 📖 Usage + +### Basic + +```js +import AbortController from "abort-controller" +// or +const AbortController = require("abort-controller") + +// or UMD version defines a global variable: +const AbortController = window.AbortControllerShim +``` + +If your bundler recognizes `browser` field of `package.json`, the imported `AbortController` is the native one and it doesn't contain shim (even if the native implementation was nothing). +If you wanted to polyfill `AbortController` for IE, use `abort-controller/polyfill`. + +### Polyfilling + +Importing `abort-controller/polyfill` assigns the `AbortController` shim to the `AbortController` global variable if the native implementation was nothing. + +```js +import "abort-controller/polyfill" +// or +require("abort-controller/polyfill") +``` + +### API + +#### AbortController + +> https://dom.spec.whatwg.org/#interface-abortcontroller + +##### controller.signal + +The [AbortSignal](https://dom.spec.whatwg.org/#interface-AbortSignal) object which is associated to this controller. + +##### controller.abort() + +Notify `abort` event to listeners that the `signal` has. + +## 📰 Changelog + +- See [GitHub releases](https://github.com/mysticatea/abort-controller/releases). + +## 🍻 Contributing + +Contributing is welcome ❤️ + +Please use GitHub issues/PRs. + +### Development tools + +- `npm install` installs dependencies for development. +- `npm test` runs tests and measures code coverage. +- `npm run clean` removes temporary files of tests. +- `npm run coverage` opens code coverage of the previous test with your default browser. +- `npm run lint` runs ESLint. +- `npm run build` generates `dist` codes. +- `npm run watch` runs tests on each file change. diff --git a/node_modules/abort-controller/browser.js b/node_modules/abort-controller/browser.js new file mode 100644 index 000000000..b0c5ec37d --- /dev/null +++ b/node_modules/abort-controller/browser.js @@ -0,0 +1,13 @@ +/*globals self, window */ +"use strict" + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +module.exports = AbortController +module.exports.AbortSignal = AbortSignal +module.exports.default = AbortController diff --git a/node_modules/abort-controller/browser.mjs b/node_modules/abort-controller/browser.mjs new file mode 100644 index 000000000..a8f321afe --- /dev/null +++ b/node_modules/abort-controller/browser.mjs @@ -0,0 +1,11 @@ +/*globals self, window */ + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +export default AbortController +export { AbortController, AbortSignal } diff --git a/node_modules/abort-controller/dist/abort-controller.d.ts b/node_modules/abort-controller/dist/abort-controller.d.ts new file mode 100644 index 000000000..75852fb59 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.d.ts @@ -0,0 +1,43 @@ +import { EventTarget } from "event-target-shim" + +type Events = { + abort: any +} +type EventAttributes = { + onabort: any +} +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +declare class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() + /** + * Returns `true` if this `AbortSignal`"s `AbortController` has signaled to abort, and `false` otherwise. + */ + readonly aborted: boolean +} +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +declare class AbortController { + /** + * Initialize this controller. + */ + constructor() + /** + * Returns the `AbortSignal` object associated with this object. + */ + readonly signal: AbortSignal + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort(): void +} + +export default AbortController +export { AbortController, AbortSignal } diff --git a/node_modules/abort-controller/dist/abort-controller.js b/node_modules/abort-controller/dist/abort-controller.js new file mode 100644 index 000000000..49af73955 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.js @@ -0,0 +1,127 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var eventTargetShim = require('event-target-shim'); + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends eventTargetShim.EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + eventTargetShim.EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports.default = AbortController; + +module.exports = AbortController +module.exports.AbortController = module.exports["default"] = AbortController +module.exports.AbortSignal = AbortSignal +//# sourceMappingURL=abort-controller.js.map diff --git a/node_modules/abort-controller/dist/abort-controller.js.map b/node_modules/abort-controller/dist/abort-controller.js.map new file mode 100644 index 000000000..cfdcafdc6 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abort-controller.js","sources":["../src/abort-signal.ts","../src/abort-controller.ts"],"sourcesContent":["import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":["EventTarget","defineEventAttribute"],"mappings":";;;;;;;;;;AAkBA;;;;AAIA,MAAqB,WAAY,SAAQA,2BAAoC;;;;IAIzE;QACI,KAAK,EAAE,CAAA;QACP,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;KACpE;;;;IAKD,IAAW,OAAO;QACd,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,SAAS,CACf,0DACI,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,IACpC,EAAE,CACL,CAAA;SACJ;QACD,OAAO,OAAO,CAAA;KACjB;CACJ;AACDC,oCAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;;;;AAKpD,SAAgB,iBAAiB;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACnDD,2BAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC/B,OAAO,MAAM,CAAA;CAChB;;;;AAKD,SAAgB,WAAW,CAAC,MAAmB;IAC3C,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE;QACpC,OAAM;KACT;IAED,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,MAAM,CAAC,aAAa,CAAU,EAAE,IAAI,EAAE,OAAO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AM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QACjE,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,iBAAiB;KAC3B,CAAC,CAAA;CACL;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/abort-controller/dist/abort-controller.mjs b/node_modules/abort-controller/dist/abort-controller.mjs new file mode 100644 index 000000000..88ba22d55 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.mjs @@ -0,0 +1,118 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +import { EventTarget, defineEventAttribute } from 'event-target-shim'; + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +export default AbortController; +export { AbortController, AbortSignal }; +//# sourceMappingURL=abort-controller.mjs.map diff --git a/node_modules/abort-controller/dist/abort-controller.mjs.map b/node_modules/abort-controller/dist/abort-controller.mjs.map new file mode 100644 index 000000000..1e8fa6b00 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"abort-controller.mjs","sources":["../src/abort-signal.ts","../src/abort-controller.ts"],"sourcesContent":["import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":[],"mappings":";;;;;;AAkBA;;;;AAIA,MAAqB,WAAY,SAAQ,WAAoC;;;;IAIzE;QACI,KAAK,EAAE,CAAA;QACP,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;KACpE;;;;IAKD,IAAW,OAAO;QACd,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,SAAS,CACf,0DACI,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,IACpC,EAAE,CACL,CAAA;SACJ;QACD,OAAO,OAAO,CAAA;KACjB;CACJ;AACD,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;;;;AAKpD,SAAgB,iBAAiB;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACnD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC/B,OAAO,MAAM,CAAA;CAChB;;;;AAKD,SAAgB,WAAW,CAAC,MAAmB;IAC3C,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,K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S,EAAE;IAC/C,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5B,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;CAC9B,CAAC,CAAA;AAEF,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QACjE,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,iBAAiB;KAC3B,CAAC,CAAA;CACL;;;;;"} \ No newline at end of file diff --git a/node_modules/abort-controller/dist/abort-controller.umd.js b/node_modules/abort-controller/dist/abort-controller.umd.js new file mode 100644 index 000000000..f643cfd6b --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.umd.js @@ -0,0 +1,5 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.AbortControllerShim={}))})(this,function(a){'use strict';function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){for(var c,d=0;d\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap();\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap();\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event);\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n );\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n );\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true;\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault();\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n });\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true });\n\n // Define accessors\n const keys = Object.keys(event);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key));\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget;\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation();\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this);\n\n data.stopped = true;\n data.immediateStopped = true;\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation();\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this));\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true;\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this));\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n});\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype);\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event);\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value;\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event;\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto);\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event);\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n });\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n const isFunc = typeof descriptor.value === \"function\";\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n );\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto);\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);\n wrappers.set(proto, wrapper);\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nfunction wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event));\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nfunction isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nfunction setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase;\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nfunction setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget;\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nfunction setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener;\n}\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap();\n\n// Listener types\nconst CAPTURE = 1;\nconst BUBBLE = 2;\nconst ATTRIBUTE = 3;\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget);\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this);\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next;\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null; // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this);\n\n // Traverse to the tail while removing old value.\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n node = node.next;\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n };\n if (prev === null) {\n listeners.set(eventName, newNode);\n } else {\n prev.next = newNode;\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n );\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this);\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n });\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map());\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length);\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i];\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this);\n const optionsIsObj = isObject(options);\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n };\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName);\n if (node === undefined) {\n listeners.set(eventName, newNode);\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null;\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node;\n node = node.next;\n }\n\n // Add it.\n prev.next = newNode;\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this);\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n return\n }\n\n prev = node;\n node = node.next;\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this);\n const eventName = event.type;\n let node = listeners.get(eventName);\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event);\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null;\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n );\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent);\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err);\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent);\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next;\n }\n setPassiveListener(wrappedEvent, null);\n setEventPhase(wrappedEvent, 0);\n setCurrentTarget(wrappedEvent, null);\n\n return !wrappedEvent.defaultPrevented\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n});\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);\n}\n\nexport default EventTarget;\nexport { defineEventAttribute, EventTarget };\n//# sourceMappingURL=event-target-shim.mjs.map\n","import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":["pd","event","retv","privateData","get","console","assert","setCancelFlag","data","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","Object","defineProperty","value","enumerable","key","keys","i","length","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","defineWrapper","BaseEvent","proto","CustomEvent","call","prototype","create","constructor","writable","descriptor","getOwnPropertyDescriptor","isFunc","getWrapper","wrapper","wrappers","getPrototypeOf","wrapEvent","Wrapper","isStopped","setEventPhase","setCurrentTarget","setPassiveListener","createAbortSignal","signal","AbortSignal","EventTarget","abortedFlags","abortSignal","dispatchEvent","type","getSignal","controller","signals","TypeError","WeakMap","target","composedPath","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","defaultPrevented","composed","srcElement","cancelBubble","returnValue","initEvent","window","setPrototypeOf","aborted","defineEventAttribute","defineProperties","Symbol","_typeof","toStringTag","AbortController","abort"],"mappings":";;;+3CAkCA,QAASA,CAAAA,CAAT,CAAYC,CAAZ,CAAmB,IACTC,CAAAA,CAAI,CAAGC,CAAW,CAACC,GAAZ,CAAgBH,CAAhB,QACbI,CAAAA,OAAO,CAACC,MAAR,CACY,IAAR,EAAAJ,CADJ,CAEI,6CAFJ,CAGID,CAHJ,EAKOC,EAOX,QAASK,CAAAA,CAAT,CAAuBC,CAAvB,CAA6B,OACG,KAAxB,EAAAA,CAAI,CAACC,eADgB,MAarB,CAACD,CAAI,CAACP,KAAL,CAAWS,UAbS,GAiBzBF,CAAI,CAACG,QAAL,GAjByB,CAkBgB,UAArC,QAAOH,CAAAA,CAAI,CAACP,KAAL,CAAWW,cAlBG,EAmBrBJ,CAAI,CAACP,KAAL,CAAWW,cAAX,EAnBqB,QAGE,WAAnB,QAAOP,CAAAA,OAAP,EACyB,UAAzB,QAAOA,CAAAA,OAAO,CAACQ,KAJE,EAMjBR,OAAO,CAACQ,KAAR,CACI,oEADJ,CAEIL,CAAI,CAACC,eAFT,CANiB,EAiC7B,QAASK,CAAAA,CAAT,CAAeC,CAAf,CAA4Bd,CAA5B,CAAmC,CAC/BE,CAAW,CAACa,GAAZ,CAAgB,IAAhB,CAAsB,CAClBD,WAAW,CAAXA,CADkB,CAElBd,KAAK,CAALA,CAFkB,CAGlBgB,UAAU,CAAE,CAHM,CAIlBC,aAAa,CAAEH,CAJG,CAKlBJ,QAAQ,GALU,CAMlBQ,OAAO,GAN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,CAAC,IAAD,WAclBE,CAAO,CAAG,GAAIE,CAAAA,WAkBpB/C,MAAM,CAACmE,gBAAPnE,CAAwBuE,CAAe,CAACrD,SAAxClB,CAAmD,CAC/CoC,MAAM,CAAE,CAAEjC,UAAU,GAAZ,CADuC,CAE/CqE,KAAK,CAAE,CAAErE,UAAU,GAAZ,CAFwC,CAAnDH,EAKsB,UAAlB,QAAOoE,CAAAA,MAAP,EAA8D,QAA9B,GAAAC,EAAOD,MAAM,CAACE,cAC9CtE,MAAM,CAACC,cAAPD,CAAsBuE,CAAe,CAACrD,SAAtClB,CAAiDoE,MAAM,CAACE,WAAxDtE,CAAqE,CACjES,YAAY,GADqD,CAEjEP,KAAK,CAAE,iBAF0D,CAArEF"} \ No newline at end of file diff --git a/node_modules/abort-controller/package.json b/node_modules/abort-controller/package.json new file mode 100644 index 000000000..fe821eff5 --- /dev/null +++ b/node_modules/abort-controller/package.json @@ -0,0 +1,125 @@ +{ + "_from": "abort-controller@^3.0.0", + "_id": "abort-controller@3.0.0", + "_inBundle": false, + "_integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "_location": "/abort-controller", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "abort-controller@^3.0.0", + "name": "abort-controller", + "escapedName": "abort-controller", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@azure/ms-rest-js" + ], + "_resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "_shasum": "eaf54d53b62bae4138e809ca225c8439a6efb392", + "_spec": "abort-controller@^3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/ms-rest-js", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/mysticatea/abort-controller/issues" + }, + "bundleDependencies": false, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "deprecated": false, + "description": "An implementation of WHATWG AbortController interface.", + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.3.0", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "@types/mocha": "^5.2.5", + "@types/node": "^10.12.18", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "dts-bundle-generator": "^2.0.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.1.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.2", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-typescript": "^1.0.0", + "rollup-watch": "^4.3.1", + "ts-node": "^8.0.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "engines": { + "node": ">=6.5" + }, + "files": [ + "dist", + "polyfill.*", + "browser.*" + ], + "homepage": "https://github.com/mysticatea/abort-controller#readme", + "keywords": [ + "w3c", + "whatwg", + "event", + "events", + "abort", + "cancel", + "abortcontroller", + "abortsignal", + "controller", + "signal", + "shim" + ], + "license": "MIT", + "main": "dist/abort-controller", + "name": "abort-controller", + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/abort-controller.git" + }, + "scripts": { + "build": "run-s -s build:*", + "build:dts": "dts-bundle-generator -o dist/abort-controller.d.ts src/abort-controller.ts && ts-node scripts/fix-dts", + "build:rollup": "rollup -c", + "clean": "rimraf .nyc_output coverage", + "codecov": "codecov", + "coverage": "opener coverage/lcov-report/index.html", + "lint": "eslint . --ext .ts", + "postversion": "git push && git push --tags", + "preversion": "npm test", + "test": "run-s -s lint test:*", + "test:karma": "karma start --single-run", + "test:mocha": "nyc mocha test/*.ts", + "version": "npm run -s build && git add dist/*", + "watch": "run-p -s watch:*", + "watch:karma": "karma start --watch", + "watch:mocha": "mocha test/*.ts --require ts-node/register --watch-extensions ts --watch --growl" + }, + "version": "3.0.0" +} diff --git a/node_modules/abort-controller/polyfill.js b/node_modules/abort-controller/polyfill.js new file mode 100644 index 000000000..3ca892330 --- /dev/null +++ b/node_modules/abort-controller/polyfill.js @@ -0,0 +1,21 @@ +/*globals require, self, window */ +"use strict" + +const ac = require("./dist/abort-controller") + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/node_modules/abort-controller/polyfill.mjs b/node_modules/abort-controller/polyfill.mjs new file mode 100644 index 000000000..0602a64dd --- /dev/null +++ b/node_modules/abort-controller/polyfill.mjs @@ -0,0 +1,19 @@ +/*globals self, window */ +import * as ac from "./dist/abort-controller" + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/node_modules/acorn-jsx/package.json b/node_modules/acorn-jsx/package.json index 3088f9add..4e4311355 100644 --- a/node_modules/acorn-jsx/package.json +++ b/node_modules/acorn-jsx/package.json @@ -1,27 +1,59 @@ { - "name": "acorn-jsx", + "_args": [ + [ + "acorn-jsx@5.3.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "acorn-jsx@5.3.1", + "_id": "acorn-jsx@5.3.1", + "_inBundle": false, + "_integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "_location": "/acorn-jsx", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "acorn-jsx@5.3.1", + "name": "acorn-jsx", + "escapedName": "acorn-jsx", + "rawSpec": "5.3.1", + "saveSpec": null, + "fetchSpec": "5.3.1" + }, + "_requiredBy": [ + "/espree" + ], + "_resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "_spec": "5.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/acornjs/acorn-jsx/issues" + }, "description": "Modern, fast React.js JSX parser", + "devDependencies": { + "acorn": "^8.0.1" + }, "homepage": "https://github.com/acornjs/acorn-jsx", - "version": "5.3.1", + "license": "MIT", "maintainers": [ { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", - "web": "http://rreverser.com/" + "url": "http://rreverser.com/" } ], - "repository": { - "type": "git", - "url": "https://github.com/acornjs/acorn-jsx" - }, - "license": "MIT", - "scripts": { - "test": "node test/run.js" - }, + "name": "acorn-jsx", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" }, - "devDependencies": { - "acorn": "^8.0.1" - } -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/acornjs/acorn-jsx.git" + }, + "scripts": { + "test": "node test/run.js" + }, + "version": "5.3.1" +} diff --git a/node_modules/acorn/package.json b/node_modules/acorn/package.json index 40a5beda7..ea62e68cc 100644 --- a/node_modules/acorn/package.json +++ b/node_modules/acorn/package.json @@ -1,39 +1,71 @@ { - "name": "acorn", + "_args": [ + [ + "acorn@7.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "acorn@7.1.1", + "_id": "acorn@7.1.1", + "_inBundle": false, + "_integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "_location": "/acorn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "acorn@7.1.1", + "name": "acorn", + "escapedName": "acorn", + "rawSpec": "7.1.1", + "saveSpec": null, + "fetchSpec": "7.1.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "_spec": "7.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "acorn": "bin/acorn" + }, + "bugs": { + "url": "https://github.com/acornjs/acorn/issues" + }, "description": "ECMAScript parser", - "homepage": "https://github.com/acornjs/acorn", - "main": "dist/acorn.js", - "types": "dist/acorn.d.ts", - "module": "dist/acorn.mjs", - "version": "7.1.1", "engines": { "node": ">=0.4.0" }, + "homepage": "https://github.com/acornjs/acorn", + "license": "MIT", + "main": "dist/acorn.js", "maintainers": [ { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", - "web": "https://marijnhaverbeke.nl" + "url": "https://marijnhaverbeke.nl" }, { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", - "web": "https://rreverser.com/" + "url": "https://rreverser.com/" }, { "name": "Adrian Heine", - "web": "http://adrianheine.de" + "url": "http://adrianheine.de" } ], + "module": "dist/acorn.mjs", + "name": "acorn", "repository": { "type": "git", - "url": "https://github.com/acornjs/acorn.git" + "url": "git+https://github.com/acornjs/acorn.git" }, - "license": "MIT", "scripts": { "prepare": "cd ..; npm run build:main && npm run build:bin" }, - "bin": { - "acorn": "./bin/acorn" - } -} \ No newline at end of file + "types": "dist/acorn.d.ts", + "version": "7.1.1" +} diff --git a/node_modules/aggregate-error/package.json b/node_modules/aggregate-error/package.json index 975b087d9..83a286db3 100644 --- a/node_modules/aggregate-error/package.json +++ b/node_modules/aggregate-error/package.json @@ -1,24 +1,60 @@ { - "name": "aggregate-error", - "version": "3.0.1", - "description": "Create an error from multiple errors", - "license": "MIT", - "repository": "sindresorhus/aggregate-error", + "_args": [ + [ + "aggregate-error@3.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "aggregate-error@3.0.1", + "_id": "aggregate-error@3.0.1", + "_inBundle": false, + "_integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "_location": "/aggregate-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "aggregate-error@3.0.1", + "name": "aggregate-error", + "escapedName": "aggregate-error", + "rawSpec": "3.0.1", + "saveSpec": null, + "fetchSpec": "3.0.1" + }, + "_requiredBy": [ + "/del/p-map", + "/p-map" + ], + "_resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "_spec": "3.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/aggregate-error/issues" + }, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "description": "Create an error from multiple errors", + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.7.1", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/aggregate-error#readme", "keywords": [ "aggregate", "error", @@ -29,13 +65,14 @@ "iterable", "iterator" ], - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "license": "MIT", + "name": "aggregate-error", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/aggregate-error.git" }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.7.1", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.1" +} diff --git a/node_modules/ajv/package.json b/node_modules/ajv/package.json index 91a03048f..1f7ce14cf 100644 --- a/node_modules/ajv/package.json +++ b/node_modules/ajv/package.json @@ -1,72 +1,52 @@ { - "name": "ajv", - "version": "6.12.5", - "description": "Another JSON Schema Validator", - "main": "lib/ajv.js", - "typings": "lib/ajv.d.ts", - "files": [ - "lib/", - "dist/", - "scripts/", - "LICENSE", - ".tonic_example.js" - ], - "scripts": { - "eslint": "eslint lib/{compile/,}*.js spec/{**/,}*.js scripts --ignore-pattern spec/JSON-Schema-Test-Suite", - "jshint": "jshint lib/{compile/,}*.js", - "lint": "npm run jshint && npm run eslint", - "test-spec": "mocha spec/{**/,}*.spec.js -R spec", - "test-fast": "AJV_FAST_TEST=true npm run test-spec", - "test-debug": "npm run test-spec -- --inspect-brk", - "test-cov": "nyc npm run test-spec", - "test-ts": "tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts", - "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", - "bundle-beautify": "node ./scripts/bundle.js js-beautify", - "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js", - "test-karma": "karma start", - "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", - "test-all": "npm run test-cov && if-node-version 10 npm run test-browser", - "test": "npm run lint && npm run build && npm run test-all", - "prepublish": "npm run build && npm run bundle", - "watch": "watch \"npm run build\" ./lib/dot" - }, - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" + "_args": [ + [ + "ajv@6.12.5", + "/home/chris/src/github.com/github/codeql-action" ] - }, - "repository": { - "type": "git", - "url": "https://github.com/ajv-validator/ajv.git" - }, - "keywords": [ - "JSON", - "schema", - "validator", - "validation", - "jsonschema", - "json-schema", - "json-schema-validator", - "json-schema-validation" ], - "author": "Evgeny Poberezkin", - "license": "MIT", + "_development": true, + "_from": "ajv@6.12.5", + "_id": "ajv@6.12.5", + "_inBundle": false, + "_integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", + "_location": "/ajv", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ajv@6.12.5", + "name": "ajv", + "escapedName": "ajv", + "rawSpec": "6.12.5", + "saveSpec": null, + "fetchSpec": "6.12.5" + }, + "_requiredBy": [ + "/@eslint/eslintrc", + "/eslint", + "/table" + ], + "_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", + "_spec": "6.12.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Evgeny Poberezkin" + }, "bugs": { "url": "https://github.com/ajv-validator/ajv/issues" }, - "homepage": "https://github.com/ajv-validator/ajv", - "tonicExampleFilename": ".tonic_example.js", + "collective": { + "type": "opencollective", + "url": "https://opencollective.com/ajv" + }, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" }, + "description": "Another JSON Schema Validator", "devDependencies": { "ajv-async": "^1.0.0", "bluebird": "^3.5.3", @@ -95,12 +75,65 @@ "uglify-js": "^3.6.9", "watch": "^1.0.0" }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/ajv" - }, + "files": [ + "lib/", + "dist/", + "scripts/", + "LICENSE", + ".tonic_example.js" + ], "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/ajv-validator/ajv", + "keywords": [ + "JSON", + "schema", + "validator", + "validation", + "jsonschema", + "json-schema", + "json-schema-validator", + "json-schema-validation" + ], + "license": "MIT", + "main": "lib/ajv.js", + "name": "ajv", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ajv-validator/ajv.git" + }, + "scripts": { + "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js", + "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", + "bundle-beautify": "node ./scripts/bundle.js js-beautify", + "eslint": "eslint lib/{compile/,}*.js spec/{**/,}*.js scripts --ignore-pattern spec/JSON-Schema-Test-Suite", + "jshint": "jshint lib/{compile/,}*.js", + "lint": "npm run jshint && npm run eslint", + "prepublish": "npm run build && npm run bundle", + "test": "npm run lint && npm run build && npm run test-all", + "test-all": "npm run test-cov && if-node-version 10 npm run test-browser", + "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", + "test-cov": "nyc npm run test-spec", + "test-debug": "npm run test-spec -- --inspect-brk", + "test-fast": "AJV_FAST_TEST=true npm run test-spec", + "test-karma": "karma start", + "test-spec": "mocha spec/{**/,}*.spec.js -R spec", + "test-ts": "tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts", + "watch": "watch \"npm run build\" ./lib/dot" + }, + "tonicExampleFilename": ".tonic_example.js", + "typings": "lib/ajv.d.ts", + "version": "6.12.5" +} diff --git a/node_modules/ansi-align/node_modules/emoji-regex/package.json b/node_modules/ansi-align/node_modules/emoji-regex/package.json index 9b1f7fa11..149fe8beb 100644 --- a/node_modules/ansi-align/node_modules/emoji-regex/package.json +++ b/node_modules/ansi-align/node_modules/emoji-regex/package.json @@ -1,10 +1,60 @@ { - "name": "emoji-regex", - "version": "7.0.3", + "_args": [ + [ + "emoji-regex@7.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "emoji-regex@7.0.3", + "_id": "emoji-regex@7.0.3", + "_inBundle": false, + "_integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "_location": "/ansi-align/emoji-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "emoji-regex@7.0.3", + "name": "emoji-regex", + "escapedName": "emoji-regex", + "rawSpec": "7.0.3", + "saveSpec": null, + "fetchSpec": "7.0.3" + }, + "_requiredBy": [ + "/ansi-align/string-width" + ], + "_resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "_spec": "7.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bugs": { + "url": "https://github.com/mathiasbynens/emoji-regex/issues" + }, "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "mocha": "^5.2.0", + "regexgen": "^1.3.0", + "unicode-11.0.0": "^0.7.7", + "unicode-tr51": "^9.0.1" + }, + "files": [ + "LICENSE-MIT.txt", + "index.js", + "index.d.ts", + "text.js", + "es2015/index.js", + "es2015/text.js" + ], "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", "keywords": [ "unicode", "regex", @@ -16,36 +66,17 @@ "emoji" ], "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, + "main": "index.js", + "name": "emoji-regex", "repository": { "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" + "url": "git+https://github.com/mathiasbynens/emoji-regex.git" }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], "scripts": { "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", "test": "mocha", "test:watch": "npm run test -- --watch" }, - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "mocha": "^5.2.0", - "regexgen": "^1.3.0", - "unicode-11.0.0": "^0.7.7", - "unicode-tr51": "^9.0.1" - } -} \ No newline at end of file + "types": "index.d.ts", + "version": "7.0.3" +} diff --git a/node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json b/node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json index 26bde6763..9600ab3be 100644 --- a/node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json +++ b/node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json @@ -1,23 +1,53 @@ { - "name": "is-fullwidth-code-point", - "version": "2.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", + "_args": [ + [ + "is-fullwidth-code-point@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-fullwidth-code-point@2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/ansi-align/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-fullwidth-code-point@2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/ansi-align/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", "keywords": [ "fullwidth", "full-width", @@ -35,11 +65,17 @@ "detect", "check" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/ansi-align/node_modules/string-width/package.json b/node_modules/ansi-align/node_modules/string-width/package.json index 999be2234..4eae52ecd 100644 --- a/node_modules/ansi-align/node_modules/string-width/package.json +++ b/node_modules/ansi-align/node_modules/string-width/package.json @@ -1,23 +1,58 @@ { - "name": "string-width", - "version": "3.1.0", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", + "_args": [ + [ + "string-width@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "string-width@3.1.0", + "_id": "string-width@3.1.0", + "_inBundle": false, + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "_location": "/ansi-align/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "string-width@3.1.0", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/ansi-align" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/string-width#readme", "keywords": [ "string", "str", @@ -44,13 +79,14 @@ "korean", "fixed-width" ], - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" }, - "devDependencies": { - "ava": "^1.0.1", - "xo": "^0.23.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/node_modules/ansi-align/node_modules/strip-ansi/package.json b/node_modules/ansi-align/node_modules/strip-ansi/package.json index 8da283c17..5cf4f1ce2 100644 --- a/node_modules/ansi-align/node_modules/strip-ansi/package.json +++ b/node_modules/ansi-align/node_modules/strip-ansi/package.json @@ -1,24 +1,58 @@ { - "name": "strip-ansi", - "version": "5.2.0", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", + "_args": [ + [ + "strip-ansi@5.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "strip-ansi@5.2.0", + "_id": "strip-ansi@5.2.0", + "_inBundle": false, + "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "_location": "/ansi-align/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-ansi@5.2.0", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "5.2.0", + "saveSpec": null, + "fetchSpec": "5.2.0" + }, + "_requiredBy": [ + "/ansi-align/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "description": "Strip ANSI escape codes from a string", + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ "strip", "trim", @@ -43,12 +77,14 @@ "command-line", "text" ], - "dependencies": { - "ansi-regex": "^4.1.0" + "license": "MIT", + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" }, - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "5.2.0" +} diff --git a/node_modules/ansi-align/package.json b/node_modules/ansi-align/package.json index dd0ee2023..2ab8aadcc 100644 --- a/node_modules/ansi-align/package.json +++ b/node_modules/ansi-align/package.json @@ -1,37 +1,45 @@ { - "name": "ansi-align", - "version": "3.0.0", - "description": "align-text with ANSI support for CLIs", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "files": [ - "index.js" + "_args": [ + [ + "ansi-align@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "git+https://github.com/nexdrew/ansi-align.git" + "_development": true, + "_from": "ansi-align@3.0.0", + "_id": "ansi-align@3.0.0", + "_inBundle": false, + "_integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "_location": "/ansi-align", + "_phantomChildren": { + "ansi-regex": "4.1.0" }, - "keywords": [ - "ansi", - "align", - "cli", - "center", - "pad" + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-align@3.0.0", + "name": "ansi-align", + "escapedName": "ansi-align", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/boxen" ], - "author": "nexdrew", - "license": "ISC", + "_resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "nexdrew" + }, "bugs": { "url": "https://github.com/nexdrew/ansi-align/issues" }, - "homepage": "https://github.com/nexdrew/ansi-align#readme", "dependencies": { "string-width": "^3.0.0" }, + "description": "align-text with ANSI support for CLIs", "devDependencies": { "ava": "^1.0.1", "chalk": "^2.4.1", @@ -39,5 +47,30 @@ "nyc": "^13.1.0", "standard": "^12.0.1", "standard-version": "^4.4.0" - } -} \ No newline at end of file + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/nexdrew/ansi-align#readme", + "keywords": [ + "ansi", + "align", + "cli", + "center", + "pad" + ], + "license": "ISC", + "main": "index.js", + "name": "ansi-align", + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/ansi-align.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json index eb1facb6d..137349089 100644 --- a/node_modules/ansi-colors/package.json +++ b/node_modules/ansi-colors/package.json @@ -1,33 +1,59 @@ { - "name": "ansi-colors", - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "version": "4.1.1", - "homepage": "https://github.com/doowb/ansi-colors", - "author": "Brian Woodward (https://github.com/doowb)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Jason Schilling (https://sourecode.de)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Jordan (https://github.com/Silic0nS0ldier)" + "_args": [ + [ + "ansi-colors@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "doowb/ansi-colors", + "_development": true, + "_from": "ansi-colors@4.1.1", + "_id": "ansi-colors@4.1.1", + "_inBundle": false, + "_integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "_location": "/ansi-colors", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-colors@4.1.1", + "name": "ansi-colors", + "escapedName": "ansi-colors", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" + }, + "_requiredBy": [ + "/enquirer" + ], + "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Brian Woodward", + "url": "https://github.com/doowb" + }, "bugs": { "url": "https://github.com/doowb/ansi-colors/issues" }, - "license": "MIT", - "files": [ - "index.js", - "symbols.js", - "types/index.d.ts" + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jason Schilling", + "url": "https://sourecode.de" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Jordan", + "url": "https://github.com/Silic0nS0ldier" + } ], - "main": "index.js", - "types": "./types/index.d.ts", - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "mocha" - }, + "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", "devDependencies": { "decache": "^4.5.1", "gulp-format-md": "^2.0.0", @@ -35,6 +61,15 @@ "mocha": "^6.1.4", "text-table": "^0.2.0" }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "symbols.js", + "types/index.d.ts" + ], + "homepage": "https://github.com/doowb/ansi-colors", "keywords": [ "ansi", "bgblack", @@ -75,6 +110,17 @@ "white", "yellow" ], + "license": "MIT", + "main": "index.js", + "name": "ansi-colors", + "repository": { + "type": "git", + "url": "git+https://github.com/doowb/ansi-colors.git" + }, + "scripts": { + "test": "mocha" + }, + "types": "./types/index.d.ts", "verb": { "toc": false, "layout": "default", @@ -105,5 +151,6 @@ "colors", "kleur" ] - } -} \ No newline at end of file + }, + "version": "4.1.1" +} diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json index cbf44fadd..3bdabc2cd 100644 --- a/node_modules/ansi-regex/package.json +++ b/node_modules/ansi-regex/package.json @@ -1,24 +1,54 @@ { - "name": "ansi-regex", - "version": "4.1.0", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", + "_args": [ + [ + "ansi-regex@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-regex@4.1.0", + "_id": "ansi-regex@4.1.0", + "_inBundle": false, + "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-regex@4.1.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/ansi-align/strip-ansi", + "/table/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, "files": [ "index.js" ], + "homepage": "https://github.com/chalk/ansi-regex#readme", "keywords": [ "ansi", "styles", @@ -46,8 +76,15 @@ "find", "pattern" ], - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "4.1.0" +} diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json index a5eb4ff0f..670345c16 100644 --- a/node_modules/ansi-styles/package.json +++ b/node_modules/ansi-styles/package.json @@ -1,24 +1,62 @@ { - "name": "ansi-styles", - "version": "3.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", + "_args": [ + [ + "ansi-styles@3.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-styles@3.2.1", + "_id": "ansi-styles@3.2.1", + "_inBundle": false, + "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-styles@3.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "3.2.1", + "saveSpec": null, + "fetchSpec": "3.2.1" + }, + "_requiredBy": [ + "/chalk", + "/table/slice-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "_spec": "3.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "ava": { + "require": "babel-polyfill" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "color-convert": "^1.9.0" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "ava": "*", + "babel-polyfill": "^6.23.0", + "svg-term-cli": "^2.1.1", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, "files": [ "index.js" ], + "homepage": "https://github.com/chalk/ansi-styles#readme", "keywords": [ "ansi", "styles", @@ -41,16 +79,15 @@ "command-line", "text" ], - "dependencies": { - "color-convert": "^1.9.0" + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" }, - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava" }, - "ava": { - "require": "babel-polyfill" - } -} \ No newline at end of file + "version": "3.2.1" +} diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json index b16de2518..884ec2136 100644 --- a/node_modules/argparse/package.json +++ b/node_modules/argparse/package.json @@ -1,7 +1,58 @@ { - "name": "argparse", + "_args": [ + [ + "argparse@1.0.10", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "argparse@1.0.10", + "_id": "argparse@1.0.10", + "_inBundle": false, + "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "_location": "/argparse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "argparse@1.0.10", + "name": "argparse", + "escapedName": "argparse", + "rawSpec": "1.0.10", + "saveSpec": null, + "fetchSpec": "1.0.10" + }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "_spec": "1.0.10", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/nodeca/argparse/issues" + }, + "contributors": [ + { + "name": "Eugene Shkuropat" + }, + { + "name": "Paul Jacobson" + } + ], + "dependencies": { + "sprintf-js": "~1.0.2" + }, "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "version": "1.0.10", + "devDependencies": { + "eslint": "^2.13.1", + "istanbul": "^0.4.5", + "mocha": "^3.1.0", + "ndoc": "^5.0.1" + }, + "files": [ + "index.js", + "lib/" + ], + "homepage": "https://github.com/nodeca/argparse#readme", "keywords": [ "cli", "parser", @@ -9,26 +60,14 @@ "option", "args" ], - "contributors": [ - "Eugene Shkuropat", - "Paul Jacobson" - ], - "files": [ - "index.js", - "lib/" - ], "license": "MIT", - "repository": "nodeca/argparse", + "name": "argparse", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/argparse.git" + }, "scripts": { "test": "make test" }, - "dependencies": { - "sprintf-js": "~1.0.2" - }, - "devDependencies": { - "eslint": "^2.13.1", - "istanbul": "^0.4.5", - "mocha": "^3.1.0", - "ndoc": "^5.0.1" - } -} \ No newline at end of file + "version": "1.0.10" +} diff --git a/node_modules/array-find-index/package.json b/node_modules/array-find-index/package.json index ed7544350..24cab74cf 100644 --- a/node_modules/array-find-index/package.json +++ b/node_modules/array-find-index/package.json @@ -1,23 +1,53 @@ { - "name": "array-find-index", - "version": "1.0.2", - "description": "ES2015 `Array#findIndex()` ponyfill", - "license": "MIT", - "repository": "sindresorhus/array-find-index", + "_args": [ + [ + "array-find-index@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "array-find-index@1.0.2", + "_id": "array-find-index@1.0.2", + "_inBundle": false, + "_integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "_location": "/array-find-index", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-find-index@1.0.2", + "name": "array-find-index", + "escapedName": "array-find-index", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/currently-unhandled" + ], + "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/array-find-index/issues" + }, + "description": "ES2015 `Array#findIndex()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/array-find-index#readme", "keywords": [ "es2015", "ponyfill", @@ -28,8 +58,14 @@ "findindex", "array" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "array-find-index", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-find-index.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/node_modules/array-includes/package.json b/node_modules/array-includes/package.json index a9ca8a4a6..c8977e8a5 100644 --- a/node_modules/array-includes/package.json +++ b/node_modules/array-includes/package.json @@ -1,13 +1,40 @@ { - "name": "array-includes", - "version": "3.1.1", + "_args": [ + [ + "array-includes@3.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "array-includes@3.1.1", + "_id": "array-includes@3.1.1", + "_inBundle": false, + "_integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "_location": "/array-includes", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-includes@3.1.1", + "name": "array-includes", + "escapedName": "array-includes", + "rawSpec": "3.1.1", + "saveSpec": null, + "fetchSpec": "3.1.1" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "_spec": "3.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bugs": { + "url": "https://github.com/es-shims/array-includes/issues" }, "contributors": [ { @@ -16,40 +43,12 @@ "url": "http://ljharb.codes" } ], - "description": "An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run --silent lint && evalmd README.md", - "test": "npm run --silent tests-only", - "posttest": "npx aud", - "tests-only": "es-shim-api --bound && npm run --silent test:shimmed && npm run --silent test:module", - "test:shimmed": "node test/shimmed.js", - "test:module": "node test/index.js", - "coverage": "covert test/*.js", - "coverage:quiet": "covert test/*.js --quiet", - "lint": "eslint ." - }, - "repository": { - "type": "git", - "url": "git://github.com/es-shims/array-includes.git" - }, - "keywords": [ - "Array.prototype.includes", - "includes", - "array", - "ES7", - "shim", - "polyfill", - "contains", - "Array.prototype.contains", - "es-shim API" - ], "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0", "is-string": "^1.0.5" }, + "description": "An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.", "devDependencies": { "@es-shims/api": "^2.1.2", "@ljharb/eslint-config": "^15.1.0", @@ -62,6 +61,42 @@ "indexof": "^0.0.1", "tape": "^4.12.0" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/es-shims/array-includes#readme", + "keywords": [ + "Array.prototype.includes", + "includes", + "array", + "ES7", + "shim", + "polyfill", + "contains", + "Array.prototype.contains", + "es-shim API" + ], + "license": "MIT", + "main": "index.js", + "name": "array-includes", + "repository": { + "type": "git", + "url": "git://github.com/es-shims/array-includes.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "coverage:quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "posttest": "npx aud", + "pretest": "npm run --silent lint && evalmd README.md", + "test": "npm run --silent tests-only", + "test:module": "node test/index.js", + "test:shimmed": "node test/shimmed.js", + "tests-only": "es-shim-api --bound && npm run --silent test:shimmed && npm run --silent test:module" + }, "testling": { "files": [ "test/index.js", @@ -83,7 +118,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "3.1.1" +} diff --git a/node_modules/array-union/package.json b/node_modules/array-union/package.json index ca61e74cb..1676c30f1 100644 --- a/node_modules/array-union/package.json +++ b/node_modules/array-union/package.json @@ -1,24 +1,57 @@ { - "name": "array-union", - "version": "2.1.0", - "description": "Create an array of unique values, in order, from the input arrays", - "license": "MIT", - "repository": "sindresorhus/array-union", + "_args": [ + [ + "array-union@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "array-union@2.1.0", + "_id": "array-union@2.1.0", + "_inBundle": false, + "_integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "_location": "/array-union", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-union@2.1.0", + "name": "array-union", + "escapedName": "array-union", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree/globby", + "/del/globby", + "/globby" + ], + "_resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/array-union/issues" + }, + "description": "Create an array of unique values, in order, from the input arrays", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/array-union#readme", "keywords": [ "array", "set", @@ -30,9 +63,14 @@ "combine", "merge" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "array-union", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-union.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/array.prototype.flat/package.json b/node_modules/array.prototype.flat/package.json index 8e1e119a0..123135a17 100644 --- a/node_modules/array.prototype.flat/package.json +++ b/node_modules/array.prototype.flat/package.json @@ -1,13 +1,40 @@ { - "name": "array.prototype.flat", - "version": "1.2.3", + "_args": [ + [ + "array.prototype.flat@1.2.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "array.prototype.flat@1.2.3", + "_id": "array.prototype.flat@1.2.3", + "_inBundle": false, + "_integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "_location": "/array.prototype.flat", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array.prototype.flat@1.2.3", + "name": "array.prototype.flat", + "escapedName": "array.prototype.flat", + "rawSpec": "1.2.3", + "saveSpec": null, + "fetchSpec": "1.2.3" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "_spec": "1.2.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bugs": { + "url": "https://github.com/es-shims/Array.prototype.flat/issues" }, "contributors": [ { @@ -16,25 +43,35 @@ "url": "http://ljharb.codes" } ], + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + }, "description": "An ES2019 spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint && evalmd README.md", - "test": "npm run --silent tests-only", - "posttest": "npx aud --production", - "pretests-only": "es-shim-api --bound", - "tests-only": "npm run --silent test:shimmed && npm run --silent test:module", - "test:shimmed": "node test/shimmed", - "test:module": "node test", - "coverage": "nyc npm run tests-only", - "lint": "eslint test/*.js *.js" + "devDependencies": { + "@es-shims/api": "^2.1.2", + "@ljharb/eslint-config": "^15.0.2", + "covert": "^1.1.1", + "eslint": "^6.7.2", + "evalmd": "0.0.19", + "function-bind": "^1.1.1", + "nyc": "^10.3.2", + "object-inspect": "^1.7.0", + "safe-publish-latest": "^1.1.4", + "tape": "^4.11.0" }, - "repository": { - "type": "git", - "url": "git://github.com/es-shims/Array.prototype.flat.git" + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "ignore": [ + "nyc" + ] + }, + "homepage": "https://github.com/es-shims/Array.prototype.flat#readme", "keywords": [ "Array.prototype.flatten", "Array.prototype.flat", @@ -48,21 +85,24 @@ "Array.prototype.flatMap", "es-shim API" ], - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "license": "MIT", + "main": "index.js", + "name": "array.prototype.flat", + "repository": { + "type": "git", + "url": "git://github.com/es-shims/Array.prototype.flat.git" }, - "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^15.0.2", - "covert": "^1.1.1", - "eslint": "^6.7.2", - "evalmd": "0.0.19", - "function-bind": "^1.1.1", - "nyc": "^10.3.2", - "object-inspect": "^1.7.0", - "safe-publish-latest": "^1.1.4", - "tape": "^4.11.0" + "scripts": { + "coverage": "nyc npm run tests-only", + "lint": "eslint test/*.js *.js", + "posttest": "npx aud --production", + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint && evalmd README.md", + "pretests-only": "es-shim-api --bound", + "test": "npm run --silent tests-only", + "test:module": "node test", + "test:shimmed": "node test/shimmed", + "tests-only": "npm run --silent test:shimmed && npm run --silent test:module" }, "testling": { "files": [ @@ -85,12 +125,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "greenkeeper": { - "ignore": [ - "nyc" - ] - } -} \ No newline at end of file + "version": "1.2.3" +} diff --git a/node_modules/arrgv/package.json b/node_modules/arrgv/package.json index 620775aeb..d7ff84fbc 100644 --- a/node_modules/arrgv/package.json +++ b/node_modules/arrgv/package.json @@ -1,25 +1,52 @@ { - "name": "arrgv", - "version": "1.0.2", + "_args": [ + [ + "arrgv@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "arrgv@1.0.2", + "_id": "arrgv@1.0.2", + "_inBundle": false, + "_integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==", + "_location": "/arrgv", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "arrgv@1.0.2", + "name": "arrgv", + "escapedName": "arrgv", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "astur", + "email": "astur@yandex.ru", + "url": "http://kozlov.am/" + }, + "bugs": { + "url": "https://github.com/astur/arrgv/issues" + }, "description": "Parsing string to array of args like node on bash do.", - "main": "index.js", - "author": "astur (http://kozlov.am/)", - "scripts": { - "test": "eslint . && nyc ava -v" - }, - "repository": { - "type": "git", - "url": "https://github.com/astur/arrgv.git" - }, - "engines": { - "node": ">=8.0.0" - }, "devDependencies": { "ava": "^0.25.0", "eslint": "^5.4.0", "eslint-config-astur": "^1.6.1", "nyc": "^12.0.2" }, + "engines": { + "node": ">=8.0.0" + }, + "homepage": "https://github.com/astur/arrgv#readme", "keywords": [ "arguments", "cli", @@ -29,5 +56,15 @@ "args", "argv" ], - "license": "MIT" -} \ No newline at end of file + "license": "MIT", + "main": "index.js", + "name": "arrgv", + "repository": { + "type": "git", + "url": "git+https://github.com/astur/arrgv.git" + }, + "scripts": { + "test": "eslint . && nyc ava -v" + }, + "version": "1.0.2" +} diff --git a/node_modules/arrify/package.json b/node_modules/arrify/package.json index 223b18354..14c7ec985 100644 --- a/node_modules/arrify/package.json +++ b/node_modules/arrify/package.json @@ -1,24 +1,55 @@ { - "name": "arrify", - "version": "2.0.1", - "description": "Convert a value to an array", - "license": "MIT", - "repository": "sindresorhus/arrify", + "_args": [ + [ + "arrify@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "arrify@2.0.1", + "_id": "arrify@2.0.1", + "_inBundle": false, + "_integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "_location": "/arrify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "arrify@2.0.1", + "name": "arrify", + "escapedName": "arrify", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/arrify#readme", "keywords": [ "array", "arrify", @@ -27,9 +58,14 @@ "value", "ensure" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "arrify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.1" +} diff --git a/node_modules/astral-regex/package.json b/node_modules/astral-regex/package.json index 9e7141ad1..2c3cb1a71 100644 --- a/node_modules/astral-regex/package.json +++ b/node_modules/astral-regex/package.json @@ -1,32 +1,68 @@ { - "name": "astral-regex", - "version": "1.0.0", - "description": "Regular expression for matching astral symbols", - "license": "MIT", - "repository": "kevva/astral-regex", + "_args": [ + [ + "astral-regex@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "astral-regex@1.0.0", + "_id": "astral-regex@1.0.0", + "_inBundle": false, + "_integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "_location": "/astral-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "astral-regex@1.0.0", + "name": "astral-regex", + "escapedName": "astral-regex", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/table/slice-ansi" + ], + "_resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Kevin Mårtensson", "email": "kevinmartensson@gmail.com", "url": "github.com/kevva" }, + "bugs": { + "url": "https://github.com/kevva/astral-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching astral symbols", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/kevva/astral-regex#readme", "keywords": [ "astral", "emoji", "regex", "surrogate" ], - "dependencies": {}, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "astral-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/astral-regex.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE new file mode 100644 index 000000000..c9eca5dd9 --- /dev/null +++ b/node_modules/asynckit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md new file mode 100644 index 000000000..ddcc7e6b9 --- /dev/null +++ b/node_modules/asynckit/README.md @@ -0,0 +1,233 @@ +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) + +Minimal async jobs utility library, with streams support. + +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) + +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) + + + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js new file mode 100644 index 000000000..c612f1a55 --- /dev/null +++ b/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js new file mode 100644 index 000000000..455f9454e --- /dev/null +++ b/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js new file mode 100644 index 000000000..114367e5f --- /dev/null +++ b/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js new file mode 100644 index 000000000..7f1288a4c --- /dev/null +++ b/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js new file mode 100644 index 000000000..b67110c7a --- /dev/null +++ b/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js new file mode 100644 index 000000000..5d2839a59 --- /dev/null +++ b/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 000000000..78ad240f0 --- /dev/null +++ b/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 000000000..5d2929f7a --- /dev/null +++ b/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 000000000..782269820 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 000000000..3de89c472 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js new file mode 100644 index 000000000..cbea7ad8f --- /dev/null +++ b/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js new file mode 100644 index 000000000..f56a1c92b --- /dev/null +++ b/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js new file mode 100644 index 000000000..d6eb99219 --- /dev/null +++ b/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json new file mode 100644 index 000000000..0e9cec243 --- /dev/null +++ b/node_modules/asynckit/package.json @@ -0,0 +1,93 @@ +{ + "_from": "asynckit@^0.4.0", + "_id": "asynckit@0.4.0", + "_inBundle": false, + "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "_location": "/asynckit", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "asynckit@^0.4.0", + "name": "asynckit", + "escapedName": "asynckit", + "rawSpec": "^0.4.0", + "saveSpec": null, + "fetchSpec": "^0.4.0" + }, + "_requiredBy": [ + "/@azure/core-http/form-data", + "/@types/node-fetch/form-data", + "/form-data" + ], + "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", + "_spec": "asynckit@^0.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@types/node-fetch/node_modules/form-data", + "author": { + "name": "Alex Indigo", + "email": "iam@alexindigo.com" + }, + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Minimal async jobs utility library, with streams support", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "license": "MIT", + "main": "index.js", + "name": "asynckit", + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "clean": "rimraf coverage", + "debug": "tape test/test-*.js", + "lint": "eslint *.js lib/*.js test/*.js", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js" + }, + "version": "0.4.0" +} diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js new file mode 100644 index 000000000..3c50344d8 --- /dev/null +++ b/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js new file mode 100644 index 000000000..6cd949a67 --- /dev/null +++ b/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js new file mode 100644 index 000000000..607eafea5 --- /dev/null +++ b/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js new file mode 100644 index 000000000..d43465f90 --- /dev/null +++ b/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/node_modules/ava/node_modules/acorn-walk/package.json b/node_modules/ava/node_modules/acorn-walk/package.json index 1cbd11682..36de2fcef 100644 --- a/node_modules/ava/node_modules/acorn-walk/package.json +++ b/node_modules/ava/node_modules/acorn-walk/package.json @@ -1,36 +1,68 @@ { - "name": "acorn-walk", + "_args": [ + [ + "acorn-walk@7.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "acorn-walk@7.1.1", + "_id": "acorn-walk@7.1.1", + "_inBundle": false, + "_integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", + "_location": "/ava/acorn-walk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "acorn-walk@7.1.1", + "name": "acorn-walk", + "escapedName": "acorn-walk", + "rawSpec": "7.1.1", + "saveSpec": null, + "fetchSpec": "7.1.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", + "_spec": "7.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/acornjs/acorn/issues" + }, "description": "ECMAScript (ESTree) AST walker", - "homepage": "https://github.com/acornjs/acorn", - "main": "dist/walk.js", - "types": "dist/walk.d.ts", - "module": "dist/walk.mjs", - "version": "7.1.1", "engines": { "node": ">=0.4.0" }, + "homepage": "https://github.com/acornjs/acorn", + "license": "MIT", + "main": "dist/walk.js", "maintainers": [ { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", - "web": "https://marijnhaverbeke.nl" + "url": "https://marijnhaverbeke.nl" }, { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", - "web": "https://rreverser.com/" + "url": "https://rreverser.com/" }, { "name": "Adrian Heine", - "web": "http://adrianheine.de" + "url": "http://adrianheine.de" } ], + "module": "dist/walk.mjs", + "name": "acorn-walk", "repository": { "type": "git", - "url": "https://github.com/acornjs/acorn.git" + "url": "git+https://github.com/acornjs/acorn.git" }, "scripts": { "prepare": "cd ..; npm run build:walk" }, - "license": "MIT" -} \ No newline at end of file + "types": "dist/walk.d.ts", + "version": "7.1.1" +} diff --git a/node_modules/ava/node_modules/ansi-styles/package.json b/node_modules/ava/node_modules/ansi-styles/package.json index 1a7731952..c46d8d604 100644 --- a/node_modules/ava/node_modules/ansi-styles/package.json +++ b/node_modules/ava/node_modules/ansi-styles/package.json @@ -1,26 +1,63 @@ { - "name": "ansi-styles", - "version": "4.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "_args": [ + [ + "ansi-styles@4.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-styles@4.2.1", + "_id": "ansi-styles@4.2.1", + "_inBundle": false, + "_integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "_location": "/ava/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-styles@4.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "4.2.1", + "saveSpec": null, + "fetchSpec": "4.2.1" + }, + "_requiredBy": [ + "/ava", + "/ava/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "_spec": "4.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", "keywords": [ "ansi", "styles", @@ -43,15 +80,15 @@ "command-line", "text" ], - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.2.1" +} diff --git a/node_modules/ava/node_modules/chalk/package.json b/node_modules/ava/node_modules/chalk/package.json index bb745bb89..9e243c196 100644 --- a/node_modules/ava/node_modules/chalk/package.json +++ b/node_modules/ava/node_modules/chalk/package.json @@ -1,22 +1,61 @@ { - "name": "chalk", - "version": "4.0.0", + "_args": [ + [ + "chalk@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "chalk@4.0.0", + "_id": "chalk@4.0.0", + "_inBundle": false, + "_integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "_location": "/ava/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@4.0.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "main": "source", + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^4.0.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^15.0.0", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.28.2" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "source", "index.d.ts" ], + "funding": "https://github.com/chalk/chalk?sponsor=1", + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -40,21 +79,18 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "license": "MIT", + "main": "source", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && nyc ava && tsd" }, + "version": "4.0.0", "xo": { "rules": { "unicorn/prefer-string-slice": "off", @@ -65,4 +101,4 @@ "unicorn/better-regex": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/ava/node_modules/color-convert/package.json b/node_modules/ava/node_modules/color-convert/package.json index d169f869b..418c7f58a 100644 --- a/node_modules/ava/node_modules/color-convert/package.json +++ b/node_modules/ava/node_modules/color-convert/package.json @@ -1,17 +1,57 @@ { - "name": "color-convert", + "_args": [ + [ + "color-convert@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-convert@2.0.1", + "_id": "color-convert@2.0.1", + "_inBundle": false, + "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "_location": "/ava/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-convert@2.0.1", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/ava/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "~1.1.4" + }, "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" }, "engines": { "node": ">=7.0.0" }, + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", "keywords": [ "color", "colour", @@ -26,23 +66,22 @@ "ansi", "ansi16" ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "2.0.1", "xo": { "rules": { "default-case": 0, "no-inline-comments": 0, "operator-linebreak": 0 } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" } -} \ No newline at end of file +} diff --git a/node_modules/ava/node_modules/color-name/package.json b/node_modules/ava/node_modules/color-name/package.json index fecb8dcfb..707a4e29f 100644 --- a/node_modules/ava/node_modules/color-name/package.json +++ b/node_modules/ava/node_modules/color-name/package.json @@ -1,28 +1,60 @@ { - "name": "color-name", - "version": "1.1.4", + "_args": [ + [ + "color-name@1.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-name@1.1.4", + "_id": "color-name@1.1.4", + "_inBundle": false, + "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "_location": "/ava/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.4", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.4", + "saveSpec": null, + "fetchSpec": "1.1.4" + }, + "_requiredBy": [ + "/ava/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "_spec": "1.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, "description": "A list of color names and its values", - "main": "index.js", "files": [ "index.js" ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, + "homepage": "https://github.com/colorjs/color-name", "keywords": [ "color-name", "color", "color-keyword", "keyword" ], - "author": "DY ", "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/colorjs/color-name.git" }, - "homepage": "https://github.com/colorjs/color-name" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.1.4" +} diff --git a/node_modules/ava/node_modules/escape-string-regexp/package.json b/node_modules/ava/node_modules/escape-string-regexp/package.json index d7bec7c3d..ae971d718 100644 --- a/node_modules/ava/node_modules/escape-string-regexp/package.json +++ b/node_modules/ava/node_modules/escape-string-regexp/package.json @@ -1,28 +1,55 @@ { - "name": "escape-string-regexp", - "version": "2.0.0", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": "sindresorhus/escape-string-regexp", + "_args": [ + [ + "escape-string-regexp@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "escape-string-regexp@2.0.0", + "_id": "escape-string-regexp@2.0.0", + "_inBundle": false, + "_integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "_location": "/ava/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-string-regexp@2.0.0", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/ava/stack-utils" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Boy Nicolai Appelman (jbna.nl)" - ], + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", "keywords": [ "escape", "regex", @@ -35,9 +62,26 @@ "special", "characters" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/ava/node_modules/has-flag/package.json b/node_modules/ava/node_modules/has-flag/package.json index 55d0058e4..8ec4e1dd3 100644 --- a/node_modules/ava/node_modules/has-flag/package.json +++ b/node_modules/ava/node_modules/has-flag/package.json @@ -1,24 +1,55 @@ { - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", + "_args": [ + [ + "has-flag@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-flag@4.0.0", + "_id": "has-flag@4.0.0", + "_inBundle": false, + "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "_location": "/ava/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-flag@4.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/ava/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", "keywords": [ "has", "check", @@ -38,9 +69,14 @@ "minimist", "optimist" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/ava/node_modules/source-map-support/package.json b/node_modules/ava/node_modules/source-map-support/package.json index f15f25283..2c579a19b 100644 --- a/node_modules/ava/node_modules/source-map-support/package.json +++ b/node_modules/ava/node_modules/source-map-support/package.json @@ -1,18 +1,41 @@ { - "name": "source-map-support", - "description": "Fixes stack traces for files with source maps", - "version": "0.5.19", - "main": "./source-map-support.js", - "scripts": { - "build": "node build.js", - "serve-tests": "http-server -p 1336", - "prepublish": "npm run build", - "test": "mocha" + "_args": [ + [ + "source-map-support@0.5.19", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "source-map-support@0.5.19", + "_id": "source-map-support@0.5.19", + "_inBundle": false, + "_integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "_location": "/ava/source-map-support", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "source-map-support@0.5.19", + "name": "source-map-support", + "escapedName": "source-map-support", + "rawSpec": "0.5.19", + "saveSpec": null, + "fetchSpec": "0.5.19" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "_spec": "0.5.19", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/evanw/node-source-map-support/issues" }, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" }, + "description": "Fixes stack traces for files with source maps", "devDependencies": { "browserify": "^4.2.3", "coffeescript": "^1.12.7", @@ -20,12 +43,19 @@ "mocha": "^3.5.3", "webpack": "^1.15.0" }, + "homepage": "https://github.com/evanw/node-source-map-support#readme", + "license": "MIT", + "main": "./source-map-support.js", + "name": "source-map-support", "repository": { "type": "git", - "url": "https://github.com/evanw/node-source-map-support" + "url": "git+https://github.com/evanw/node-source-map-support.git" }, - "bugs": { - "url": "https://github.com/evanw/node-source-map-support/issues" + "scripts": { + "build": "node build.js", + "prepublish": "npm run build", + "serve-tests": "http-server -p 1336", + "test": "mocha" }, - "license": "MIT" -} \ No newline at end of file + "version": "0.5.19" +} diff --git a/node_modules/ava/node_modules/stack-utils/package.json b/node_modules/ava/node_modules/stack-utils/package.json index 186d32844..2930949c0 100644 --- a/node_modules/ava/node_modules/stack-utils/package.json +++ b/node_modules/ava/node_modules/stack-utils/package.json @@ -1,29 +1,45 @@ { - "name": "stack-utils", - "version": "2.0.2", - "description": "Captures and cleans stack traces", - "license": "MIT", - "repository": "tapjs/stack-utils", + "_args": [ + [ + "stack-utils@2.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "stack-utils@2.0.2", + "_id": "stack-utils@2.0.2", + "_inBundle": false, + "_integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==", + "_location": "/ava/stack-utils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "stack-utils@2.0.2", + "name": "stack-utils", + "escapedName": "stack-utils", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "James Talmage", "email": "james@talmage.io", "url": "github.com/jamestalmage" }, - "engines": { - "node": ">=10" + "bugs": { + "url": "https://github.com/tapjs/stack-utils/issues" }, - "scripts": { - "test": "tap --no-esm --100", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "files": [ - "index.js" - ], "dependencies": { "escape-string-regexp": "^2.0.0" }, + "description": "Captures and cleans stack traces", "devDependencies": { "bluebird": "^3.7.2", "coveralls": "^3.0.9", @@ -31,5 +47,25 @@ "pify": "^4.0.1", "q": "^1.5.1", "tap": "=14.10.2-unbundled" - } -} \ No newline at end of file + }, + "engines": { + "node": ">=10" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/tapjs/stack-utils#readme", + "license": "MIT", + "name": "stack-utils", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/stack-utils.git" + }, + "scripts": { + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "preversion": "npm test", + "test": "tap --no-esm --100" + }, + "version": "2.0.2" +} diff --git a/node_modules/ava/node_modules/supports-color/package.json b/node_modules/ava/node_modules/supports-color/package.json index 79856038d..cfbb6bb5a 100644 --- a/node_modules/ava/node_modules/supports-color/package.json +++ b/node_modules/ava/node_modules/supports-color/package.json @@ -1,24 +1,59 @@ { - "name": "supports-color", - "version": "7.1.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", + "_args": [ + [ + "supports-color@7.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "supports-color@7.1.0", + "_id": "supports-color@7.1.0", + "_inBundle": false, + "_integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "_location": "/ava/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "supports-color@7.1.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "7.1.0", + "saveSpec": null, + "fetchSpec": "7.1.0" + }, + "_requiredBy": [ + "/ava/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "_spec": "7.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": { + "has-flag": "^4.0.0" + }, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "browser.js" ], + "homepage": "https://github.com/chalk/supports-color#readme", "keywords": [ "color", "colour", @@ -41,13 +76,14 @@ "truecolor", "16m" ], - "dependencies": { - "has-flag": "^4.0.0" + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "7.1.0" +} diff --git a/node_modules/ava/package.json b/node_modules/ava/package.json index 03146bb13..64d8ecef3 100644 --- a/node_modules/ava/package.json +++ b/node_modules/ava/package.json @@ -1,59 +1,43 @@ { - "name": "ava", - "version": "3.8.1", - "description": "Testing can be a drag. AVA helps you get it done.", - "license": "MIT", - "repository": "avajs/ava", - "homepage": "https://avajs.dev", - "bin": "cli.js", - "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0 <14 || >=14.0.0" - }, - "scripts": { - "test": "xo && tsd && c8 tap" - }, - "files": [ - "lib", - "*.js", - "!*.config.js", - "index.d.ts" + "_args": [ + [ + "ava@3.8.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "keywords": [ - "🦄", - "test", - "runner", - "testing", - "ava", - "concurrent", - "parallel", - "fast", - "tdd", - "cli-app", - "cli", - "jest", - "mocha", - "tape", - "tap", - "qunit", - "jasmine", - "babel", - "assert", - "assertion", - "promise", - "promises", - "async", - "function", - "await", - "generator", - "generators", - "yield", - "observable", - "observables", - "unit", - "snapshot", - "expect", - "typescript" + "_development": true, + "_from": "ava@3.8.1", + "_id": "ava@3.8.1", + "_inBundle": false, + "_integrity": "sha512-OPWrTxcf1EbtAaGGFQPLbx4AaVqPrFMumKOKn2SzIRo+RTKb33lF2aoVnWqBeZaJ68uSc9R6jqIE7qkG6O33uQ==", + "_location": "/ava", + "_phantomChildren": { + "@types/color-name": "1.1.1", + "buffer-from": "1.1.1", + "source-map": "0.6.1" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "ava@3.8.1", + "name": "ava", + "escapedName": "ava", + "rawSpec": "3.8.1", + "saveSpec": null, + "fetchSpec": "3.8.1" + }, + "_requiredBy": [ + "#DEV:/" ], + "_resolved": "https://registry.npmjs.org/ava/-/ava-3.8.1.tgz", + "_spec": "3.8.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "ava": "cli.js" + }, + "bugs": { + "url": "https://github.com/avajs/ava/issues" + }, "dependencies": { "@concordance/react": "^2.0.0", "acorn": "^7.1.1", @@ -111,6 +95,7 @@ "write-file-atomic": "^3.0.3", "yargs": "^15.3.1" }, + "description": "Testing can be a drag. AVA helps you get it done.", "devDependencies": { "@ava/babel": "^1.0.1", "@babel/plugin-proposal-do-expressions": "^7.8.3", @@ -136,5 +121,61 @@ "typescript": "^3.8.3", "xo": "^0.30.0", "zen-observable": "^0.8.15" - } -} \ No newline at end of file + }, + "engines": { + "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0 <14 || >=14.0.0" + }, + "files": [ + "lib", + "*.js", + "!*.config.js", + "index.d.ts" + ], + "homepage": "https://avajs.dev", + "keywords": [ + "🦄", + "test", + "runner", + "testing", + "ava", + "concurrent", + "parallel", + "fast", + "tdd", + "cli-app", + "cli", + "jest", + "mocha", + "tape", + "tap", + "qunit", + "jasmine", + "babel", + "assert", + "assertion", + "promise", + "promises", + "async", + "function", + "await", + "generator", + "generators", + "yield", + "observable", + "observables", + "unit", + "snapshot", + "expect", + "typescript" + ], + "license": "MIT", + "name": "ava", + "repository": { + "type": "git", + "url": "git+https://github.com/avajs/ava.git" + }, + "scripts": { + "test": "xo && tsd && c8 tap" + }, + "version": "3.8.1" +} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json index 55ba6f00e..a7c43f739 100644 --- a/node_modules/balanced-match/package.json +++ b/node_modules/balanced-match/package.json @@ -1,22 +1,48 @@ { - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" + "_args": [ + [ + "balanced-match@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "balanced-match@1.0.0", + "_id": "balanced-match@1.0.0", + "_inBundle": false, + "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "_location": "/balanced-match", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "balanced-match@1.0.0", + "name": "balanced-match", + "escapedName": "balanced-match", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "make test", - "bench": "make bench" + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" }, "dependencies": {}, + "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { "matcha": "^0.7.0", "tape": "^4.6.0" }, + "homepage": "https://github.com/juliangruber/balanced-match", "keywords": [ "match", "regexp", @@ -24,12 +50,17 @@ "balanced", "parse" ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, "license": "MIT", + "main": "index.js", + "name": "balanced-match", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "bench": "make bench", + "test": "make test" + }, "testling": { "files": "test/*.js", "browsers": [ @@ -45,5 +76,6 @@ "iphone/6.0..latest", "android-browser/4.2..latest" ] - } -} \ No newline at end of file + }, + "version": "1.0.0" +} diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json index ddd5acbe7..c5b82cbe6 100644 --- a/node_modules/before-after-hook/package.json +++ b/node_modules/before-after-hook/package.json @@ -1,45 +1,40 @@ { - "name": "before-after-hook", - "version": "2.1.0", - "description": "asynchronous before/error/after hooks for internal functionality", - "files": [ - "index.js", - "index.d.ts", - "lib" + "_args": [ + [ + "before-after-hook@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "types": "./index.d.ts", - "scripts": { - "prebuild": "rimraf dist && mkdirp dist", - "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", - "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", - "pretest": "standard", - "test": "npm run -s test:node | tap-spec", - "posttest": "npm run validate:ts", - "test:node": "node test", - "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", - "test:coverage": "istanbul cover test", - "test:coverage:upload": "istanbul-coveralls", - "validate:ts": "tsc --strict --target es6 index.d.ts", - "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", - "presemantic-release": "npm run build", - "semantic-release": "semantic-release" + "_from": "before-after-hook@2.1.0", + "_id": "before-after-hook@2.1.0", + "_inBundle": false, + "_integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "_location": "/before-after-hook", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "before-after-hook@2.1.0", + "name": "before-after-hook", + "escapedName": "before-after-hook", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" }, - "repository": { - "type": "git", - "url": "https://github.com/gr2m/before-after-hook.git" - }, - "keywords": [ - "hook", - "hooks", - "api" + "_requiredBy": [ + "/@octokit/core" ], - "author": "Gregor Martynus", - "license": "Apache-2.0", + "_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Gregor Martynus" + }, "bugs": { "url": "https://github.com/gr2m/before-after-hook/issues" }, - "homepage": "https://github.com/gr2m/before-after-hook#readme", "dependencies": {}, + "description": "asynchronous before/error/after hooks for internal functionality", "devDependencies": { "browserify": "^16.0.0", "gaze-cli": "^0.2.0", @@ -56,6 +51,19 @@ "typescript": "^3.5.3", "uglify-js": "^3.0.0" }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/gr2m/before-after-hook#readme", + "keywords": [ + "hook", + "hooks", + "api" + ], + "license": "Apache-2.0", + "name": "before-after-hook", "release": { "publish": [ "@semantic-release/npm", @@ -66,5 +74,27 @@ ] } ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/before-after-hook.git" + }, + "scripts": { + "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", + "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", + "posttest": "npm run validate:ts", + "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", + "prebuild": "rimraf dist && mkdirp dist", + "presemantic-release": "npm run build", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "npm run -s test:node | tap-spec", + "test:coverage": "istanbul cover test", + "test:coverage:upload": "istanbul-coveralls", + "test:node": "node test", + "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", + "validate:ts": "tsc --strict --target es6 index.d.ts" + }, + "types": "./index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/binary-extensions/package.json b/node_modules/binary-extensions/package.json index e1ec6292f..94d68e938 100644 --- a/node_modules/binary-extensions/package.json +++ b/node_modules/binary-extensions/package.json @@ -1,26 +1,57 @@ { - "name": "binary-extensions", - "version": "2.0.0", - "description": "List of binary file extensions", - "license": "MIT", - "repository": "sindresorhus/binary-extensions", + "_args": [ + [ + "binary-extensions@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "binary-extensions@2.0.0", + "_id": "binary-extensions@2.0.0", + "_inBundle": false, + "_integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "_location": "/binary-extensions", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "binary-extensions@2.0.0", + "name": "binary-extensions", + "escapedName": "binary-extensions", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/is-binary-path" + ], + "_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/binary-extensions/issues" + }, + "description": "List of binary file extensions", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "binary-extensions.json", "binary-extensions.json.d.ts" ], + "homepage": "https://github.com/sindresorhus/binary-extensions#readme", "keywords": [ "binary", "extensions", @@ -30,9 +61,14 @@ "list", "array" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "binary-extensions", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/binary-extensions.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/blueimp-md5/package.json b/node_modules/blueimp-md5/package.json index c7b89fc14..7fd93c949 100644 --- a/node_modules/blueimp-md5/package.json +++ b/node_modules/blueimp-md5/package.json @@ -1,28 +1,47 @@ { - "name": "blueimp-md5", - "version": "2.15.0", - "title": "JavaScript MD5", - "description": "JavaScript MD5 implementation. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.", - "keywords": [ - "javascript", - "md5" + "_args": [ + [ + "blueimp-md5@2.15.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/blueimp/JavaScript-MD5", + "_development": true, + "_from": "blueimp-md5@2.15.0", + "_id": "blueimp-md5@2.15.0", + "_inBundle": false, + "_integrity": "sha512-Zc6sowqlCWu3+V0bocZwdaPPXlRv14EHtYcQDCOghj9EdyKLMkAOODBh3HHAx5r7QRylDYCOaXa/b/edgBLDpA==", + "_location": "/blueimp-md5", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "blueimp-md5@2.15.0", + "name": "blueimp-md5", + "escapedName": "blueimp-md5", + "rawSpec": "2.15.0", + "saveSpec": null, + "fetchSpec": "2.15.0" + }, + "_requiredBy": [ + "/md5-hex" + ], + "_resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.15.0.tgz", + "_spec": "2.15.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sebastian Tschan", "url": "https://blueimp.net" }, + "bugs": { + "url": "https://github.com/blueimp/JavaScript-MD5/issues" + }, "contributors": [ { "name": "Paul Johnston", "url": "http://pajhome.org.uk/crypt/md5" } ], - "repository": { - "type": "git", - "url": "git://github.com/blueimp/JavaScript-MD5.git" - }, - "license": "MIT", + "description": "JavaScript MD5 implementation. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.", "devDependencies": { "chai": "4", "eslint": "6", @@ -49,6 +68,18 @@ "js/*.min.js", "test/vendor" ], + "files": [ + "js/*.js", + "js/*.js.map" + ], + "homepage": "https://github.com/blueimp/JavaScript-MD5", + "keywords": [ + "javascript", + "md5" + ], + "license": "MIT", + "main": "js/md5.js", + "name": "blueimp-md5", "prettier": { "arrowParens": "avoid", "proseWrap": "always", @@ -56,18 +87,19 @@ "singleQuote": true, "trailingComma": "none" }, - "scripts": { - "lint": "eslint .", - "unit": "mocha", - "test": "npm run lint && npm run unit", - "build": "cd js && uglifyjs md5.js -c -m -o md5.min.js --source-map url=md5.min.js.map", - "preversion": "npm test", - "version": "npm run build && git add -A js", - "postversion": "git push --tags origin master master:gh-pages && npm publish" + "repository": { + "type": "git", + "url": "git://github.com/blueimp/JavaScript-MD5.git" }, - "files": [ - "js/*.js", - "js/*.js.map" - ], - "main": "js/md5.js" -} \ No newline at end of file + "scripts": { + "build": "cd js && uglifyjs md5.js -c -m -o md5.min.js --source-map url=md5.min.js.map", + "lint": "eslint .", + "postversion": "git push --tags origin master master:gh-pages && npm publish", + "preversion": "npm test", + "test": "npm run lint && npm run unit", + "unit": "mocha", + "version": "npm run build && git add -A js" + }, + "title": "JavaScript MD5", + "version": "2.15.0" +} diff --git a/node_modules/bottleneck/package.json b/node_modules/bottleneck/package.json index 8abb77421..5d1965dc6 100644 --- a/node_modules/bottleneck/package.json +++ b/node_modules/bottleneck/package.json @@ -1,38 +1,40 @@ { - "name": "bottleneck", - "version": "2.19.5", - "description": "Distributed task scheduler and rate limiter", - "main": "lib/index.js", - "typings": "bottleneck.d.ts", - "scripts": { - "test": "mocha test", - "test-all": "./scripts/test_all.sh" - }, - "repository": { - "type": "git", - "url": "https://github.com/SGrondin/bottleneck" - }, - "keywords": [ - "async rate limiter", - "rate limiter", - "rate limiting", - "async", - "rate", - "limiting", - "limiter", - "throttle", - "throttling", - "throttler", - "load", - "clustering" + "_args": [ + [ + "bottleneck@2.19.5", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_from": "bottleneck@2.19.5", + "_id": "bottleneck@2.19.5", + "_inBundle": false, + "_integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "_location": "/bottleneck", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "bottleneck@2.19.5", + "name": "bottleneck", + "escapedName": "bottleneck", + "rawSpec": "2.19.5", + "saveSpec": null, + "fetchSpec": "2.19.5" + }, + "_requiredBy": [ + "/@octokit/plugin-retry" + ], + "_resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "_spec": "2.19.5", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Simon Grondin" }, - "license": "MIT", "bugs": { "url": "https://github.com/SGrondin/bottleneck/issues" }, + "dependencies": {}, + "description": "Distributed task scheduler and rate limiter", "devDependencies": { "@babel/core": "^7.5.0", "@babel/preset-env": "^7.5.0", @@ -52,5 +54,32 @@ "rollup-plugin-node-resolve": "^3.4.0", "typescript": "^2.6.2" }, - "dependencies": {} -} \ No newline at end of file + "homepage": "https://github.com/SGrondin/bottleneck#readme", + "keywords": [ + "async rate limiter", + "rate limiter", + "rate limiting", + "async", + "rate", + "limiting", + "limiter", + "throttle", + "throttling", + "throttler", + "load", + "clustering" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "bottleneck", + "repository": { + "type": "git", + "url": "git+https://github.com/SGrondin/bottleneck.git" + }, + "scripts": { + "test": "mocha test", + "test-all": "./scripts/test_all.sh" + }, + "typings": "bottleneck.d.ts", + "version": "2.19.5" +} diff --git a/node_modules/boxen/node_modules/ansi-styles/package.json b/node_modules/boxen/node_modules/ansi-styles/package.json index 1a7731952..fa20effa4 100644 --- a/node_modules/boxen/node_modules/ansi-styles/package.json +++ b/node_modules/boxen/node_modules/ansi-styles/package.json @@ -1,26 +1,62 @@ { - "name": "ansi-styles", - "version": "4.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "_args": [ + [ + "ansi-styles@4.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-styles@4.2.1", + "_id": "ansi-styles@4.2.1", + "_inBundle": false, + "_integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "_location": "/boxen/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-styles@4.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "4.2.1", + "saveSpec": null, + "fetchSpec": "4.2.1" + }, + "_requiredBy": [ + "/boxen/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "_spec": "4.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", "keywords": [ "ansi", "styles", @@ -43,15 +79,15 @@ "command-line", "text" ], - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.2.1" +} diff --git a/node_modules/boxen/node_modules/chalk/package.json b/node_modules/boxen/node_modules/chalk/package.json index b68e931e7..551617502 100644 --- a/node_modules/boxen/node_modules/chalk/package.json +++ b/node_modules/boxen/node_modules/chalk/package.json @@ -1,21 +1,60 @@ { - "name": "chalk", - "version": "3.0.0", + "_args": [ + [ + "chalk@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "chalk@3.0.0", + "_id": "chalk@3.0.0", + "_inBundle": false, + "_integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "_location": "/boxen/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@3.0.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "main": "source", + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^3.2.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^14.1.1", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "source", "index.d.ts" ], + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -39,25 +78,22 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "license": "MIT", + "main": "source", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^3.2.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^14.1.1", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.25.3" + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && nyc ava && tsd" }, + "version": "3.0.0", "xo": { "rules": { "unicorn/prefer-string-slice": "off", "unicorn/prefer-includes": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/boxen/node_modules/color-convert/package.json b/node_modules/boxen/node_modules/color-convert/package.json index d169f869b..dbdde2dca 100644 --- a/node_modules/boxen/node_modules/color-convert/package.json +++ b/node_modules/boxen/node_modules/color-convert/package.json @@ -1,17 +1,57 @@ { - "name": "color-convert", + "_args": [ + [ + "color-convert@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-convert@2.0.1", + "_id": "color-convert@2.0.1", + "_inBundle": false, + "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "_location": "/boxen/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-convert@2.0.1", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/boxen/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "~1.1.4" + }, "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" }, "engines": { "node": ">=7.0.0" }, + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", "keywords": [ "color", "colour", @@ -26,23 +66,22 @@ "ansi", "ansi16" ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "2.0.1", "xo": { "rules": { "default-case": 0, "no-inline-comments": 0, "operator-linebreak": 0 } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" } -} \ No newline at end of file +} diff --git a/node_modules/boxen/node_modules/color-name/package.json b/node_modules/boxen/node_modules/color-name/package.json index fecb8dcfb..b88429818 100644 --- a/node_modules/boxen/node_modules/color-name/package.json +++ b/node_modules/boxen/node_modules/color-name/package.json @@ -1,28 +1,60 @@ { - "name": "color-name", - "version": "1.1.4", + "_args": [ + [ + "color-name@1.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-name@1.1.4", + "_id": "color-name@1.1.4", + "_inBundle": false, + "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "_location": "/boxen/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.4", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.4", + "saveSpec": null, + "fetchSpec": "1.1.4" + }, + "_requiredBy": [ + "/boxen/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "_spec": "1.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, "description": "A list of color names and its values", - "main": "index.js", "files": [ "index.js" ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, + "homepage": "https://github.com/colorjs/color-name", "keywords": [ "color-name", "color", "color-keyword", "keyword" ], - "author": "DY ", "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/colorjs/color-name.git" }, - "homepage": "https://github.com/colorjs/color-name" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.1.4" +} diff --git a/node_modules/boxen/node_modules/has-flag/package.json b/node_modules/boxen/node_modules/has-flag/package.json index 55d0058e4..0a766f3db 100644 --- a/node_modules/boxen/node_modules/has-flag/package.json +++ b/node_modules/boxen/node_modules/has-flag/package.json @@ -1,24 +1,55 @@ { - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", + "_args": [ + [ + "has-flag@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-flag@4.0.0", + "_id": "has-flag@4.0.0", + "_inBundle": false, + "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "_location": "/boxen/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-flag@4.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/boxen/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", "keywords": [ "has", "check", @@ -38,9 +69,14 @@ "minimist", "optimist" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/boxen/node_modules/supports-color/package.json b/node_modules/boxen/node_modules/supports-color/package.json index 79856038d..9578d9d33 100644 --- a/node_modules/boxen/node_modules/supports-color/package.json +++ b/node_modules/boxen/node_modules/supports-color/package.json @@ -1,24 +1,59 @@ { - "name": "supports-color", - "version": "7.1.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", + "_args": [ + [ + "supports-color@7.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "supports-color@7.1.0", + "_id": "supports-color@7.1.0", + "_inBundle": false, + "_integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "_location": "/boxen/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "supports-color@7.1.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "7.1.0", + "saveSpec": null, + "fetchSpec": "7.1.0" + }, + "_requiredBy": [ + "/boxen/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "_spec": "7.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": { + "has-flag": "^4.0.0" + }, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "browser.js" ], + "homepage": "https://github.com/chalk/supports-color#readme", "keywords": [ "color", "colour", @@ -41,13 +76,14 @@ "truecolor", "16m" ], - "dependencies": { - "has-flag": "^4.0.0" + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "7.1.0" +} diff --git a/node_modules/boxen/node_modules/type-fest/package.json b/node_modules/boxen/node_modules/type-fest/package.json index 4ae131df3..f7f357965 100644 --- a/node_modules/boxen/node_modules/type-fest/package.json +++ b/node_modules/boxen/node_modules/type-fest/package.json @@ -1,24 +1,58 @@ { - "name": "type-fest", - "version": "0.8.1", - "description": "A collection of essential TypeScript types", - "license": "(MIT OR CC0-1.0)", - "repository": "sindresorhus/type-fest", + "_args": [ + [ + "type-fest@0.8.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "type-fest@0.8.1", + "_id": "type-fest@0.8.1", + "_inBundle": false, + "_integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "_location": "/boxen/type-fest", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "type-fest@0.8.1", + "name": "type-fest", + "escapedName": "type-fest", + "rawSpec": "0.8.1", + "saveSpec": null, + "fetchSpec": "0.8.1" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "_spec": "0.8.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/type-fest/issues" + }, + "description": "A collection of essential TypeScript types", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.4.0", + "@typescript-eslint/eslint-plugin": "^2.2.0", + "@typescript-eslint/parser": "^2.2.0", + "eslint-config-xo-typescript": "^0.18.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && tsd" - }, "files": [ "index.d.ts", "source" ], + "homepage": "https://github.com/sindresorhus/type-fest#readme", "keywords": [ "typescript", "ts", @@ -30,14 +64,16 @@ "merge", "json" ], - "devDependencies": { - "@sindresorhus/tsconfig": "^0.4.0", - "@typescript-eslint/eslint-plugin": "^2.2.0", - "@typescript-eslint/parser": "^2.2.0", - "eslint-config-xo-typescript": "^0.18.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" + "license": "(MIT OR CC0-1.0)", + "name": "type-fest", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/type-fest.git" }, + "scripts": { + "test": "xo && tsd" + }, + "version": "0.8.1", "xo": { "extends": "xo-typescript", "extensions": [ @@ -48,4 +84,4 @@ "@typescript-eslint/indent": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/boxen/package.json b/node_modules/boxen/package.json index 9ecbd6db5..09814bcb1 100644 --- a/node_modules/boxen/package.json +++ b/node_modules/boxen/package.json @@ -1,25 +1,69 @@ { - "name": "boxen", - "version": "4.2.0", - "description": "Create boxes in the terminal", - "license": "MIT", - "repository": "sindresorhus/boxen", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "boxen@4.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "boxen@4.2.0", + "_id": "boxen@4.2.0", + "_inBundle": false, + "_integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "_location": "/boxen", + "_phantomChildren": { + "@types/color-name": "1.1.1" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "boxen@4.2.0", + "name": "boxen", + "escapedName": "boxen", + "rawSpec": "4.2.0", + "saveSpec": null, + "fetchSpec": "4.2.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "_spec": "4.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/boxen/issues" + }, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "description": "Create boxes in the terminal", + "devDependencies": { + "ava": "^2.1.0", + "nyc": "^14.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/boxen#readme", "keywords": [ "cli", "box", @@ -32,20 +76,14 @@ "border", "text" ], - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "cli-boxes": "^2.2.0", - "string-width": "^4.1.0", - "term-size": "^2.1.0", - "type-fest": "^0.8.1", - "widest-line": "^3.1.0" + "license": "MIT", + "name": "boxen", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/boxen.git" }, - "devDependencies": { - "ava": "^2.1.0", - "nyc": "^14.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "version": "4.2.0" +} diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json index c8e652883..6c352b6de 100644 --- a/node_modules/brace-expansion/package.json +++ b/node_modules/brace-expansion/package.json @@ -1,33 +1,64 @@ { - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.11", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" + "_args": [ + [ + "brace-expansion@1.1.11", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "brace-expansion@1.1.11", + "_id": "brace-expansion@1.1.11", + "_inBundle": false, + "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "_location": "/brace-expansion", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "brace-expansion@1.1.11", + "name": "brace-expansion", + "escapedName": "brace-expansion", + "rawSpec": "1.1.11", + "saveSpec": null, + "fetchSpec": "1.1.11" }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [], + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "_spec": "1.1.11", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], "license": "MIT", + "main": "index.js", + "name": "brace-expansion", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, "testling": { "files": "test/*.js", "browsers": [ @@ -43,5 +74,6 @@ "iphone/6.0..latest", "android-browser/4.2..latest" ] - } -} \ No newline at end of file + }, + "version": "1.1.11" +} diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json index da327631e..6c97facc3 100644 --- a/node_modules/braces/package.json +++ b/node_modules/braces/package.json @@ -1,42 +1,81 @@ { - "name": "braces", - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "version": "3.0.2", - "homepage": "https://github.com/micromatch/braces", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Elan Shanker (https://github.com/es128)", - "Eugene Sharygin (https://github.com/eush77)", - "hemanth.hm (http://h3manth.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" + "_args": [ + [ + "braces@3.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "micromatch/braces", + "_development": true, + "_from": "braces@3.0.2", + "_id": "braces@3.0.2", + "_inBundle": false, + "_integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "_location": "/braces", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "braces@3.0.2", + "name": "braces", + "escapedName": "braces", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/chokidar", + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/micromatch/braces/issues" }, - "license": "MIT", - "files": [ - "index.js", - "lib" + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Eugene Sharygin", + "url": "https://github.com/eush77" + }, + { + "name": "hemanth.hm", + "url": "http://h3manth.com" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "mocha", - "benchmark": "node benchmark" - }, "dependencies": { "fill-range": "^7.0.1" }, + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", "devDependencies": { "ansi-colors": "^3.2.4", "bash-path": "^2.0.1", "gulp-format-md": "^2.0.0", "mocha": "^6.1.1" }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/micromatch/braces", "keywords": [ "alpha", "alphabetical", @@ -61,6 +100,17 @@ "ranges", "sh" ], + "license": "MIT", + "main": "index.js", + "name": "braces", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/braces.git" + }, + "scripts": { + "benchmark": "node benchmark", + "test": "mocha" + }, "verb": { "toc": false, "layout": "default", @@ -73,5 +123,6 @@ "plugins": [ "gulp-format-md" ] - } -} \ No newline at end of file + }, + "version": "3.0.2" +} diff --git a/node_modules/buffer-from/package.json b/node_modules/buffer-from/package.json index 22277b00f..09128a7d5 100644 --- a/node_modules/buffer-from/package.json +++ b/node_modules/buffer-from/package.json @@ -1,19 +1,56 @@ { - "name": "buffer-from", - "version": "1.1.1", - "license": "MIT", - "repository": "LinusU/buffer-from", - "files": [ - "index.js" + "_args": [ + [ + "buffer-from@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "test": "standard && node test" + "_development": true, + "_from": "buffer-from@1.1.1", + "_id": "buffer-from@1.1.1", + "_inBundle": false, + "_integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "_location": "/buffer-from", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "buffer-from@1.1.1", + "name": "buffer-from", + "escapedName": "buffer-from", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" }, + "_requiredBy": [ + "/ava/source-map-support" + ], + "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/LinusU/buffer-from/issues" + }, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.", "devDependencies": { "standard": "^7.1.2" }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-from#readme", "keywords": [ "buffer", "buffer from" - ] -} \ No newline at end of file + ], + "license": "MIT", + "name": "buffer-from", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-from.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.1.1" +} diff --git a/node_modules/cacheable-request/node_modules/get-stream/package.json b/node_modules/cacheable-request/node_modules/get-stream/package.json index 7c86cfc9f..5876b4f93 100644 --- a/node_modules/cacheable-request/node_modules/get-stream/package.json +++ b/node_modules/cacheable-request/node_modules/get-stream/package.json @@ -1,25 +1,61 @@ { - "name": "get-stream", - "version": "5.1.0", - "description": "Get a stream as a string, buffer, or array", - "license": "MIT", - "repository": "sindresorhus/get-stream", + "_args": [ + [ + "get-stream@5.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "get-stream@5.1.0", + "_id": "get-stream@5.1.0", + "_inBundle": false, + "_integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "_location": "/cacheable-request/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stream@5.1.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "5.1.0", + "saveSpec": null, + "fetchSpec": "5.1.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "_spec": "5.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": { + "pump": "^3.0.0" + }, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "@types/node": "^11.13.0", + "ava": "^1.4.1", + "into-stream": "^5.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "buffer-stream.js" ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", "keywords": [ "get", "stream", @@ -36,14 +72,14 @@ "array", "object" ], - "dependencies": { - "pump": "^3.0.0" + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" }, - "devDependencies": { - "@types/node": "^11.13.0", - "ava": "^1.4.1", - "into-stream": "^5.0.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.1.0" +} diff --git a/node_modules/cacheable-request/node_modules/lowercase-keys/package.json b/node_modules/cacheable-request/node_modules/lowercase-keys/package.json index f9e75a348..a5e945c27 100644 --- a/node_modules/cacheable-request/node_modules/lowercase-keys/package.json +++ b/node_modules/cacheable-request/node_modules/lowercase-keys/package.json @@ -1,24 +1,55 @@ { - "name": "lowercase-keys", - "version": "2.0.0", - "description": "Lowercase the keys of an object", - "license": "MIT", - "repository": "sindresorhus/lowercase-keys", + "_args": [ + [ + "lowercase-keys@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lowercase-keys@2.0.0", + "_id": "lowercase-keys@2.0.0", + "_inBundle": false, + "_integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "_location": "/cacheable-request/lowercase-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lowercase-keys@2.0.0", + "name": "lowercase-keys", + "escapedName": "lowercase-keys", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/lowercase-keys/issues" + }, + "description": "Lowercase the keys of an object", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/lowercase-keys#readme", "keywords": [ "object", "assign", @@ -30,9 +61,14 @@ "keys", "key" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "lowercase-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lowercase-keys.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/cacheable-request/package.json b/node_modules/cacheable-request/package.json index ba9468bd6..45040ea8b 100644 --- a/node_modules/cacheable-request/package.json +++ b/node_modules/cacheable-request/package.json @@ -1,33 +1,43 @@ { - "name": "cacheable-request", - "version": "6.1.0", - "description": "Wrap native HTTP requests with RFC compliant cache support", - "license": "MIT", - "repository": "lukechilds/cacheable-request", - "author": "Luke Childs (http://lukechilds.co.uk)", - "main": "src/index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "src" + "_args": [ + [ + "cacheable-request@6.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "keywords": [ - "HTTP", - "HTTPS", - "cache", - "caching", - "layer", - "cacheable", - "RFC 7234", - "RFC", - "7234", - "compliant" + "_development": true, + "_from": "cacheable-request@6.1.0", + "_id": "cacheable-request@6.1.0", + "_inBundle": false, + "_integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "_location": "/cacheable-request", + "_phantomChildren": { + "pump": "3.0.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "cacheable-request@6.1.0", + "name": "cacheable-request", + "escapedName": "cacheable-request", + "rawSpec": "6.1.0", + "saveSpec": null, + "fetchSpec": "6.1.0" + }, + "_requiredBy": [ + "/got" ], + "_resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "_spec": "6.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Luke Childs", + "email": "lukechilds123@gmail.com", + "url": "http://lukechilds.co.uk" + }, + "bugs": { + "url": "https://github.com/lukechilds/cacheable-request/issues" + }, "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -37,6 +47,7 @@ "normalize-url": "^4.1.0", "responselike": "^1.0.2" }, + "description": "Wrap native HTTP requests with RFC compliant cache support", "devDependencies": { "@keyv/sqlite": "^2.0.0", "ava": "^1.1.0", @@ -50,7 +61,38 @@ "this": "^1.0.2", "xo": "^0.23.0" }, + "engines": { + "node": ">=8" + }, + "files": [ + "src" + ], + "homepage": "https://github.com/lukechilds/cacheable-request#readme", + "keywords": [ + "HTTP", + "HTTPS", + "cache", + "caching", + "layer", + "cacheable", + "RFC 7234", + "RFC", + "7234", + "compliant" + ], + "license": "MIT", + "main": "src/index.js", + "name": "cacheable-request", + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/cacheable-request.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "6.1.0", "xo": { "extends": "xo-lukechilds" } -} \ No newline at end of file +} diff --git a/node_modules/callsites/package.json b/node_modules/callsites/package.json index 46b1de0c6..aba637b49 100644 --- a/node_modules/callsites/package.json +++ b/node_modules/callsites/package.json @@ -1,24 +1,56 @@ { - "name": "callsites", - "version": "3.1.0", - "description": "Get callsites from the V8 stack trace API", - "license": "MIT", - "repository": "sindresorhus/callsites", + "_args": [ + [ + "callsites@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "callsites@3.1.0", + "_id": "callsites@3.1.0", + "_inBundle": false, + "_integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "_location": "/callsites", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "callsites@3.1.0", + "name": "callsites", + "escapedName": "callsites", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/ava", + "/parent-module" + ], + "_resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/callsites/issues" + }, + "description": "Get callsites from the V8 stack trace API", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/callsites#readme", "keywords": [ "stacktrace", "v8", @@ -31,9 +63,14 @@ "line", "debug" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "callsites", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/callsites.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.0" +} diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json index 1b48bb0da..1fd654cd2 100644 --- a/node_modules/camelcase/package.json +++ b/node_modules/camelcase/package.json @@ -1,24 +1,56 @@ { - "name": "camelcase", - "version": "5.3.1", - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "license": "MIT", - "repository": "sindresorhus/camelcase", + "_args": [ + [ + "camelcase@5.3.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "camelcase@5.3.1", + "_id": "camelcase@5.3.1", + "_inBundle": false, + "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "_location": "/camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "camelcase@5.3.1", + "name": "camelcase", + "escapedName": "camelcase", + "rawSpec": "5.3.1", + "saveSpec": null, + "fetchSpec": "5.3.1" + }, + "_requiredBy": [ + "/boxen", + "/yargs-parser" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "_spec": "5.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/camelcase#readme", "keywords": [ "camelcase", "camel-case", @@ -35,9 +67,14 @@ "pascalcase", "pascal-case" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.3.1" +} diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json index aed521aec..ebed28b01 100644 --- a/node_modules/chalk/package.json +++ b/node_modules/chalk/package.json @@ -1,23 +1,65 @@ { - "name": "chalk", - "version": "2.4.2", + "_args": [ + [ + "chalk@2.4.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "chalk@2.4.2", + "_id": "chalk@2.4.2", + "_inBundle": false, + "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "_location": "/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@2.4.2", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "2.4.2", + "saveSpec": null, + "fetchSpec": "2.4.2" + }, + "_requiredBy": [ + "/@babel/highlight", + "/log-symbols" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "_spec": "2.4.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", + "devDependencies": { + "ava": "*", + "coveralls": "^3.0.0", + "execa": "^0.9.0", + "flow-bin": "^0.68.0", + "import-fresh": "^2.0.0", + "matcha": "^0.7.0", + "nyc": "^11.0.2", + "resolve-from": "^4.0.0", + "typescript": "^2.5.3", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, "files": [ "index.js", "templates.js", "types/index.d.ts", "index.js.flow" ], + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -41,24 +83,19 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "license": "MIT", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" + "scripts": { + "bench": "matcha benchmark.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" }, "types": "types/index.d.ts", + "version": "2.4.2", "xo": { "envs": [ "node", @@ -68,4 +105,4 @@ "test/_flow.js" ] } -} \ No newline at end of file +} diff --git a/node_modules/charenc/package.json b/node_modules/charenc/package.json index 80ac698de..27772ab8d 100644 --- a/node_modules/charenc/package.json +++ b/node_modules/charenc/package.json @@ -1,24 +1,57 @@ { - "author": "Paul Vorbach (http://vorb.de)", - "name": "charenc", + "_args": [ + [ + "charenc@0.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "charenc@0.0.2", + "_id": "charenc@0.0.2", + "_inBundle": false, + "_integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", + "_location": "/charenc", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "charenc@0.0.2", + "name": "charenc", + "escapedName": "charenc", + "rawSpec": "0.0.2", + "saveSpec": null, + "fetchSpec": "0.0.2" + }, + "_requiredBy": [ + "/md5" + ], + "_resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "_spec": "0.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorb.de", + "url": "http://vorb.de" + }, + "bugs": { + "url": "https://github.com/pvorb/node-charenc/issues" + }, "description": "character encoding utilities", + "engines": { + "node": "*" + }, + "homepage": "https://github.com/pvorb/node-charenc#readme", + "license": "BSD-3-Clause", + "main": "charenc.js", + "name": "charenc", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-charenc.git" + }, "tags": [ "utf8", "binary", "byte", "string" ], - "version": "0.0.2", - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-charenc.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-charenc/issues" - }, - "main": "charenc.js", - "engines": { - "node": "*" - } -} \ No newline at end of file + "version": "0.0.2" +} diff --git a/node_modules/chokidar/node_modules/anymatch/package.json b/node_modules/chokidar/node_modules/anymatch/package.json index aa33dbcdb..75cb3630b 100644 --- a/node_modules/chokidar/node_modules/anymatch/package.json +++ b/node_modules/chokidar/node_modules/anymatch/package.json @@ -1,25 +1,57 @@ { - "name": "anymatch", - "version": "3.1.1", - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", - "files": [ - "index.js", - "index.d.ts" + "_args": [ + [ + "anymatch@3.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "_development": true, + "_from": "anymatch@3.1.1", + "_id": "anymatch@3.1.1", + "_inBundle": false, + "_integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "_location": "/chokidar/anymatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "anymatch@3.1.1", + "name": "anymatch", + "escapedName": "anymatch", + "rawSpec": "3.1.1", + "saveSpec": null, + "fetchSpec": "3.1.1" }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "_spec": "3.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Elan Shanker", "url": "https://github.com/es128" }, - "license": "ISC", - "homepage": "https://github.com/micromatch/anymatch", - "repository": { - "type": "git", - "url": "https://github.com/micromatch/anymatch" + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" }, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "mocha": "^6.1.3", + "nyc": "^14.0.0" + }, + "engines": { + "node": ">= 8" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/micromatch/anymatch", "keywords": [ "match", "any", @@ -34,15 +66,15 @@ "expression", "function" ], + "license": "ISC", + "name": "anymatch", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/anymatch.git" + }, "scripts": { - "test": "nyc mocha", - "mocha": "mocha" + "mocha": "mocha", + "test": "nyc mocha" }, - "devDependencies": { - "mocha": "^6.1.3", - "nyc": "^14.0.0" - }, - "engines": { - "node": ">= 8" - } -} \ No newline at end of file + "version": "3.1.1" +} diff --git a/node_modules/chokidar/node_modules/normalize-path/package.json b/node_modules/chokidar/node_modules/normalize-path/package.json index 101634b95..7b075a120 100644 --- a/node_modules/chokidar/node_modules/normalize-path/package.json +++ b/node_modules/chokidar/node_modules/normalize-path/package.json @@ -1,33 +1,64 @@ { - "name": "normalize-path", - "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", - "version": "3.0.0", - "homepage": "https://github.com/jonschlinkert/normalize-path", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Blaine Bublitz (https://twitter.com/BlaineBublitz)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" + "_args": [ + [ + "normalize-path@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/normalize-path", + "_development": true, + "_from": "normalize-path@3.0.0", + "_id": "normalize-path@3.0.0", + "_inBundle": false, + "_integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "_location": "/chokidar/normalize-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "normalize-path@3.0.0", + "name": "normalize-path", + "escapedName": "normalize-path", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/chokidar", + "/chokidar/anymatch" + ], + "_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/normalize-path/issues" }, - "license": "MIT", - "files": [ - "index.js" + "contributors": [ + { + "name": "Blaine Bublitz", + "url": "https://twitter.com/BlaineBublitz" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, + "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", "devDependencies": { "gulp-format-md": "^1.0.0", "minimist": "^1.2.0", "mocha": "^3.5.3" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/normalize-path", "keywords": [ "absolute", "backslash", @@ -49,6 +80,16 @@ "unix", "urix" ], + "license": "MIT", + "main": "index.js", + "name": "normalize-path", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/normalize-path.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "toc": false, "layout": "default", @@ -73,5 +114,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "3.0.0" +} diff --git a/node_modules/chokidar/package.json b/node_modules/chokidar/package.json index 84d082a47..96b397808 100644 --- a/node_modules/chokidar/package.json +++ b/node_modules/chokidar/package.json @@ -1,29 +1,62 @@ { - "name": "chokidar", - "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", - "version": "3.4.0", - "homepage": "https://github.com/paulmillr/chokidar", - "author": "Paul Miller (https://paulmillr.com)", - "contributors": [ - "Paul Miller (https://paulmillr.com)", - "Elan Shanker" + "_args": [ + [ + "chokidar@3.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">= 8.10.0" + "_development": true, + "_from": "chokidar@3.4.0", + "_id": "chokidar@3.4.0", + "_inBundle": false, + "_integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "_location": "/chokidar", + "_phantomChildren": { + "picomatch": "2.2.2" }, - "main": "index.js", + "_requested": { + "type": "version", + "registry": true, + "raw": "chokidar@3.4.0", + "name": "chokidar", + "escapedName": "chokidar", + "rawSpec": "3.4.0", + "saveSpec": null, + "fetchSpec": "3.4.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", + "_spec": "3.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Paul Miller", + "url": "https://paulmillr.com" + }, + "bugs": { + "url": "https://github.com/paulmillr/chokidar/issues" + }, + "contributors": [ + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + }, + { + "name": "Elan Shanker" + } + ], "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", + "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.4.0" }, - "optionalDependencies": { - "fsevents": "~2.1.2" - }, + "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", "devDependencies": { "@types/node": "^13", "chai": "^4.2", @@ -36,35 +69,9 @@ "sinon-chai": "^3.3.0", "upath": "^1.2.0" }, - "files": [ - "index.js", - "lib/*.js", - "types/index.d.ts" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/paulmillr/chokidar.git" + "engines": { + "node": ">= 8.10.0" }, - "bugs": { - "url": "https://github.com/paulmillr/chokidar/issues" - }, - "license": "MIT", - "scripts": { - "dtslint": "dtslint types", - "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --exit --timeout 60000", - "test": "npm run lint && npm run mocha" - }, - "keywords": [ - "fs", - "watch", - "watchFile", - "watcher", - "watching", - "file", - "fsevents" - ], - "types": "./types/index.d.ts", "eslintConfig": { "extends": "eslint:recommended", "parserOptions": { @@ -115,6 +122,24 @@ ] } }, + "files": [ + "index.js", + "lib/*.js", + "types/index.d.ts" + ], + "homepage": "https://github.com/paulmillr/chokidar", + "keywords": [ + "fs", + "watch", + "watchFile", + "watcher", + "watching", + "file", + "fsevents" + ], + "license": "MIT", + "main": "index.js", + "name": "chokidar", "nyc": { "include": [ "index.js", @@ -124,5 +149,20 @@ "html", "text" ] - } -} \ No newline at end of file + }, + "optionalDependencies": { + "fsevents": "~2.1.2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/paulmillr/chokidar.git" + }, + "scripts": { + "dtslint": "dtslint types", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --exit --timeout 60000", + "test": "npm run lint && npm run mocha" + }, + "types": "./types/index.d.ts", + "version": "3.4.0" +} diff --git a/node_modules/chunkd/package.json b/node_modules/chunkd/package.json index 6dfab968b..4d780209a 100644 --- a/node_modules/chunkd/package.json +++ b/node_modules/chunkd/package.json @@ -1,46 +1,36 @@ { - "name": "chunkd", - "version": "2.0.1", - "description": "Get a chunk of an array based on the total number of chunks and current index", - "main": "dist/chunkd.js", - "repository": "jamiebuilds/chunkd", - "author": "Jamie Kyle ", - "license": "MIT", - "keywords": [ - "util", - "chunk", - "index", - "total" - ], - "files": [ - "dist" - ], - "scripts": { - "check:typescript": "tsc --noEmit", - "check:prettier": "prettier --check '**'", - "build": "rm -rf dist && tsc", - "format": "prettier --write '**'", - "test": "ava", - "prepublishOnly": "npm run -s build" - }, - "devDependencies": { - "ava": "^2.4.0", - "husky": "^3.1.0", - "lint-staged": "^9.4.3", - "prettier": "^1.19.1", - "ts-node": "^8.5.2", - "typescript": "^3.7.2" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*": [ - "prettier --write", - "git add" + "_args": [ + [ + "chunkd@2.0.1", + "/home/chris/src/github.com/github/codeql-action" ] + ], + "_development": true, + "_from": "chunkd@2.0.1", + "_id": "chunkd@2.0.1", + "_inBundle": false, + "_integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==", + "_location": "/chunkd", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chunkd@2.0.1", + "name": "chunkd", + "escapedName": "chunkd", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jamie Kyle", + "email": "me@thejameskyle.com" }, "ava": { "compileEnhancements": false, @@ -50,5 +40,54 @@ "require": [ "ts-node/register" ] - } -} \ No newline at end of file + }, + "bugs": { + "url": "https://github.com/jamiebuilds/chunkd/issues" + }, + "description": "Get a chunk of an array based on the total number of chunks and current index", + "devDependencies": { + "ava": "^2.4.0", + "husky": "^3.1.0", + "lint-staged": "^9.4.3", + "prettier": "^1.19.1", + "ts-node": "^8.5.2", + "typescript": "^3.7.2" + }, + "files": [ + "dist" + ], + "homepage": "https://github.com/jamiebuilds/chunkd#readme", + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "keywords": [ + "util", + "chunk", + "index", + "total" + ], + "license": "MIT", + "lint-staged": { + "*": [ + "prettier --write", + "git add" + ] + }, + "main": "dist/chunkd.js", + "name": "chunkd", + "repository": { + "type": "git", + "url": "git+https://github.com/jamiebuilds/chunkd.git" + }, + "scripts": { + "build": "rm -rf dist && tsc", + "check:prettier": "prettier --check '**'", + "check:typescript": "tsc --noEmit", + "format": "prettier --write '**'", + "prepublishOnly": "npm run -s build", + "test": "ava" + }, + "version": "2.0.1" +} diff --git a/node_modules/ci-info/package.json b/node_modules/ci-info/package.json index b3f5c2ca9..404f05236 100644 --- a/node_modules/ci-info/package.json +++ b/node_modules/ci-info/package.json @@ -1,21 +1,54 @@ { - "name": "ci-info", - "version": "2.0.0", - "description": "Get details about the current Continuous Integration environment", - "main": "index.js", + "_args": [ + [ + "ci-info@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ci-info@2.0.0", + "_id": "ci-info@2.0.0", + "_inBundle": false, + "_integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "_location": "/ci-info", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ci-info@2.0.0", + "name": "ci-info", + "escapedName": "ci-info", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/ava", + "/is-ci" + ], + "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Thomas Watson Steen", + "email": "w@tson.dk", + "url": "https://twitter.com/wa7son" + }, + "bugs": { + "url": "https://github.com/watson/ci-info/issues" + }, + "coordinates": [ + 55.778231, + 12.593179 + ], "dependencies": {}, + "description": "Get details about the current Continuous Integration environment", "devDependencies": { "clear-require": "^1.0.1", "standard": "^12.0.1", "tape": "^4.9.1" }, - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/watson/ci-info.git" - }, + "homepage": "https://github.com/watson/ci-info", "keywords": [ "ci", "continuous", @@ -23,14 +56,15 @@ "test", "detect" ], - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", "license": "MIT", - "bugs": { - "url": "https://github.com/watson/ci-info/issues" + "main": "index.js", + "name": "ci-info", + "repository": { + "type": "git", + "url": "git+https://github.com/watson/ci-info.git" }, - "homepage": "https://github.com/watson/ci-info", - "coordinates": [ - 55.778231, - 12.593179 - ] -} \ No newline at end of file + "scripts": { + "test": "standard && node test.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/ci-parallel-vars/package.json b/node_modules/ci-parallel-vars/package.json index 5e6cc758a..5ace0a014 100644 --- a/node_modules/ci-parallel-vars/package.json +++ b/node_modules/ci-parallel-vars/package.json @@ -1,11 +1,50 @@ { - "name": "ci-parallel-vars", - "version": "1.0.0", + "_args": [ + [ + "ci-parallel-vars@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ci-parallel-vars@1.0.0", + "_id": "ci-parallel-vars@1.0.0", + "_inBundle": false, + "_integrity": "sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g==", + "_location": "/ci-parallel-vars", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ci-parallel-vars@1.0.0", + "name": "ci-parallel-vars", + "escapedName": "ci-parallel-vars", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jamie Kyle", + "email": "me@thejameskyle.com" + }, + "bugs": { + "url": "https://github.com/jamiebuilds/ci-parallel-vars/issues" + }, "description": "Get CI environment variables for parallelizing builds", - "main": "index.js", - "repository": "https://github.com/jamiebuilds/ci-parallel-vars", - "author": "Jamie Kyle ", - "license": "MIT", + "devDependencies": { + "ava": "^0.25.0", + "flow-bin": "^0.73.0", + "spawndamnit": "^2.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jamiebuilds/ci-parallel-vars#readme", "keywords": [ "ci", "env", @@ -22,15 +61,15 @@ "pipelines", "knapsack" ], - "files": [ - "index.js" - ], + "license": "MIT", + "main": "index.js", + "name": "ci-parallel-vars", + "repository": { + "type": "git", + "url": "git+https://github.com/jamiebuilds/ci-parallel-vars.git" + }, "scripts": { "test": "ava" }, - "devDependencies": { - "ava": "^0.25.0", - "flow-bin": "^0.73.0", - "spawndamnit": "^2.0.0" - } -} \ No newline at end of file + "version": "1.0.0" +} diff --git a/node_modules/clean-stack/package.json b/node_modules/clean-stack/package.json index fb9bd0b77..909a86248 100644 --- a/node_modules/clean-stack/package.json +++ b/node_modules/clean-stack/package.json @@ -1,24 +1,58 @@ { - "name": "clean-stack", - "version": "2.2.0", - "description": "Clean up error stack traces", - "license": "MIT", - "repository": "sindresorhus/clean-stack", + "_args": [ + [ + "clean-stack@2.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "clean-stack@2.2.0", + "_id": "clean-stack@2.2.0", + "_inBundle": false, + "_integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "_location": "/clean-stack", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "clean-stack@2.2.0", + "name": "clean-stack", + "escapedName": "clean-stack", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/aggregate-error" + ], + "_resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": { + "os": false + }, + "bugs": { + "url": "https://github.com/sindresorhus/clean-stack/issues" + }, + "description": "Clean up error stack traces", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/clean-stack#readme", "keywords": [ "clean", "stack", @@ -28,12 +62,14 @@ "err", "electron" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "license": "MIT", + "name": "clean-stack", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/clean-stack.git" }, - "browser": { - "os": false - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.2.0" +} diff --git a/node_modules/clean-yaml-object/package.json b/node_modules/clean-yaml-object/package.json index 27a6564ba..a7b849c7f 100644 --- a/node_modules/clean-yaml-object/package.json +++ b/node_modules/clean-yaml-object/package.json @@ -1,23 +1,56 @@ { - "name": "clean-yaml-object", - "version": "0.1.0", - "description": "Clean up an object prior to serialization", - "license": "MIT", - "repository": "tapjs/clean-yaml-object", + "_args": [ + [ + "clean-yaml-object@0.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "clean-yaml-object@0.1.0", + "_id": "clean-yaml-object@0.1.0", + "_inBundle": false, + "_integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", + "_location": "/clean-yaml-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "clean-yaml-object@0.1.0", + "name": "clean-yaml-object", + "escapedName": "clean-yaml-object", + "rawSpec": "0.1.0", + "saveSpec": null, + "fetchSpec": "0.1.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", + "_spec": "0.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "James Talmage", "email": "james@talmage.io", "url": "github.com/jamestalmage" }, + "bugs": { + "url": "https://github.com/tapjs/clean-yaml-object/issues" + }, + "dependencies": {}, + "description": "Clean up an object prior to serialization", + "devDependencies": { + "ava": "^0.10.0", + "coveralls": "^2.11.6", + "nyc": "^5.3.0", + "xo": "^0.12.1" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && nyc --cache --reporter=lcov --reporter=text ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/tapjs/clean-yaml-object#readme", "keywords": [ "serialize", "clean", @@ -27,11 +60,14 @@ "json", "error" ], - "dependencies": {}, - "devDependencies": { - "ava": "^0.10.0", - "coveralls": "^2.11.6", - "nyc": "^5.3.0", - "xo": "^0.12.1" - } -} \ No newline at end of file + "license": "MIT", + "name": "clean-yaml-object", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/clean-yaml-object.git" + }, + "scripts": { + "test": "xo && nyc --cache --reporter=lcov --reporter=text ava" + }, + "version": "0.1.0" +} diff --git a/node_modules/cli-boxes/package.json b/node_modules/cli-boxes/package.json index f77701b7e..e83665890 100644 --- a/node_modules/cli-boxes/package.json +++ b/node_modules/cli-boxes/package.json @@ -1,25 +1,56 @@ { - "name": "cli-boxes", - "version": "2.2.0", - "description": "Boxes for use in the terminal", - "license": "MIT", - "repository": "sindresorhus/cli-boxes", + "_args": [ + [ + "cli-boxes@2.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "cli-boxes@2.2.0", + "_id": "cli-boxes@2.2.0", + "_inBundle": false, + "_integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "_location": "/cli-boxes", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cli-boxes@2.2.0", + "name": "cli-boxes", + "escapedName": "cli-boxes", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/cli-boxes/issues" + }, + "description": "Boxes for use in the terminal", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "boxes.json" ], + "homepage": "https://github.com/sindresorhus/cli-boxes#readme", "keywords": [ "cli", "box", @@ -33,9 +64,14 @@ "text", "json" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "cli-boxes", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/cli-boxes.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.2.0" +} diff --git a/node_modules/cli-cursor/package.json b/node_modules/cli-cursor/package.json index 38d50d2c4..bad7db3bc 100644 --- a/node_modules/cli-cursor/package.json +++ b/node_modules/cli-cursor/package.json @@ -1,24 +1,60 @@ { - "name": "cli-cursor", - "version": "3.1.0", - "description": "Toggle the CLI cursor", - "license": "MIT", - "repository": "sindresorhus/cli-cursor", + "_args": [ + [ + "cli-cursor@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "cli-cursor@3.1.0", + "_id": "cli-cursor@3.1.0", + "_inBundle": false, + "_integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "_location": "/cli-cursor", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cli-cursor@3.1.0", + "name": "cli-cursor", + "escapedName": "cli-cursor", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/ava", + "/ora" + ], + "_resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/cli-cursor/issues" + }, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "description": "Toggle the CLI cursor", + "devDependencies": { + "@types/node": "^12.0.7", + "ava": "^2.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/cli-cursor#readme", "keywords": [ "cli", "cursor", @@ -34,13 +70,14 @@ "shell", "command-line" ], - "dependencies": { - "restore-cursor": "^3.1.0" + "license": "MIT", + "name": "cli-cursor", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/cli-cursor.git" }, - "devDependencies": { - "@types/node": "^12.0.7", - "ava": "^2.1.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.0" +} diff --git a/node_modules/cli-spinners/package.json b/node_modules/cli-spinners/package.json index 23323c5f4..cc7dea696 100644 --- a/node_modules/cli-spinners/package.json +++ b/node_modules/cli-spinners/package.json @@ -1,26 +1,57 @@ { - "name": "cli-spinners", - "version": "2.3.0", - "description": "Spinners for use in the terminal", - "license": "MIT", - "repository": "sindresorhus/cli-spinners", + "_args": [ + [ + "cli-spinners@2.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "cli-spinners@2.3.0", + "_id": "cli-spinners@2.3.0", + "_inBundle": false, + "_integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==", + "_location": "/cli-spinners", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cli-spinners@2.3.0", + "name": "cli-spinners", + "escapedName": "cli-spinners", + "rawSpec": "2.3.0", + "saveSpec": null, + "fetchSpec": "2.3.0" + }, + "_requiredBy": [ + "/ora" + ], + "_resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz", + "_spec": "2.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/cli-spinners/issues" + }, + "description": "Spinners for use in the terminal", + "devDependencies": { + "ava": "^1.4.1", + "log-update": "^3.2.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd", - "asciicast": "asciinema rec --command='node example-all.js' --title='cli-spinner' --quiet" - }, "files": [ "index.js", "index.d.ts", "spinners.json" ], + "homepage": "https://github.com/sindresorhus/cli-spinners#readme", "keywords": [ "cli", "spinner", @@ -38,10 +69,15 @@ "idle", "json" ], - "devDependencies": { - "ava": "^1.4.1", - "log-update": "^3.2.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "cli-spinners", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/cli-spinners.git" + }, + "scripts": { + "asciicast": "asciinema rec --command='node example-all.js' --title='cli-spinner' --quiet", + "test": "xo && ava && tsd" + }, + "version": "2.3.0" +} diff --git a/node_modules/cli-truncate/package.json b/node_modules/cli-truncate/package.json index 0d9e9a141..671d452d7 100644 --- a/node_modules/cli-truncate/package.json +++ b/node_modules/cli-truncate/package.json @@ -1,25 +1,60 @@ { - "name": "cli-truncate", - "version": "2.1.0", - "description": "Truncate a string to a specific width in the terminal", - "license": "MIT", - "repository": "sindresorhus/cli-truncate", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "cli-truncate@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "cli-truncate@2.1.0", + "_id": "cli-truncate@2.1.0", + "_inBundle": false, + "_integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "_location": "/cli-truncate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cli-truncate@2.1.0", + "name": "cli-truncate", + "escapedName": "cli-truncate", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/cli-truncate/issues" + }, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "description": "Truncate a string to a specific width in the terminal", + "devDependencies": { + "ava": "^2.1.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/cli-truncate#readme", "keywords": [ "truncate", "ellipsis", @@ -34,13 +69,14 @@ "ansi", "string" ], - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "license": "MIT", + "name": "cli-truncate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/cli-truncate.git" }, - "devDependencies": { - "ava": "^2.1.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json index 2869089cc..13674cf9f 100644 --- a/node_modules/cliui/package.json +++ b/node_modules/cliui/package.json @@ -1,16 +1,39 @@ { - "name": "cliui", - "version": "6.0.0", - "description": "easily create complex multi-column command-line-interfaces", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc mocha", - "coverage": "nyc --reporter=text-lcov mocha | coveralls" + "_args": [ + [ + "cliui@6.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "cliui@6.0.0", + "_id": "cliui@6.0.0", + "_inBundle": false, + "_integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "_location": "/cliui", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cliui@6.0.0", + "name": "cliui", + "escapedName": "cliui", + "rawSpec": "6.0.0", + "saveSpec": null, + "fetchSpec": "6.0.0" }, - "repository": { - "type": "git", - "url": "http://github.com/yargs/cliui.git" + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "_spec": "6.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/yargs/cliui/issues" }, "config": { "blanket": { @@ -24,14 +47,27 @@ "output-reporter": "spec" } }, - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" }, + "description": "easily create complex multi-column command-line-interfaces", + "devDependencies": { + "chai": "^4.2.0", + "chalk": "^3.0.0", + "coveralls": "^3.0.3", + "mocha": "^6.2.2", + "nyc": "^14.1.1", + "standard": "^12.0.1" + }, + "engine": { + "node": ">=8" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/yargs/cliui#readme", "keywords": [ "cli", "command-line", @@ -41,25 +77,25 @@ "wrap", "table" ], - "author": "Ben Coe ", "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "main": "index.js", + "name": "cliui", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/cliui.git" }, - "devDependencies": { - "chai": "^4.2.0", - "chalk": "^3.0.0", - "coveralls": "^3.0.3", - "mocha": "^6.2.2", - "nyc": "^14.1.1", - "standard": "^12.0.1" + "scripts": { + "coverage": "nyc --reporter=text-lcov mocha | coveralls", + "pretest": "standard", + "test": "nyc mocha" }, - "files": [ - "index.js" - ], - "engine": { - "node": ">=8" - } -} \ No newline at end of file + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "version": "6.0.0" +} diff --git a/node_modules/clone-response/package.json b/node_modules/clone-response/package.json index 24e834356..4abb7ad18 100644 --- a/node_modules/clone-response/package.json +++ b/node_modules/clone-response/package.json @@ -1,36 +1,45 @@ { - "name": "clone-response", - "version": "1.0.2", - "description": "Clone a Node.js HTTP response stream", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/clone-response.git" - }, - "keywords": [ - "clone", - "duplicate", - "copy", - "response", - "HTTP", - "stream" + "_args": [ + [ + "clone-response@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Luke Childs (http://lukechilds.co.uk)", - "license": "MIT", + "_development": true, + "_from": "clone-response@1.0.2", + "_id": "clone-response@1.0.2", + "_inBundle": false, + "_integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "_location": "/clone-response", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "clone-response@1.0.2", + "name": "clone-response", + "escapedName": "clone-response", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Luke Childs", + "email": "lukechilds123@gmail.com", + "url": "http://lukechilds.co.uk" + }, "bugs": { "url": "https://github.com/lukechilds/clone-response/issues" }, - "homepage": "https://github.com/lukechilds/clone-response", "dependencies": { "mimic-response": "^1.0.0" }, + "description": "Clone a Node.js HTTP response stream", "devDependencies": { "ava": "^0.22.0", "coveralls": "^2.13.1", @@ -40,5 +49,29 @@ "nyc": "^11.0.2", "pify": "^3.0.0", "xo": "^0.19.0" + }, + "homepage": "https://github.com/lukechilds/clone-response", + "keywords": [ + "clone", + "duplicate", + "copy", + "response", + "HTTP", + "stream" + ], + "license": "MIT", + "main": "src/index.js", + "name": "clone-response", + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/clone-response.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "1.0.2", + "xo": { + "extends": "xo-lukechilds" } -} \ No newline at end of file +} diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json index 9305b656e..553819fc6 100644 --- a/node_modules/clone/package.json +++ b/node_modules/clone/package.json @@ -1,6 +1,135 @@ { - "name": "clone", + "_args": [ + [ + "clone@1.0.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "clone@1.0.4", + "_id": "clone@1.0.4", + "_inBundle": false, + "_integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "_location": "/clone", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "clone@1.0.4", + "name": "clone", + "escapedName": "clone", + "rawSpec": "1.0.4", + "saveSpec": null, + "fetchSpec": "1.0.4" + }, + "_requiredBy": [ + "/defaults" + ], + "_resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "_spec": "1.0.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch/" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "contributors": [ + { + "name": "Blake Miner", + "email": "miner.blake@gmail.com", + "url": "http://www.blakeminer.com/" + }, + { + "name": "Tian You", + "email": "axqd001@gmail.com", + "url": "http://blog.axqd.net/" + }, + { + "name": "George Stagas", + "email": "gstagas@gmail.com", + "url": "http://stagas.com/" + }, + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "url": "https://github.com/TobiaszCudnik" + }, + { + "name": "Pavel Lang", + "email": "langpavel@phpskelet.org", + "url": "https://github.com/langpavel" + }, + { + "name": "Dan MacTough", + "url": "http://yabfog.com/" + }, + { + "name": "w1nk", + "url": "https://github.com/w1nk" + }, + { + "name": "Hugh Kennedy", + "url": "http://twitter.com/hughskennedy" + }, + { + "name": "Dustin Diaz", + "url": "http://dustindiaz.com" + }, + { + "name": "Ilya Shaisultanov", + "url": "https://github.com/diversario" + }, + { + "name": "Nathan MacInnes", + "email": "nathan@macinn.es", + "url": "http://macinn.es/" + }, + { + "name": "Benjamin E. Coe", + "email": "ben@npmjs.com", + "url": "https://twitter.com/benjamincoe" + }, + { + "name": "Nathan Zadoks", + "url": "https://github.com/nathan7" + }, + { + "name": "Róbert Oroszi", + "email": "robert+gh@oroszi.net", + "url": "https://github.com/oroce" + }, + { + "name": "Aurélio A. Heckert", + "url": "http://softwarelivre.org/aurium" + }, + { + "name": "Guy Ellis", + "url": "http://www.guyellisrocks.com/" + } + ], + "dependencies": {}, "description": "deep cloning of objects and arrays", + "devDependencies": { + "nodeunit": "~0.9.0" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/pvorb/node-clone#readme", + "license": "MIT", + "main": "clone.js", + "name": "clone", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "scripts": { + "test": "nodeunit test.js" + }, "tags": [ "clone", "object", @@ -8,44 +137,5 @@ "function", "date" ], - "version": "1.0.4", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "main": "clone.js", - "author": "Paul Vorbach (http://paul.vorba.ch/)", - "contributors": [ - "Blake Miner (http://www.blakeminer.com/)", - "Tian You (http://blog.axqd.net/)", - "George Stagas (http://stagas.com/)", - "Tobiasz Cudnik (https://github.com/TobiaszCudnik)", - "Pavel Lang (https://github.com/langpavel)", - "Dan MacTough (http://yabfog.com/)", - "w1nk (https://github.com/w1nk)", - "Hugh Kennedy (http://twitter.com/hughskennedy)", - "Dustin Diaz (http://dustindiaz.com)", - "Ilya Shaisultanov (https://github.com/diversario)", - "Nathan MacInnes (http://macinn.es/)", - "Benjamin E. Coe (https://twitter.com/benjamincoe)", - "Nathan Zadoks (https://github.com/nathan7)", - "Róbert Oroszi (https://github.com/oroce)", - "Aurélio A. Heckert (http://softwarelivre.org/aurium)", - "Guy Ellis (http://www.guyellisrocks.com/)" - ], - "license": "MIT", - "engines": { - "node": ">=0.8" - }, - "dependencies": {}, - "devDependencies": { - "nodeunit": "~0.9.0" - }, - "optionalDependencies": {}, - "scripts": { - "test": "nodeunit test.js" - } -} \ No newline at end of file + "version": "1.0.4" +} diff --git a/node_modules/code-excerpt/package.json b/node_modules/code-excerpt/package.json index 1f55433e7..aa776b99a 100644 --- a/node_modules/code-excerpt/package.json +++ b/node_modules/code-excerpt/package.json @@ -1,31 +1,67 @@ { - "name": "code-excerpt", - "version": "2.1.1", - "description": "Extract code excerpts", - "license": "MIT", - "repository": "vadimdemedes/code-excerpt", + "_args": [ + [ + "code-excerpt@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "code-excerpt@2.1.1", + "_id": "code-excerpt@2.1.1", + "_inBundle": false, + "_integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", + "_location": "/code-excerpt", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "code-excerpt@2.1.1", + "name": "code-excerpt", + "escapedName": "code-excerpt", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "vdemedes", "email": "vdemedes@gmail.com", "url": "github.com/vadimdemedes" }, - "engines": { - "node": ">=4" + "bugs": { + "url": "https://github.com/vadimdemedes/code-excerpt/issues" }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], "dependencies": { "convert-to-spaces": "^1.0.1" }, + "description": "Extract code excerpts", "devDependencies": { "ava": "^0.16.0", "xo": "^0.17.1" }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/vadimdemedes/code-excerpt#readme", + "license": "MIT", + "name": "code-excerpt", + "repository": { + "type": "git", + "url": "git+https://github.com/vadimdemedes/code-excerpt.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json index 6446c22d5..65cd1c903 100644 --- a/node_modules/color-convert/package.json +++ b/node_modules/color-convert/package.json @@ -1,14 +1,55 @@ { - "name": "color-convert", - "description": "Plain color conversion functions", - "version": "1.9.3", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" + "_args": [ + [ + "color-convert@1.9.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-convert@1.9.3", + "_id": "color-convert@1.9.3", + "_inBundle": false, + "_integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "_location": "/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-convert@1.9.3", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "1.9.3", + "saveSpec": null, + "fetchSpec": "1.9.3" }, + "_requiredBy": [ + "/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "_spec": "1.9.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "1.1.3" + }, + "description": "Plain color conversion functions", + "devDependencies": { + "chalk": "1.1.1", + "xo": "0.11.2" + }, + "files": [ + "index.js", + "conversions.js", + "css-keywords.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", "keywords": [ "color", "colour", @@ -23,24 +64,22 @@ "ansi", "ansi16" ], - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "1.9.3", "xo": { "rules": { "default-case": 0, "no-inline-comments": 0, "operator-linebreak": 0 } - }, - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "dependencies": { - "color-name": "1.1.3" } -} \ No newline at end of file +} diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json index 40d588535..7000aff98 100644 --- a/node_modules/color-name/package.json +++ b/node_modules/color-name/package.json @@ -1,25 +1,57 @@ { - "name": "color-name", - "version": "1.1.3", + "_args": [ + [ + "color-name@1.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-name@1.1.3", + "_id": "color-name@1.1.3", + "_inBundle": false, + "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "_location": "/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.3", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.3", + "saveSpec": null, + "fetchSpec": "1.1.3" + }, + "_requiredBy": [ + "/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "_spec": "1.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/dfcreative/color-name/issues" + }, "description": "A list of color names and its values", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:dfcreative/color-name.git" - }, + "homepage": "https://github.com/dfcreative/color-name", "keywords": [ "color-name", "color", "color-keyword", "keyword" ], - "author": "DY ", "license": "MIT", - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/dfcreative/color-name.git" }, - "homepage": "https://github.com/dfcreative/color-name" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.1.3" +} diff --git a/node_modules/combined-stream/License b/node_modules/combined-stream/License new file mode 100644 index 000000000..4804b7ab4 --- /dev/null +++ b/node_modules/combined-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/combined-stream/Readme.md b/node_modules/combined-stream/Readme.md new file mode 100644 index 000000000..9e367b5bc --- /dev/null +++ b/node_modules/combined-stream/Readme.md @@ -0,0 +1,138 @@ +# combined-stream + +A stream that emits multiple other streams one after another. + +**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. + +- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. + +- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. + +## Installation + +``` bash +npm install combined-stream +``` + +## Usage + +Here is a simple example that shows how you can use combined-stream to combine +two files into one: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +While the example above works great, it will pause all source streams until +they are needed. If you don't want that to happen, you can set `pauseStreams` +to `false`: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create({pauseStreams: false}); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +However, what if you don't have all the source streams yet, or you don't want +to allocate the resources (file descriptors, memory, etc.) for them right away? +Well, in that case you can simply provide a callback that supplies the stream +by calling a `next()` function: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(function(next) { + next(fs.createReadStream('file1.txt')); +}); +combinedStream.append(function(next) { + next(fs.createReadStream('file2.txt')); +}); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +## API + +### CombinedStream.create([options]) + +Returns a new combined stream object. Available options are: + +* `maxDataSize` +* `pauseStreams` + +The effect of those options is described below. + +### combinedStream.pauseStreams = `true` + +Whether to apply back pressure to the underlaying streams. If set to `false`, +the underlaying streams will never be paused. If set to `true`, the +underlaying streams will be paused right after being appended, as well as when +`delayedStream.pipe()` wants to throttle. + +### combinedStream.maxDataSize = `2 * 1024 * 1024` + +The maximum amount of bytes (or characters) to buffer for all source streams. +If this value is exceeded, `combinedStream` emits an `'error'` event. + +### combinedStream.dataSize = `0` + +The amount of bytes (or characters) currently buffered by `combinedStream`. + +### combinedStream.append(stream) + +Appends the given `stream` to the combinedStream object. If `pauseStreams` is +set to `true, this stream will also be paused right away. + +`streams` can also be a function that takes one parameter called `next`. `next` +is a function that must be invoked in order to provide the `next` stream, see +example above. + +Regardless of how the `stream` is appended, combined-stream always attaches an +`'error'` listener to it, so you don't have to do that manually. + +Special case: `stream` can also be a String or Buffer. + +### combinedStream.write(data) + +You should not call this, `combinedStream` takes care of piping the appended +streams into itself for you. + +### combinedStream.resume() + +Causes `combinedStream` to start drain the streams it manages. The function is +idempotent, and also emits a `'resume'` event each time which usually goes to +the stream that is currently being drained. + +### combinedStream.pause(); + +If `combinedStream.pauseStreams` is set to `false`, this does nothing. +Otherwise a `'pause'` event is emitted, this goes to the stream that is +currently being drained, so you can use it to apply back pressure. + +### combinedStream.end(); + +Sets `combinedStream.writable` to false, emits an `'end'` event, and removes +all streams from the queue. + +### combinedStream.destroy(); + +Same as `combinedStream.end()`, except it emits a `'close'` event instead of +`'end'`. + +## License + +combined-stream is licensed under the MIT license. diff --git a/node_modules/combined-stream/lib/combined_stream.js b/node_modules/combined-stream/lib/combined_stream.js new file mode 100644 index 000000000..125f097f3 --- /dev/null +++ b/node_modules/combined-stream/lib/combined_stream.js @@ -0,0 +1,208 @@ +var util = require('util'); +var Stream = require('stream').Stream; +var DelayedStream = require('delayed-stream'); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json new file mode 100644 index 000000000..39ce4f9f1 --- /dev/null +++ b/node_modules/combined-stream/package.json @@ -0,0 +1,59 @@ +{ + "_from": "combined-stream@^1.0.8", + "_id": "combined-stream@1.0.8", + "_inBundle": false, + "_integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "_location": "/combined-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "combined-stream@^1.0.8", + "name": "combined-stream", + "escapedName": "combined-stream", + "rawSpec": "^1.0.8", + "saveSpec": null, + "fetchSpec": "^1.0.8" + }, + "_requiredBy": [ + "/@azure/core-http/form-data", + "/@types/node-fetch/form-data", + "/form-data" + ], + "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "_shasum": "c3d45a8b34fd730631a110a8a2520682b31d5a7f", + "_spec": "combined-stream@^1.0.8", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@types/node-fetch/node_modules/form-data", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "bugs": { + "url": "https://github.com/felixge/node-combined-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "deprecated": false, + "description": "A stream that emits multiple other streams one after another.", + "devDependencies": { + "far": "~0.0.7" + }, + "engines": { + "node": ">= 0.8" + }, + "homepage": "https://github.com/felixge/node-combined-stream", + "license": "MIT", + "main": "./lib/combined_stream", + "name": "combined-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-combined-stream.git" + }, + "scripts": { + "test": "node test/run.js" + }, + "version": "1.0.8" +} diff --git a/node_modules/combined-stream/yarn.lock b/node_modules/combined-stream/yarn.lock new file mode 100644 index 000000000..7edf41840 --- /dev/null +++ b/node_modules/combined-stream/yarn.lock @@ -0,0 +1,17 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +far@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" + dependencies: + oop "0.0.3" + +oop@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json index 6e623f09b..cdc92ba67 100644 --- a/node_modules/commander/package.json +++ b/node_modules/commander/package.json @@ -1,35 +1,41 @@ { - "name": "commander", - "version": "6.0.0", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "commander", - "command", - "option", - "parser", - "cli", - "argument", - "args", - "argv" + "_args": [ + [ + "commander@6.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "TJ Holowaychuk ", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/tj/commander.js.git" + "_from": "commander@6.0.0", + "_id": "commander@6.0.0", + "_inBundle": false, + "_integrity": "sha512-s7EA+hDtTYNhuXkTlhqew4txMZVdszBmKWSPEMxGr8ru8JXR7bLUFIAtPhcSuFdJQ0ILMxnJi8GkQL0yvDy/YA==", + "_location": "/commander", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "commander@6.0.0", + "name": "commander", + "escapedName": "commander", + "rawSpec": "6.0.0", + "saveSpec": null, + "fetchSpec": "6.0.0" }, - "scripts": { - "lint": "eslint index.js \"tests/**/*.js\"", - "typescript-lint": "eslint typings/*.ts", - "test": "jest && npm run test-typings", - "test-typings": "tsc -p tsconfig.json" - }, - "main": "index", - "files": [ - "index.js", - "typings/index.d.ts" + "_requiredBy": [ + "/" ], + "_resolved": "https://registry.npmjs.org/commander/-/commander-6.0.0.tgz", + "_spec": "6.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/tj/commander.js/issues" + }, "dependencies": {}, + "description": "the complete solution for node.js command-line programs", "devDependencies": { "@types/jest": "^26.0.5", "@types/node": "^14.0.23", @@ -41,8 +47,37 @@ "standard": "^14.3.4", "typescript": "^3.9.7" }, - "typings": "typings/index.d.ts", "engines": { "node": ">= 6" - } -} \ No newline at end of file + }, + "files": [ + "index.js", + "typings/index.d.ts" + ], + "homepage": "https://github.com/tj/commander.js#readme", + "keywords": [ + "commander", + "command", + "option", + "parser", + "cli", + "argument", + "args", + "argv" + ], + "license": "MIT", + "main": "index", + "name": "commander", + "repository": { + "type": "git", + "url": "git+https://github.com/tj/commander.js.git" + }, + "scripts": { + "lint": "eslint index.js \"tests/**/*.js\"", + "test": "jest && npm run test-typings", + "test-typings": "tsc -p tsconfig.json", + "typescript-lint": "eslint typings/*.ts" + }, + "typings": "typings/index.d.ts", + "version": "6.0.0" +} diff --git a/node_modules/common-path-prefix/package.json b/node_modules/common-path-prefix/package.json index 5fbc77c3a..751718481 100644 --- a/node_modules/common-path-prefix/package.json +++ b/node_modules/common-path-prefix/package.json @@ -1,24 +1,50 @@ { - "name": "common-path-prefix", - "version": "3.0.0", + "_args": [ + [ + "common-path-prefix@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "common-path-prefix@3.0.0", + "_id": "common-path-prefix@3.0.0", + "_inBundle": false, + "_integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "_location": "/common-path-prefix", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "common-path-prefix@3.0.0", + "name": "common-path-prefix", + "escapedName": "common-path-prefix", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net/" + }, + "bugs": { + "url": "https://github.com/novemberborn/common-path-prefix/issues" + }, "description": "Computes the longest prefix string that is common to each path, excluding the base component", - "main": "index.js", + "devDependencies": { + "ava": "^2.3.0", + "nyc": "^14.1.1", + "standard": "^14.0.2" + }, "files": [ "index.d.ts", "index.js" ], - "scripts": { - "test": "standard && nyc ava" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/novemberborn/common-path-prefix.git" - }, - "author": "Mark Wubben (https://novemberborn.net/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/novemberborn/common-path-prefix/issues" - }, "homepage": "https://github.com/novemberborn/common-path-prefix#readme", "keywords": [ "common", @@ -33,9 +59,15 @@ "common path start", "common root" ], - "devDependencies": { - "ava": "^2.3.0", - "nyc": "^14.1.1", - "standard": "^14.0.2" - } -} \ No newline at end of file + "license": "ISC", + "main": "index.js", + "name": "common-path-prefix", + "repository": { + "type": "git", + "url": "git+https://github.com/novemberborn/common-path-prefix.git" + }, + "scripts": { + "test": "standard && nyc ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json index 396f2c1b9..98386cb44 100644 --- a/node_modules/concat-map/package.json +++ b/node_modules/concat-map/package.json @@ -1,12 +1,50 @@ { - "name": "concat-map", - "description": "concatenative mapdashery", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" + "_args": [ + [ + "concat-map@0.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inBundle": false, + "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "_location": "/concat-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "concat-map@0.0.1", + "name": "concat-map", + "escapedName": "concat-map", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" }, - "main": "index.js", + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_spec": "0.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "homepage": "https://github.com/substack/node-concat-map#readme", "keywords": [ "concat", "concatMap", @@ -14,22 +52,16 @@ "functional", "higher-order" ], - "directories": { - "example": "example", - "test": "test" + "license": "MIT", + "main": "index.js", + "name": "concat-map", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" }, "scripts": { "test": "tape test/*.js" }, - "devDependencies": { - "tape": "~2.4.0" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "testling": { "files": "test/*.js", "browsers": { @@ -55,5 +87,6 @@ 12 ] } - } -} \ No newline at end of file + }, + "version": "0.0.1" +} diff --git a/node_modules/concordance/node_modules/md5-hex/package.json b/node_modules/concordance/node_modules/md5-hex/package.json index f45fb17da..b69058983 100644 --- a/node_modules/concordance/node_modules/md5-hex/package.json +++ b/node_modules/concordance/node_modules/md5-hex/package.json @@ -1,24 +1,58 @@ { - "name": "md5-hex", - "version": "2.0.0", - "description": "Create a MD5 hash with hex encoding", - "license": "MIT", - "repository": "sindresorhus/md5-hex", + "_args": [ + [ + "md5-hex@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "md5-hex@2.0.0", + "_id": "md5-hex@2.0.0", + "_inBundle": false, + "_integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", + "_location": "/concordance/md5-hex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "md5-hex@2.0.0", + "name": "md5-hex", + "escapedName": "md5-hex", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/sindresorhus/md5-hex/issues" + }, + "dependencies": { + "md5-o-matic": "^0.1.1" + }, + "description": "Create a MD5 hash with hex encoding", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "browser.js" ], + "homepage": "https://github.com/sindresorhus/md5-hex#readme", "keywords": [ "hash", "crypto", @@ -28,12 +62,14 @@ "browser", "browserify" ], - "dependencies": { - "md5-o-matic": "^0.1.1" + "license": "MIT", + "name": "md5-hex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/md5-hex.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "2.0.0" +} diff --git a/node_modules/concordance/node_modules/semver/package.json b/node_modules/concordance/node_modules/semver/package.json index 90e287ecf..48f117ba9 100644 --- a/node_modules/concordance/node_modules/semver/package.json +++ b/node_modules/concordance/node_modules/semver/package.json @@ -1,28 +1,64 @@ { - "name": "semver", - "version": "5.7.1", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "_args": [ + [ + "semver@5.7.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "semver@5.7.1", + "_id": "semver@5.7.1", + "_inBundle": false, + "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "_location": "/concordance/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@5.7.1", + "name": "semver", + "escapedName": "semver", + "rawSpec": "5.7.1", + "saveSpec": null, + "fetchSpec": "5.7.1" }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "_spec": "5.7.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "semver": "bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^13.0.0-rc.18" }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver" - }, "files": [ "bin", "range.bnf", "semver.js" ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true - } -} \ No newline at end of file + }, + "version": "5.7.1" +} diff --git a/node_modules/concordance/package.json b/node_modules/concordance/package.json index 6c8901446..3f9111b2d 100644 --- a/node_modules/concordance/package.json +++ b/node_modules/concordance/package.json @@ -1,29 +1,48 @@ { - "name": "concordance", - "version": "4.0.0", - "description": "Compare, format, diff and serialize any JavaScript value", - "main": "index.js", - "files": [ - "lib", - "index.js" + "_args": [ + [ + "concordance@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" + "_development": true, + "_from": "concordance@4.0.0", + "_id": "concordance@4.0.0", + "_inBundle": false, + "_integrity": "sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ==", + "_location": "/concordance", + "_phantomChildren": { + "md5-o-matic": "0.1.1" }, - "scripts": { - "lint": "as-i-preach", - "test": "npm run -s lint && nyc ava" + "_requested": { + "type": "version", + "registry": true, + "raw": "concordance@4.0.0", + "name": "concordance", + "escapedName": "concordance", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" }, - "repository": { - "type": "git", - "url": "git+https://github.com/concordancejs/concordance.git" + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/concordance/-/concordance-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "as-i-preach": { + "allowDevDependencies": [ + "perf/**/*.js", + "test/**/*.js" + ] + }, + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net/" }, - "author": "Mark Wubben (https://novemberborn.net/)", - "license": "ISC", "bugs": { "url": "https://github.com/concordancejs/concordance/issues" }, - "homepage": "https://github.com/concordancejs/concordance#readme", "dependencies": { "date-time": "^2.1.0", "esutils": "^2.0.2", @@ -37,6 +56,7 @@ "semver": "^5.5.1", "well-known-symbols": "^2.0.0" }, + "description": "Compare, format, diff and serialize any JavaScript value", "devDependencies": { "@novemberborn/as-i-preach": "^10.0.1", "ava": "1.0.0-beta.8", @@ -47,12 +67,17 @@ "nyc": "^13.0.1", "pretty-format": "^23.6.0" }, - "as-i-preach": { - "allowDevDependencies": [ - "perf/**/*.js", - "test/**/*.js" - ] + "engines": { + "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" }, + "files": [ + "lib", + "index.js" + ], + "homepage": "https://github.com/concordancejs/concordance#readme", + "license": "ISC", + "main": "index.js", + "name": "concordance", "nyc": { "reporter": [ "html", @@ -60,5 +85,14 @@ "text" ] }, - "standard-engine": "@novemberborn/as-i-preach" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/concordancejs/concordance.git" + }, + "scripts": { + "lint": "as-i-preach", + "test": "npm run -s lint && nyc ava" + }, + "standard-engine": "@novemberborn/as-i-preach", + "version": "4.0.0" +} diff --git a/node_modules/configstore/package.json b/node_modules/configstore/package.json index 08dd5b83a..7d975c7cd 100644 --- a/node_modules/configstore/package.json +++ b/node_modules/configstore/package.json @@ -1,23 +1,61 @@ { - "name": "configstore", - "version": "5.0.1", - "description": "Easily load and save config without having to think about where and how", - "license": "BSD-2-Clause", - "repository": "yeoman/configstore", + "_args": [ + [ + "configstore@5.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "configstore@5.0.1", + "_id": "configstore@5.0.1", + "_inBundle": false, + "_integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "_location": "/configstore", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "configstore@5.0.1", + "name": "configstore", + "escapedName": "configstore", + "rawSpec": "5.0.1", + "saveSpec": null, + "fetchSpec": "5.0.1" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "_spec": "5.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/yeoman/configstore/issues" + }, + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "description": "Easily load and save config without having to think about where and how", + "devDependencies": { + "ava": "^2.1.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/yeoman/configstore#readme", "keywords": [ "config", "store", @@ -31,16 +69,14 @@ "persistent", "save" ], - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" + "license": "BSD-2-Clause", + "name": "configstore", + "repository": { + "type": "git", + "url": "git+https://github.com/yeoman/configstore.git" }, - "devDependencies": { - "ava": "^2.1.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "5.0.1" +} diff --git a/node_modules/console-log-level/package.json b/node_modules/console-log-level/package.json index 55a7bcc1c..231125ef7 100644 --- a/node_modules/console-log-level/package.json +++ b/node_modules/console-log-level/package.json @@ -1,15 +1,50 @@ { - "name": "console-log-level", - "version": "1.4.1", + "_args": [ + [ + "console-log-level@1.4.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "console-log-level@1.4.1", + "_id": "console-log-level@1.4.1", + "_inBundle": false, + "_integrity": "sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ==", + "_location": "/console-log-level", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "console-log-level@1.4.1", + "name": "console-log-level", + "escapedName": "console-log-level", + "rawSpec": "1.4.1", + "saveSpec": null, + "fetchSpec": "1.4.1" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/console-log-level/-/console-log-level-1.4.1.tgz", + "_spec": "1.4.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Thomas Watson Steen", + "email": "w@tson.dk" + }, + "bugs": { + "url": "https://github.com/watson/console-log-level/issues" + }, + "coordinates": [ + 55.778253, + 12.593208 + ], + "dependencies": {}, "description": "The most simple logger imaginable", - "main": "index.js", - "scripts": { - "test": "standard && tape test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/watson/console-log-level.git" + "devDependencies": { + "standard": "^12.0.1", + "tape": "^4.10.1" }, + "homepage": "https://github.com/watson/console-log-level", "keywords": [ "log", "logging", @@ -19,19 +54,15 @@ "stdout", "stderr" ], - "author": "Thomas Watson Steen ", "license": "MIT", - "bugs": { - "url": "https://github.com/watson/console-log-level/issues" + "main": "index.js", + "name": "console-log-level", + "repository": { + "type": "git", + "url": "git+https://github.com/watson/console-log-level.git" }, - "homepage": "https://github.com/watson/console-log-level", - "dependencies": {}, - "devDependencies": { - "standard": "^12.0.1", - "tape": "^4.10.1" + "scripts": { + "test": "standard && tape test.js" }, - "coordinates": [ - 55.778253, - 12.593208 - ] -} \ No newline at end of file + "version": "1.4.1" +} diff --git a/node_modules/contains-path/package.json b/node_modules/contains-path/package.json index dd72402ff..312644f02 100644 --- a/node_modules/contains-path/package.json +++ b/node_modules/contains-path/package.json @@ -1,28 +1,52 @@ { - "name": "contains-path", - "description": "Return true if a file path contains the given path.", - "version": "0.1.0", - "homepage": "https://github.com/jonschlinkert/contains-path", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/contains-path", + "_args": [ + [ + "contains-path@0.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "contains-path@0.1.0", + "_id": "contains-path@0.1.0", + "_inBundle": false, + "_integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "_location": "/contains-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "contains-path@0.1.0", + "name": "contains-path", + "escapedName": "contains-path", + "rawSpec": "0.1.0", + "saveSpec": null, + "fetchSpec": "0.1.0" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "_spec": "0.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/contains-path/issues" }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, "dependencies": {}, + "description": "Return true if a file path contains the given path.", "devDependencies": { "mocha": "*" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/contains-path", "keywords": [ "contains", "directory", @@ -40,6 +64,16 @@ "regex", "test" ], + "license": "MIT", + "main": "index.js", + "name": "contains-path", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/contains-path.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "related": { "list": [ @@ -51,5 +85,6 @@ "parse-filepath" ] } - } -} \ No newline at end of file + }, + "version": "0.1.0" +} diff --git a/node_modules/convert-source-map/package.json b/node_modules/convert-source-map/package.json index 40ec9f5af..a9104044e 100644 --- a/node_modules/convert-source-map/package.json +++ b/node_modules/convert-source-map/package.json @@ -1,23 +1,59 @@ { - "name": "convert-source-map", - "version": "1.7.0", - "description": "Converts a source-map from/to different formats and allows adding/changing properties.", - "main": "index.js", - "scripts": { - "test": "tap test/*.js --color" + "_args": [ + [ + "convert-source-map@1.7.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "convert-source-map@1.7.0", + "_id": "convert-source-map@1.7.0", + "_inBundle": false, + "_integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "_location": "/convert-source-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "convert-source-map@1.7.0", + "name": "convert-source-map", + "escapedName": "convert-source-map", + "rawSpec": "1.7.0", + "saveSpec": null, + "fetchSpec": "1.7.0" }, - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/convert-source-map.git" + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "_spec": "1.7.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/thlorenz/convert-source-map/issues" }, - "homepage": "https://github.com/thlorenz/convert-source-map", "dependencies": { "safe-buffer": "~5.1.1" }, + "description": "Converts a source-map from/to different formats and allows adding/changing properties.", "devDependencies": { "inline-source-map": "~0.6.2", "tap": "~9.0.0" }, + "engine": { + "node": ">=0.6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/thlorenz/convert-source-map", "keywords": [ "convert", "sourcemap", @@ -26,19 +62,15 @@ "browser", "debug" ], - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, "license": "MIT", - "engine": { - "node": ">=0.6" + "main": "index.js", + "name": "convert-source-map", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/convert-source-map.git" }, - "files": [ - "index.js" - ], - "browser": { - "fs": false - } -} \ No newline at end of file + "scripts": { + "test": "tap test/*.js --color" + }, + "version": "1.7.0" +} diff --git a/node_modules/convert-to-spaces/package.json b/node_modules/convert-to-spaces/package.json index 330450e4d..44a2403c4 100644 --- a/node_modules/convert-to-spaces/package.json +++ b/node_modules/convert-to-spaces/package.json @@ -1,25 +1,64 @@ { - "name": "convert-to-spaces", - "version": "1.0.2", - "description": "Convert tabs to spaces in a string", - "license": "MIT", - "repository": "vadimdemedes/convert-to-spaces", - "author": "Vadim Demedes ", - "keywords": [ - "tabs", - "spaces" + "_args": [ + [ + "convert-to-spaces@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "convert-to-spaces@1.0.2", + "_id": "convert-to-spaces@1.0.2", + "_inBundle": false, + "_integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", + "_location": "/convert-to-spaces", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "convert-to-spaces@1.0.2", + "name": "convert-to-spaces", + "escapedName": "convert-to-spaces", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/code-excerpt" + ], + "_resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Vadim Demedes", + "email": "vdemedes@gmail.com" + }, + "bugs": { + "url": "https://github.com/vadimdemedes/convert-to-spaces/issues" + }, + "description": "Convert tabs to spaces in a string", + "devDependencies": { + "ava": "^0.18.2", + "xo": "^0.17.1" + }, "engines": { "node": ">= 4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], - "devDependencies": { - "ava": "^0.18.2", - "xo": "^0.17.1" - } -} \ No newline at end of file + "homepage": "https://github.com/vadimdemedes/convert-to-spaces#readme", + "keywords": [ + "tabs", + "spaces" + ], + "license": "MIT", + "name": "convert-to-spaces", + "repository": { + "type": "git", + "url": "git+https://github.com/vadimdemedes/convert-to-spaces.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/node_modules/crypt/package.json b/node_modules/crypt/package.json index b4b8c991c..0d674d05b 100644 --- a/node_modules/crypt/package.json +++ b/node_modules/crypt/package.json @@ -1,22 +1,55 @@ { - "author": "Paul Vorbach (http://vorb.de)", - "name": "crypt", - "description": "utilities for encryption and hashing", - "tags": [ - "hash", - "security" + "_args": [ + [ + "crypt@0.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "version": "0.0.2", - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-crypt.git" + "_from": "crypt@0.0.2", + "_id": "crypt@0.0.2", + "_inBundle": false, + "_integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", + "_location": "/crypt", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "crypt@0.0.2", + "name": "crypt", + "escapedName": "crypt", + "rawSpec": "0.0.2", + "saveSpec": null, + "fetchSpec": "0.0.2" + }, + "_requiredBy": [ + "/md5" + ], + "_resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "_spec": "0.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorb.de", + "url": "http://vorb.de" }, "bugs": { "url": "https://github.com/pvorb/node-crypt/issues" }, - "main": "crypt.js", + "description": "utilities for encryption and hashing", "engines": { "node": "*" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/pvorb/node-crypt#readme", + "license": "BSD-3-Clause", + "main": "crypt.js", + "name": "crypt", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-crypt.git" + }, + "tags": [ + "hash", + "security" + ], + "version": "0.0.2" +} diff --git a/node_modules/crypto-random-string/package.json b/node_modules/crypto-random-string/package.json index ef7255a61..19bb482d8 100644 --- a/node_modules/crypto-random-string/package.json +++ b/node_modules/crypto-random-string/package.json @@ -1,24 +1,55 @@ { - "name": "crypto-random-string", - "version": "2.0.0", - "description": "Generate a cryptographically strong random string", - "license": "MIT", - "repository": "sindresorhus/crypto-random-string", + "_args": [ + [ + "crypto-random-string@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "crypto-random-string@2.0.0", + "_id": "crypto-random-string@2.0.0", + "_inBundle": false, + "_integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "_location": "/crypto-random-string", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "crypto-random-string@2.0.0", + "name": "crypto-random-string", + "escapedName": "crypto-random-string", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/unique-string" + ], + "_resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/crypto-random-string/issues" + }, + "description": "Generate a cryptographically strong random string", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/crypto-random-string#readme", "keywords": [ "random", "string", @@ -32,9 +63,14 @@ "secure", "hex" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "crypto-random-string", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/crypto-random-string.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/currently-unhandled/package.json b/node_modules/currently-unhandled/package.json index 99380249b..306fe408c 100644 --- a/node_modules/currently-unhandled/package.json +++ b/node_modules/currently-unhandled/package.json @@ -1,34 +1,51 @@ { - "name": "currently-unhandled", - "version": "0.4.1", - "description": "Track the list of currently unhandled promise rejections.", - "license": "MIT", - "repository": "jamestalmage/currently-unhandled", + "_args": [ + [ + "currently-unhandled@0.4.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "currently-unhandled@0.4.1", + "_id": "currently-unhandled@0.4.1", + "_inBundle": false, + "_integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "_location": "/currently-unhandled", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "currently-unhandled@0.4.1", + "name": "currently-unhandled", + "escapedName": "currently-unhandled", + "rawSpec": "0.4.1", + "saveSpec": null, + "fetchSpec": "0.4.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "_spec": "0.4.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "James Talmage", "email": "james@talmage.io", "url": "github.com/jamestalmage" }, - "engines": { - "node": ">=0.10.0" + "ava": { + "files": "test.js" }, - "scripts": { - "test": "xo && nyc ava" + "browser": { + "./index.js": "./browser.js" + }, + "bugs": { + "url": "https://github.com/jamestalmage/currently-unhandled/issues" }, - "files": [ - "index.js", - "core.js", - "browser.js" - ], - "keywords": [ - "unhandled", - "unhandledRejection", - "rejected", - "promises" - ], "dependencies": { "array-find-index": "^1.0.1" }, + "description": "Track the list of currently unhandled promise rejections.", "devDependencies": { "ava": "^0.15.1", "bluebird": "^3.4.0", @@ -46,18 +63,37 @@ "watchify": "^3.7.0", "xo": "^0.15.0" }, - "browser": { - "./index.js": "./browser.js" - }, - "ava": { - "files": "test.js" + "engines": { + "node": ">=0.10.0" }, + "files": [ + "index.js", + "core.js", + "browser.js" + ], + "homepage": "https://github.com/jamestalmage/currently-unhandled#readme", + "keywords": [ + "unhandled", + "unhandledRejection", + "rejected", + "promises" + ], + "license": "MIT", + "name": "currently-unhandled", "nyc": { "reporter": [ "lcov", "text" ] }, + "repository": { + "type": "git", + "url": "git+https://github.com/jamestalmage/currently-unhandled.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "0.4.1", "xo": { "ignores": [ "browser-bluebird-test.js" @@ -68,4 +104,4 @@ "node" ] } -} \ No newline at end of file +} diff --git a/node_modules/date-time/package.json b/node_modules/date-time/package.json index 3b28adcd3..b9245e039 100644 --- a/node_modules/date-time/package.json +++ b/node_modules/date-time/package.json @@ -1,23 +1,56 @@ { - "name": "date-time", - "version": "2.1.0", - "description": "Pretty datetime: `2014-01-09 06:46:01`", - "license": "MIT", - "repository": "sindresorhus/date-time", + "_args": [ + [ + "date-time@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "date-time@2.1.0", + "_id": "date-time@2.1.0", + "_inBundle": false, + "_integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", + "_location": "/date-time", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "date-time@2.1.0", + "name": "date-time", + "escapedName": "date-time", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/date-time/-/date-time-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/date-time/issues" + }, + "dependencies": { + "time-zone": "^1.0.0" + }, + "description": "Pretty datetime: `2014-01-09 06:46:01`", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/date-time#readme", "keywords": [ "datetime", "date-time", @@ -29,11 +62,14 @@ "zone", "timestamp" ], - "dependencies": { - "time-zone": "^1.0.0" + "license": "MIT", + "name": "date-time", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/date-time.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json index a71916fc4..dc621835d 100644 --- a/node_modules/debug/package.json +++ b/node_modules/debug/package.json @@ -1,44 +1,62 @@ { - "name": "debug", - "version": "4.1.1", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "_args": [ + [ + "debug@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "debug@4.1.1", + "_id": "debug@4.1.1", + "_inBundle": false, + "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "_location": "/debug", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "debug@4.1.1", + "name": "debug", + "escapedName": "debug", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" + "_requiredBy": [ + "/@eslint/eslintrc", + "/@typescript-eslint/eslint-plugin", + "/@typescript-eslint/parser", + "/@typescript-eslint/typescript-estree", + "/ava", + "/eslint", + "/nock" ], - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "author": "TJ Holowaychuk ", + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser", - "test:node": "istanbul cover _mocha -- test.js", - "pretest:browser": "npm run build", - "test:browser": "karma start --single-run", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "build": "npm run build:debug && npm run build:test", - "clean": "rimraf dist coverage", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, "dependencies": { "ms": "^2.1.1" }, + "description": "small debugging utility", "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", @@ -57,7 +75,38 @@ "rimraf": "^2.5.4", "xo": "^0.23.0" }, + "files": [ + "src", + "dist/debug.js", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", "main": "./src/index.js", - "browser": "./src/browser.js", - "unpkg": "./dist/debug.js" -} \ No newline at end of file + "name": "debug", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": { + "build": "npm run build:debug && npm run build:test", + "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", + "build:test": "babel -d dist test.js", + "clean": "rimraf dist coverage", + "lint": "xo", + "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", + "pretest:browser": "npm run build", + "test": "npm run test:node && npm run test:browser", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls", + "test:node": "istanbul cover _mocha -- test.js" + }, + "unpkg": "./dist/debug.js", + "version": "4.1.1" +} diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json index 861013122..abf71e71c 100644 --- a/node_modules/decamelize/package.json +++ b/node_modules/decamelize/package.json @@ -1,23 +1,54 @@ { - "name": "decamelize", - "version": "1.2.0", - "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", - "license": "MIT", - "repository": "sindresorhus/decamelize", + "_args": [ + [ + "decamelize@1.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "decamelize@1.2.0", + "_id": "decamelize@1.2.0", + "_inBundle": false, + "_integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "_location": "/decamelize", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "decamelize@1.2.0", + "name": "decamelize", + "escapedName": "decamelize", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/yargs", + "/yargs-parser" + ], + "_resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/decamelize/issues" + }, + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/decamelize#readme", "keywords": [ "decamelize", "decamelcase", @@ -31,8 +62,14 @@ "text", "convert" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "decamelize", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/decamelize.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/node_modules/decompress-response/package.json b/node_modules/decompress-response/package.json index 25f1828ef..1195710ac 100644 --- a/node_modules/decompress-response/package.json +++ b/node_modules/decompress-response/package.json @@ -1,30 +1,53 @@ { - "name": "decompress-response", - "version": "3.3.0", - "description": "Decompress a HTTP response if needed", - "license": "MIT", - "repository": "sindresorhus/decompress-response", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - } + "_args": [ + [ + "decompress-response@3.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "decompress-response@3.3.0", + "_id": "decompress-response@3.3.0", + "_inBundle": false, + "_integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "_location": "/decompress-response", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "decompress-response@3.3.0", + "name": "decompress-response", + "escapedName": "decompress-response", + "rawSpec": "3.3.0", + "saveSpec": null, + "fetchSpec": "3.3.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "_spec": "3.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/sindresorhus/decompress-response/issues" + }, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "description": "Decompress a HTTP response if needed", + "devDependencies": { + "ava": "*", + "get-stream": "^3.0.0", + "pify": "^3.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/decompress-response#readme", "keywords": [ "decompress", "response", @@ -41,13 +64,26 @@ "stream", "compressed" ], - "dependencies": { - "mimic-response": "^1.0.0" + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + } + ], + "name": "decompress-response", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/decompress-response.git" }, - "devDependencies": { - "ava": "*", - "get-stream": "^3.0.0", - "pify": "^3.0.0", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.3.0" +} diff --git a/node_modules/deep-extend/package.json b/node_modules/deep-extend/package.json index e507ea0fb..b65b3c95e 100644 --- a/node_modules/deep-extend/package.json +++ b/node_modules/deep-extend/package.json @@ -1,31 +1,40 @@ { - "name": "deep-extend", - "description": "Recursive object extending", - "license": "MIT", - "version": "0.6.0", - "homepage": "https://github.com/unclechu/node-deep-extend", - "keywords": [ - "deep-extend", - "extend", - "deep", - "recursive", - "xtend", - "clone", - "merge", - "json" + "_args": [ + [ + "deep-extend@0.6.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "licenses": [ - { - "type": "MIT", - "url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/unclechu/node-deep-extend.git" + "_development": true, + "_from": "deep-extend@0.6.0", + "_id": "deep-extend@0.6.0", + "_inBundle": false, + "_integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "_location": "/deep-extend", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deep-extend@0.6.0", + "name": "deep-extend", + "escapedName": "deep-extend", + "rawSpec": "0.6.0", + "saveSpec": null, + "fetchSpec": "0.6.0" + }, + "_requiredBy": [ + "/rc" + ], + "_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "_spec": "0.6.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Viacheslav Lotsmanov", + "email": "lotsmanov89@gmail.com" + }, + "bugs": { + "url": "https://github.com/unclechu/node-deep-extend/issues" }, - "author": "Viacheslav Lotsmanov ", - "bugs": "https://github.com/unclechu/node-deep-extend/issues", "contributors": [ { "name": "Romain Prieto", @@ -44,19 +53,44 @@ "url": "https://github.com/mwakerman" } ], - "main": "lib/deep-extend.js", - "engines": { - "node": ">=4.0.0" - }, - "scripts": { - "test": "./node_modules/.bin/mocha" - }, + "description": "Recursive object extending", "devDependencies": { "mocha": "5.2.0", "should": "13.2.1" }, + "engines": { + "node": ">=4.0.0" + }, "files": [ "index.js", "lib/" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/unclechu/node-deep-extend", + "keywords": [ + "deep-extend", + "extend", + "deep", + "recursive", + "xtend", + "clone", + "merge", + "json" + ], + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE" + } + ], + "main": "lib/deep-extend.js", + "name": "deep-extend", + "repository": { + "type": "git", + "url": "git://github.com/unclechu/node-deep-extend.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.6.0" +} diff --git a/node_modules/deep-is/package.json b/node_modules/deep-is/package.json index d3fe0febc..55d83399e 100644 --- a/node_modules/deep-is/package.json +++ b/node_modules/deep-is/package.json @@ -1,37 +1,69 @@ { - "name": "deep-is", - "version": "0.1.3", - "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", - "main": "index.js", - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "tape test/*.js" - }, - "devDependencies": { - "tape": "~1.0.2" - }, - "repository": { - "type": "git", - "url": "http://github.com/thlorenz/deep-is.git" - }, - "keywords": [ - "equality", - "equal", - "compare" + "_args": [ + [ + "deep-is@0.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "deep-is@0.1.3", + "_id": "deep-is@0.1.3", + "_inBundle": false, + "_integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "_location": "/deep-is", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deep-is@0.1.3", + "name": "deep-is", + "escapedName": "deep-is", + "rawSpec": "0.1.3", + "saveSpec": null, + "fetchSpec": "0.1.3" + }, + "_requiredBy": [ + "/optionator" + ], + "_resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "_spec": "0.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Thorsten Lorenz", "email": "thlorenz@gmx.de", "url": "http://thlorenz.com" }, + "bugs": { + "url": "https://github.com/thlorenz/deep-is/issues" + }, + "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", + "devDependencies": { + "tape": "~1.0.2" + }, + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "homepage": "https://github.com/thlorenz/deep-is#readme", + "keywords": [ + "equality", + "equal", + "compare" + ], "license": { "type": "MIT", "url": "https://github.com/thlorenz/deep-is/blob/master/LICENSE" }, + "main": "index.js", + "name": "deep-is", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/thlorenz/deep-is.git" + }, + "scripts": { + "test": "tape test/*.js" + }, "testling": { "files": "test/*.js", "browsers": { @@ -57,5 +89,6 @@ 12 ] } - } -} \ No newline at end of file + }, + "version": "0.1.3" +} diff --git a/node_modules/defaults/package.json b/node_modules/defaults/package.json index f34731bf6..90b173607 100644 --- a/node_modules/defaults/package.json +++ b/node_modules/defaults/package.json @@ -1,26 +1,61 @@ { - "name": "defaults", - "version": "1.0.3", + "_args": [ + [ + "defaults@1.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "defaults@1.0.3", + "_id": "defaults@1.0.3", + "_inBundle": false, + "_integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "_location": "/defaults", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "defaults@1.0.3", + "name": "defaults", + "escapedName": "defaults", + "rawSpec": "1.0.3", + "saveSpec": null, + "fetchSpec": "1.0.3" + }, + "_requiredBy": [ + "/wcwidth" + ], + "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "_spec": "1.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Elijah Insua", + "email": "tmpvar@gmail.com" + }, + "bugs": { + "url": "https://github.com/tmpvar/defaults/issues" + }, + "dependencies": { + "clone": "^1.0.2" + }, "description": "merge single level defaults over a config object", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/tmpvar/defaults.git" + "devDependencies": { + "tap": "^2.0.0" }, + "homepage": "https://github.com/tmpvar/defaults#readme", "keywords": [ "config", "defaults" ], - "author": "Elijah Insua ", "license": "MIT", - "readmeFilename": "README.md", - "dependencies": { - "clone": "^1.0.2" + "main": "index.js", + "name": "defaults", + "repository": { + "type": "git", + "url": "git://github.com/tmpvar/defaults.git" }, - "devDependencies": { - "tap": "^2.0.0" - } -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.0.3" +} diff --git a/node_modules/defer-to-connect/package.json b/node_modules/defer-to-connect/package.json index a47091f68..8e70c9255 100644 --- a/node_modules/defer-to-connect/package.json +++ b/node_modules/defer-to-connect/package.json @@ -1,41 +1,53 @@ { - "name": "defer-to-connect", - "version": "1.1.3", - "description": "The safe way to handle the `connect` socket event", - "main": "dist", - "files": [ - "dist" + "_args": [ + [ + "defer-to-connect@1.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "build": "del-cli dist && tsc", - "prepublishOnly": "npm run build", - "test": "xo && nyc ava", - "coveralls": "nyc report --reporter=text-lcov | coveralls" + "_development": true, + "_from": "defer-to-connect@1.1.3", + "_id": "defer-to-connect@1.1.3", + "_inBundle": false, + "_integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "_location": "/defer-to-connect", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "defer-to-connect@1.1.3", + "name": "defer-to-connect", + "escapedName": "defer-to-connect", + "rawSpec": "1.1.3", + "saveSpec": null, + "fetchSpec": "1.1.3" }, - "keywords": [ - "socket", - "connect", - "event" + "_requiredBy": [ + "/@szmarczak/http-timer" ], - "author": "Szymon Marczak", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/szmarczak/defer-to-connect.git" + "_resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "_spec": "1.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Szymon Marczak" + }, + "ava": { + "babel": false, + "compileEnhancements": false, + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ], + "files": [ + "!dist/tests/test.d.ts" + ] }, "bugs": { "url": "https://github.com/szmarczak/defer-to-connect/issues" }, - "homepage": "https://github.com/szmarczak/defer-to-connect#readme", - "xo": { - "extends": "xo-typescript", - "extensions": [ - "ts" - ], - "rules": { - "ava/no-ignored-test-files": "off" - } - }, + "description": "The safe way to handle the `connect` socket event", "devDependencies": { "@sindresorhus/tsconfig": "^0.5.0", "@types/node": "^12.12.4", @@ -52,23 +64,42 @@ "typescript": "^3.6.4", "xo": "^0.25.3" }, + "files": [ + "dist" + ], + "homepage": "https://github.com/szmarczak/defer-to-connect#readme", + "keywords": [ + "socket", + "connect", + "event" + ], + "license": "MIT", + "main": "dist", + "name": "defer-to-connect", "nyc": { "extension": [ ".ts" ] }, - "ava": { - "babel": false, - "compileEnhancements": false, + "repository": { + "type": "git", + "url": "git+https://github.com/szmarczak/defer-to-connect.git" + }, + "scripts": { + "build": "del-cli dist && tsc", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "prepublishOnly": "npm run build", + "test": "xo && nyc ava" + }, + "types": "dist", + "version": "1.1.3", + "xo": { + "extends": "xo-typescript", "extensions": [ "ts" ], - "require": [ - "ts-node/register" - ], - "files": [ - "!dist/tests/test.d.ts" - ] - }, - "types": "dist" -} \ No newline at end of file + "rules": { + "ava/no-ignored-test-files": "off" + } + } +} diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json index 06d4ccdeb..d7607c34b 100644 --- a/node_modules/define-properties/package.json +++ b/node_modules/define-properties/package.json @@ -1,26 +1,60 @@ { - "name": "define-properties", - "version": "1.1.3", - "author": "Jordan Harband", + "_args": [ + [ + "define-properties@1.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "define-properties@1.1.3", + "_id": "define-properties@1.1.3", + "_inBundle": false, + "_integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "_location": "/define-properties", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "define-properties@1.1.3", + "name": "define-properties", + "escapedName": "define-properties", + "rawSpec": "1.1.3", + "saveSpec": null, + "fetchSpec": "1.1.3" + }, + "_requiredBy": [ + "/array-includes", + "/array.prototype.flat", + "/object.assign", + "/object.values", + "/string.prototype.trimend", + "/string.prototype.trimstart" + ], + "_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "_spec": "1.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband" + }, + "bugs": { + "url": "https://github.com/ljharb/define-properties/issues" + }, + "dependencies": { + "object-keys": "^1.0.12" + }, "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npm run --silent security", - "tests-only": "node test/index.js", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "npm run --silent jscs && npm run --silent eslint", - "jscs": "jscs test/*.js *.js", - "eslint": "eslint test/*.js *.js", - "security": "nsp check" + "devDependencies": { + "@ljharb/eslint-config": "^13.0.0", + "covert": "^1.1.0", + "eslint": "^5.3.0", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "tape": "^4.9.0" }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/define-properties.git" + "engines": { + "node": ">= 0.4" }, + "homepage": "https://github.com/ljharb/define-properties#readme", "keywords": [ "Object.defineProperty", "Object.defineProperties", @@ -30,16 +64,24 @@ "define", "ES5" ], - "dependencies": { - "object-keys": "^1.0.12" + "license": "MIT", + "main": "index.js", + "name": "define-properties", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/define-properties.git" }, - "devDependencies": { - "@ljharb/eslint-config": "^13.0.0", - "covert": "^1.1.0", - "eslint": "^5.3.0", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "tape": "^4.9.0" + "scripts": { + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "eslint": "eslint test/*.js *.js", + "jscs": "jscs test/*.js *.js", + "lint": "npm run --silent jscs && npm run --silent eslint", + "posttest": "npm run --silent security", + "pretest": "npm run --silent lint", + "security": "nsp check", + "test": "npm run --silent tests-only", + "tests-only": "node test/index.js" }, "testling": { "files": "test/index.js", @@ -59,7 +101,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "1.1.3" +} diff --git a/node_modules/del/node_modules/globby/package.json b/node_modules/del/node_modules/globby/package.json index e8b134ab4..ecb9cd982 100644 --- a/node_modules/del/node_modules/globby/package.json +++ b/node_modules/del/node_modules/globby/package.json @@ -1,27 +1,72 @@ { - "name": "globby", - "version": "10.0.2", - "description": "Extends `glob` with support for multiple patterns and exposes a Promise API", - "license": "MIT", - "repository": "sindresorhus/globby", + "_args": [ + [ + "globby@10.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "globby@10.0.2", + "_id": "globby@10.0.2", + "_inBundle": false, + "_integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "_location": "/del/globby", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "globby@10.0.2", + "name": "globby", + "escapedName": "globby", + "rawSpec": "10.0.2", + "saveSpec": null, + "fetchSpec": "10.0.2" + }, + "_requiredBy": [ + "/del" + ], + "_resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "_spec": "10.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/globby/issues" + }, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "description": "Extends `glob` with support for multiple patterns and exposes a Promise API", + "devDependencies": { + "ava": "^2.1.0", + "get-stream": "^5.1.0", + "glob-stream": "^6.1.0", + "globby": "github:sindresorhus/globby#master", + "matcha": "^0.7.0", + "rimraf": "^2.6.3", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "bench": "npm update glob-stream fast-glob && matcha bench.js", - "test": "xo && ava && tsd" - }, "files": [ "index.js", "gitignore.js", "index.d.ts", "stream-utils.js" ], + "homepage": "https://github.com/sindresorhus/globby#readme", "keywords": [ "all", "array", @@ -55,29 +100,20 @@ "gitignore", "git" ], - "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" + "license": "MIT", + "name": "globby", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/globby.git" }, - "devDependencies": { - "ava": "^2.1.0", - "get-stream": "^5.1.0", - "glob-stream": "^6.1.0", - "globby": "sindresorhus/globby#master", - "matcha": "^0.7.0", - "rimraf": "^2.6.3", - "tsd": "^0.7.3", - "xo": "^0.24.0" + "scripts": { + "bench": "npm update glob-stream fast-glob && matcha bench.js", + "test": "xo && ava && tsd" }, + "version": "10.0.2", "xo": { "ignores": [ "fixtures" ] } -} \ No newline at end of file +} diff --git a/node_modules/del/node_modules/p-map/package.json b/node_modules/del/node_modules/p-map/package.json index df6f80d15..ba8a21748 100644 --- a/node_modules/del/node_modules/p-map/package.json +++ b/node_modules/del/node_modules/p-map/package.json @@ -1,24 +1,62 @@ { - "name": "p-map", - "version": "3.0.0", - "description": "Map over promises concurrently", - "license": "MIT", - "repository": "sindresorhus/p-map", + "_args": [ + [ + "p-map@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-map@3.0.0", + "_id": "p-map@3.0.0", + "_inBundle": false, + "_integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "_location": "/del/p-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-map@3.0.0", + "name": "p-map", + "escapedName": "p-map", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/del" + ], + "_resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-map/issues" + }, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "description": "Map over promises concurrently", + "devDependencies": { + "ava": "^2.2.0", + "delay": "^4.1.0", + "in-range": "^2.0.0", + "random-int": "^2.0.0", + "time-span": "^3.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/p-map#readme", "keywords": [ "promise", "map", @@ -37,16 +75,14 @@ "parallel", "bluebird" ], - "dependencies": { - "aggregate-error": "^3.0.0" + "license": "MIT", + "name": "p-map", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-map.git" }, - "devDependencies": { - "ava": "^2.2.0", - "delay": "^4.1.0", - "in-range": "^2.0.0", - "random-int": "^2.0.0", - "time-span": "^3.1.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.0" +} diff --git a/node_modules/del/package.json b/node_modules/del/package.json index e230d78b8..10b93b7b0 100644 --- a/node_modules/del/package.json +++ b/node_modules/del/package.json @@ -1,25 +1,78 @@ { - "name": "del", - "version": "5.1.0", - "description": "Delete files and directories", - "license": "MIT", - "repository": "sindresorhus/del", + "_args": [ + [ + "del@5.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "del@5.1.0", + "_id": "del@5.1.0", + "_inBundle": false, + "_integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", + "_location": "/del", + "_phantomChildren": { + "@types/glob": "7.1.1", + "aggregate-error": "3.0.1", + "array-union": "2.1.0", + "dir-glob": "3.0.1", + "fast-glob": "3.2.2", + "glob": "7.1.6", + "ignore": "5.1.4", + "merge2": "1.3.0", + "slash": "3.0.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "del@5.1.0", + "name": "del", + "escapedName": "del", + "rawSpec": "5.1.0", + "saveSpec": null, + "fetchSpec": "5.1.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", + "_spec": "5.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/del/issues" + }, + "dependencies": { + "globby": "^10.0.1", + "graceful-fs": "^4.2.2", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.1", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0" + }, + "description": "Delete files and directories", + "devDependencies": { + "ava": "^2.3.0", + "benchmark": "^2.1.4", + "make-dir": "^3.0.0", + "tempy": "^0.3.0", + "tsd": "^0.7.4", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "node benchmark.js" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/del#readme", "keywords": [ "delete", "files", @@ -44,22 +97,15 @@ "fs", "filesystem" ], - "dependencies": { - "globby": "^10.0.1", - "graceful-fs": "^4.2.2", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.1", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0" + "license": "MIT", + "name": "del", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/del.git" }, - "devDependencies": { - "ava": "^2.3.0", - "benchmark": "^2.1.4", - "make-dir": "^3.0.0", - "tempy": "^0.3.0", - "tsd": "^0.7.4", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "bench": "node benchmark.js", + "test": "xo && ava && tsd" + }, + "version": "5.1.0" +} diff --git a/node_modules/delayed-stream/.npmignore b/node_modules/delayed-stream/.npmignore new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/node_modules/delayed-stream/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/delayed-stream/License b/node_modules/delayed-stream/License new file mode 100644 index 000000000..4804b7ab4 --- /dev/null +++ b/node_modules/delayed-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/delayed-stream/Makefile b/node_modules/delayed-stream/Makefile new file mode 100644 index 000000000..b4ff85a33 --- /dev/null +++ b/node_modules/delayed-stream/Makefile @@ -0,0 +1,7 @@ +SHELL := /bin/bash + +test: + @./test/run.js + +.PHONY: test + diff --git a/node_modules/delayed-stream/Readme.md b/node_modules/delayed-stream/Readme.md new file mode 100644 index 000000000..aca36f9f0 --- /dev/null +++ b/node_modules/delayed-stream/Readme.md @@ -0,0 +1,141 @@ +# delayed-stream + +Buffers events from a stream until you are ready to handle them. + +## Installation + +``` bash +npm install delayed-stream +``` + +## Usage + +The following example shows how to write a http echo server that delays its +response by 1000 ms. + +``` javascript +var DelayedStream = require('delayed-stream'); +var http = require('http'); + +http.createServer(function(req, res) { + var delayed = DelayedStream.create(req); + + setTimeout(function() { + res.writeHead(200); + delayed.pipe(res); + }, 1000); +}); +``` + +If you are not using `Stream#pipe`, you can also manually release the buffered +events by calling `delayedStream.resume()`: + +``` javascript +var delayed = DelayedStream.create(req); + +setTimeout(function() { + // Emit all buffered events and resume underlaying source + delayed.resume(); +}, 1000); +``` + +## Implementation + +In order to use this meta stream properly, here are a few things you should +know about the implementation. + +### Event Buffering / Proxying + +All events of the `source` stream are hijacked by overwriting the `source.emit` +method. Until node implements a catch-all event listener, this is the only way. + +However, delayed-stream still continues to emit all events it captures on the +`source`, regardless of whether you have released the delayed stream yet or +not. + +Upon creation, delayed-stream captures all `source` events and stores them in +an internal event buffer. Once `delayedStream.release()` is called, all +buffered events are emitted on the `delayedStream`, and the event buffer is +cleared. After that, delayed-stream merely acts as a proxy for the underlaying +source. + +### Error handling + +Error events on `source` are buffered / proxied just like any other events. +However, `delayedStream.create` attaches a no-op `'error'` listener to the +`source`. This way you only have to handle errors on the `delayedStream` +object, rather than in two places. + +### Buffer limits + +delayed-stream provides a `maxDataSize` property that can be used to limit +the amount of data being buffered. In order to protect you from bad `source` +streams that don't react to `source.pause()`, this feature is enabled by +default. + +## API + +### DelayedStream.create(source, [options]) + +Returns a new `delayedStream`. Available options are: + +* `pauseStream` +* `maxDataSize` + +The description for those properties can be found below. + +### delayedStream.source + +The `source` stream managed by this object. This is useful if you are +passing your `delayedStream` around, and you still want to access properties +on the `source` object. + +### delayedStream.pauseStream = true + +Whether to pause the underlaying `source` when calling +`DelayedStream.create()`. Modifying this property afterwards has no effect. + +### delayedStream.maxDataSize = 1024 * 1024 + +The amount of data to buffer before emitting an `error`. + +If the underlaying source is emitting `Buffer` objects, the `maxDataSize` +refers to bytes. + +If the underlaying source is emitting JavaScript strings, the size refers to +characters. + +If you know what you are doing, you can set this property to `Infinity` to +disable this feature. You can also modify this property during runtime. + +### delayedStream.dataSize = 0 + +The amount of data buffered so far. + +### delayedStream.readable + +An ECMA5 getter that returns the value of `source.readable`. + +### delayedStream.resume() + +If the `delayedStream` has not been released so far, `delayedStream.release()` +is called. + +In either case, `source.resume()` is called. + +### delayedStream.pause() + +Calls `source.pause()`. + +### delayedStream.pipe(dest) + +Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. + +### delayedStream.release() + +Emits and clears all events that have been buffered up so far. This does not +resume the underlaying source, use `delayedStream.resume()` instead. + +## License + +delayed-stream is licensed under the MIT license. diff --git a/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/delayed-stream/lib/delayed_stream.js new file mode 100644 index 000000000..b38fc85ff --- /dev/null +++ b/node_modules/delayed-stream/lib/delayed_stream.js @@ -0,0 +1,107 @@ +var Stream = require('stream').Stream; +var util = require('util'); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json new file mode 100644 index 000000000..4202bbe0f --- /dev/null +++ b/node_modules/delayed-stream/package.json @@ -0,0 +1,62 @@ +{ + "_from": "delayed-stream@~1.0.0", + "_id": "delayed-stream@1.0.0", + "_inBundle": false, + "_integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "_location": "/delayed-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "delayed-stream@~1.0.0", + "name": "delayed-stream", + "escapedName": "delayed-stream", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/combined-stream" + ], + "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "_shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619", + "_spec": "delayed-stream@~1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/combined-stream", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "bugs": { + "url": "https://github.com/felixge/node-delayed-stream/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Mike Atkins", + "email": "apeherder@gmail.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Buffers events from a stream until you are ready to handle them.", + "devDependencies": { + "fake": "0.2.0", + "far": "0.0.1" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/felixge/node-delayed-stream", + "license": "MIT", + "main": "./lib/delayed_stream", + "name": "delayed-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-delayed-stream.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.0.0" +} diff --git a/node_modules/deprecation/package.json b/node_modules/deprecation/package.json index 02e6bc9d4..cf81bf6a6 100644 --- a/node_modules/deprecation/package.json +++ b/node_modules/deprecation/package.json @@ -1,28 +1,39 @@ { - "name": "deprecation", - "description": "Log a deprecation message with stack", - "version": "2.3.1", - "license": "ISC", - "files": [ - "dist-*/", - "bin/" + "_args": [ + [ + "deprecation@2.3.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "esnext": "dist-src/index.js", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "types": "dist-types/index.d.ts", - "pika": true, - "sideEffects": false, - "keywords": [ - "deprecate", - "deprecated", - "deprecation" + "_from": "deprecation@2.3.1", + "_id": "deprecation@2.3.1", + "_inBundle": false, + "_integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "_location": "/deprecation", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deprecation@2.3.1", + "name": "deprecation", + "escapedName": "deprecation", + "rawSpec": "2.3.1", + "saveSpec": null, + "fetchSpec": "2.3.1" + }, + "_requiredBy": [ + "/@octokit/plugin-rest-endpoint-methods", + "/@octokit/request", + "/@octokit/request-error" ], - "repository": { - "type": "git", - "url": "https://github.com/gr2m/deprecation.git" + "_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "_spec": "2.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/gr2m/deprecation/issues" }, "dependencies": {}, + "description": "Log a deprecation message with stack", "devDependencies": { "@pika/pack": "^0.3.7", "@pika/plugin-build-node": "^0.4.0", @@ -30,5 +41,28 @@ "@pika/plugin-build-web": "^0.4.0", "@pika/plugin-standard-pkg": "^0.4.0", "semantic-release": "^15.13.3" - } -} \ No newline at end of file + }, + "esnext": "dist-src/index.js", + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/deprecation#readme", + "keywords": [ + "deprecate", + "deprecated", + "deprecation" + ], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "deprecation", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/deprecation.git" + }, + "sideEffects": false, + "types": "dist-types/index.d.ts", + "version": "2.3.1" +} diff --git a/node_modules/diff/package.json b/node_modules/diff/package.json index 4ff484e88..895f8228b 100644 --- a/node_modules/diff/package.json +++ b/node_modules/diff/package.json @@ -1,34 +1,40 @@ { - "name": "diff", - "version": "4.0.2", - "description": "A javascript text diff implementation.", - "keywords": [ - "diff", - "javascript" + "_args": [ + [ + "diff@4.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "maintainers": [ - "Kevin Decker (http://incaseofstairs.com)" + "_development": true, + "_from": "diff@4.0.2", + "_id": "diff@4.0.2", + "_inBundle": false, + "_integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "_location": "/diff", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "diff@4.0.2", + "name": "diff", + "escapedName": "diff", + "rawSpec": "4.0.2", + "saveSpec": null, + "fetchSpec": "4.0.2" + }, + "_requiredBy": [ + "/sinon" ], - "bugs": { - "email": "kpdecker@gmail.com", - "url": "http://github.com/kpdecker/jsdiff/issues" - }, - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" - }, - "engines": { - "node": ">=0.3.1" - }, - "main": "./lib/index.js", - "module": "./lib/index.es6.js", + "_resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "_spec": "4.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "browser": "./dist/diff.js", - "scripts": { - "clean": "rm -rf lib/ dist/", - "build:node": "yarn babel --out-dir lib --source-maps=inline src", - "test": "grunt" + "bugs": { + "url": "http://github.com/kpdecker/jsdiff/issues", + "email": "kpdecker@gmail.com" }, + "dependencies": {}, + "description": "A javascript text diff implementation.", "devDependencies": { "@babel/cli": "^7.2.3", "@babel/core": "^7.2.2", @@ -69,5 +75,34 @@ "webpack": "^4.28.3", "webpack-dev-server": "^3.1.14" }, - "optionalDependencies": {} -} \ No newline at end of file + "engines": { + "node": ">=0.3.1" + }, + "homepage": "https://github.com/kpdecker/jsdiff#readme", + "keywords": [ + "diff", + "javascript" + ], + "license": "BSD-3-Clause", + "main": "./lib/index.js", + "maintainers": [ + { + "name": "Kevin Decker", + "email": "kpdecker@gmail.com", + "url": "http://incaseofstairs.com" + } + ], + "module": "./lib/index.es6.js", + "name": "diff", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/kpdecker/jsdiff.git" + }, + "scripts": { + "build:node": "yarn babel --out-dir lib --source-maps=inline src", + "clean": "rm -rf lib/ dist/", + "test": "grunt" + }, + "version": "4.0.2" +} diff --git a/node_modules/dir-glob/package.json b/node_modules/dir-glob/package.json index e2334d4af..09f919cae 100644 --- a/node_modules/dir-glob/package.json +++ b/node_modules/dir-glob/package.json @@ -1,23 +1,61 @@ { - "name": "dir-glob", - "version": "3.0.1", - "description": "Convert directories to glob compatible strings", - "license": "MIT", - "repository": "kevva/dir-glob", + "_args": [ + [ + "dir-glob@3.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "dir-glob@3.0.1", + "_id": "dir-glob@3.0.1", + "_inBundle": false, + "_integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "_location": "/dir-glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "dir-glob@3.0.1", + "name": "dir-glob", + "escapedName": "dir-glob", + "rawSpec": "3.0.1", + "saveSpec": null, + "fetchSpec": "3.0.1" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree/globby", + "/del/globby", + "/globby" + ], + "_resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "_spec": "3.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Kevin Mårtensson", "email": "kevinmartensson@gmail.com", "url": "github.com/kevva" }, + "bugs": { + "url": "https://github.com/kevva/dir-glob/issues" + }, + "dependencies": { + "path-type": "^4.0.0" + }, + "description": "Convert directories to glob compatible strings", + "devDependencies": { + "ava": "^2.1.0", + "del": "^4.1.1", + "make-dir": "^3.0.0", + "rimraf": "^2.5.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/kevva/dir-glob#readme", "keywords": [ "convert", "directory", @@ -25,14 +63,14 @@ "files", "glob" ], - "dependencies": { - "path-type": "^4.0.0" + "license": "MIT", + "name": "dir-glob", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/dir-glob.git" }, - "devDependencies": { - "ava": "^2.1.0", - "del": "^4.1.1", - "make-dir": "^3.0.0", - "rimraf": "^2.5.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.1" +} diff --git a/node_modules/dot-prop/package.json b/node_modules/dot-prop/package.json index a1c3610c3..c67efa585 100644 --- a/node_modules/dot-prop/package.json +++ b/node_modules/dot-prop/package.json @@ -1,25 +1,59 @@ { - "name": "dot-prop", - "version": "5.2.0", - "description": "Get, set, or delete a property from a nested object using a dot path", - "license": "MIT", - "repository": "sindresorhus/dot-prop", + "_args": [ + [ + "dot-prop@5.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "dot-prop@5.2.0", + "_id": "dot-prop@5.2.0", + "_inBundle": false, + "_integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "_location": "/dot-prop", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "dot-prop@5.2.0", + "name": "dot-prop", + "escapedName": "dot-prop", + "rawSpec": "5.2.0", + "saveSpec": null, + "fetchSpec": "5.2.0" + }, + "_requiredBy": [ + "/configstore" + ], + "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/dot-prop/issues" + }, + "dependencies": { + "is-obj": "^2.0.0" + }, + "description": "Get, set, or delete a property from a nested object using a dot path", + "devDependencies": { + "ava": "^2.1.0", + "benchmark": "^2.1.4", + "tsd": "^0.7.2", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "node bench.js" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/dot-prop#readme", "keywords": [ "object", "prop", @@ -33,13 +67,15 @@ "notation", "dotty" ], - "dependencies": { - "is-obj": "^2.0.0" + "license": "MIT", + "name": "dot-prop", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/dot-prop.git" }, - "devDependencies": { - "ava": "^2.1.0", - "benchmark": "^2.1.4", - "tsd": "^0.7.2", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "bench": "node bench.js", + "test": "xo && ava && tsd" + }, + "version": "5.2.0" +} diff --git a/node_modules/duplexer3/package.json b/node_modules/duplexer3/package.json index 195def149..1eea3b2b7 100644 --- a/node_modules/duplexer3/package.json +++ b/node_modules/duplexer3/package.json @@ -1,17 +1,52 @@ { - "name": "duplexer3", - "version": "0.1.4", + "_args": [ + [ + "duplexer3@0.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "duplexer3@0.1.4", + "_id": "duplexer3@0.1.4", + "_inBundle": false, + "_integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "_location": "/duplexer3", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "duplexer3@0.1.4", + "name": "duplexer3", + "escapedName": "duplexer3", + "rawSpec": "0.1.4", + "saveSpec": null, + "fetchSpec": "0.1.4" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "_spec": "0.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Conrad Pankoff", + "email": "deoxxa@fknsrs.biz", + "url": "http://www.fknsrs.biz/" + }, + "bugs": { + "url": "https://github.com/floatdrop/duplexer3/issues" + }, "description": "Like duplexer but using streams3", + "devDependencies": { + "mocha": "^2.2.5" + }, "engine": { "node": ">=4" }, "files": [ "index.js" ], - "scripts": { - "test": "mocha -R tap" - }, - "repository": "floatdrop/duplexer3", + "homepage": "https://github.com/floatdrop/duplexer3#readme", "keywords": [ "duplex", "duplexer", @@ -20,9 +55,14 @@ "join", "combine" ], - "author": "Conrad Pankoff (http://www.fknsrs.biz/)", "license": "BSD-3-Clause", - "devDependencies": { - "mocha": "^2.2.5" - } -} \ No newline at end of file + "name": "duplexer3", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/duplexer3.git" + }, + "scripts": { + "test": "mocha -R tap" + }, + "version": "0.1.4" +} diff --git a/node_modules/emittery/package.json b/node_modules/emittery/package.json index 1bc264a4c..63ba935a1 100644 --- a/node_modules/emittery/package.json +++ b/node_modules/emittery/package.json @@ -1,25 +1,61 @@ { - "name": "emittery", - "version": "0.6.0", - "description": "Simple and modern async event emitter", - "license": "MIT", - "repository": "sindresorhus/emittery", - "funding": "https://github.com/sindresorhus/emittery?sponsor=1", + "_args": [ + [ + "emittery@0.6.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "emittery@0.6.0", + "_id": "emittery@0.6.0", + "_inBundle": false, + "_integrity": "sha512-6EMRGr9KzYWp8DzHFZsKVZBsMO6QhAeHMeHND8rhyBNCHKMLpgW9tZv40bwN3rAIKRS5CxcK8oLRKUJSB9h7yQ==", + "_location": "/emittery", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "emittery@0.6.0", + "name": "emittery", + "escapedName": "emittery", + "rawSpec": "0.6.0", + "saveSpec": null, + "fetchSpec": "0.6.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/emittery/-/emittery-0.6.0.tgz", + "_spec": "0.6.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/emittery/issues" + }, + "description": "Simple and modern async event emitter", + "devDependencies": { + "@types/node": "^13.7.5", + "ava": "^2.4.0", + "codecov": "^3.1.0", + "delay": "^4.3.0", + "nyc": "^15.0.0", + "p-event": "^4.1.0", + "tsd": "^0.11.0", + "xo": "^0.25.4" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sindresorhus/emittery?sponsor=1", + "homepage": "https://github.com/sindresorhus/emittery#readme", "keywords": [ "event", "emitter", @@ -47,21 +83,21 @@ "ts", "typed" ], - "devDependencies": { - "@types/node": "^13.7.5", - "ava": "^2.4.0", - "codecov": "^3.1.0", - "delay": "^4.3.0", - "nyc": "^15.0.0", - "p-event": "^4.1.0", - "tsd": "^0.11.0", - "xo": "^0.25.4" - }, + "license": "MIT", + "name": "emittery", "nyc": { "reporter": [ "html", "lcov", "text" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/emittery.git" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "version": "0.6.0" +} diff --git a/node_modules/emoji-regex/package.json b/node_modules/emoji-regex/package.json index cb5ad3677..9b7ff6b62 100644 --- a/node_modules/emoji-regex/package.json +++ b/node_modules/emoji-regex/package.json @@ -1,10 +1,59 @@ { - "name": "emoji-regex", - "version": "8.0.0", + "_args": [ + [ + "emoji-regex@8.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "emoji-regex@8.0.0", + "_id": "emoji-regex@8.0.0", + "_inBundle": false, + "_integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "_location": "/emoji-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "emoji-regex@8.0.0", + "name": "emoji-regex", + "escapedName": "emoji-regex", + "rawSpec": "8.0.0", + "saveSpec": null, + "fetchSpec": "8.0.0" + }, + "_requiredBy": [ + "/string-width" + ], + "_resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "_spec": "8.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bugs": { + "url": "https://github.com/mathiasbynens/emoji-regex/issues" + }, "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", + "devDependencies": { + "@babel/cli": "^7.2.3", + "@babel/core": "^7.3.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", + "@babel/preset-env": "^7.3.4", + "mocha": "^6.0.2", + "regexgen": "^1.3.0", + "unicode-12.0.0": "^0.7.9" + }, + "files": [ + "LICENSE-MIT.txt", + "index.js", + "index.d.ts", + "text.js", + "es2015/index.js", + "es2015/text.js" + ], "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", "keywords": [ "unicode", "regex", @@ -16,35 +65,17 @@ "emoji" ], "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, + "main": "index.js", + "name": "emoji-regex", "repository": { "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" + "url": "git+https://github.com/mathiasbynens/emoji-regex.git" }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], "scripts": { "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", "test": "mocha", "test:watch": "npm run test -- --watch" }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} \ No newline at end of file + "types": "index.d.ts", + "version": "8.0.0" +} diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json index 4caffe9e0..afb981b82 100644 --- a/node_modules/end-of-stream/package.json +++ b/node_modules/end-of-stream/package.json @@ -1,20 +1,51 @@ { - "name": "end-of-stream", - "version": "1.4.4", - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" + "_args": [ + [ + "end-of-stream@1.4.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "end-of-stream@1.4.4", + "_id": "end-of-stream@1.4.4", + "_inBundle": false, + "_integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "_location": "/end-of-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "end-of-stream@1.4.4", + "name": "end-of-stream", + "escapedName": "end-of-stream", + "rawSpec": "1.4.4", + "saveSpec": null, + "fetchSpec": "1.4.4" + }, + "_requiredBy": [ + "/pump" + ], + "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "_spec": "1.4.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mathias Buus", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/end-of-stream/issues" }, "dependencies": { "once": "^1.4.0" }, - "scripts": { - "test": "node test.js" + "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", + "devDependencies": { + "tape": "^4.11.0" }, "files": [ "index.js" ], + "homepage": "https://github.com/mafintosh/end-of-stream", "keywords": [ "stream", "streams", @@ -24,14 +55,15 @@ "end", "wait" ], - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "homepage": "https://github.com/mafintosh/end-of-stream", - "main": "index.js", - "author": "Mathias Buus ", "license": "MIT", - "devDependencies": { - "tape": "^4.11.0" - } -} \ No newline at end of file + "main": "index.js", + "name": "end-of-stream", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/end-of-stream.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.4.4" +} diff --git a/node_modules/enquirer/package.json b/node_modules/enquirer/package.json index f4815e037..ffcd6f5cd 100644 --- a/node_modules/enquirer/package.json +++ b/node_modules/enquirer/package.json @@ -1,34 +1,54 @@ { - "name": "enquirer", - "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", - "version": "2.3.6", - "homepage": "https://github.com/enquirer/enquirer", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" + "_args": [ + [ + "enquirer@2.3.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "enquirer/enquirer", + "_development": true, + "_from": "enquirer@2.3.6", + "_id": "enquirer@2.3.6", + "_inBundle": false, + "_integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "_location": "/enquirer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "enquirer@2.3.6", + "name": "enquirer", + "escapedName": "enquirer", + "rawSpec": "2.3.6", + "saveSpec": null, + "fetchSpec": "2.3.6" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "_spec": "2.3.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/enquirer/enquirer/issues" }, - "license": "MIT", - "files": [ - "index.js", - "index.d.ts", - "lib" + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "test": "mocha && tsc -p ./test/types", - "cover": "nyc --reporter=text --reporter=html mocha" - }, "dependencies": { "ansi-colors": "^4.1.1" }, + "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", "devDependencies": { "@types/node": "^8", "gulp-format-md": "^2.0.0", @@ -39,6 +59,15 @@ "time-require": "github:jonschlinkert/time-require", "typescript": "^3.1.6" }, + "engines": { + "node": ">=8.6" + }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/enquirer/enquirer", "keywords": [ "answer", "answers", @@ -77,6 +106,7 @@ "yo", "zsh" ], + "license": "MIT", "lintDeps": { "devDependencies": { "files": { @@ -88,6 +118,16 @@ } } }, + "main": "index.js", + "name": "enquirer", + "repository": { + "type": "git", + "url": "git+https://github.com/enquirer/enquirer.git" + }, + "scripts": { + "cover": "nyc --reporter=text --reporter=html mocha", + "test": "mocha && tsc -p ./test/types" + }, "verb": { "toc": false, "layout": false, @@ -107,5 +147,6 @@ "inquirer", "prompt-skeleton" ] - } -} \ No newline at end of file + }, + "version": "2.3.6" +} diff --git a/node_modules/equal-length/package.json b/node_modules/equal-length/package.json index 06bf86a9e..270f25d44 100644 --- a/node_modules/equal-length/package.json +++ b/node_modules/equal-length/package.json @@ -1,32 +1,68 @@ { - "name": "equal-length", - "version": "1.0.1", - "description": "Extend lines to equal length", - "license": "MIT", - "repository": "vadimdemedes/equal-length", + "_args": [ + [ + "equal-length@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "equal-length@1.0.1", + "_id": "equal-length@1.0.1", + "_inBundle": false, + "_integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", + "_location": "/equal-length", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "equal-length@1.0.1", + "name": "equal-length", + "escapedName": "equal-length", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "vdemedes", "email": "vdemedes@gmail.com", "url": "github.com/vadimdemedes" }, - "engines": { - "node": ">=4" + "bugs": { + "url": "https://github.com/vadimdemedes/equal-length/issues" }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "equal", - "line" - ], + "description": "Extend lines to equal length", "devDependencies": { "ava": "^0.17.0", "xo": "^0.17.1" }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/vadimdemedes/equal-length#readme", + "keywords": [ + "equal", + "line" + ], + "license": "MIT", + "name": "equal-length", + "repository": { + "type": "git", + "url": "git+https://github.com/vadimdemedes/equal-length.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json index 01f328d44..4c43c6daa 100644 --- a/node_modules/error-ex/package.json +++ b/node_modules/error-ex/package.json @@ -1,11 +1,54 @@ { - "name": "error-ex", - "description": "Easy error subclassing and stack customization", - "version": "1.3.2", - "maintainers": [ - "Josh Junon (github.com/qix-)", - "Sindre Sorhus (sindresorhus.com)" + "_args": [ + [ + "error-ex@1.3.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "error-ex@1.3.2", + "_id": "error-ex@1.3.2", + "_inBundle": false, + "_integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "_location": "/error-ex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "error-ex@1.3.2", + "name": "error-ex", + "escapedName": "error-ex", + "rawSpec": "1.3.2", + "saveSpec": null, + "fetchSpec": "1.3.2" + }, + "_requiredBy": [ + "/parse-json", + "/read-pkg-up/parse-json", + "/read-pkg/parse-json" + ], + "_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "_spec": "1.3.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/qix-/node-error-ex/issues" + }, + "dependencies": { + "is-arrayish": "^0.2.1" + }, + "description": "Easy error subclassing and stack customization", + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.7.1" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/qix-/node-error-ex#readme", "keywords": [ "error", "errors", @@ -17,30 +60,33 @@ "custom" ], "license": "MIT", + "maintainers": [ + { + "name": "Josh Junon", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + }, + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + } + ], + "name": "error-ex", + "repository": { + "type": "git", + "url": "git+https://github.com/qix-/node-error-ex.git" + }, "scripts": { "pretest": "xo", "test": "mocha --compilers coffee:coffee-script/register" }, + "version": "1.3.2", "xo": { "rules": { "operator-linebreak": [ 0 ] } - }, - "repository": "qix-/node-error-ex", - "files": [ - "index.js" - ], - "devDependencies": { - "coffee-script": "^1.9.3", - "coveralls": "^2.11.2", - "istanbul": "^0.3.17", - "mocha": "^2.2.5", - "should": "^7.0.1", - "xo": "^0.7.1" - }, - "dependencies": { - "is-arrayish": "^0.2.1" } -} \ No newline at end of file +} diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json index 4b9662eb1..9c9e23375 100644 --- a/node_modules/es-abstract/package.json +++ b/node_modules/es-abstract/package.json @@ -1,13 +1,44 @@ { - "name": "es-abstract", - "version": "1.17.6", + "_args": [ + [ + "es-abstract@1.17.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "es-abstract@1.17.6", + "_id": "es-abstract@1.17.6", + "_inBundle": false, + "_integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "_location": "/es-abstract", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "es-abstract@1.17.6", + "name": "es-abstract", + "escapedName": "es-abstract", + "rawSpec": "1.17.6", + "saveSpec": null, + "fetchSpec": "1.17.6" + }, + "_requiredBy": [ + "/array-includes", + "/array.prototype.flat", + "/object.values", + "/string.prototype.trimend", + "/string.prototype.trimstart" + ], + "_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "_spec": "1.17.6", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bugs": { + "url": "https://github.com/ljharb/es-abstract/issues" }, "contributors": [ { @@ -16,38 +47,6 @@ "url": "http://ljharb.codes" } ], - "description": "ECMAScript spec abstract operations.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", - "spackle": "node operations/spackle 1", - "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", - "prepublish": "safe-publish-latest && (not-in-publish || npm run spackle)", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "node test", - "coverage": "nyc npm run tests-only >/dev/null", - "postcoverage": "nyc report", - "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-abstract.git" - }, - "keywords": [ - "ECMAScript", - "ES", - "abstract", - "operation", - "abstract operation", - "JavaScript", - "ES5", - "ES6", - "ES7" - ], "dependencies": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", @@ -61,6 +60,7 @@ "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" }, + "description": "ECMAScript spec abstract operations.", "devDependencies": { "@ljharb/eslint-config": "^17.1.0", "array.prototype.indexof": "^1.0.0", @@ -80,6 +80,51 @@ "safe-publish-latest": "^1.1.4", "tape": "^5.0.1" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "//": "nyc is ignored because it requires node 4+, and we support older than that", + "ignore": [ + "nyc" + ] + }, + "homepage": "https://github.com/ljharb/es-abstract#readme", + "keywords": [ + "ECMAScript", + "ES", + "abstract", + "operation", + "abstract operation", + "JavaScript", + "ES5", + "ES6", + "ES7" + ], + "license": "MIT", + "main": "index.js", + "name": "es-abstract", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-abstract.git" + }, + "scripts": { + "coverage": "nyc npm run tests-only >/dev/null", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "lint": "eslint .", + "postcoverage": "nyc report", + "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", + "posttest": "aud --production", + "prepublish": "safe-publish-latest && (not-in-publish || npm run spackle)", + "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", + "pretest": "npm run lint", + "spackle": "node operations/spackle 1", + "test": "npm run tests-only", + "tests-only": "node test" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -98,13 +143,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "greenkeeper": { - "//": "nyc is ignored because it requires node 4+, and we support older than that", - "ignore": [ - "nyc" - ] - } -} \ No newline at end of file + "version": "1.17.6" +} diff --git a/node_modules/es-to-primitive/package.json b/node_modules/es-to-primitive/package.json index 475c3ffdb..89de30fd6 100644 --- a/node_modules/es-to-primitive/package.json +++ b/node_modules/es-to-primitive/package.json @@ -1,26 +1,67 @@ { - "name": "es-to-primitive", - "version": "1.2.1", - "author": "Jordan Harband ", + "_args": [ + [ + "es-to-primitive@1.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "es-to-primitive@1.2.1", + "_id": "es-to-primitive@1.2.1", + "_inBundle": false, + "_integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "_location": "/es-to-primitive", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "es-to-primitive@1.2.1", + "name": "es-to-primitive", + "escapedName": "es-to-primitive", + "rawSpec": "1.2.1", + "saveSpec": null, + "fetchSpec": "1.2.1" + }, + "_requiredBy": [ + "/es-abstract", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "_spec": "1.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "bugs": { + "url": "https://github.com/ljharb/es-to-primitive/issues" + }, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", + "devDependencies": { + "@ljharb/eslint-config": "^15.0.0", + "covert": "^1.1.1", + "eslint": "^6.6.0", + "foreach": "^2.0.5", + "function.prototype.name": "^1.1.1", + "has-symbols": "^1.0.0", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "replace": "^1.1.1", + "semver": "^6.3.0", + "tape": "^4.11.0" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" }, - "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npx aud", - "tests-only": "node --es-staging test", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "eslint ." - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-to-primitive.git" - }, + "homepage": "https://github.com/ljharb/es-to-primitive#readme", "keywords": [ "primitive", "abstract", @@ -39,23 +80,21 @@ "null", "undefined" ], - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "license": "MIT", + "main": "index.js", + "name": "es-to-primitive", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-to-primitive.git" }, - "devDependencies": { - "@ljharb/eslint-config": "^15.0.0", - "covert": "^1.1.1", - "eslint": "^6.6.0", - "foreach": "^2.0.5", - "function.prototype.name": "^1.1.1", - "has-symbols": "^1.0.0", - "object-inspect": "^1.6.0", - "object-is": "^1.0.1", - "replace": "^1.1.1", - "semver": "^6.3.0", - "tape": "^4.11.0" + "scripts": { + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "posttest": "npx aud", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "tests-only": "node --es-staging test" }, "testling": { "files": "test", @@ -75,7 +114,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "1.2.1" +} diff --git a/node_modules/escape-goat/package.json b/node_modules/escape-goat/package.json index b97a05f1d..09df4849c 100644 --- a/node_modules/escape-goat/package.json +++ b/node_modules/escape-goat/package.json @@ -1,24 +1,55 @@ { - "name": "escape-goat", - "version": "2.1.1", - "description": "Escape a string for use in HTML or the inverse", - "license": "MIT", - "repository": "sindresorhus/escape-goat", + "_args": [ + [ + "escape-goat@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "escape-goat@2.1.1", + "_id": "escape-goat@2.1.1", + "_inBundle": false, + "_integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "_location": "/escape-goat", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-goat@2.1.1", + "name": "escape-goat", + "escapedName": "escape-goat", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/pupa" + ], + "_resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/escape-goat/issues" + }, + "description": "Escape a string for use in HTML or the inverse", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/escape-goat#readme", "keywords": [ "escape", "unescape", @@ -37,9 +68,14 @@ "goat", "🐐" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "escape-goat", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-goat.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.1" +} diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json index ddf8dee2f..cb59e8dbd 100644 --- a/node_modules/escape-string-regexp/package.json +++ b/node_modules/escape-string-regexp/package.json @@ -1,27 +1,55 @@ { - "name": "escape-string-regexp", - "version": "1.0.5", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": "sindresorhus/escape-string-regexp", + "_args": [ + [ + "escape-string-regexp@1.0.5", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "escape-string-regexp@1.0.5", + "_id": "escape-string-regexp@1.0.5", + "_inBundle": false, + "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "_location": "/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-string-regexp@1.0.5", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "1.0.5", + "saveSpec": null, + "fetchSpec": "1.0.5" + }, + "_requiredBy": [ + "/chalk", + "/eslint-plugin-eslint-comments", + "/figures" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "_spec": "1.0.5", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Boy Nicolai Appelman (jbna.nl)" - ], + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=0.8.0" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", "keywords": [ "escape", "regex", @@ -34,8 +62,26 @@ "special", "characters" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.5" +} diff --git a/node_modules/eslint-config-prettier/package.json b/node_modules/eslint-config-prettier/package.json index ea6eba288..284cb9a08 100644 --- a/node_modules/eslint-config-prettier/package.json +++ b/node_modules/eslint-config-prettier/package.json @@ -1,44 +1,46 @@ { - "name": "eslint-config-prettier", - "version": "6.11.0", - "license": "MIT", - "author": "Simon Lydell", - "description": "Turns off all rules that are unnecessary or might conflict with Prettier.", - "repository": "prettier/eslint-config-prettier", - "files": [ - "bin/", - "@typescript-eslint.js", - "babel.js", - "flowtype.js", - "index.js", - "react.js", - "standard.js", - "unicorn.js", - "vue.js" + "_args": [ + [ + "eslint-config-prettier@6.11.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "eslint-config-prettier@6.11.0", + "_id": "eslint-config-prettier@6.11.0", + "_inBundle": false, + "_integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", + "_location": "/eslint-config-prettier", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-config-prettier@6.11.0", + "name": "eslint-config-prettier", + "escapedName": "eslint-config-prettier", + "rawSpec": "6.11.0", + "saveSpec": null, + "fetchSpec": "6.11.0" + }, + "_requiredBy": [ + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", + "_spec": "6.11.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Simon Lydell" + }, "bin": { "eslint-config-prettier-check": "bin/cli.js" }, - "keywords": [ - "eslint", - "eslintconfig", - "prettier" - ], - "scripts": { - "doctoc": "doctoc README.md && replace \"\\[\\[([\\w/-]+)\\](?:([^\\[\\]]+)\\[([\\w/-]+)\\])?\\]\" \"[\\$1\\$2\\$3]\" README.md", - "prettier": "prettier --write .", - "test:lint": "eslint . && prettier --check .", - "test:lint-verify-fail": "eslint \"test-lint/*.{js,ts,vue}\" --config .eslintrc.base.js --format json", - "test:lint-rules": "eslint index.js --config test-config/.eslintrc.js --format json", - "test:deprecated": "eslint-find-rules --deprecated index.js", - "test:jest": "jest", - "test:cli-sanity": "eslint --print-config index.js | node ./bin/cli.js", - "test:cli-sanity-warning": "eslint --print-config ./bin/cli.js | node ./bin/cli.js", - "test": "npm run test:lint && npm run test:jest && npm run test:cli-sanity && npm run test:cli-sanity-warning" + "bugs": { + "url": "https://github.com/prettier/eslint-config-prettier/issues" }, "dependencies": { "get-stdin": "^6.0.0" }, + "description": "Turns off all rules that are unnecessary or might conflict with Prettier.", "devDependencies": { "@typescript-eslint/eslint-plugin": "2.29.0", "@typescript-eslint/parser": "2.29.0", @@ -61,7 +63,43 @@ "rimraf": "3.0.2", "typescript": "3.7.5" }, + "files": [ + "bin/", + "@typescript-eslint.js", + "babel.js", + "flowtype.js", + "index.js", + "react.js", + "standard.js", + "unicorn.js", + "vue.js" + ], + "homepage": "https://github.com/prettier/eslint-config-prettier#readme", + "keywords": [ + "eslint", + "eslintconfig", + "prettier" + ], + "license": "MIT", + "name": "eslint-config-prettier", "peerDependencies": { "eslint": ">=3.14.1" - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/eslint-config-prettier.git" + }, + "scripts": { + "doctoc": "doctoc README.md && replace \"\\[\\[([\\w/-]+)\\](?:([^\\[\\]]+)\\[([\\w/-]+)\\])?\\]\" \"[\\$1\\$2\\$3]\" README.md", + "prettier": "prettier --write .", + "test": "npm run test:lint && npm run test:jest && npm run test:cli-sanity && npm run test:cli-sanity-warning", + "test:cli-sanity": "eslint --print-config index.js | node ./bin/cli.js", + "test:cli-sanity-warning": "eslint --print-config ./bin/cli.js | node ./bin/cli.js", + "test:deprecated": "eslint-find-rules --deprecated index.js", + "test:jest": "jest", + "test:lint": "eslint . && prettier --check .", + "test:lint-rules": "eslint index.js --config test-config/.eslintrc.js --format json", + "test:lint-verify-fail": "eslint \"test-lint/*.{js,ts,vue}\" --config .eslintrc.base.js --format json" + }, + "version": "6.11.0" +} diff --git a/node_modules/eslint-import-resolver-node/node_modules/debug/package.json b/node_modules/eslint-import-resolver-node/node_modules/debug/package.json index 0b1b9df8b..4c72a4903 100644 --- a/node_modules/eslint-import-resolver-node/node_modules/debug/package.json +++ b/node_modules/eslint-import-resolver-node/node_modules/debug/package.json @@ -1,25 +1,62 @@ { - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "_args": [ + [ + "debug@2.6.9", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "debug@2.6.9", + "_id": "debug@2.6.9", + "_inBundle": false, + "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "_location": "/eslint-import-resolver-node/debug", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "debug@2.6.9", + "name": "debug", + "escapedName": "debug", + "rawSpec": "2.6.9", + "saveSpec": null, + "fetchSpec": "2.6.9" }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" + "_requiredBy": [ + "/eslint-import-resolver-node" ], - "author": "TJ Holowaychuk ", + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "_spec": "2.6.9", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } ], - "license": "MIT", "dependencies": { "ms": "2.0.0" }, + "description": "small debugging utility", "devDependencies": { "browserify": "9.0.3", "chai": "^3.5.0", @@ -38,12 +75,18 @@ "sinon": "^1.17.6", "sinon-chai": "^2.8.0" }, + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} \ No newline at end of file + "name": "debug", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "version": "2.6.9" +} diff --git a/node_modules/eslint-import-resolver-node/node_modules/ms/package.json b/node_modules/eslint-import-resolver-node/node_modules/ms/package.json index 63aaff3ab..39d948a30 100644 --- a/node_modules/eslint-import-resolver-node/node_modules/ms/package.json +++ b/node_modules/eslint-import-resolver-node/node_modules/ms/package.json @@ -1,16 +1,43 @@ { - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" + "_args": [ + [ + "ms@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" + "_development": true, + "_from": "ms@2.0.0", + "_id": "ms@2.0.0", + "_inBundle": false, + "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "_location": "/eslint-import-resolver-node/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.0.0", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-import-resolver-node/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "description": "Tiny milisecond conversion utility", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" }, "eslintConfig": { "extends": "eslint:recommended", @@ -19,6 +46,11 @@ "es6": true } }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", "lint-staged": { "*.js": [ "npm run lint", @@ -26,12 +58,16 @@ "git add" ] }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} \ No newline at end of file + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/eslint-import-resolver-node/package.json b/node_modules/eslint-import-resolver-node/package.json index ee08f68cd..a3f0271f4 100644 --- a/node_modules/eslint-import-resolver-node/package.json +++ b/node_modules/eslint-import-resolver-node/package.json @@ -1,21 +1,55 @@ { - "name": "eslint-import-resolver-node", - "version": "0.3.4", + "_args": [ + [ + "eslint-import-resolver-node@0.3.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "eslint-import-resolver-node@0.3.4", + "_id": "eslint-import-resolver-node@0.3.4", + "_inBundle": false, + "_integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "_location": "/eslint-import-resolver-node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-import-resolver-node@0.3.4", + "name": "eslint-import-resolver-node", + "escapedName": "eslint-import-resolver-node", + "rawSpec": "0.3.4", + "saveSpec": null, + "fetchSpec": "0.3.4" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "_spec": "0.3.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ben Mosher", + "url": "me@benmosher.com" + }, + "bugs": { + "url": "https://github.com/benmosher/eslint-plugin-import/issues" + }, + "dependencies": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, "description": "Node default behavior import resolution plugin for eslint-plugin-import.", - "main": "index.js", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^3.0.0", + "mocha": "^3.5.3", + "nyc": "^11.7.1" + }, "files": [ "index.js" ], - "scripts": { - "prepublishOnly": "cp ../../{LICENSE,.npmrc} ./", - "tests-only": "nyc mocha", - "test": "npm run tests-only", - "coveralls": "nyc report --reporter lcovonly && cd ../.. && coveralls < ./resolvers/node/coverage/lcov.info" - }, - "repository": { - "type": "git", - "url": "https://github.com/benmosher/eslint-plugin-import" - }, + "homepage": "https://github.com/benmosher/eslint-plugin-import", "keywords": [ "eslint", "eslintplugin", @@ -23,25 +57,23 @@ "modules", "eslint-plugin-import" ], - "author": "Ben Mosher (me@benmosher.com)", "license": "MIT", - "bugs": { - "url": "https://github.com/benmosher/eslint-plugin-import/issues" - }, - "homepage": "https://github.com/benmosher/eslint-plugin-import", - "dependencies": { - "debug": "^2.6.9", - "resolve": "^1.13.1" - }, - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^3.0.0", - "mocha": "^3.5.3", - "nyc": "^11.7.1" - }, + "main": "index.js", + "name": "eslint-import-resolver-node", "nyc": { "exclude": [ "test/" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/benmosher/eslint-plugin-import.git" + }, + "scripts": { + "coveralls": "nyc report --reporter lcovonly && cd ../.. && coveralls < ./resolvers/node/coverage/lcov.info", + "prepublishOnly": "cp ../../{LICENSE,.npmrc} ./", + "test": "npm run tests-only", + "tests-only": "nyc mocha" + }, + "version": "0.3.4" +} diff --git a/node_modules/eslint-module-utils/node_modules/debug/package.json b/node_modules/eslint-module-utils/node_modules/debug/package.json index 0b1b9df8b..ad8ae0724 100644 --- a/node_modules/eslint-module-utils/node_modules/debug/package.json +++ b/node_modules/eslint-module-utils/node_modules/debug/package.json @@ -1,25 +1,62 @@ { - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "_args": [ + [ + "debug@2.6.9", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "debug@2.6.9", + "_id": "debug@2.6.9", + "_inBundle": false, + "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "_location": "/eslint-module-utils/debug", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "debug@2.6.9", + "name": "debug", + "escapedName": "debug", + "rawSpec": "2.6.9", + "saveSpec": null, + "fetchSpec": "2.6.9" }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" + "_requiredBy": [ + "/eslint-module-utils" ], - "author": "TJ Holowaychuk ", + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "_spec": "2.6.9", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } ], - "license": "MIT", "dependencies": { "ms": "2.0.0" }, + "description": "small debugging utility", "devDependencies": { "browserify": "9.0.3", "chai": "^3.5.0", @@ -38,12 +75,18 @@ "sinon": "^1.17.6", "sinon-chai": "^2.8.0" }, + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} \ No newline at end of file + "name": "debug", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "version": "2.6.9" +} diff --git a/node_modules/eslint-module-utils/node_modules/find-up/package.json b/node_modules/eslint-module-utils/node_modules/find-up/package.json index 7ec1b7ef8..86b599545 100644 --- a/node_modules/eslint-module-utils/node_modules/find-up/package.json +++ b/node_modules/eslint-module-utils/node_modules/find-up/package.json @@ -1,23 +1,57 @@ { - "name": "find-up", - "version": "2.1.0", - "description": "Find a file by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", + "_args": [ + [ + "find-up@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "find-up@2.1.0", + "_id": "find-up@2.1.0", + "_inBundle": false, + "_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "_location": "/eslint-module-utils/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "find-up@2.1.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/eslint-module-utils/pkg-dir" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "dependencies": { + "locate-path": "^2.0.0" + }, + "description": "Find a file by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/find-up#readme", "keywords": [ "find", "up", @@ -39,15 +73,17 @@ "walking", "path" ], - "dependencies": { - "locate-path": "^2.0.0" + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" }, - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.1.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/eslint-module-utils/node_modules/locate-path/package.json b/node_modules/eslint-module-utils/node_modules/locate-path/package.json index e05a6304b..b15c3f6eb 100644 --- a/node_modules/eslint-module-utils/node_modules/locate-path/package.json +++ b/node_modules/eslint-module-utils/node_modules/locate-path/package.json @@ -1,23 +1,57 @@ { - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", + "_args": [ + [ + "locate-path@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "locate-path@2.0.0", + "_id": "locate-path@2.0.0", + "_inBundle": false, + "_integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "_location": "/eslint-module-utils/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "locate-path@2.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", "keywords": [ "locate", "path", @@ -33,15 +67,17 @@ "iterable", "iterator" ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/eslint-module-utils/node_modules/ms/package.json b/node_modules/eslint-module-utils/node_modules/ms/package.json index 63aaff3ab..7e1535679 100644 --- a/node_modules/eslint-module-utils/node_modules/ms/package.json +++ b/node_modules/eslint-module-utils/node_modules/ms/package.json @@ -1,16 +1,43 @@ { - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" + "_args": [ + [ + "ms@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" + "_development": true, + "_from": "ms@2.0.0", + "_id": "ms@2.0.0", + "_inBundle": false, + "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "_location": "/eslint-module-utils/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.0.0", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "description": "Tiny milisecond conversion utility", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" }, "eslintConfig": { "extends": "eslint:recommended", @@ -19,6 +46,11 @@ "es6": true } }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", "lint-staged": { "*.js": [ "npm run lint", @@ -26,12 +58,16 @@ "git add" ] }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} \ No newline at end of file + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/eslint-module-utils/node_modules/p-limit/package.json b/node_modules/eslint-module-utils/node_modules/p-limit/package.json index 275cb73ae..e6489e590 100644 --- a/node_modules/eslint-module-utils/node_modules/p-limit/package.json +++ b/node_modules/eslint-module-utils/node_modules/p-limit/package.json @@ -1,23 +1,60 @@ { - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", + "_args": [ + [ + "p-limit@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-limit@1.3.0", + "_id": "p-limit@1.3.0", + "_inBundle": false, + "_integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "_location": "/eslint-module-utils/p-limit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-limit@1.3.0", + "name": "p-limit", + "escapedName": "p-limit", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/eslint-module-utils/p-locate" + ], + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-limit/issues" + }, + "dependencies": { + "p-try": "^1.0.0" + }, + "description": "Run multiple promise-returning & async functions with limited concurrency", + "devDependencies": { + "ava": "*", + "delay": "^2.0.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-limit#readme", "keywords": [ "promise", "limit", @@ -35,15 +72,14 @@ "promises", "bluebird" ], - "dependencies": { - "p-try": "^1.0.0" + "license": "MIT", + "name": "p-limit", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-limit.git" }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "1.3.0" +} diff --git a/node_modules/eslint-module-utils/node_modules/p-locate/package.json b/node_modules/eslint-module-utils/node_modules/p-locate/package.json index b938aa4c5..584252250 100644 --- a/node_modules/eslint-module-utils/node_modules/p-locate/package.json +++ b/node_modules/eslint-module-utils/node_modules/p-locate/package.json @@ -1,23 +1,59 @@ { - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", + "_args": [ + [ + "p-locate@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-locate@2.0.0", + "_id": "p-locate@2.0.0", + "_inBundle": false, + "_integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "_location": "/eslint-module-utils/p-locate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-locate@2.0.0", + "name": "p-locate", + "escapedName": "p-locate", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "dependencies": { + "p-limit": "^1.1.0" + }, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "in-range": "^1.0.0", + "time-span": "^1.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-locate#readme", "keywords": [ "promise", "locate", @@ -38,17 +74,17 @@ "promises", "bluebird" ], - "dependencies": { - "p-limit": "^1.1.0" + "license": "MIT", + "name": "p-locate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/eslint-module-utils/node_modules/p-try/package.json b/node_modules/eslint-module-utils/node_modules/p-try/package.json index a4623262b..e154ab74b 100644 --- a/node_modules/eslint-module-utils/node_modules/p-try/package.json +++ b/node_modules/eslint-module-utils/node_modules/p-try/package.json @@ -1,23 +1,53 @@ { - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", + "_args": [ + [ + "p-try@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-try@1.0.0", + "_id": "p-try@1.0.0", + "_inBundle": false, + "_integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "_location": "/eslint-module-utils/p-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-try@1.0.0", + "name": "p-try", + "escapedName": "p-try", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils/p-limit" + ], + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-try/issues" + }, + "description": "`Promise#try()` ponyfill - Starts a promise chain", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-try#readme", "keywords": [ "promise", "try", @@ -33,11 +63,17 @@ "shim", "bluebird" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "p-try", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-try.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/eslint-module-utils/node_modules/path-exists/package.json b/node_modules/eslint-module-utils/node_modules/path-exists/package.json index ed507545d..bea52cc51 100644 --- a/node_modules/eslint-module-utils/node_modules/path-exists/package.json +++ b/node_modules/eslint-module-utils/node_modules/path-exists/package.json @@ -1,23 +1,53 @@ { - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", + "_args": [ + [ + "path-exists@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-exists@3.0.0", + "_id": "path-exists@3.0.0", + "_inBundle": false, + "_integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "_location": "/eslint-module-utils/path-exists", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-exists@3.0.0", + "name": "path-exists", + "escapedName": "path-exists", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils/locate-path" + ], + "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-exists/issues" + }, + "description": "Check if a path exists", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/path-exists#readme", "keywords": [ "path", "exists", @@ -30,11 +60,17 @@ "access", "stat" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "path-exists", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-exists.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json b/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json index 267b3ae01..392c3e4d8 100644 --- a/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json +++ b/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json @@ -1,23 +1,56 @@ { - "name": "pkg-dir", - "version": "2.0.0", - "description": "Find the root directory of a Node.js project or npm package", - "license": "MIT", - "repository": "sindresorhus/pkg-dir", + "_args": [ + [ + "pkg-dir@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pkg-dir@2.0.0", + "_id": "pkg-dir@2.0.0", + "_inBundle": false, + "_integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "_location": "/eslint-module-utils/pkg-dir", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pkg-dir@2.0.0", + "name": "pkg-dir", + "escapedName": "pkg-dir", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-module-utils" + ], + "_resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pkg-dir/issues" + }, + "dependencies": { + "find-up": "^2.1.0" + }, + "description": "Find the root directory of a Node.js project or npm package", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/pkg-dir#readme", "keywords": [ "package", "json", @@ -43,11 +76,14 @@ "walking", "path" ], - "dependencies": { - "find-up": "^2.1.0" + "license": "MIT", + "name": "pkg-dir", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pkg-dir.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0" +} diff --git a/node_modules/eslint-module-utils/package.json b/node_modules/eslint-module-utils/package.json index f311b235a..d5378cde7 100644 --- a/node_modules/eslint-module-utils/package.json +++ b/node_modules/eslint-module-utils/package.json @@ -1,32 +1,64 @@ { - "name": "eslint-module-utils", - "version": "2.6.0", + "_args": [ + [ + "eslint-module-utils@2.6.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "eslint-module-utils@2.6.0", + "_id": "eslint-module-utils@2.6.0", + "_inBundle": false, + "_integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "_location": "/eslint-module-utils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-module-utils@2.6.0", + "name": "eslint-module-utils", + "escapedName": "eslint-module-utils", + "rawSpec": "2.6.0", + "saveSpec": null, + "fetchSpec": "2.6.0" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "_spec": "2.6.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ben Mosher", + "email": "me@benmosher.com" + }, + "bugs": { + "url": "https://github.com/benmosher/eslint-plugin-import/issues" + }, + "dependencies": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, "description": "Core utilities to support eslint-plugin-import and other module-related plugins.", "engines": { "node": ">=4" }, - "scripts": { - "prepublishOnly": "cp ../{LICENSE,.npmrc} ./", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/benmosher/eslint-plugin-import.git" - }, + "homepage": "https://github.com/benmosher/eslint-plugin-import#readme", "keywords": [ "eslint-plugin-import", "eslint", "modules", "esmodules" ], - "author": "Ben Mosher ", "license": "MIT", - "bugs": { - "url": "https://github.com/benmosher/eslint-plugin-import/issues" + "name": "eslint-module-utils", + "repository": { + "type": "git", + "url": "git+https://github.com/benmosher/eslint-plugin-import.git" }, - "homepage": "https://github.com/benmosher/eslint-plugin-import#readme", - "dependencies": { - "debug": "^2.6.9", - "pkg-dir": "^2.0.0" - } -} \ No newline at end of file + "scripts": { + "prepublishOnly": "cp ../{LICENSE,.npmrc} ./", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "2.6.0" +} diff --git a/node_modules/eslint-plugin-eslint-comments/package.json b/node_modules/eslint-plugin-eslint-comments/package.json index cbae8dda3..d0e39749b 100644 --- a/node_modules/eslint-plugin-eslint-comments/package.json +++ b/node_modules/eslint-plugin-eslint-comments/package.json @@ -1,21 +1,44 @@ { - "name": "eslint-plugin-eslint-comments", - "version": "3.2.0", - "description": "Additional ESLint rules for ESLint directive comments.", - "engines": { - "node": ">=6.5.0" - }, - "main": "index.js", - "files": [ - "lib" + "_args": [ + [ + "eslint-plugin-eslint-comments@3.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "peerDependencies": { - "eslint": ">=4.19.1" + "_development": true, + "_from": "eslint-plugin-eslint-comments@3.2.0", + "_id": "eslint-plugin-eslint-comments@3.2.0", + "_inBundle": false, + "_integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "_location": "/eslint-plugin-eslint-comments", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-eslint-comments@3.2.0", + "name": "eslint-plugin-eslint-comments", + "escapedName": "eslint-plugin-eslint-comments", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima" + }, + "bugs": { + "url": "https://github.com/mysticatea/eslint-plugin-eslint-comments/issues" }, "dependencies": { "escape-string-regexp": "^1.0.5", "ignore": "^5.0.5" }, + "description": "Additional ESLint rules for ESLint directive comments.", "devDependencies": { "@mysticatea/eslint-plugin": "^13.0.0", "@types/node": "^14.0.1", @@ -35,27 +58,14 @@ "vue-eslint-editor": "^1.1.0", "vuepress": "^1.0.1" }, - "scripts": { - "preversion": "npm test", - "version": "node scripts/update && git add .", - "postversion": "git push && git push --tags", - "clean": "rimraf .nyc_output coverage docs/.vuepress/dist", - "docs:build": "vuepress build docs", - "docs:watch": "vuepress dev docs", - "docs:deploy": "node scripts/deploy", - "lint": "eslint lib scripts tests", - "pretest": "npm run -s lint", - "test": "nyc npm run -s test:mocha", - "test:ci": "nyc npm run -s test:mocha", - "test:mocha": "mocha \"tests/lib/**/*.js\" --reporter dot --timeout 8000", - "watch": "npm run -s test:mocha -- --watch --growl", - "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "codecov": "nyc report --reporter text-lcov | codecov --pipe --disable=gcov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/eslint-plugin-eslint-comments.git" + "engines": { + "node": ">=6.5.0" }, + "files": [ + "lib" + ], + "funding": "https://github.com/sponsors/mysticatea", + "homepage": "https://github.com/mysticatea/eslint-plugin-eslint-comments#readme", "keywords": [ "eslint", "eslintplugin", @@ -73,11 +83,32 @@ "eslint-disable-line", "eslint-disable-next-line" ], - "author": "Toru Nagashima", "license": "MIT", - "bugs": { - "url": "https://github.com/mysticatea/eslint-plugin-eslint-comments/issues" + "main": "index.js", + "name": "eslint-plugin-eslint-comments", + "peerDependencies": { + "eslint": ">=4.19.1" }, - "homepage": "https://github.com/mysticatea/eslint-plugin-eslint-comments#readme", - "funding": "https://github.com/sponsors/mysticatea" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/eslint-plugin-eslint-comments.git" + }, + "scripts": { + "clean": "rimraf .nyc_output coverage docs/.vuepress/dist", + "codecov": "nyc report --reporter text-lcov | codecov --pipe --disable=gcov", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "docs:build": "vuepress build docs", + "docs:deploy": "node scripts/deploy", + "docs:watch": "vuepress dev docs", + "lint": "eslint lib scripts tests", + "postversion": "git push && git push --tags", + "pretest": "npm run -s lint", + "preversion": "npm test", + "test": "nyc npm run -s test:mocha", + "test:ci": "nyc npm run -s test:mocha", + "test:mocha": "mocha \"tests/lib/**/*.js\" --reporter dot --timeout 8000", + "version": "node scripts/update && git add .", + "watch": "npm run -s test:mocha -- --watch --growl" + }, + "version": "3.2.0" +} diff --git a/node_modules/eslint-plugin-filenames/package.json b/node_modules/eslint-plugin-filenames/package.json index 0402d11a2..4f425bf68 100644 --- a/node_modules/eslint-plugin-filenames/package.json +++ b/node_modules/eslint-plugin-filenames/package.json @@ -1,15 +1,39 @@ { - "name": "eslint-plugin-filenames", - "version": "1.3.2", - "description": "Eslint rule for consistent filenames.", - "main": "index.js", - "scripts": { - "test": "npm run lint && npm run unit-test --coverage && npm run check-coverage", - "lint": "eslint .", - "unit-test": "istanbul test --dir build/coverage _mocha test -- --recursive --reporter dot", - "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100 --lines 100", - "report-coverage-html": "istanbul report --dir build/coverage html", - "coveralls": "cat ./build/coverage/lcov.info | coveralls" + "_args": [ + [ + "eslint-plugin-filenames@1.3.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "eslint-plugin-filenames@1.3.2", + "_id": "eslint-plugin-filenames@1.3.2", + "_inBundle": false, + "_integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==", + "_location": "/eslint-plugin-filenames", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-filenames@1.3.2", + "name": "eslint-plugin-filenames", + "escapedName": "eslint-plugin-filenames", + "rawSpec": "1.3.2", + "saveSpec": null, + "fetchSpec": "1.3.2" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", + "_spec": "1.3.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Stefan Lau", + "email": "github@stefanlau.com" + }, + "bugs": { + "url": "https://github.com/selaux/eslint-plugin-filenames/issues" }, "dependencies": { "lodash.camelcase": "4.3.0", @@ -17,6 +41,7 @@ "lodash.snakecase": "4.1.1", "lodash.upperfirst": "4.3.1" }, + "description": "Eslint rule for consistent filenames.", "devDependencies": { "chai": "3.5.0", "coveralls": "2.13.0", @@ -26,18 +51,6 @@ "mocha": "3.2.0", "sinon": "2.1.0" }, - "peerDependencies": { - "eslint": "*" - }, - "repository": { - "type": "git", - "url": "git://github.com/selaux/eslint-plugin-filenames.git" - }, - "author": "Stefan Lau ", - "license": "MIT", - "bugs": { - "url": "https://github.com/selaux/eslint-plugin-filenames/issues" - }, "homepage": "https://github.com/selaux/eslint-plugin-filenames", "keywords": [ "eslint", @@ -46,5 +59,24 @@ "file", "filename", "path" - ] -} \ No newline at end of file + ], + "license": "MIT", + "main": "index.js", + "name": "eslint-plugin-filenames", + "peerDependencies": { + "eslint": "*" + }, + "repository": { + "type": "git", + "url": "git://github.com/selaux/eslint-plugin-filenames.git" + }, + "scripts": { + "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100 --lines 100", + "coveralls": "cat ./build/coverage/lcov.info | coveralls", + "lint": "eslint .", + "report-coverage-html": "istanbul report --dir build/coverage html", + "test": "npm run lint && npm run unit-test --coverage && npm run check-coverage", + "unit-test": "istanbul test --dir build/coverage _mocha test -- --recursive --reporter dot" + }, + "version": "1.3.2" +} diff --git a/node_modules/eslint-plugin-github/package.json b/node_modules/eslint-plugin-github/package.json index d30222cfb..f7bd9fdac 100644 --- a/node_modules/eslint-plugin-github/package.json +++ b/node_modules/eslint-plugin-github/package.json @@ -1,29 +1,42 @@ { - "name": "eslint-plugin-github", - "version": "4.1.1", - "description": "An opinionated collection of ESLint shared configs and rules used by GitHub.", - "main": "lib/index.js", - "entries": [ - "lib/formatters/stylish-fixes.js" + "_args": [ + [ + "eslint-plugin-github@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "eslint-plugin-github@4.1.1", + "_id": "eslint-plugin-github@4.1.1", + "_inBundle": false, + "_integrity": "sha512-MzCh4P4zVvR/13AHtumzZ3znq0cbUE7lXehyBEpFURD/EHdx/+7qW+0c+ySTrteImpX9LGLJFTYNtu10BifkbQ==", + "_location": "/eslint-plugin-github", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-github@4.1.1", + "name": "eslint-plugin-github", + "escapedName": "eslint-plugin-github", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "GitHub, Inc." + }, "bin": { "eslint-ignore-errors": "bin/eslint-ignore-errors.js" }, - "scripts": { - "pretest": "mkdir -p node_modules/ && ln -fs $(pwd) node_modules/", - "eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check", - "test": "npm run eslint-check && eslint . && mocha tests/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/github/eslint-plugin-github.git" - }, - "author": "GitHub, Inc.", - "license": "MIT", "bugs": { "url": "https://github.com/github/eslint-plugin-github/issues" }, - "homepage": "https://github.com/github/eslint-plugin-github#readme", "dependencies": { "@typescript-eslint/eslint-plugin": ">=2.25.0", "@typescript-eslint/parser": ">=2.25.0", @@ -35,17 +48,35 @@ "prettier": ">=1.12.0", "svg-element-attributes": ">=1.3.1" }, - "prettier": "@github/prettier-config", - "peerDependencies": { - "eslint": ">=4.19.0" - }, - "files": [ - "bin/*", - "lib/*" - ], + "description": "An opinionated collection of ESLint shared configs and rules used by GitHub.", "devDependencies": { "@github/prettier-config": "0.0.4", "eslint": ">=7.0.0", "mocha": ">=7.1.1" - } -} \ No newline at end of file + }, + "entries": [ + "lib/formatters/stylish-fixes.js" + ], + "files": [ + "bin/*", + "lib/*" + ], + "homepage": "https://github.com/github/eslint-plugin-github#readme", + "license": "MIT", + "main": "lib/index.js", + "name": "eslint-plugin-github", + "peerDependencies": { + "eslint": ">=4.19.0" + }, + "prettier": "@github/prettier-config", + "repository": { + "type": "git", + "url": "git+https://github.com/github/eslint-plugin-github.git" + }, + "scripts": { + "eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check", + "pretest": "mkdir -p node_modules/ && ln -fs $(pwd) node_modules/", + "test": "npm run eslint-check && eslint . && mocha tests/" + }, + "version": "4.1.1" +} diff --git a/node_modules/eslint-plugin-import/memo-parser/package.json b/node_modules/eslint-plugin-import/memo-parser/package.json index d101752ed..69996d33e 100644 --- a/node_modules/eslint-plugin-import/memo-parser/package.json +++ b/node_modules/eslint-plugin-import/memo-parser/package.json @@ -31,4 +31,4 @@ "dependencies": { "eslint-module-utils": "^2.5.0" } -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/package.json b/node_modules/eslint-plugin-import/node_modules/debug/package.json index 0b1b9df8b..0b14ad600 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/package.json +++ b/node_modules/eslint-plugin-import/node_modules/debug/package.json @@ -1,25 +1,62 @@ { - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" + "_args": [ + [ + "debug@2.6.9", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "debug@2.6.9", + "_id": "debug@2.6.9", + "_inBundle": false, + "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "_location": "/eslint-plugin-import/debug", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "debug@2.6.9", + "name": "debug", + "escapedName": "debug", + "rawSpec": "2.6.9", + "saveSpec": null, + "fetchSpec": "2.6.9" }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" + "_requiredBy": [ + "/eslint-plugin-import" ], - "author": "TJ Holowaychuk ", + "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "_spec": "2.6.9", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + }, "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } ], - "license": "MIT", "dependencies": { "ms": "2.0.0" }, + "description": "small debugging utility", "devDependencies": { "browserify": "9.0.3", "chai": "^3.5.0", @@ -38,12 +75,18 @@ "sinon": "^1.17.6", "sinon-chai": "^2.8.0" }, + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} \ No newline at end of file + "name": "debug", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "version": "2.6.9" +} diff --git a/node_modules/eslint-plugin-import/node_modules/doctrine/package.json b/node_modules/eslint-plugin-import/node_modules/doctrine/package.json index 4454768df..427d06cf5 100644 --- a/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +++ b/node_modules/eslint-plugin-import/node_modules/doctrine/package.json @@ -1,35 +1,41 @@ { - "name": "doctrine", + "_args": [ + [ + "doctrine@1.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "doctrine@1.5.0", + "_id": "doctrine@1.5.0", + "_inBundle": false, + "_integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "_location": "/eslint-plugin-import/doctrine", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "doctrine@1.5.0", + "name": "doctrine", + "escapedName": "doctrine", + "rawSpec": "1.5.0", + "saveSpec": null, + "fetchSpec": "1.5.0" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "_spec": "1.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/eslint/doctrine/issues" + }, + "dependencies": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + }, "description": "JSDoc parser", - "homepage": "https://github.com/eslint/doctrine", - "main": "lib/doctrine.js", - "version": "1.5.0", - "engines": { - "node": ">=0.10.0" - }, - "directories": { - "lib": "./lib" - }, - "files": [ - "lib", - "LICENSE.BSD", - "LICENSE.closure-compiler", - "LICENSE.esprima", - "README.md" - ], - "maintainers": [ - { - "name": "Nicholas C. Zakas", - "email": "nicholas+npm@nczconsulting.com", - "web": "https://www.nczonline.net" - }, - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "https://github.com/Constellation" - } - ], - "repository": "eslint/doctrine", "devDependencies": { "coveralls": "^2.11.2", "dateformat": "^1.0.11", @@ -44,22 +50,51 @@ "shelljs-nodecli": "^0.1.1", "should": "^5.0.1" }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "lib", + "LICENSE.BSD", + "LICENSE.closure-compiler", + "LICENSE.esprima", + "README.md" + ], + "homepage": "https://github.com/eslint/doctrine", "licenses": [ { "type": "BSD", "url": "http://github.com/eslint/doctrine/raw/master/LICENSE.BSD" } ], + "main": "lib/doctrine.js", + "maintainers": [ + { + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com", + "url": "https://www.nczonline.net" + }, + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "https://github.com/Constellation" + } + ], + "name": "doctrine", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/doctrine.git" + }, "scripts": { - "test": "npm run lint && node Makefile.js test", + "alpharelease": "eslint-prerelease alpha", + "betarelease": "eslint-prerelease beta", + "ci-release": "eslint-ci-release", "lint": "eslint lib/", "release": "eslint-release", - "ci-release": "eslint-ci-release", - "alpharelease": "eslint-prerelease alpha", - "betarelease": "eslint-prerelease beta" + "test": "npm run lint && node Makefile.js test" }, - "dependencies": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } -} \ No newline at end of file + "version": "1.5.0" +} diff --git a/node_modules/eslint-plugin-import/node_modules/isarray/package.json b/node_modules/eslint-plugin-import/node_modules/isarray/package.json index a732aec72..2ad1ad700 100644 --- a/node_modules/eslint-plugin-import/node_modules/isarray/package.json +++ b/node_modules/eslint-plugin-import/node_modules/isarray/package.json @@ -1,28 +1,62 @@ { - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.13.4" - }, - "keywords": [ - "browser", - "isarray", - "array" + "_args": [ + [ + "isarray@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "isarray@1.0.0", + "_id": "isarray@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "_location": "/eslint-plugin-import/isarray", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isarray@1.0.0", + "name": "isarray", + "escapedName": "isarray", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/eslint-plugin-import/doctrine" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tape": "~2.13.4" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], "license": "MIT", + "main": "index.js", + "name": "isarray", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tape test.js" + }, "testling": { "files": "test.js", "browsers": [ @@ -39,7 +73,5 @@ "android-browser/4.2..latest" ] }, - "scripts": { - "test": "tape test.js" - } -} \ No newline at end of file + "version": "1.0.0" +} diff --git a/node_modules/eslint-plugin-import/node_modules/ms/package.json b/node_modules/eslint-plugin-import/node_modules/ms/package.json index 63aaff3ab..ab0569d42 100644 --- a/node_modules/eslint-plugin-import/node_modules/ms/package.json +++ b/node_modules/eslint-plugin-import/node_modules/ms/package.json @@ -1,16 +1,43 @@ { - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" + "_args": [ + [ + "ms@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" + "_development": true, + "_from": "ms@2.0.0", + "_id": "ms@2.0.0", + "_inBundle": false, + "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "_location": "/eslint-plugin-import/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.0.0", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-plugin-import/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "description": "Tiny milisecond conversion utility", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" }, "eslintConfig": { "extends": "eslint:recommended", @@ -19,6 +46,11 @@ "es6": true } }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", "lint-staged": { "*.js": [ "npm run lint", @@ -26,12 +58,16 @@ "git add" ] }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} \ No newline at end of file + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/package.json index d895eda5c..b1b21894a 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/package.json @@ -1,28 +1,45 @@ { - "name": "resolve", - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.17.0", - "repository": { - "type": "git", - "url": "git://github.com/browserify/resolve.git" - }, - "main": "index.js", - "keywords": [ - "resolve", - "require", - "node", - "module" + "_args": [ + [ + "resolve@1.17.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepublish": "safe-publish-latest", - "lint": "eslint .", - "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", - "tests-only": "tape test/*.js", - "pretest": "npm run lint", - "test": "npm run --silent tests-only", - "posttest": "npm run test:multirepo", - "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + "_development": true, + "_from": "resolve@1.17.0", + "_id": "resolve@1.17.0", + "_inBundle": false, + "_integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "_location": "/eslint-plugin-import/resolve", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "resolve@1.17.0", + "name": "resolve", + "escapedName": "resolve", + "rawSpec": "1.17.0", + "saveSpec": null, + "fetchSpec": "1.17.0" }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "_spec": "1.17.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/browserify/resolve/issues" + }, + "dependencies": { + "path-parse": "^1.0.6" + }, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", "devDependencies": { "@ljharb/eslint-config": "^16.0.0", "array.prototype.map": "^1.0.2", @@ -32,16 +49,32 @@ "tap": "0.4.13", "tape": "^5.0.0-next.5" }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "funding": { "url": "https://github.com/sponsors/ljharb" }, - "dependencies": { - "path-parse": "^1.0.6" - } -} \ No newline at end of file + "homepage": "https://github.com/browserify/resolve#readme", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "name": "resolve", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "scripts": { + "lint": "eslint .", + "posttest": "npm run test:multirepo", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "test": "npm run --silent tests-only", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", + "tests-only": "tape test/*.js" + }, + "version": "1.17.0" +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/module_dir/zmodules/bbb/package.json index a60376465..c13b8cf6a 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -1,3 +1,3 @@ { "main": "main.js" -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/baz/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/baz/package.json index 6ba9318a0..2f77720b8 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/baz/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/baz/package.json @@ -1,4 +1,4 @@ { - "name": "baz", - "main": "quux.js" -} \ No newline at end of file + "name": "baz", + "main": "quux.js" +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/browser_field/package.json index 291ab03bc..bf406f083 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/browser_field/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/browser_field/package.json @@ -2,4 +2,4 @@ "name": "browser_field", "main": "a", "browser": "b" -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_main/package.json index d08e00e9d..d7f4fc807 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_main/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_main/package.json @@ -1,3 +1,3 @@ { - "main": "." -} \ No newline at end of file + "main": "." +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_slash_main/package.json index a92bfd7b1..f51287b9d 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -1,3 +1,3 @@ { - "main": "./" -} \ No newline at end of file + "main": "./" +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/incorrect_main/package.json index b3b73da08..b71880417 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/incorrect_main/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -1,3 +1,3 @@ { - "main": "wrong.js" -} \ No newline at end of file + "main": "wrong.js" +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/invalid_main/package.json index 3158504f6..0cf827995 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/invalid_main/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/invalid_main/package.json @@ -4,4 +4,4 @@ "why is this a thing", "srsly omg wtf" ] -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/package.json index 9c6d56b61..8508f9d2c 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/package.json @@ -17,4 +17,4 @@ "devDependencies": { "lerna": "^3.4.3" } -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json index a2bbfff89..204de51e0 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -11,4 +11,4 @@ "dependencies": { "@my-scope/package-b": "^0.0.0" } -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json index f7adacdeb..f57c3b5f5 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -11,4 +11,4 @@ "dependencies": { "@my-scope/package-a": "^0.0.0" } -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json index f3fffe71c..acfe9e951 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -12,4 +12,4 @@ "dependencies": { "buffer": "*" } -} \ No newline at end of file +} diff --git a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/symlinked/package/package.json index b6e6d85fd..8e1b58591 100644 --- a/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/symlinked/package/package.json +++ b/node_modules/eslint-plugin-import/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -1,3 +1,3 @@ { - "main": "bar.js" + "main": "bar.js" } \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/package.json b/node_modules/eslint-plugin-import/package.json index 4010e37a3..f924563a7 100644 --- a/node_modules/eslint-plugin-import/package.json +++ b/node_modules/eslint-plugin-import/package.json @@ -1,57 +1,60 @@ { - "name": "eslint-plugin-import", - "version": "2.22.0", - "description": "Import with sanity.", - "engines": { - "node": ">=4" - }, - "main": "lib/index.js", - "directories": { - "test": "tests" - }, - "files": [ - "*.md", - "LICENSE", - "docs", - "lib", - "config", - "memo-parser/{*.js,LICENSE,*.md}" + "_args": [ + [ + "eslint-plugin-import@2.22.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prebuild": "rimraf lib", - "build": "babel --quiet --out-dir lib src", - "postbuild": "npm run copy-metafiles", - "copy-metafiles": "node --require babel-register ./scripts/copyMetafiles", - "watch": "npm run tests-only -- -- --watch", - "pretest": "linklocal", - "posttest": "eslint .", - "mocha": "cross-env BABEL_ENV=test nyc -s mocha", - "tests-only": "npm run mocha tests/src", - "test": "npm run tests-only", - "test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src", - "test-all": "node --require babel-register ./scripts/testAll", - "prepublish": "not-in-publish || npm run build", - "coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info" + "_development": true, + "_from": "eslint-plugin-import@2.22.0", + "_id": "eslint-plugin-import@2.22.0", + "_inBundle": false, + "_integrity": "sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==", + "_location": "/eslint-plugin-import", + "_phantomChildren": { + "esutils": "2.0.3", + "path-parse": "1.0.6" }, - "repository": { - "type": "git", - "url": "https://github.com/benmosher/eslint-plugin-import" + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-import@2.22.0", + "name": "eslint-plugin-import", + "escapedName": "eslint-plugin-import", + "rawSpec": "2.22.0", + "saveSpec": null, + "fetchSpec": "2.22.0" }, - "keywords": [ - "eslint", - "eslintplugin", - "es6", - "jsnext", - "modules", - "import", - "export" + "_requiredBy": [ + "#DEV:/", + "/eslint-plugin-github" ], - "author": "Ben Mosher ", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz", + "_spec": "2.22.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ben Mosher", + "email": "me@benmosher.com" + }, "bugs": { "url": "https://github.com/benmosher/eslint-plugin-import/issues" }, - "homepage": "https://github.com/benmosher/eslint-plugin-import", + "dependencies": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.3", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "description": "Import with sanity.", "devDependencies": { "@eslint/import-test-order-redirect-scoped": "file:./tests/files/order-redirect-scoped", "@test-scope/some-module": "file:./tests/files/symlinked-module", @@ -93,24 +96,33 @@ "typescript": "~3.9.5", "typescript-eslint-parser": "^22.0.0" }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "directories": { + "test": "tests" }, - "dependencies": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "engines": { + "node": ">=4" }, + "files": [ + "*.md", + "LICENSE", + "docs", + "lib", + "config", + "memo-parser/{*.js,LICENSE,*.md}" + ], + "homepage": "https://github.com/benmosher/eslint-plugin-import", + "keywords": [ + "eslint", + "eslintplugin", + "es6", + "jsnext", + "modules", + "import", + "export" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "eslint-plugin-import", "nyc": { "require": [ "babel-register" @@ -121,5 +133,29 @@ "src/", "resolvers/" ] - } -} \ No newline at end of file + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/benmosher/eslint-plugin-import.git" + }, + "scripts": { + "build": "babel --quiet --out-dir lib src", + "copy-metafiles": "node --require babel-register ./scripts/copyMetafiles", + "coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info", + "mocha": "cross-env BABEL_ENV=test nyc -s mocha", + "postbuild": "npm run copy-metafiles", + "posttest": "eslint .", + "prebuild": "rimraf lib", + "prepublish": "not-in-publish || npm run build", + "pretest": "linklocal", + "test": "npm run tests-only", + "test-all": "node --require babel-register ./scripts/testAll", + "test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src", + "tests-only": "npm run mocha tests/src", + "watch": "npm run tests-only -- -- --watch" + }, + "version": "2.22.0" +} diff --git a/node_modules/eslint-plugin-no-async-foreach/package.json b/node_modules/eslint-plugin-no-async-foreach/package.json index 0ce033466..f46399a29 100644 --- a/node_modules/eslint-plugin-no-async-foreach/package.json +++ b/node_modules/eslint-plugin-no-async-foreach/package.json @@ -1,20 +1,40 @@ { - "name": "eslint-plugin-no-async-foreach", - "version": "0.1.1", - "description": "No async forEachs", - "keywords": [ - "eslint", - "eslintplugin", - "eslint-plugin" + "_args": [ + [ + "eslint-plugin-no-async-foreach@0.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Elliott McNary", - "main": "index.js", - "scripts": { - "test": "mocha tests --recursive" + "_development": true, + "_from": "eslint-plugin-no-async-foreach@0.1.1", + "_id": "eslint-plugin-no-async-foreach@0.1.1", + "_inBundle": false, + "_integrity": "sha512-SXiJCpXWyNijyT8F4K51oXwqnYv3G2JTHMhg+qE/BcWyj7E395pDScmHIP4NkeKi8B650BQBIMOLgMI47Mj26A==", + "_location": "/eslint-plugin-no-async-foreach", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-no-async-foreach@0.1.1", + "name": "eslint-plugin-no-async-foreach", + "escapedName": "eslint-plugin-no-async-foreach", + "rawSpec": "0.1.1", + "saveSpec": null, + "fetchSpec": "0.1.1" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-no-async-foreach/-/eslint-plugin-no-async-foreach-0.1.1.tgz", + "_spec": "0.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Elliott McNary" }, "dependencies": { "requireindex": "~1.1.0" }, + "description": "No async forEachs", "devDependencies": { "eslint": "~3.9.1", "mocha": "^3.1.2" @@ -22,5 +42,16 @@ "engines": { "node": ">=0.10.0" }, - "license": "ISC" -} \ No newline at end of file + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin" + ], + "license": "ISC", + "main": "index.js", + "name": "eslint-plugin-no-async-foreach", + "scripts": { + "test": "mocha tests --recursive" + }, + "version": "0.1.1" +} diff --git a/node_modules/eslint-plugin-prettier/package.json b/node_modules/eslint-plugin-prettier/package.json index 5b42531a7..3a55f4d26 100644 --- a/node_modules/eslint-plugin-prettier/package.json +++ b/node_modules/eslint-plugin-prettier/package.json @@ -1,39 +1,43 @@ { - "name": "eslint-plugin-prettier", - "version": "3.1.4", - "description": "Runs prettier as an eslint rule", - "keywords": [ - "eslint", - "eslintplugin", - "eslint-plugin", - "prettier" + "_args": [ + [ + "eslint-plugin-prettier@3.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Teddy Katz", - "files": [ - "eslint-plugin-prettier.js" - ], - "main": "eslint-plugin-prettier.js", - "scripts": { - "lint": "eslint .", - "test": "npm run lint && mocha", - "format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix", - "generate-release": "node-release-script" + "_development": true, + "_from": "eslint-plugin-prettier@3.1.4", + "_id": "eslint-plugin-prettier@3.1.4", + "_inBundle": false, + "_integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", + "_location": "/eslint-plugin-prettier", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-plugin-prettier@3.1.4", + "name": "eslint-plugin-prettier", + "escapedName": "eslint-plugin-prettier", + "rawSpec": "3.1.4", + "saveSpec": null, + "fetchSpec": "3.1.4" }, - "repository": { - "type": "git", - "url": "git+https://github.com/prettier/eslint-plugin-prettier.git" + "_requiredBy": [ + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "_spec": "3.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Teddy Katz" }, "bugs": { "url": "https://github.com/prettier/eslint-plugin-prettier/issues" }, - "homepage": "https://github.com/prettier/eslint-plugin-prettier#readme", "dependencies": { "prettier-linter-helpers": "^1.0.0" }, - "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" - }, + "description": "Runs prettier as an eslint rule", "devDependencies": { "@not-an-aardvark/node-release-script": "^0.1.0", "eslint": "^7.0.0", @@ -49,5 +53,32 @@ "engines": { "node": ">=6.0.0" }, - "license": "MIT" -} \ No newline at end of file + "files": [ + "eslint-plugin-prettier.js" + ], + "homepage": "https://github.com/prettier/eslint-plugin-prettier#readme", + "keywords": [ + "eslint", + "eslintplugin", + "eslint-plugin", + "prettier" + ], + "license": "MIT", + "main": "eslint-plugin-prettier.js", + "name": "eslint-plugin-prettier", + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/eslint-plugin-prettier.git" + }, + "scripts": { + "format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix", + "generate-release": "node-release-script", + "lint": "eslint .", + "test": "npm run lint && mocha" + }, + "version": "3.1.4" +} diff --git a/node_modules/eslint-rule-documentation/package.json b/node_modules/eslint-rule-documentation/package.json index 821f73786..b5552e9aa 100644 --- a/node_modules/eslint-rule-documentation/package.json +++ b/node_modules/eslint-rule-documentation/package.json @@ -1,24 +1,54 @@ { - "name": "eslint-rule-documentation", - "version": "1.0.23", - "description": "Find the url for the documentation of an ESLint rule", - "license": "MIT", - "repository": "jfmengels/eslint-rule-documentation", + "_args": [ + [ + "eslint-rule-documentation@1.0.23", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "eslint-rule-documentation@1.0.23", + "_id": "eslint-rule-documentation@1.0.23", + "_inBundle": false, + "_integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==", + "_location": "/eslint-rule-documentation", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-rule-documentation@1.0.23", + "name": "eslint-rule-documentation", + "escapedName": "eslint-rule-documentation", + "rawSpec": "1.0.23", + "saveSpec": null, + "fetchSpec": "1.0.23" + }, + "_requiredBy": [ + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz", + "_spec": "1.0.23", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jeroen Engels", "email": "jfm.engels@gmail.com", "url": "github.com/jfmengels" }, + "bugs": { + "url": "https://github.com/jfmengels/eslint-rule-documentation/issues" + }, + "description": "Find the url for the documentation of an ESLint rule", + "devDependencies": { + "ava": "^0.15.2", + "xo": "^0.16.0" + }, "engines": { "node": ">=4.0.0" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "plugins.json" ], + "homepage": "https://github.com/jfmengels/eslint-rule-documentation#readme", "keywords": [ "eslint", "eslintplugin", @@ -30,11 +60,17 @@ "doc", "documentation" ], - "devDependencies": { - "ava": "^0.15.2", - "xo": "^0.16.0" + "license": "MIT", + "name": "eslint-rule-documentation", + "repository": { + "type": "git", + "url": "git+https://github.com/jfmengels/eslint-rule-documentation.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.23", "xo": { "space": 2 } -} \ No newline at end of file +} diff --git a/node_modules/eslint-scope/package.json b/node_modules/eslint-scope/package.json index 9ae6624ce..345b6e32c 100644 --- a/node_modules/eslint-scope/package.json +++ b/node_modules/eslint-scope/package.json @@ -1,35 +1,42 @@ { - "name": "eslint-scope", - "description": "ECMAScript scope analyzer for ESLint", - "homepage": "http://github.com/eslint/eslint-scope", - "main": "lib/index.js", - "version": "5.1.1", - "engines": { - "node": ">=8.0.0" + "_args": [ + [ + "eslint-scope@5.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "eslint-scope@5.1.1", + "_id": "eslint-scope@5.1.1", + "_inBundle": false, + "_integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "_location": "/eslint-scope", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-scope@5.1.1", + "name": "eslint-scope", + "escapedName": "eslint-scope", + "rawSpec": "5.1.1", + "saveSpec": null, + "fetchSpec": "5.1.1" }, - "repository": "eslint/eslint-scope", + "_requiredBy": [ + "/@typescript-eslint/experimental-utils", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "_spec": "5.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/eslint/eslint-scope/issues" }, - "license": "BSD-2-Clause", - "scripts": { - "test": "node Makefile.js test", - "lint": "node Makefile.js lint", - "generate-release": "eslint-generate-release", - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" - }, - "files": [ - "LICENSE", - "README.md", - "lib" - ], "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" }, + "description": "ECMAScript scope analyzer for ESLint", "devDependencies": { "@typescript-eslint/parser": "^1.11.0", "chai": "^4.2.0", @@ -44,5 +51,31 @@ "npm-license": "^0.3.3", "shelljs": "^0.8.3", "typescript": "^3.5.2" - } -} \ No newline at end of file + }, + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "LICENSE", + "README.md", + "lib" + ], + "homepage": "http://github.com/eslint/eslint-scope", + "license": "BSD-2-Clause", + "main": "lib/index.js", + "name": "eslint-scope", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-scope.git" + }, + "scripts": { + "generate-alpharelease": "eslint-generate-prerelease alpha", + "generate-betarelease": "eslint-generate-prerelease beta", + "generate-rcrelease": "eslint-generate-prerelease rc", + "generate-release": "eslint-generate-release", + "lint": "node Makefile.js lint", + "publish-release": "eslint-publish-release", + "test": "node Makefile.js test" + }, + "version": "5.1.1" +} diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json index 98262a15c..f2b552833 100644 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json @@ -1,15 +1,42 @@ { - "name": "eslint-visitor-keys", - "version": "1.3.0", - "description": "Constants and utilities about visitor keys to traverse AST.", - "main": "lib/index.js", - "files": [ - "lib" + "_args": [ + [ + "eslint-visitor-keys@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=4" + "_development": true, + "_from": "eslint-visitor-keys@1.3.0", + "_id": "eslint-visitor-keys@1.3.0", + "_inBundle": false, + "_integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "_location": "/eslint-utils/eslint-visitor-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-visitor-keys@1.3.0", + "name": "eslint-visitor-keys", + "escapedName": "eslint-visitor-keys", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/eslint-utils" + ], + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, "dependencies": {}, + "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { "eslint": "^4.7.2", "eslint-config-eslint": "^4.0.0", @@ -18,23 +45,31 @@ "nyc": "^11.2.1", "opener": "^1.4.3" }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "keywords": [], + "license": "Apache-2.0", + "main": "lib/index.js", + "name": "eslint-visitor-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-visitor-keys.git" + }, "scripts": { - "lint": "eslint lib tests/lib", - "pretest": "npm run -s lint", - "test": "nyc mocha tests/lib", "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" + "generate-release": "eslint-generate-release", + "lint": "eslint lib tests/lib", + "pretest": "npm run -s lint", + "publish-release": "eslint-publish-release", + "test": "nyc mocha tests/lib" }, - "repository": "eslint/eslint-visitor-keys", - "keywords": [], - "author": "Toru Nagashima (https://github.com/mysticatea)", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" -} \ No newline at end of file + "version": "1.3.0" +} diff --git a/node_modules/eslint-utils/package.json b/node_modules/eslint-utils/package.json index 1de02b13c..04fc5d96a 100644 --- a/node_modules/eslint-utils/package.json +++ b/node_modules/eslint-utils/package.json @@ -1,19 +1,44 @@ { - "name": "eslint-utils", - "version": "2.1.0", - "description": "Utilities for ESLint plugins.", - "engines": { - "node": ">=6" - }, - "sideEffects": false, - "main": "index", - "module": "index.mjs", - "files": [ - "index.*" + "_args": [ + [ + "eslint-utils@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "eslint-utils@2.1.0", + "_id": "eslint-utils@2.1.0", + "_inBundle": false, + "_integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "_location": "/eslint-utils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-utils@2.1.0", + "name": "eslint-utils", + "escapedName": "eslint-utils", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/experimental-utils", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima" + }, + "bugs": { + "url": "https://github.com/mysticatea/eslint-utils/issues" + }, "dependencies": { "eslint-visitor-keys": "^1.1.0" }, + "description": "Utilities for ESLint plugins.", "devDependencies": { "@mysticatea/eslint-plugin": "^12.0.0", "codecov": "^3.6.1", @@ -32,8 +57,26 @@ "vuepress": "^1.2.0", "warun": "^1.0.0" }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.*" + ], + "funding": "https://github.com/sponsors/mysticatea", + "homepage": "https://github.com/mysticatea/eslint-utils#readme", + "keywords": [ + "eslint" + ], + "license": "MIT", + "main": "index", + "module": "index.mjs", + "name": "eslint-utils", + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/eslint-utils.git" + }, "scripts": { - "prebuild": "npm run -s clean", "build": "rollup -c", "clean": "rimraf .nyc_output coverage index.*", "codecov": "nyc report -r lcovonly && codecov", @@ -41,25 +84,14 @@ "docs:build": "vuepress build docs", "docs:watch": "vuepress dev docs", "lint": "eslint src test", + "postversion": "git push && git push --tags", + "prebuild": "npm run -s clean", + "preversion": "npm test && npm run -s build", + "prewatch": "npm run -s clean", "test": "run-s lint build test:mocha", "test:mocha": "nyc mocha --reporter dot \"test/*.js\"", - "preversion": "npm test && npm run -s build", - "postversion": "git push && git push --tags", - "prewatch": "npm run -s clean", "watch": "warun \"{src,test}/**/*.js\" -- npm run -s test:mocha" }, - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/eslint-utils.git" - }, - "keywords": [ - "eslint" - ], - "author": "Toru Nagashima", - "license": "MIT", - "bugs": { - "url": "https://github.com/mysticatea/eslint-utils/issues" - }, - "homepage": "https://github.com/mysticatea/eslint-utils#readme", - "funding": "https://github.com/sponsors/mysticatea" -} \ No newline at end of file + "sideEffects": false, + "version": "2.1.0" +} diff --git a/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-visitor-keys/package.json index 959b51792..f4d38abe7 100644 --- a/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/eslint-visitor-keys/package.json @@ -1,15 +1,42 @@ { - "name": "eslint-visitor-keys", - "version": "2.0.0", - "description": "Constants and utilities about visitor keys to traverse AST.", - "main": "lib/index.js", - "files": [ - "lib" + "_args": [ + [ + "eslint-visitor-keys@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=10" + "_development": true, + "_from": "eslint-visitor-keys@2.0.0", + "_id": "eslint-visitor-keys@2.0.0", + "_inBundle": false, + "_integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "_location": "/eslint-visitor-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-visitor-keys@2.0.0", + "name": "eslint-visitor-keys", + "escapedName": "eslint-visitor-keys", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/@typescript-eslint/visitor-keys" + ], + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, "dependencies": {}, + "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { "eslint": "^4.7.2", "eslint-config-eslint": "^4.0.0", @@ -18,22 +45,30 @@ "nyc": "^11.2.1", "opener": "^1.4.3" }, + "engines": { + "node": ">=10" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "keywords": [], + "license": "Apache-2.0", + "main": "lib/index.js", + "name": "eslint-visitor-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-visitor-keys.git" + }, "scripts": { - "lint": "eslint lib tests/lib", - "test": "nyc mocha tests/lib", "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" + "generate-release": "eslint-generate-release", + "lint": "eslint lib tests/lib", + "publish-release": "eslint-publish-release", + "test": "nyc mocha tests/lib" }, - "repository": "eslint/eslint-visitor-keys", - "keywords": [], - "author": "Toru Nagashima (https://github.com/mysticatea)", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" -} \ No newline at end of file + "version": "2.0.0" +} diff --git a/node_modules/eslint/node_modules/ansi-styles/package.json b/node_modules/eslint/node_modules/ansi-styles/package.json index 1a7731952..ac7ea2d87 100644 --- a/node_modules/eslint/node_modules/ansi-styles/package.json +++ b/node_modules/eslint/node_modules/ansi-styles/package.json @@ -1,26 +1,62 @@ { - "name": "ansi-styles", - "version": "4.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "_args": [ + [ + "ansi-styles@4.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-styles@4.2.1", + "_id": "ansi-styles@4.2.1", + "_inBundle": false, + "_integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "_location": "/eslint/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-styles@4.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "4.2.1", + "saveSpec": null, + "fetchSpec": "4.2.1" + }, + "_requiredBy": [ + "/eslint/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "_spec": "4.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", "keywords": [ "ansi", "styles", @@ -43,15 +79,15 @@ "command-line", "text" ], - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.2.1" +} diff --git a/node_modules/eslint/node_modules/chalk/package.json b/node_modules/eslint/node_modules/chalk/package.json index efe4541a6..9a5d6d076 100644 --- a/node_modules/eslint/node_modules/chalk/package.json +++ b/node_modules/eslint/node_modules/chalk/package.json @@ -1,22 +1,61 @@ { - "name": "chalk", - "version": "4.1.0", + "_args": [ + [ + "chalk@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "chalk@4.1.0", + "_id": "chalk@4.1.0", + "_inBundle": false, + "_integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "_location": "/eslint/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@4.1.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "main": "source", + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^4.0.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^15.0.0", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.28.2" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "source", "index.d.ts" ], + "funding": "https://github.com/chalk/chalk?sponsor=1", + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -40,21 +79,18 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "license": "MIT", + "main": "source", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && nyc ava && tsd" }, + "version": "4.1.0", "xo": { "rules": { "unicorn/prefer-string-slice": "off", @@ -65,4 +101,4 @@ "unicorn/better-regex": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/eslint/node_modules/color-convert/package.json b/node_modules/eslint/node_modules/color-convert/package.json index d169f869b..ad5163a4b 100644 --- a/node_modules/eslint/node_modules/color-convert/package.json +++ b/node_modules/eslint/node_modules/color-convert/package.json @@ -1,17 +1,57 @@ { - "name": "color-convert", + "_args": [ + [ + "color-convert@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-convert@2.0.1", + "_id": "color-convert@2.0.1", + "_inBundle": false, + "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "_location": "/eslint/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-convert@2.0.1", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/eslint/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "~1.1.4" + }, "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" }, "engines": { "node": ">=7.0.0" }, + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", "keywords": [ "color", "colour", @@ -26,23 +66,22 @@ "ansi", "ansi16" ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "2.0.1", "xo": { "rules": { "default-case": 0, "no-inline-comments": 0, "operator-linebreak": 0 } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" } -} \ No newline at end of file +} diff --git a/node_modules/eslint/node_modules/color-name/package.json b/node_modules/eslint/node_modules/color-name/package.json index fecb8dcfb..b5c9f1ef9 100644 --- a/node_modules/eslint/node_modules/color-name/package.json +++ b/node_modules/eslint/node_modules/color-name/package.json @@ -1,28 +1,60 @@ { - "name": "color-name", - "version": "1.1.4", + "_args": [ + [ + "color-name@1.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-name@1.1.4", + "_id": "color-name@1.1.4", + "_inBundle": false, + "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "_location": "/eslint/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.4", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.4", + "saveSpec": null, + "fetchSpec": "1.1.4" + }, + "_requiredBy": [ + "/eslint/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "_spec": "1.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, "description": "A list of color names and its values", - "main": "index.js", "files": [ "index.js" ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, + "homepage": "https://github.com/colorjs/color-name", "keywords": [ "color-name", "color", "color-keyword", "keyword" ], - "author": "DY ", "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/colorjs/color-name.git" }, - "homepage": "https://github.com/colorjs/color-name" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.1.4" +} diff --git a/node_modules/eslint/node_modules/cross-spawn/package.json b/node_modules/eslint/node_modules/cross-spawn/package.json index af692031e..d7fddf7c6 100644 --- a/node_modules/eslint/node_modules/cross-spawn/package.json +++ b/node_modules/eslint/node_modules/cross-spawn/package.json @@ -1,46 +1,39 @@ { - "name": "cross-spawn", - "version": "7.0.3", - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "keywords": [ - "spawn", - "spawnSync", - "windows", - "cross-platform", - "path-ext", - "shebang", - "cmd", - "execute" - ], - "author": "André Cruz ", - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "repository": { - "type": "git", - "url": "git@github.com:moxystudio/node-cross-spawn.git" - }, - "license": "MIT", - "main": "index.js", - "files": [ - "lib" - ], - "scripts": { - "lint": "eslint .", - "test": "jest --env node --coverage", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "postrelease": "git push --follow-tags origin HEAD && npm publish" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" + "_args": [ + [ + "cross-spawn@7.0.3", + "/home/chris/src/github.com/github/codeql-action" ] + ], + "_development": true, + "_from": "cross-spawn@7.0.3", + "_id": "cross-spawn@7.0.3", + "_inBundle": false, + "_integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "_location": "/eslint/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cross-spawn@7.0.3", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "7.0.3", + "saveSpec": null, + "fetchSpec": "7.0.3" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "_spec": "7.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" }, "commitlint": { "extends": [ @@ -52,6 +45,7 @@ "shebang-command": "^2.0.0", "which": "^2.0.1" }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", "devDependencies": { "@commitlint/cli": "^8.1.0", "@commitlint/config-conventional": "^8.1.0", @@ -69,5 +63,46 @@ }, "engines": { "node": ">= 8" - } -} \ No newline at end of file + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "lint": "eslint .", + "postrelease": "git push --follow-tags origin HEAD && npm publish", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "version": "7.0.3" +} diff --git a/node_modules/eslint/node_modules/doctrine/package.json b/node_modules/eslint/node_modules/doctrine/package.json index ff109c462..7a8a50ede 100644 --- a/node_modules/eslint/node_modules/doctrine/package.json +++ b/node_modules/eslint/node_modules/doctrine/package.json @@ -1,31 +1,40 @@ { - "name": "doctrine", + "_args": [ + [ + "doctrine@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "doctrine@3.0.0", + "_id": "doctrine@3.0.0", + "_inBundle": false, + "_integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "_location": "/eslint/doctrine", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "doctrine@3.0.0", + "name": "doctrine", + "escapedName": "doctrine", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/eslint/doctrine/issues" + }, + "dependencies": { + "esutils": "^2.0.2" + }, "description": "JSDoc parser", - "homepage": "https://github.com/eslint/doctrine", - "main": "lib/doctrine.js", - "version": "3.0.0", - "engines": { - "node": ">=6.0.0" - }, - "directories": { - "lib": "./lib" - }, - "files": [ - "lib" - ], - "maintainers": [ - { - "name": "Nicholas C. Zakas", - "email": "nicholas+npm@nczconsulting.com", - "web": "https://www.nczonline.net" - }, - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "https://github.com/Constellation" - } - ], - "repository": "eslint/doctrine", "devDependencies": { "coveralls": "^3.0.1", "dateformat": "^1.0.11", @@ -40,19 +49,45 @@ "shelljs-nodecli": "^0.1.1", "should": "^5.0.1" }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=6.0.0" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/eslint/doctrine", "license": "Apache-2.0", + "main": "lib/doctrine.js", + "maintainers": [ + { + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com", + "url": "https://www.nczonline.net" + }, + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "https://github.com/Constellation" + } + ], + "name": "doctrine", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/doctrine.git" + }, "scripts": { - "pretest": "npm run lint", - "test": "nyc mocha", "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "eslint lib/", - "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" + "generate-release": "eslint-generate-release", + "lint": "eslint lib/", + "pretest": "npm run lint", + "publish-release": "eslint-publish-release", + "test": "nyc mocha" }, - "dependencies": { - "esutils": "^2.0.2" - } -} \ No newline at end of file + "version": "3.0.0" +} diff --git a/node_modules/eslint/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint/node_modules/eslint-visitor-keys/package.json index 98262a15c..0c12c3ab6 100644 --- a/node_modules/eslint/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/eslint/node_modules/eslint-visitor-keys/package.json @@ -1,15 +1,42 @@ { - "name": "eslint-visitor-keys", - "version": "1.3.0", - "description": "Constants and utilities about visitor keys to traverse AST.", - "main": "lib/index.js", - "files": [ - "lib" + "_args": [ + [ + "eslint-visitor-keys@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=4" + "_development": true, + "_from": "eslint-visitor-keys@1.3.0", + "_id": "eslint-visitor-keys@1.3.0", + "_inBundle": false, + "_integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "_location": "/eslint/eslint-visitor-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-visitor-keys@1.3.0", + "name": "eslint-visitor-keys", + "escapedName": "eslint-visitor-keys", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, "dependencies": {}, + "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { "eslint": "^4.7.2", "eslint-config-eslint": "^4.0.0", @@ -18,23 +45,31 @@ "nyc": "^11.2.1", "opener": "^1.4.3" }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "keywords": [], + "license": "Apache-2.0", + "main": "lib/index.js", + "name": "eslint-visitor-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-visitor-keys.git" + }, "scripts": { - "lint": "eslint lib tests/lib", - "pretest": "npm run -s lint", - "test": "nyc mocha tests/lib", "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" + "generate-release": "eslint-generate-release", + "lint": "eslint lib tests/lib", + "pretest": "npm run -s lint", + "publish-release": "eslint-publish-release", + "test": "nyc mocha tests/lib" }, - "repository": "eslint/eslint-visitor-keys", - "keywords": [], - "author": "Toru Nagashima (https://github.com/mysticatea)", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" -} \ No newline at end of file + "version": "1.3.0" +} diff --git a/node_modules/eslint/node_modules/has-flag/package.json b/node_modules/eslint/node_modules/has-flag/package.json index 55d0058e4..4eef7ad55 100644 --- a/node_modules/eslint/node_modules/has-flag/package.json +++ b/node_modules/eslint/node_modules/has-flag/package.json @@ -1,24 +1,55 @@ { - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", + "_args": [ + [ + "has-flag@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-flag@4.0.0", + "_id": "has-flag@4.0.0", + "_inBundle": false, + "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "_location": "/eslint/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-flag@4.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/eslint/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", "keywords": [ "has", "check", @@ -38,9 +69,14 @@ "minimist", "optimist" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/eslint/node_modules/ignore/package.json b/node_modules/eslint/node_modules/ignore/package.json index 873bff3ed..749f2d59c 100644 --- a/node_modules/eslint/node_modules/ignore/package.json +++ b/node_modules/eslint/node_modules/ignore/package.json @@ -1,48 +1,40 @@ { - "name": "ignore", - "version": "4.0.6", - "description": "Ignore is a manager and filter for .gitignore rules.", - "files": [ - "legacy.js", - "index.js", - "index.d.ts", - "LICENSE-MIT" + "_args": [ + [ + "ignore@4.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepublish": "npm run build", - "build": "babel -o legacy.js index.js", - "test:lint": "eslint .", - "test:tsc": "tsc ./test/ts/simple.ts", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js --coverage", - "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", - "test": "npm run test-no-cov", - "posttest": "tap --coverage-report=html && codecov" + "_development": true, + "_from": "ignore@4.0.6", + "_id": "ignore@4.0.6", + "_inBundle": false, + "_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "_location": "/eslint/ignore", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ignore@4.0.6", + "name": "ignore", + "escapedName": "ignore", + "rawSpec": "4.0.6", + "saveSpec": null, + "fetchSpec": "4.0.6" }, - "repository": { - "type": "git", - "url": "git@github.com:kaelzhang/node-ignore.git" - }, - "keywords": [ - "ignore", - ".gitignore", - "gitignore", - "npmignore", - "rules", - "manager", - "filter", - "regexp", - "regex", - "fnmatch", - "glob", - "asterisks", - "regular-expression" + "_requiredBy": [ + "/eslint" ], - "author": "kael", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "_spec": "4.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "kael" + }, "bugs": { "url": "https://github.com/kaelzhang/node-ignore/issues" }, + "description": "Ignore is a manager and filter for .gitignore rules.", "devDependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.7.0", @@ -60,5 +52,45 @@ }, "engines": { "node": ">= 4" - } -} \ No newline at end of file + }, + "files": [ + "legacy.js", + "index.js", + "index.d.ts", + "LICENSE-MIT" + ], + "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "keywords": [ + "ignore", + ".gitignore", + "gitignore", + "npmignore", + "rules", + "manager", + "filter", + "regexp", + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" + ], + "license": "MIT", + "name": "ignore", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" + }, + "scripts": { + "build": "babel -o legacy.js index.js", + "posttest": "tap --coverage-report=html && codecov", + "prepublish": "npm run build", + "test": "npm run test-no-cov", + "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", + "test:git": "tap test/git-check-ignore.js", + "test:ignore": "tap test/ignore.js --coverage", + "test:lint": "eslint .", + "test:tsc": "tsc ./test/ts/simple.ts" + }, + "version": "4.0.6" +} diff --git a/node_modules/eslint/node_modules/path-key/package.json b/node_modules/eslint/node_modules/path-key/package.json index 95d21612d..cb7853a23 100644 --- a/node_modules/eslint/node_modules/path-key/package.json +++ b/node_modules/eslint/node_modules/path-key/package.json @@ -1,24 +1,56 @@ { - "name": "path-key", - "version": "3.1.1", - "description": "Get the PATH environment variable key cross-platform", - "license": "MIT", - "repository": "sindresorhus/path-key", + "_args": [ + [ + "path-key@3.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-key@3.1.1", + "_id": "path-key@3.1.1", + "_inBundle": false, + "_integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "_location": "/eslint/path-key", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-key@3.1.1", + "name": "path-key", + "escapedName": "path-key", + "rawSpec": "3.1.1", + "saveSpec": null, + "fetchSpec": "3.1.1" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "_spec": "3.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-key/issues" + }, + "description": "Get the PATH environment variable key cross-platform", + "devDependencies": { + "@types/node": "^11.13.0", + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/path-key#readme", "keywords": [ "path", "key", @@ -30,10 +62,14 @@ "cross-platform", "windows" ], - "devDependencies": { - "@types/node": "^11.13.0", - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "path-key", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-key.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.1" +} diff --git a/node_modules/eslint/node_modules/shebang-command/package.json b/node_modules/eslint/node_modules/shebang-command/package.json index 3df239d17..f707f8b71 100644 --- a/node_modules/eslint/node_modules/shebang-command/package.json +++ b/node_modules/eslint/node_modules/shebang-command/package.json @@ -1,34 +1,70 @@ { - "name": "shebang-command", - "version": "2.0.0", - "description": "Get the command from a shebang", - "license": "MIT", - "repository": "kevva/shebang-command", + "_args": [ + [ + "shebang-command@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "shebang-command@2.0.0", + "_id": "shebang-command@2.0.0", + "_inBundle": false, + "_integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "_location": "/eslint/shebang-command", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-command@2.0.0", + "name": "shebang-command", + "escapedName": "shebang-command", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Kevin Mårtensson", "email": "kevinmartensson@gmail.com", "url": "github.com/kevva" }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "^2.3.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/kevva/shebang-command#readme", "keywords": [ "cmd", "command", "parse", "shebang" ], - "dependencies": { - "shebang-regex": "^3.0.0" + "license": "MIT", + "name": "shebang-command", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" }, - "devDependencies": { - "ava": "^2.3.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0" +} diff --git a/node_modules/eslint/node_modules/shebang-regex/package.json b/node_modules/eslint/node_modules/shebang-regex/package.json index c59ff7284..15ad7bcdd 100644 --- a/node_modules/eslint/node_modules/shebang-regex/package.json +++ b/node_modules/eslint/node_modules/shebang-regex/package.json @@ -1,24 +1,55 @@ { - "name": "shebang-regex", - "version": "3.0.0", - "description": "Regular expression for matching a shebang line", - "license": "MIT", - "repository": "sindresorhus/shebang-regex", + "_args": [ + [ + "shebang-regex@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "shebang-regex@3.0.0", + "_id": "shebang-regex@3.0.0", + "_inBundle": false, + "_integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "_location": "/eslint/shebang-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-regex@3.0.0", + "name": "shebang-regex", + "escapedName": "shebang-regex", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/eslint/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "description": "Regular expression for matching a shebang line", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/shebang-regex#readme", "keywords": [ "regex", "regexp", @@ -27,9 +58,14 @@ "test", "line" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "shebang-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.0" +} diff --git a/node_modules/eslint/node_modules/strip-json-comments/package.json b/node_modules/eslint/node_modules/strip-json-comments/package.json index ea6331861..9666bd047 100644 --- a/node_modules/eslint/node_modules/strip-json-comments/package.json +++ b/node_modules/eslint/node_modules/strip-json-comments/package.json @@ -1,26 +1,57 @@ { - "name": "strip-json-comments", - "version": "3.1.1", - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "license": "MIT", - "repository": "sindresorhus/strip-json-comments", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "strip-json-comments@3.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "strip-json-comments@3.1.1", + "_id": "strip-json-comments@3.1.1", + "_inBundle": false, + "_integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "_location": "/eslint/strip-json-comments", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-json-comments@3.1.1", + "name": "strip-json-comments", + "escapedName": "strip-json-comments", + "rawSpec": "3.1.1", + "saveSpec": null, + "fetchSpec": "3.1.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "_spec": "3.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" + }, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "devDependencies": { + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", "keywords": [ "json", "strip", @@ -38,10 +69,15 @@ "environment", "jsonc" ], - "devDependencies": { - "ava": "^1.4.1", - "matcha": "^0.7.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "strip-json-comments", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && ava && tsd" + }, + "version": "3.1.1" +} diff --git a/node_modules/eslint/node_modules/supports-color/package.json b/node_modules/eslint/node_modules/supports-color/package.json index 12d9e2923..674d05bd6 100644 --- a/node_modules/eslint/node_modules/supports-color/package.json +++ b/node_modules/eslint/node_modules/supports-color/package.json @@ -1,24 +1,59 @@ { - "name": "supports-color", - "version": "7.2.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", + "_args": [ + [ + "supports-color@7.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "supports-color@7.2.0", + "_id": "supports-color@7.2.0", + "_inBundle": false, + "_integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "_location": "/eslint/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "supports-color@7.2.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "7.2.0", + "saveSpec": null, + "fetchSpec": "7.2.0" + }, + "_requiredBy": [ + "/eslint/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "_spec": "7.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": { + "has-flag": "^4.0.0" + }, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "browser.js" ], + "homepage": "https://github.com/chalk/supports-color#readme", "keywords": [ "color", "colour", @@ -41,13 +76,14 @@ "truecolor", "16m" ], - "dependencies": { - "has-flag": "^4.0.0" + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "7.2.0" +} diff --git a/node_modules/eslint/node_modules/which/package.json b/node_modules/eslint/node_modules/which/package.json index 33ce9eed8..657cd8e88 100644 --- a/node_modules/eslint/node_modules/which/package.json +++ b/node_modules/eslint/node_modules/which/package.json @@ -1,43 +1,80 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "2.0.2", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" + "_args": [ + [ + "which@2.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "which@2.0.2", + "_id": "which@2.0.2", + "_inBundle": false, + "_integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "_location": "/eslint/which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "which@2.0.2", + "name": "which", + "escapedName": "which", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" }, - "main": "which.js", "bin": { - "node-which": "./bin/node-which" + "node-which": "bin/node-which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" }, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", "devDependencies": { "mkdirp": "^0.5.0", "rimraf": "^2.6.2", "tap": "^14.6.9" }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublish": "npm run changelog", - "prechangelog": "bash gen-changelog.sh", - "changelog": "git add CHANGELOG.md", - "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", - "postpublish": "git push origin --follow-tags" + "engines": { + "node": ">= 8" }, "files": [ "which.js", "bin/node-which" ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "git add CHANGELOG.md", + "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "prechangelog": "bash gen-changelog.sh", + "prepublish": "npm run changelog", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true }, - "engines": { - "node": ">= 8" - } -} \ No newline at end of file + "version": "2.0.2" +} diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index b85ca52cb..e43ef2a43 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,50 +1,47 @@ { - "name": "eslint", - "version": "7.9.0", - "author": "Nicholas C. Zakas ", - "description": "An AST-based pattern checker for JavaScript.", - "bin": { - "eslint": "./bin/eslint.js" - }, - "main": "./lib/api.js", - "scripts": { - "test": "node Makefile.js test", - "test:cli": "mocha", - "lint": "node Makefile.js lint", - "fix": "node Makefile.js lint -- fix", - "fuzz": "node Makefile.js fuzz", - "generate-release": "node Makefile.js generateRelease", - "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha", - "generate-betarelease": "node Makefile.js generatePrerelease -- beta", - "generate-rcrelease": "node Makefile.js generatePrerelease -- rc", - "publish-release": "node Makefile.js publishRelease", - "docs": "node Makefile.js docs", - "gensite": "node Makefile.js gensite", - "webpack": "node Makefile.js webpack", - "perf": "node Makefile.js perf" - }, - "gitHooks": { - "pre-commit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ], - "*.md": "markdownlint" - }, - "files": [ - "LICENSE", - "README.md", - "bin", - "conf", - "lib", - "messages" + "_args": [ + [ + "eslint@7.9.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "eslint/eslint", - "funding": "https://opencollective.com/eslint", - "homepage": "https://eslint.org", - "bugs": "https://github.com/eslint/eslint/issues/", + "_development": true, + "_from": "eslint@7.9.0", + "_id": "eslint@7.9.0", + "_inBundle": false, + "_integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", + "_location": "/eslint", + "_phantomChildren": { + "@types/color-name": "1.1.1", + "esutils": "2.0.3", + "isexe": "2.0.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint@7.9.0", + "name": "eslint", + "escapedName": "eslint", + "rawSpec": "7.9.0", + "saveSpec": null, + "fetchSpec": "7.9.0" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", + "_spec": "7.9.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "bugs": { + "url": "https://github.com/eslint/eslint/issues/" + }, "dependencies": { "@babel/code-frame": "^7.0.0", "@eslint/eslintrc": "^0.1.3", @@ -84,6 +81,7 @@ "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, + "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "@babel/core": "^7.4.3", "@babel/preset-env": "^7.4.3", @@ -132,6 +130,22 @@ "webpack-cli": "^3.3.5", "yorkie": "^2.0.0" }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "files": [ + "LICENSE", + "README.md", + "bin", + "conf", + "lib", + "messages" + ], + "funding": "https://opencollective.com/eslint", + "gitHooks": { + "pre-commit": "lint-staged" + }, + "homepage": "https://eslint.org", "keywords": [ "ast", "lint", @@ -140,7 +154,34 @@ "espree" ], "license": "MIT", - "engines": { - "node": "^10.12.0 || >=12.0.0" - } -} \ No newline at end of file + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ], + "*.md": "markdownlint" + }, + "main": "./lib/api.js", + "name": "eslint", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint.git" + }, + "scripts": { + "docs": "node Makefile.js docs", + "fix": "node Makefile.js lint -- fix", + "fuzz": "node Makefile.js fuzz", + "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha", + "generate-betarelease": "node Makefile.js generatePrerelease -- beta", + "generate-rcrelease": "node Makefile.js generatePrerelease -- rc", + "generate-release": "node Makefile.js generateRelease", + "gensite": "node Makefile.js gensite", + "lint": "node Makefile.js lint", + "perf": "node Makefile.js perf", + "publish-release": "node Makefile.js publishRelease", + "test": "node Makefile.js test", + "test:cli": "mocha", + "webpack": "node Makefile.js webpack" + }, + "version": "7.9.0" +} diff --git a/node_modules/espree/node_modules/acorn/package.json b/node_modules/espree/node_modules/acorn/package.json index d511e5db4..f017fb490 100644 --- a/node_modules/espree/node_modules/acorn/package.json +++ b/node_modules/espree/node_modules/acorn/package.json @@ -1,39 +1,71 @@ { - "name": "acorn", + "_args": [ + [ + "acorn@7.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "acorn@7.4.0", + "_id": "acorn@7.4.0", + "_inBundle": false, + "_integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "_location": "/espree/acorn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "acorn@7.4.0", + "name": "acorn", + "escapedName": "acorn", + "rawSpec": "7.4.0", + "saveSpec": null, + "fetchSpec": "7.4.0" + }, + "_requiredBy": [ + "/espree" + ], + "_resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "_spec": "7.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "acorn": "bin/acorn" + }, + "bugs": { + "url": "https://github.com/acornjs/acorn/issues" + }, "description": "ECMAScript parser", - "homepage": "https://github.com/acornjs/acorn", - "main": "dist/acorn.js", - "types": "dist/acorn.d.ts", - "module": "dist/acorn.mjs", - "version": "7.4.0", "engines": { "node": ">=0.4.0" }, + "homepage": "https://github.com/acornjs/acorn", + "license": "MIT", + "main": "dist/acorn.js", "maintainers": [ { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", - "web": "https://marijnhaverbeke.nl" + "url": "https://marijnhaverbeke.nl" }, { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", - "web": "https://rreverser.com/" + "url": "https://rreverser.com/" }, { "name": "Adrian Heine", - "web": "http://adrianheine.de" + "url": "http://adrianheine.de" } ], + "module": "dist/acorn.mjs", + "name": "acorn", "repository": { "type": "git", - "url": "https://github.com/acornjs/acorn.git" + "url": "git+https://github.com/acornjs/acorn.git" }, - "license": "MIT", "scripts": { "prepare": "cd ..; npm run build:main && npm run build:bin" }, - "bin": { - "acorn": "./bin/acorn" - } -} \ No newline at end of file + "types": "dist/acorn.d.ts", + "version": "7.4.0" +} diff --git a/node_modules/espree/node_modules/eslint-visitor-keys/package.json b/node_modules/espree/node_modules/eslint-visitor-keys/package.json index 98262a15c..1cf1efeb2 100644 --- a/node_modules/espree/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/espree/node_modules/eslint-visitor-keys/package.json @@ -1,15 +1,42 @@ { - "name": "eslint-visitor-keys", - "version": "1.3.0", - "description": "Constants and utilities about visitor keys to traverse AST.", - "main": "lib/index.js", - "files": [ - "lib" + "_args": [ + [ + "eslint-visitor-keys@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=4" + "_development": true, + "_from": "eslint-visitor-keys@1.3.0", + "_id": "eslint-visitor-keys@1.3.0", + "_inBundle": false, + "_integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "_location": "/espree/eslint-visitor-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "eslint-visitor-keys@1.3.0", + "name": "eslint-visitor-keys", + "escapedName": "eslint-visitor-keys", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/espree" + ], + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, "dependencies": {}, + "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { "eslint": "^4.7.2", "eslint-config-eslint": "^4.0.0", @@ -18,23 +45,31 @@ "nyc": "^11.2.1", "opener": "^1.4.3" }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "keywords": [], + "license": "Apache-2.0", + "main": "lib/index.js", + "name": "eslint-visitor-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-visitor-keys.git" + }, "scripts": { - "lint": "eslint lib tests/lib", - "pretest": "npm run -s lint", - "test": "nyc mocha tests/lib", "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" + "generate-release": "eslint-generate-release", + "lint": "eslint lib tests/lib", + "pretest": "npm run -s lint", + "publish-release": "eslint-publish-release", + "test": "nyc mocha tests/lib" }, - "repository": "eslint/eslint-visitor-keys", - "keywords": [], - "author": "Toru Nagashima (https://github.com/mysticatea)", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" -} \ No newline at end of file + "version": "1.3.0" +} diff --git a/node_modules/espree/package.json b/node_modules/espree/package.json index 96926a2bb..a37b5b718 100644 --- a/node_modules/espree/package.json +++ b/node_modules/espree/package.json @@ -1,27 +1,47 @@ { - "name": "espree", - "description": "An Esprima-compatible JavaScript parser built on Acorn", - "author": "Nicholas C. Zakas ", - "homepage": "https://github.com/eslint/espree", - "main": "espree.js", - "version": "7.3.0", - "files": [ - "lib", - "espree.js" + "_args": [ + [ + "espree@7.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": "^10.12.0 || >=12.0.0" + "_development": true, + "_from": "espree@7.3.0", + "_id": "espree@7.3.0", + "_inBundle": false, + "_integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "_location": "/espree", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "espree@7.3.0", + "name": "espree", + "escapedName": "espree", + "rawSpec": "7.3.0", + "saveSpec": null, + "fetchSpec": "7.3.0" + }, + "_requiredBy": [ + "/@eslint/eslintrc", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "_spec": "7.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Nicholas C. Zakas", + "email": "nicholas+npm@nczconsulting.com" }, - "repository": "eslint/espree", "bugs": { "url": "http://github.com/eslint/espree.git" }, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^7.4.0", "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.3.0" }, + "description": "An Esprima-compatible JavaScript parser built on Acorn", "devDependencies": { "browserify": "^16.5.0", "chai": "^4.2.0", @@ -40,6 +60,14 @@ "shelljs-nodecli": "^0.1.1", "unicode-6.3.0": "^0.7.5" }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "files": [ + "lib", + "espree.js" + ], + "homepage": "https://github.com/eslint/espree", "keywords": [ "ast", "ecmascript", @@ -48,17 +76,25 @@ "syntax", "acorn" ], + "license": "BSD-2-Clause", + "main": "espree.js", + "name": "espree", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/espree.git" + }, "scripts": { - "generate-regex": "node tools/generate-identifier-regex.js", - "test": "npm run-script lint && node Makefile.js test", - "lint": "node Makefile.js lint", - "fixlint": "node Makefile.js lint --fix", - "sync-docs": "node Makefile.js docs", "browserify": "node Makefile.js browserify", - "generate-release": "eslint-generate-release", + "fixlint": "node Makefile.js lint --fix", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "publish-release": "eslint-publish-release" - } -} \ No newline at end of file + "generate-regex": "node tools/generate-identifier-regex.js", + "generate-release": "eslint-generate-release", + "lint": "node Makefile.js lint", + "publish-release": "eslint-publish-release", + "sync-docs": "node Makefile.js docs", + "test": "npm run-script lint && node Makefile.js test" + }, + "version": "7.3.0" +} diff --git a/node_modules/esquery/node_modules/estraverse/package.json b/node_modules/esquery/node_modules/estraverse/package.json index 0cf551dd7..f988e31b0 100644 --- a/node_modules/esquery/node_modules/estraverse/package.json +++ b/node_modules/esquery/node_modules/estraverse/package.json @@ -1,23 +1,37 @@ { - "name": "estraverse", - "description": "ECMAScript JS AST traversal functions", - "homepage": "https://github.com/estools/estraverse", - "main": "estraverse.js", - "version": "5.2.0", - "engines": { - "node": ">=4.0" - }, - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "http://github.com/Constellation" - } + "_args": [ + [ + "estraverse@5.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "http://github.com/estools/estraverse.git" + "_development": true, + "_from": "estraverse@5.2.0", + "_id": "estraverse@5.2.0", + "_inBundle": false, + "_integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "_location": "/esquery/estraverse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "estraverse@5.2.0", + "name": "estraverse", + "escapedName": "estraverse", + "rawSpec": "5.2.0", + "saveSpec": null, + "fetchSpec": "5.2.0" }, + "_requiredBy": [ + "/esquery" + ], + "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/estools/estraverse/issues" + }, + "description": "ECMAScript JS AST traversal functions", "devDependencies": { "babel-preset-env": "^1.6.1", "babel-register": "^6.3.13", @@ -31,10 +45,28 @@ "jshint": "^2.5.6", "mocha": "^2.1.0" }, + "engines": { + "node": ">=4.0" + }, + "homepage": "https://github.com/estools/estraverse", "license": "BSD-2-Clause", + "main": "estraverse.js", + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "http://github.com/Constellation" + } + ], + "name": "estraverse", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/estools/estraverse.git" + }, "scripts": { - "test": "npm run-script lint && npm run-script unit-test", "lint": "jshint estraverse.js", + "test": "npm run-script lint && npm run-script unit-test", "unit-test": "mocha --compilers js:babel-register" - } -} \ No newline at end of file + }, + "version": "5.2.0" +} diff --git a/node_modules/esquery/package.json b/node_modules/esquery/package.json index bd1010929..bd5c2d1da 100644 --- a/node_modules/esquery/package.json +++ b/node_modules/esquery/package.json @@ -1,55 +1,45 @@ { - "name": "esquery", - "version": "1.3.1", - "author": "Joel Feenstra ", - "contributors": [], - "description": "A query library for ECMAScript AST using a CSS selector like query language.", - "main": "dist/esquery.min.js", - "module": "dist/esquery.esm.min.js", - "files": [ - "dist/*.js", - "dist/*.map", - "parser.js", - "license.txt", - "README.md" - ], - "nyc": { - "branches": 100, - "lines": 100, - "functions": 100, - "statements": 100, - "reporter": [ - "html", - "text" - ], - "exclude": [ - "parser.js", - "dist", - "tests" + "_args": [ + [ + "esquery@1.3.1", + "/home/chris/src/github.com/github/codeql-action" ] - }, - "scripts": { - "prepublishOnly": "npm run build && npm test", - "build:parser": "rm parser.js && pegjs --cache --format umd -o \"parser.js\" \"grammar.pegjs\"", - "build:browser": "rollup -c", - "build": "npm run build:parser && npm run build:browser", - "mocha": "mocha --require chai/register-assert --require @babel/register tests", - "test": "nyc npm run mocha && npm run lint", - "test:ci": "npm run mocha", - "lint": "eslint ." - }, - "repository": { - "type": "git", - "url": "https://github.com/estools/esquery.git" - }, - "bugs": "https://github.com/estools/esquery/issues", - "homepage": "https://github.com/estools/esquery/", - "keywords": [ - "ast", - "ecmascript", - "javascript", - "query" ], + "_development": true, + "_from": "esquery@1.3.1", + "_id": "esquery@1.3.1", + "_inBundle": false, + "_integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "_location": "/esquery", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "esquery@1.3.1", + "name": "esquery", + "escapedName": "esquery", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Joel Feenstra", + "email": "jrfeenst+esquery@gmail.com" + }, + "bugs": { + "url": "https://github.com/estools/esquery/issues" + }, + "contributors": [], + "dependencies": { + "estraverse": "^5.1.0" + }, + "description": "A query library for ECMAScript AST using a CSS selector like query language.", "devDependencies": { "@babel/core": "^7.9.0", "@babel/preset-env": "^7.9.5", @@ -68,11 +58,55 @@ "rollup-plugin-babel": "^4.4.0", "rollup-plugin-terser": "^5.3.0" }, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10" }, - "dependencies": { - "estraverse": "^5.1.0" - } -} \ No newline at end of file + "files": [ + "dist/*.js", + "dist/*.map", + "parser.js", + "license.txt", + "README.md" + ], + "homepage": "https://github.com/estools/esquery/", + "keywords": [ + "ast", + "ecmascript", + "javascript", + "query" + ], + "license": "BSD-3-Clause", + "main": "dist/esquery.min.js", + "module": "dist/esquery.esm.min.js", + "name": "esquery", + "nyc": { + "branches": 100, + "lines": 100, + "functions": 100, + "statements": 100, + "reporter": [ + "html", + "text" + ], + "exclude": [ + "parser.js", + "dist", + "tests" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/estools/esquery.git" + }, + "scripts": { + "build": "npm run build:parser && npm run build:browser", + "build:browser": "rollup -c", + "build:parser": "rm parser.js && pegjs --cache --format umd -o \"parser.js\" \"grammar.pegjs\"", + "lint": "eslint .", + "mocha": "mocha --require chai/register-assert --require @babel/register tests", + "prepublishOnly": "npm run build && npm test", + "test": "nyc npm run mocha && npm run lint", + "test:ci": "npm run mocha" + }, + "version": "1.3.1" +} diff --git a/node_modules/esrecurse/node_modules/estraverse/package.json b/node_modules/esrecurse/node_modules/estraverse/package.json index 0cf551dd7..a82fd873b 100644 --- a/node_modules/esrecurse/node_modules/estraverse/package.json +++ b/node_modules/esrecurse/node_modules/estraverse/package.json @@ -1,23 +1,37 @@ { - "name": "estraverse", - "description": "ECMAScript JS AST traversal functions", - "homepage": "https://github.com/estools/estraverse", - "main": "estraverse.js", - "version": "5.2.0", - "engines": { - "node": ">=4.0" - }, - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "http://github.com/Constellation" - } + "_args": [ + [ + "estraverse@5.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "http://github.com/estools/estraverse.git" + "_development": true, + "_from": "estraverse@5.2.0", + "_id": "estraverse@5.2.0", + "_inBundle": false, + "_integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "_location": "/esrecurse/estraverse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "estraverse@5.2.0", + "name": "estraverse", + "escapedName": "estraverse", + "rawSpec": "5.2.0", + "saveSpec": null, + "fetchSpec": "5.2.0" }, + "_requiredBy": [ + "/esrecurse" + ], + "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/estools/estraverse/issues" + }, + "description": "ECMAScript JS AST traversal functions", "devDependencies": { "babel-preset-env": "^1.6.1", "babel-register": "^6.3.13", @@ -31,10 +45,28 @@ "jshint": "^2.5.6", "mocha": "^2.1.0" }, + "engines": { + "node": ">=4.0" + }, + "homepage": "https://github.com/estools/estraverse", "license": "BSD-2-Clause", + "main": "estraverse.js", + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "http://github.com/Constellation" + } + ], + "name": "estraverse", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/estools/estraverse.git" + }, "scripts": { - "test": "npm run-script lint && npm run-script unit-test", "lint": "jshint estraverse.js", + "test": "npm run-script lint && npm run-script unit-test", "unit-test": "mocha --compilers js:babel-register" - } -} \ No newline at end of file + }, + "version": "5.2.0" +} diff --git a/node_modules/esrecurse/package.json b/node_modules/esrecurse/package.json index c3018ca5c..55aaaa1a4 100755 --- a/node_modules/esrecurse/package.json +++ b/node_modules/esrecurse/package.json @@ -1,26 +1,45 @@ { - "name": "esrecurse", - "description": "ECMAScript AST recursive visitor", - "homepage": "https://github.com/estools/esrecurse", - "main": "esrecurse.js", - "version": "4.3.0", - "engines": { - "node": ">=4.0" - }, - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "https://github.com/Constellation" - } + "_args": [ + [ + "esrecurse@4.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "https://github.com/estools/esrecurse.git" + "_development": true, + "_from": "esrecurse@4.3.0", + "_id": "esrecurse@4.3.0", + "_inBundle": false, + "_integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "_location": "/esrecurse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "esrecurse@4.3.0", + "name": "esrecurse", + "escapedName": "esrecurse", + "rawSpec": "4.3.0", + "saveSpec": null, + "fetchSpec": "4.3.0" + }, + "_requiredBy": [ + "/eslint-scope" + ], + "_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "_spec": "4.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "babel": { + "presets": [ + "es2015" + ] + }, + "bugs": { + "url": "https://github.com/estools/esrecurse/issues" }, "dependencies": { "estraverse": "^5.2.0" }, + "description": "ECMAScript AST recursive visitor", "devDependencies": { "babel-cli": "^6.24.1", "babel-eslint": "^7.2.3", @@ -38,15 +57,28 @@ "jsdoc": "^3.3.0-alpha10", "minimist": "^1.1.0" }, - "license": "BSD-2-Clause", - "scripts": { - "test": "gulp travis", - "unit-test": "gulp test", - "lint": "gulp lint" + "engines": { + "node": ">=4.0" }, - "babel": { - "presets": [ - "es2015" - ] - } -} \ No newline at end of file + "homepage": "https://github.com/estools/esrecurse", + "license": "BSD-2-Clause", + "main": "esrecurse.js", + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "https://github.com/Constellation" + } + ], + "name": "esrecurse", + "repository": { + "type": "git", + "url": "git+https://github.com/estools/esrecurse.git" + }, + "scripts": { + "lint": "gulp lint", + "test": "gulp travis", + "unit-test": "gulp test" + }, + "version": "4.3.0" +} diff --git a/node_modules/estraverse/package.json b/node_modules/estraverse/package.json index 17849599f..2971edf0f 100644 --- a/node_modules/estraverse/package.json +++ b/node_modules/estraverse/package.json @@ -1,23 +1,37 @@ { - "name": "estraverse", - "description": "ECMAScript JS AST traversal functions", - "homepage": "https://github.com/estools/estraverse", - "main": "estraverse.js", - "version": "4.3.0", - "engines": { - "node": ">=4.0" - }, - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "http://github.com/Constellation" - } + "_args": [ + [ + "estraverse@4.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "http://github.com/estools/estraverse.git" + "_development": true, + "_from": "estraverse@4.3.0", + "_id": "estraverse@4.3.0", + "_inBundle": false, + "_integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "_location": "/estraverse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "estraverse@4.3.0", + "name": "estraverse", + "escapedName": "estraverse", + "rawSpec": "4.3.0", + "saveSpec": null, + "fetchSpec": "4.3.0" }, + "_requiredBy": [ + "/eslint-scope" + ], + "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "_spec": "4.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/estools/estraverse/issues" + }, + "description": "ECMAScript JS AST traversal functions", "devDependencies": { "babel-preset-env": "^1.6.1", "babel-register": "^6.3.13", @@ -31,10 +45,28 @@ "jshint": "^2.5.6", "mocha": "^2.1.0" }, + "engines": { + "node": ">=4.0" + }, + "homepage": "https://github.com/estools/estraverse", "license": "BSD-2-Clause", + "main": "estraverse.js", + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "http://github.com/Constellation" + } + ], + "name": "estraverse", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/estools/estraverse.git" + }, "scripts": { - "test": "npm run-script lint && npm run-script unit-test", "lint": "jshint estraverse.js", + "test": "npm run-script lint && npm run-script unit-test", "unit-test": "mocha --compilers js:babel-register" - } -} \ No newline at end of file + }, + "version": "4.3.0" +} diff --git a/node_modules/esutils/package.json b/node_modules/esutils/package.json index 0578338b8..3b3f91f81 100644 --- a/node_modules/esutils/package.json +++ b/node_modules/esutils/package.json @@ -1,31 +1,41 @@ { - "name": "esutils", + "_args": [ + [ + "esutils@2.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "esutils@2.0.3", + "_id": "esutils@2.0.3", + "_inBundle": false, + "_integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "_location": "/esutils", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "esutils@2.0.3", + "name": "esutils", + "escapedName": "esutils", + "rawSpec": "2.0.3", + "saveSpec": null, + "fetchSpec": "2.0.3" + }, + "_requiredBy": [ + "/@babel/highlight", + "/concordance", + "/eslint", + "/eslint-plugin-import/doctrine", + "/eslint/doctrine" + ], + "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "_spec": "2.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/estools/esutils/issues" + }, "description": "utility box for ECMAScript language tools", - "homepage": "https://github.com/estools/esutils", - "main": "lib/utils.js", - "version": "2.0.3", - "engines": { - "node": ">=0.10.0" - }, - "directories": { - "lib": "./lib" - }, - "files": [ - "LICENSE.BSD", - "README.md", - "lib" - ], - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "web": "http://github.com/Constellation" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/estools/esutils.git" - }, "devDependencies": { "chai": "~1.7.2", "coffee-script": "~1.6.3", @@ -34,11 +44,37 @@ "regenerate": "~1.3.1", "unicode-9.0.0": "~0.7.0" }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "LICENSE.BSD", + "README.md", + "lib" + ], + "homepage": "https://github.com/estools/esutils", "license": "BSD-2-Clause", + "main": "lib/utils.js", + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "url": "http://github.com/Constellation" + } + ], + "name": "esutils", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/estools/esutils.git" + }, "scripts": { - "test": "npm run-script lint && npm run-script unit-test", + "generate-regex": "node tools/generate-identifier-regex.js", "lint": "jshint lib/*.js", - "unit-test": "mocha --compilers coffee:coffee-script -R spec", - "generate-regex": "node tools/generate-identifier-regex.js" - } -} \ No newline at end of file + "test": "npm run-script lint && npm run-script unit-test", + "unit-test": "mocha --compilers coffee:coffee-script -R spec" + }, + "version": "2.0.3" +} diff --git a/node_modules/event-target-shim/LICENSE b/node_modules/event-target-shim/LICENSE new file mode 100644 index 000000000..c39e6949e --- /dev/null +++ b/node_modules/event-target-shim/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/event-target-shim/README.md b/node_modules/event-target-shim/README.md new file mode 100644 index 000000000..a4f9c1b7e --- /dev/null +++ b/node_modules/event-target-shim/README.md @@ -0,0 +1,293 @@ +# event-target-shim + +[![npm version](https://img.shields.io/npm/v/event-target-shim.svg)](https://www.npmjs.com/package/event-target-shim) +[![Downloads/month](https://img.shields.io/npm/dm/event-target-shim.svg)](http://www.npmtrends.com/event-target-shim) +[![Build Status](https://travis-ci.org/mysticatea/event-target-shim.svg?branch=master)](https://travis-ci.org/mysticatea/event-target-shim) +[![Coverage Status](https://codecov.io/gh/mysticatea/event-target-shim/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/event-target-shim) +[![Dependency Status](https://david-dm.org/mysticatea/event-target-shim.svg)](https://david-dm.org/mysticatea/event-target-shim) + +An implementation of [WHATWG EventTarget interface](https://dom.spec.whatwg.org/#interface-eventtarget), plus few extensions. + +- This provides `EventTarget` constructor that can inherit for your custom object. +- This provides an utility that defines properties of attribute listeners (e.g. `obj.onclick`). + +```js +import {EventTarget, defineEventAttribute} from "event-target-shim" + +class Foo extends EventTarget { + // ... +} + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Use +const foo = new Foo() +foo.addEventListener("hello", e => console.log("hello", e)) +foo.onhello = e => console.log("onhello:", e) +foo.dispatchEvent(new CustomEvent("hello")) +``` + +## 💿 Installation + +Use [npm](https://www.npmjs.com/) to install then use a bundler. + +``` +npm install event-target-shim +``` + +Or download from [`dist` directory](./dist). + +- [dist/event-target-shim.mjs](dist/event-target-shim.mjs) ... ES modules version. +- [dist/event-target-shim.js](dist/event-target-shim.js) ... Common JS version. +- [dist/event-target-shim.umd.js](dist/event-target-shim.umd.js) ... UMD (Universal Module Definition) version. This is transpiled by [Babel](https://babeljs.io/) for IE 11. + +## 📖 Usage + +```js +import {EventTarget, defineEventAttribute} from "event-target-shim" +// or +const {EventTarget, defineEventAttribute} = require("event-target-shim") + +// or UMD version defines a global variable: +const {EventTarget, defineEventAttribute} = window.EventTargetShim +``` + +### EventTarget + +> https://dom.spec.whatwg.org/#interface-eventtarget + +#### eventTarget.addEventListener(type, callback, options) + +Register an event listener. + +- `type` is a string. This is the event name to register. +- `callback` is a function. This is the event listener to register. +- `options` is a boolean or an object `{ capture?: boolean, passive?: boolean, once?: boolean }`. If this is a boolean, it's same meaning as `{ capture: options }`. + - `capture` is the flag to register the event listener for capture phase. + - `passive` is the flag to ignore `event.preventDefault()` method in the event listener. + - `once` is the flag to remove the event listener automatically after the first call. + +#### eventTarget.removeEventListener(type, callback, options) + +Unregister an event listener. + +- `type` is a string. This is the event name to unregister. +- `callback` is a function. This is the event listener to unregister. +- `options` is a boolean or an object `{ capture?: boolean }`. If this is a boolean, it's same meaning as `{ capture: options }`. + - `capture` is the flag to register the event listener for capture phase. + +#### eventTarget.dispatchEvent(event) + +Dispatch an event. + +- `event` is a [Event](https://dom.spec.whatwg.org/#event) object or an object `{ type: string, [key: string]: any }`. The latter is non-standard but useful. In both cases, listeners receive the event as implementing [Event](https://dom.spec.whatwg.org/#event) interface. + +### defineEventAttribute(proto, type) + +Define an event attribute (e.g. `onclick`) to `proto`. This is non-standard. + +- `proto` is an object (assuming it's a prototype object). This function defines a getter/setter pair for the event attribute. +- `type` is a string. This is the event name to define. + +For example: + +```js +class AbortSignal extends EventTarget { + constructor() { + this.aborted = false + } +} +// Define `onabort` property. +defineEventAttribute(AbortSignal.prototype, "abort") +``` + +### EventTarget(types) + +Define a custom `EventTarget` class with event attributes. This is non-standard. + +- `types` is a string or an array of strings. This is the event name to define. + +For example: + +```js +// This has `onabort` property. +class AbortSignal extends EventTarget("abort") { + constructor() { + this.aborted = false + } +} +``` + +## 📚 Examples + +### ES2015 and later + +> https://jsfiddle.net/636vea92/ + +```js +const {EventTarget, defineEventAttribute} = EventTargetShim + +// Define a derived class. +class Foo extends EventTarget { + // ... +} + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +const foo = new Foo() +foo.addEventListener("hello", (e) => { + console.log("hello", e) +}) +foo.onhello = (e) => { + console.log("onhello", e) +} + +// Dispatching events +foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +``` + +### Typescript + +```ts +import { EventTarget, defineEventAttribute } from "event-target-shim"; + +// Define events +type FooEvents = { + hello: CustomEvent +} +type FooEventAttributes = { + onhello: CustomEvent +} + +// Define a derived class. +class Foo extends EventTarget { + // ... +} +// Define `foo.onhello` property's implementation. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +const foo = new Foo() +foo.addEventListener("hello", (e) => { + console.log("hello", e.detail) +}) +foo.onhello = (e) => { + console.log("onhello", e.detail) +} + +// Dispatching events +foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +``` + +Unfortunately, both `FooEvents` and `FooEventAttributes` are needed because TypeScript doesn't allow the mutation of string literal types. If TypeScript allowed us to compute `"onhello"` from `"hello"` in types, `FooEventAttributes` will be optional. + +This `EventTarget` type is compatible with `EventTarget` interface of `lib.dom.d.ts`. + +#### To disallow unknown events + +By default, methods such as `addEventListener` accept unknown events. You can disallow unknown events by the third type parameter `"strict"`. + +```ts +type FooEvents = { + hello: CustomEvent +} +class Foo extends EventTarget { + // ... +} + +// OK because `hello` is defined in FooEvents. +foo.addEventListener("hello", (e) => { +}) +// Error because `unknown` is not defined in FooEvents. +foo.addEventListener("unknown", (e) => { +}) +``` + +However, if you use `"strict"` parameter, it loses compatibility with `EventTarget` interface of `lib.dom.d.ts`. + +#### To infer the type of `dispatchEvent()` method + +TypeScript cannot infer the event type of `dispatchEvent()` method properly from the argument in most cases. You can improve this behavior with the following steps: + +1. Use the third type parameter `"strict"`. This prevents inferring to `dispatchEvent()`. +2. Make the `type` property of event definitions stricter. + +```ts +type FooEvents = { + hello: CustomEvent & { type: "hello" } + hey: Event & { type: "hey" } +} +class Foo extends EventTarget { + // ... +} + +// Error because `detail` property is lacking. +foo.dispatchEvent({ type: "hello" }) +``` + +### ES5 + +> https://jsfiddle.net/522zc9de/ + +```js +// Define a derived class. +function Foo() { + EventTarget.call(this) +} +Foo.prototype = Object.create(EventTarget.prototype, { + constructor: { value: Foo, configurable: true, writable: true } + // ... +}) + +// Define `foo.onhello` property. +defineEventAttribute(Foo.prototype, "hello") + +// Register event listeners. +var foo = new Foo() +foo.addEventListener("hello", function(e) { + console.log("hello", e) +}) +foo.onhello = function(e) { + console.log("onhello", e) +} + +// Dispatching events +function isSupportEventConstrucor() { // IE does not support. + try { + new CusomEvent("hello") + return true + } catch (_err) { + return false + } +} +if (isSupportEventConstrucor()) { + foo.dispatchEvent(new CustomEvent("hello", { detail: "detail" })) +} else { + var e = document.createEvent("CustomEvent") + e.initCustomEvent("hello", false, false, "detail") + foo.dispatchEvent(e) +} +``` + +## 📰 Changelog + +- See [GitHub releases](https://github.com/mysticatea/event-target-shim/releases). + +## 🍻 Contributing + +Contributing is welcome ❤️ + +Please use GitHub issues/PRs. + +### Development tools + +- `npm install` installs dependencies for development. +- `npm test` runs tests and measures code coverage. +- `npm run clean` removes temporary files of tests. +- `npm run coverage` opens code coverage of the previous test with your default browser. +- `npm run lint` runs ESLint. +- `npm run build` generates `dist` codes. +- `npm run watch` runs tests on each file change. diff --git a/node_modules/event-target-shim/dist/event-target-shim.js b/node_modules/event-target-shim/dist/event-target-shim.js new file mode 100644 index 000000000..53ce22036 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js @@ -0,0 +1,871 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +exports.defineEventAttribute = defineEventAttribute; +exports.EventTarget = EventTarget; +exports.default = EventTarget; + +module.exports = EventTarget +module.exports.EventTarget = module.exports["default"] = EventTarget +module.exports.defineEventAttribute = defineEventAttribute +//# sourceMappingURL=event-target-shim.js.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.js.map b/node_modules/event-target-shim/dist/event-target-shim.js.map new file mode 100644 index 000000000..83c5f626a --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.js","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI,IAAI,IAAI;QACZ,6CAA6C;QAC7C,KAAK;MACR;IACD,OAAO,IAAI;CACd;;;;;;AAMD,SAAS,aAAa,CAAC,IAAI,EAAE;IACzB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;QAC9B;YACI,OAAO,OAAO,KAAK,WAAW;YAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;UACrC;YACE,OAAO,CAAC,KAAK;gBACT,oEAAoE;gBACpE,IAAI,CAAC,eAAe;cACvB;SACJ;QACD,MAAM;KACT;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACxB,MAAM;KACT;;IAED,IAAI,CAAC,QAAQ,GAAG,KAAI;IACpB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,UAAU,EAAE;QACjD,IAAI,CAAC,KAAK,CAAC,cAAc,GAAE;KAC9B;CACJ;;;;;;;;;;;;AAYD,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE;IAC/B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QAClB,WAAW;QACX,KAAK;QACL,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,WA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;QACtC,aAAa,CAAC,YAAY,EAAE,CAAC,EAAC;QAC9B,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAC;;QAEpC,OAAO,CAAC,YAAY,CAAC,gBAAgB;KACxC;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE;IACxD,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF;IACI,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW;EAC3C;IACE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EAAC;CAC7E;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs b/node_modules/event-target-shim/dist/event-target-shim.mjs new file mode 100644 index 000000000..114f3a171 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs @@ -0,0 +1,862 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +export default EventTarget; +export { defineEventAttribute, EventTarget }; +//# sourceMappingURL=event-target-shim.mjs.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs.map b/node_modules/event-target-shim/dist/event-target-shim.mjs.map new file mode 100644 index 000000000..57b3e8f7c --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.mjs","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI,IAAI,IAAI;Q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-shim/dist/event-target-shim.umd.js b/node_modules/event-target-shim/dist/event-target-shim.umd.js new file mode 100644 index 000000000..e7cf5d4d5 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.umd.js @@ -0,0 +1,6 @@ +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.EventTargetShim={}))})(this,function(a){"use strict";function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a){var b=u.get(a);return console.assert(null!=b,"'this' is expected an Event object, but got",a),b}function d(a){return null==a.passiveListener?void(!a.event.cancelable||(a.canceled=!0,"function"==typeof a.event.preventDefault&&a.event.preventDefault())):void("undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",a.passiveListener))}function e(a,b){u.set(this,{eventTarget:a,event:b,eventPhase:2,currentTarget:a,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:b.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var c,d=Object.keys(b),e=0;e}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":["pd","event","retv","privateData","get","console","assert","setCancelFlag","data","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","Object","defineProperty","value","enumerable","key","keys","i","length","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","defineWrapper","BaseEvent","proto","CustomEvent","call","prototype","create","constructor","writable","descriptor","getOwnPropertyDescriptor","isFunc","getWrapper","wrapper","wrappers","getPrototypeOf","wrapEvent","Wrapper","isStopped","setEventPhase","setCurrentTarget","setPassiveListener","isObject","x","_typeof","getListeners","listeners","listenersMap","TypeError","defineEventAttributeDescriptor","eventName","node","listenerType","listener","next","prev","delete","newNode","passive","once","defineEventAttribute","eventTargetPrototype","defineCustomEventTarget","eventNames","CustomEventTarget","EventTarget","Map","Array","isArray","types","WeakMap","type","target","composedPath","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","defaultPrevented","composed","srcElement","cancelBubble","returnValue","initEvent","window","setPrototypeOf","CAPTURE","BUBBLE","addEventListener","options","optionsIsObj","capture","removeEventListener","dispatchEvent","wrappedEvent","err","handleEvent"],"mappings":";;;;wbAkCA,QAASA,CAAAA,CAAT,CAAYC,CAAZ,CAAmB,IACTC,CAAAA,CAAI,CAAGC,CAAW,CAACC,GAAZD,CAAgBF,CAAhBE,QACbE,CAAAA,OAAO,CAACC,MAARD,CACY,IAARH,EAAAA,CADJG,CAEI,6CAFJA,CAGIJ,CAHJI,EAKOH,EAOX,QAASK,CAAAA,CAAT,CAAuBC,CAAvB,CAA6B,OACG,KAAxBA,EAAAA,CAAI,CAACC,eADgB,MAarB,CAACD,CAAI,CAACP,KAALO,CAAWE,UAbS,GAiBzBF,CAAI,CAACG,QAALH,GAjByB,CAkBgB,UAArC,QAAOA,CAAAA,CAAI,CAACP,KAALO,CAAWI,cAlBG,EAmBrBJ,CAAI,CAACP,KAALO,CAAWI,cAAXJ,EAnBqB,QAGE,WAAnB,QAAOH,CAAAA,OAAP,EACyB,UAAzB,QAAOA,CAAAA,OAAO,CAACQ,KAJE,EAMjBR,OAAO,CAACQ,KAARR,CACI,oEADJA,CAEIG,CAAI,CAACC,eAFTJ,CANiB,EAiC7B,QAASS,CAAAA,CAAT,CAAeC,CAAf,CAA4Bd,CAA5B,C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B1D,CAAa,CAAC0D,CAAD,CAAe,CAAf,EACbzD,CAAgB,CAACyD,CAAD,CAAe,IAAf,EAET,CAACA,CAAY,CAAChB,iBAvKL,EA4KxB1E,MAAM,CAACC,cAAPD,CAAsB0D,CAAW,CAACxC,SAAlClB,CAA6C,aAA7CA,CAA4D,CACxDE,KAAK,CAAEwD,CADiD,CAExDjD,YAAY,GAF4C,CAGxDY,QAAQ,GAHgD,CAA5DrB,EAQsB,WAAlB,QAAOgF,CAAAA,MAAP,EAC8B,WAA9B,QAAOA,CAAAA,MAAM,CAACtB,aAEd1D,MAAM,CAACiF,cAAPjF,CAAsB0D,CAAW,CAACxC,SAAlClB,CAA6CgF,MAAM,CAACtB,WAAPsB,CAAmB9D,SAAhElB"} \ No newline at end of file diff --git a/node_modules/event-target-shim/index.d.ts b/node_modules/event-target-shim/index.d.ts new file mode 100644 index 000000000..a30309782 --- /dev/null +++ b/node_modules/event-target-shim/index.d.ts @@ -0,0 +1,399 @@ +export as namespace EventTargetShim + +/** + * `Event` interface. + * @see https://dom.spec.whatwg.org/#event + */ +export interface Event { + /** + * The type of this event. + */ + readonly type: string + + /** + * The target of this event. + */ + readonly target: EventTarget<{}, {}, "standard"> | null + + /** + * The current target of this event. + */ + readonly currentTarget: EventTarget<{}, {}, "standard"> | null + + /** + * The target of this event. + * @deprecated + */ + readonly srcElement: any | null + + /** + * The composed path of this event. + */ + composedPath(): EventTarget<{}, {}, "standard">[] + + /** + * Constant of NONE. + */ + readonly NONE: number + + /** + * Constant of CAPTURING_PHASE. + */ + readonly CAPTURING_PHASE: number + + /** + * Constant of BUBBLING_PHASE. + */ + readonly BUBBLING_PHASE: number + + /** + * Constant of AT_TARGET. + */ + readonly AT_TARGET: number + + /** + * Indicates which phase of the event flow is currently being evaluated. + */ + readonly eventPhase: number + + /** + * Stop event bubbling. + */ + stopPropagation(): void + + /** + * Stop event bubbling. + */ + stopImmediatePropagation(): void + + /** + * Initialize event. + * @deprecated + */ + initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void + + /** + * The flag indicating bubbling. + */ + readonly bubbles: boolean + + /** + * Stop event bubbling. + * @deprecated + */ + cancelBubble: boolean + + /** + * Set or get cancellation flag. + * @deprecated + */ + returnValue: boolean + + /** + * The flag indicating whether the event can be canceled. + */ + readonly cancelable: boolean + + /** + * Cancel this event. + */ + preventDefault(): void + + /** + * The flag to indicating whether the event was canceled. + */ + readonly defaultPrevented: boolean + + /** + * The flag to indicating if event is composed. + */ + readonly composed: boolean + + /** + * Indicates whether the event was dispatched by the user agent. + */ + readonly isTrusted: boolean + + /** + * The unix time of this event. + */ + readonly timeStamp: number +} + +/** + * The constructor of `EventTarget` interface. + */ +export type EventTargetConstructor< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = { + prototype: EventTarget + new(): EventTarget +} + +/** + * `EventTarget` interface. + * @see https://dom.spec.whatwg.org/#interface-eventtarget + */ +export type EventTarget< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = EventTarget.EventAttributes & { + /** + * Add a given listener to this event target. + * @param eventName The event name to add. + * @param listener The listener to add. + * @param options The options for this listener. + */ + addEventListener>( + type: TEventType, + listener: + | EventTarget.Listener> + | null, + options?: boolean | EventTarget.AddOptions + ): void + + /** + * Remove a given listener from this event target. + * @param eventName The event name to remove. + * @param listener The listener to remove. + * @param options The options for this listener. + */ + removeEventListener>( + type: TEventType, + listener: + | EventTarget.Listener> + | null, + options?: boolean | EventTarget.RemoveOptions + ): void + + /** + * Dispatch a given event. + * @param event The event to dispatch. + * @returns `false` if canceled. + */ + dispatchEvent>( + event: EventTarget.EventData + ): boolean +} + +export const EventTarget: EventTargetConstructor & { + /** + * Create an `EventTarget` instance with detailed event definition. + * + * The detailed event definition requires to use `defineEventAttribute()` + * function later. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * const signal = new EventTarget<{ abort: Event }, { onabort: Event }>() + * defineEventAttribute(signal, "abort") + */ + new < + TEvents extends EventTarget.EventDefinition, + TEventAttributes extends EventTarget.EventDefinition, + TMode extends EventTarget.Mode = "loose" + >(): EventTarget + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(event0: string, ...events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > +} + +export namespace EventTarget { + /** + * Options of `removeEventListener()` method. + */ + export interface RemoveOptions { + /** + * The flag to indicate that the listener is for the capturing phase. + */ + capture?: boolean + } + + /** + * Options of `addEventListener()` method. + */ + export interface AddOptions extends RemoveOptions { + /** + * The flag to indicate that the listener doesn't support + * `event.preventDefault()` operation. + */ + passive?: boolean + /** + * The flag to indicate that the listener will be removed on the first + * event. + */ + once?: boolean + } + + /** + * The type of regular listeners. + */ + export interface FunctionListener { + (event: TEvent): void + } + + /** + * The type of object listeners. + */ + export interface ObjectListener { + handleEvent(event: TEvent): void + } + + /** + * The type of listeners. + */ + export type Listener = + | FunctionListener + | ObjectListener + + /** + * Event definition. + */ + export type EventDefinition = { + readonly [key: string]: Event + } + + /** + * Mapped type for event attributes. + */ + export type EventAttributes = { + [P in keyof TEventAttributes]: + | FunctionListener + | null + } + + /** + * The type of event data for `dispatchEvent()` method. + */ + export type EventData< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + TMode extends Mode + > = + TEventType extends keyof TEvents + ? ( + // Require properties which are not generated automatically. + & Pick< + TEvents[TEventType], + Exclude + > + // Properties which are generated automatically are optional. + & Partial> + ) + : ( + TMode extends "standard" + ? Event + : Event | NonStandardEvent + ) + + /** + * The string literal types of the properties which are generated + * automatically in `dispatchEvent()` method. + */ + export type OmittableEventKeys = Exclude + + /** + * The type of event data. + */ + export type NonStandardEvent = { + [key: string]: any + type: string + } + + /** + * The type of listeners. + */ + export type PickEvent< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + > = + TEventType extends keyof TEvents + ? TEvents[TEventType] + : Event + + /** + * Event type candidates. + */ + export type EventType< + TEvents extends EventDefinition, + TMode extends Mode + > = + TMode extends "strict" + ? keyof TEvents + : keyof TEvents | string + + /** + * - `"strict"` ..... Methods don't accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"loose"` ...... Methods accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"standard"` ... Methods accept unknown events. + * `dispatchEvent()` doesn't accept partial objects. + */ + export type Mode = "strict" | "standard" | "loose" +} + +/** + * Specialized `type` property. + */ +export type Type = { type: T } + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param prototype The event target prototype to define an event attribute. + * @param eventName The event name to define. + */ +export function defineEventAttribute( + prototype: EventTarget, + eventName: string +): void + +export default EventTarget diff --git a/node_modules/event-target-shim/package.json b/node_modules/event-target-shim/package.json new file mode 100644 index 000000000..c525225fe --- /dev/null +++ b/node_modules/event-target-shim/package.json @@ -0,0 +1,109 @@ +{ + "_from": "event-target-shim@^5.0.0", + "_id": "event-target-shim@5.0.1", + "_inBundle": false, + "_integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "_location": "/event-target-shim", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "event-target-shim@^5.0.0", + "name": "event-target-shim", + "escapedName": "event-target-shim", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/abort-controller" + ], + "_resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "_shasum": "5d4d3ebdf9583d63a5333ce2deb7480ab2b05789", + "_spec": "event-target-shim@^5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/abort-controller", + "author": { + "name": "Toru Nagashima" + }, + "bugs": { + "url": "https://github.com/mysticatea/event-target-shim/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "An implementation of WHATWG EventTarget interface.", + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.2.3", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.0.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.1", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-json": "^3.1.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-watch": "^4.3.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "dist", + "index.d.ts" + ], + "homepage": "https://github.com/mysticatea/event-target-shim", + "keywords": [ + "w3c", + "whatwg", + "eventtarget", + "event", + "events", + "shim" + ], + "license": "MIT", + "main": "dist/event-target-shim", + "name": "event-target-shim", + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/event-target-shim.git" + }, + "scripts": { + "build": "rollup -c scripts/rollup.config.js", + "clean": "rimraf .nyc_output coverage", + "codecov": "codecov", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "lint": "eslint src test scripts --ext .js,.mjs", + "postversion": "git push && git push --tags", + "pretest": "npm run lint", + "preversion": "npm test", + "test": "run-s test:*", + "test:karma": "karma start scripts/karma.conf.js --single-run", + "test:mocha": "nyc --require ./scripts/babel-register mocha test/*.mjs", + "version": "npm run build && git add dist/*", + "watch": "run-p watch:*", + "watch:karma": "karma start scripts/karma.conf.js --watch", + "watch:mocha": "mocha test/*.mjs --require ./scripts/babel-register --watch --watch-extensions js,mjs --growl" + }, + "types": "index.d.ts", + "version": "5.0.1" +} diff --git a/node_modules/events/.airtap.yml b/node_modules/events/.airtap.yml new file mode 100644 index 000000000..c7a8a87d5 --- /dev/null +++ b/node_modules/events/.airtap.yml @@ -0,0 +1,15 @@ +sauce_connect: true +loopback: airtap.local +browsers: + - name: chrome + version: latest + - name: firefox + version: latest + - name: safari + version: 9..latest + - name: iphone + version: latest + - name: ie + version: 9..latest + - name: microsoftedge + version: 13..latest diff --git a/node_modules/events/.github/FUNDING.yml b/node_modules/events/.github/FUNDING.yml new file mode 100644 index 000000000..8b8cb78ba --- /dev/null +++ b/node_modules/events/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/events +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/events/.travis.yml b/node_modules/events/.travis.yml new file mode 100644 index 000000000..486dc3c4c --- /dev/null +++ b/node_modules/events/.travis.yml @@ -0,0 +1,18 @@ +dist: xenial +os: linux +language: node_js +node_js: + - 'stable' + - 'lts/*' + - '0.12' +script: + - npm test + - if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_NODE_VERSION}" = "stable" ]; then npm run test:browsers; fi +addons: + sauce_connect: true + hosts: + - airtap.local +env: + global: + - secure: XcBiD8yReflut9q7leKsigDZ0mI3qTKH+QrNVY8DaqlomJOZw8aOrVuX9Jz12l86ZJ41nbxmKnRNkFzcVr9mbP9YaeTb3DpeOBWmvaoSfud9Wnc16VfXtc1FCcwDhSVcSiM3UtnrmFU5cH+Dw1LPh5PbfylYOS/nJxUvG0FFLqI= + - secure: jNWtEbqhUdQ0xXDHvCYfUbKYeJCi6a7B4LsrcxYCyWWn4NIgncE5x2YbB+FSUUFVYfz0dsn5RKP1oHB99f0laUEo18HBNkrAS/rtyOdVzcpJjbQ6kgSILGjnJD/Ty1B57Rcz3iyev5Y7bLZ6Y1FbDnk/i9/l0faOGz8vTC3Vdkc= diff --git a/node_modules/events/History.md b/node_modules/events/History.md new file mode 100644 index 000000000..029b90418 --- /dev/null +++ b/node_modules/events/History.md @@ -0,0 +1,95 @@ +# 3.2.0 + + - Add `events.once` from Node.js 11.13.0. + + To use this function, Promises must be supported in the environment. Use a polyfill like `es6-promise` if you support older browsers. + +# 3.1.0 (2020-01-08) + +`events` now matches the Node.js 11.12.0 API. + + - pass through return value in wrapped `emitter.once()` listeners + + Now, this works: + ```js + emitter.once('myevent', function () { return 1; }); + var listener = emitter.rawListeners('myevent')[0] + assert(listener() === 1); + ``` + Previously, `listener()` would return undefined regardless of the implementation. + + Ported from https://github.com/nodejs/node/commit/acc506c2d2771dab8d7bba6d3452bc5180dff7cf + + - Reduce code duplication in listener type check ([#67](https://github.com/Gozala/events/pull/67) by [@friederbluemle](https://github.com/friederbluemle)). + - Improve `emitter.once()` performance in some engines + +# 3.0.0 (2018-05-25) + +**This version drops support for IE8.** `events` no longer includes polyfills +for ES5 features. If you need to support older environments, use an ES5 shim +like [es5-shim](https://npmjs.com/package/es5-shim). Both the shim and sham +versions of es5-shim are necessary. + + - Update to events code from Node.js 10.x + - (semver major) Adds `off()` method + - Port more tests from Node.js + - Switch browser tests to airtap, making things more reliable + +# 2.1.0 (2018-05-25) + + - add Emitter#rawListeners from Node.js v9.4 + +# 2.0.0 (2018-02-02) + + - Update to events code from node.js 8.x + - Adds `prependListener()` and `prependOnceListener()` + - Adds `eventNames()` method + - (semver major) Unwrap `once()` listeners in `listeners()` + - copy tests from node.js + +Note that this version doubles the gzipped size, jumping from 1.1KB to 2.1KB, +due to new methods and runtime performance improvements. Be aware of that when +upgrading. + +# 1.1.1 (2016-06-22) + + - add more context to errors if they are not instanceof Error + +# 1.1.0 (2015-09-29) + + - add Emitter#listerCount (to match node v4 api) + +# 1.0.2 (2014-08-28) + + - remove un-reachable code + - update devDeps + +## 1.0.1 / 2014-05-11 + + - check for console.trace before using it + +## 1.0.0 / 2013-12-10 + + - Update to latest events code from node.js 0.10 + - copy tests from node.js + +## 0.4.0 / 2011-07-03 ## + + - Switching to graphquire@0.8.0 + +## 0.3.0 / 2011-07-03 ## + + - Switching to URL based module require. + +## 0.2.0 / 2011-06-10 ## + + - Simplified package structure. + - Graphquire for dependency management. + +## 0.1.1 / 2011-05-16 ## + + - Unhandled errors are logged via console.error + +## 0.1.0 / 2011-04-22 ## + + - Initial release diff --git a/node_modules/events/LICENSE b/node_modules/events/LICENSE new file mode 100644 index 000000000..52ed3b0a6 --- /dev/null +++ b/node_modules/events/LICENSE @@ -0,0 +1,22 @@ +MIT + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/events/Readme.md b/node_modules/events/Readme.md new file mode 100644 index 000000000..d5dfd24a0 --- /dev/null +++ b/node_modules/events/Readme.md @@ -0,0 +1,49 @@ +# events [![Build Status](https://travis-ci.org/Gozala/events.png?branch=master)](https://travis-ci.org/Gozala/events) + +> Node's event emitter for all engines. + +This implements the Node.js [`events`][node.js docs] module for environments that do not have it, like browsers. + +> `events` currently matches the **Node.js 11.13.0** API. + +Note that the `events` module uses ES5 features. If you need to support very old browsers like IE8, use a shim like [`es5-shim`](https://www.npmjs.com/package/es5-shim). You need both the shim and the sham versions of `es5-shim`. + +This module is maintained, but only by very few people. If you'd like to help, let us know in the [Maintainer Needed](https://github.com/Gozala/events/issues/43) issue! + +## Install + +You usually do not have to install `events` yourself! If your code runs in Node.js, `events` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) also include the `events` module. + +But if none of those apply, with npm do: + +``` +npm install events +``` + +## Usage + +```javascript +var EventEmitter = require('events') + +var ee = new EventEmitter() +ee.on('message', function (text) { + console.log(text) +}) +ee.emit('message', 'hello world') +``` + +## API + +See the [Node.js EventEmitter docs][node.js docs]. `events` currently matches the Node.js 11.13.0 API. + +## Contributing + +PRs are very welcome! The main way to contribute to `events` is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js. +This module intends to provide exactly the same API as Node.js, so features that are not available in the core `events` module will not be accepted. Feature requests should instead be directed at [nodejs/node](https://github.com/nodejs/node) and will be added to this module once they are implemented in Node.js. + +If there is a difference in behaviour between Node.js's `events` module and this module, please open an issue! + +## License + +[MIT](./LICENSE) +[node.js docs]: https://nodejs.org/dist/v11.13.0/docs/api/events.html diff --git a/node_modules/events/events.js b/node_modules/events/events.js new file mode 100644 index 000000000..edd45ce47 --- /dev/null +++ b/node_modules/events/events.js @@ -0,0 +1,476 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function eventListener() { + if (errorListener !== undefined) { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + var errorListener; + + // Adding an error listener is not optional because + // if an error is thrown on an event emitter we cannot + // guarantee that the actual event we are waiting will + // be fired. The result could be a silent way to create + // memory or file descriptor leaks, which is something + // we should avoid. + if (name !== 'error') { + errorListener = function errorListener(err) { + emitter.removeListener(name, eventListener); + reject(err); + }; + + emitter.once('error', errorListener); + } + + emitter.once(name, eventListener); + }); +} diff --git a/node_modules/events/package.json b/node_modules/events/package.json new file mode 100644 index 000000000..2faec3562 --- /dev/null +++ b/node_modules/events/package.json @@ -0,0 +1,67 @@ +{ + "_from": "events@^3.0.0", + "_id": "events@3.2.0", + "_inBundle": false, + "_integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", + "_location": "/events", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "events@^3.0.0", + "name": "events", + "escapedName": "events", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@azure/core-lro", + "/@azure/storage-blob" + ], + "_resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "_shasum": "93b87c18f8efcd4202a461aec4dfc0556b639379", + "_spec": "events@^3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/storage-blob", + "author": { + "name": "Irakli Gozalishvili", + "email": "rfobic@gmail.com", + "url": "http://jeditoolkit.com" + }, + "bugs": { + "url": "http://github.com/Gozala/events/issues/" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Node's event emitter for all engines.", + "devDependencies": { + "airtap": "^1.0.0", + "functions-have-names": "^1.2.1", + "has-symbols": "^1.0.1", + "isarray": "^2.0.5", + "tape": "^5.0.0" + }, + "engines": { + "node": ">=0.8.x" + }, + "homepage": "https://github.com/Gozala/events#readme", + "keywords": [ + "events", + "eventEmitter", + "eventDispatcher", + "listeners" + ], + "license": "MIT", + "main": "./events.js", + "name": "events", + "repository": { + "type": "git", + "url": "git://github.com/Gozala/events.git", + "web": "https://github.com/Gozala/events" + }, + "scripts": { + "test": "node tests/index.js", + "test:browsers": "airtap -- tests/index.js" + }, + "version": "3.2.0" +} diff --git a/node_modules/events/security.md b/node_modules/events/security.md new file mode 100644 index 000000000..a14ace6a5 --- /dev/null +++ b/node_modules/events/security.md @@ -0,0 +1,10 @@ +# Security Policy + +## Supported Versions +Only the latest major version is supported at any given time. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/events/tests/add-listeners.js b/node_modules/events/tests/add-listeners.js new file mode 100644 index 000000000..9b578272b --- /dev/null +++ b/node_modules/events/tests/add-listeners.js @@ -0,0 +1,111 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +{ + var ee = new EventEmitter(); + var events_new_listener_emitted = []; + var listeners_new_listener_emitted = []; + + // Sanity check + assert.strictEqual(ee.addListener, ee.on); + + ee.on('newListener', function(event, listener) { + // Don't track newListener listeners. + if (event === 'newListener') + return; + + events_new_listener_emitted.push(event); + listeners_new_listener_emitted.push(listener); + }); + + var hello = common.mustCall(function(a, b) { + assert.strictEqual('a', a); + assert.strictEqual('b', b); + }); + + ee.once('newListener', function(name, listener) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(listener, hello); + + var listeners = this.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + }); + + ee.on('hello', hello); + ee.once('foo', assert.fail); + + assert.ok(Array.isArray(events_new_listener_emitted)); + assert.strictEqual(events_new_listener_emitted.length, 2); + assert.strictEqual(events_new_listener_emitted[0], 'hello'); + assert.strictEqual(events_new_listener_emitted[1], 'foo'); + + assert.ok(Array.isArray(listeners_new_listener_emitted)); + assert.strictEqual(listeners_new_listener_emitted.length, 2); + assert.strictEqual(listeners_new_listener_emitted[0], hello); + assert.strictEqual(listeners_new_listener_emitted[1], assert.fail); + + ee.emit('hello', 'a', 'b'); +} + +// just make sure that this doesn't throw: +{ + var f = new EventEmitter(); + + f.setMaxListeners(0); +} + +{ + var listen1 = function() {}; + var listen2 = function() {}; + var ee = new EventEmitter(); + + ee.once('newListener', function() { + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + ee.once('newListener', function() { + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + }); + ee.on('hello', listen2); + }); + ee.on('hello', listen1); + // The order of listeners on an event is not always the order in which the + // listeners were added. + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listen2); + assert.strictEqual(listeners[1], listen1); +} + +// Verify that the listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.on('foo', null); +}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); diff --git a/node_modules/events/tests/check-listener-leaks.js b/node_modules/events/tests/check-listener-leaks.js new file mode 100644 index 000000000..7fce48f37 --- /dev/null +++ b/node_modules/events/tests/check-listener-leaks.js @@ -0,0 +1,101 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('./common'); +var assert = require('assert'); +var events = require('../'); + +// Redirect warning output to tape. +var consoleWarn = console.warn; +console.warn = common.test.comment; + +common.test.on('end', function () { + console.warn = consoleWarn; +}); + +// default +{ + var e = new events.EventEmitter(); + + for (var i = 0; i < 10; i++) { + e.on('default', common.mustNotCall()); + } + assert.ok(!e._events['default'].hasOwnProperty('warned')); + e.on('default', common.mustNotCall()); + assert.ok(e._events['default'].warned); + + // specific + e.setMaxListeners(5); + for (var i = 0; i < 5; i++) { + e.on('specific', common.mustNotCall()); + } + assert.ok(!e._events['specific'].hasOwnProperty('warned')); + e.on('specific', common.mustNotCall()); + assert.ok(e._events['specific'].warned); + + // only one + e.setMaxListeners(1); + e.on('only one', common.mustNotCall()); + assert.ok(!e._events['only one'].hasOwnProperty('warned')); + e.on('only one', common.mustNotCall()); + assert.ok(e._events['only one'].hasOwnProperty('warned')); + + // unlimited + e.setMaxListeners(0); + for (var i = 0; i < 1000; i++) { + e.on('unlimited', common.mustNotCall()); + } + assert.ok(!e._events['unlimited'].hasOwnProperty('warned')); +} + +// process-wide +{ + events.EventEmitter.defaultMaxListeners = 42; + var e = new events.EventEmitter(); + + for (var i = 0; i < 42; ++i) { + e.on('fortytwo', common.mustNotCall()); + } + assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); + delete e._events['fortytwo'].warned; + + events.EventEmitter.defaultMaxListeners = 44; + e.on('fortytwo', common.mustNotCall()); + assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); +} + +// but _maxListeners still has precedence over defaultMaxListeners +{ + events.EventEmitter.defaultMaxListeners = 42; + var e = new events.EventEmitter(); + e.setMaxListeners(1); + e.on('uno', common.mustNotCall()); + assert.ok(!e._events['uno'].hasOwnProperty('warned')); + e.on('uno', common.mustNotCall()); + assert.ok(e._events['uno'].hasOwnProperty('warned')); + + // chainable + assert.strictEqual(e, e.setMaxListeners(1)); +} diff --git a/node_modules/events/tests/common.js b/node_modules/events/tests/common.js new file mode 100644 index 000000000..49569b05f --- /dev/null +++ b/node_modules/events/tests/common.js @@ -0,0 +1,104 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var test = require('tape'); +var assert = require('assert'); + +var noop = function() {}; + +var mustCallChecks = []; + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + var failed = filter(mustCallChecks, function(context) { + if ('minimum' in context) { + context.messageSegment = 'at least ' + context.minimum; + return context.actual < context.minimum; + } else { + context.messageSegment = 'exactly ' + context.exact; + return context.actual !== context.exact; + } + }); + + for (var i = 0; i < failed.length; i++) { + var context = failed[i]; + console.log('Mismatched %s function calls. Expected %s, actual %d.', + context.name, + context.messageSegment, + context.actual); + // IE8 has no .stack + if (context.stack) console.log(context.stack.split('\n').slice(2).join('\n')); + } + + assert.strictEqual(failed.length, 0); +} + +exports.mustCall = function(fn, exact) { + return _mustCallInner(fn, exact, 'exact'); +}; + +function _mustCallInner(fn, criteria, field) { + if (typeof criteria == 'undefined') criteria = 1; + + if (typeof fn === 'number') { + criteria = fn; + fn = noop; + } else if (fn === undefined) { + fn = noop; + } + + if (typeof criteria !== 'number') + throw new TypeError('Invalid ' + field + ' value: ' + criteria); + + var context = { + actual: 0, + stack: (new Error()).stack, + name: fn.name || '' + }; + + context[field] = criteria; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) test.onFinish(function() { runCallChecks(0); }); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +} + +exports.mustNotCall = function(msg) { + return function mustNotCall() { + assert.fail(msg || 'function should not have been called'); + }; +}; + +function filter(arr, fn) { + if (arr.filter) return arr.filter(fn); + var filtered = []; + for (var i = 0; i < arr.length; i++) { + if (fn(arr[i], i, arr)) filtered.push(arr[i]); + } + return filtered +} diff --git a/node_modules/events/tests/errors.js b/node_modules/events/tests/errors.js new file mode 100644 index 000000000..a23df437f --- /dev/null +++ b/node_modules/events/tests/errors.js @@ -0,0 +1,13 @@ +'use strict'; +var assert = require('assert'); +var EventEmitter = require('../'); + +var EE = new EventEmitter(); + +assert.throws(function () { + EE.emit('error', 'Accepts a string'); +}, 'Error: Unhandled error. (Accepts a string)'); + +assert.throws(function () { + EE.emit('error', { message: 'Error!' }); +}, 'Unhandled error. ([object Object])'); diff --git a/node_modules/events/tests/events-list.js b/node_modules/events/tests/events-list.js new file mode 100644 index 000000000..08aa62177 --- /dev/null +++ b/node_modules/events/tests/events-list.js @@ -0,0 +1,28 @@ +'use strict'; + +var EventEmitter = require('../'); +var assert = require('assert'); + +var EE = new EventEmitter(); +var m = function() {}; +EE.on('foo', function() {}); +assert.equal(1, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); +EE.on('bar', m); +assert.equal(2, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); +assert.equal('bar', EE.eventNames()[1]); +EE.removeListener('bar', m); +assert.equal(1, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); + +if (typeof Symbol !== 'undefined') { + var s = Symbol('s'); + EE.on(s, m); + assert.equal(2, EE.eventNames().length); + assert.equal('foo', EE.eventNames()[0]); + assert.equal(s, EE.eventNames()[1]); + EE.removeListener(s, m); + assert.equal(1, EE.eventNames().length); + assert.equal('foo', EE.eventNames()[0]); +} diff --git a/node_modules/events/tests/events-once.js b/node_modules/events/tests/events-once.js new file mode 100644 index 000000000..309bf4556 --- /dev/null +++ b/node_modules/events/tests/events-once.js @@ -0,0 +1,100 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../').EventEmitter; +var once = require('../').once; +var assert = require('assert'); + +function onceAnEvent() { + var ee = new EventEmitter(); + + process.nextTick(function () { + ee.emit('myevent', 42); + }); + + return once(ee, 'myevent').then(function (args) { + var value = args[0] + assert.strictEqual(value, 42); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function onceAnEventWithTwoArgs() { + var ee = new EventEmitter(); + + process.nextTick(function () { + ee.emit('myevent', 42, 24); + }); + + return once(ee, 'myevent').then(function (value) { + assert.strictEqual(value.length, 2); + assert.strictEqual(value[0], 42); + assert.strictEqual(value[1], 24); + }); +} + +function catchesErrors() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + var err; + process.nextTick(function () { + ee.emit('error', expected); + }); + + return once(ee, 'myevent').then(function () { + throw new Error('should reject') + }, function (err) { + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function stopListeningAfterCatchingError() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + var err; + process.nextTick(function () { + ee.emit('error', expected); + ee.emit('myevent', 42, 24); + }); + + // process.on('multipleResolves', common.mustNotCall()); + + return once(ee, 'myevent').then(common.mustNotCall, function (err) { + // process.removeAllListeners('multipleResolves'); + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function onceError() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + process.nextTick(function () { + ee.emit('error', expected); + }); + + return once(ee, 'error').then(function (args) { + var err = args[0] + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +Promise.all([ + onceAnEvent(), + onceAnEventWithTwoArgs(), + catchesErrors(), + stopListeningAfterCatchingError(), + onceError() +]).catch(function (err) { + console.error(err.stack) + process.exit(1) +}); diff --git a/node_modules/events/tests/index.js b/node_modules/events/tests/index.js new file mode 100644 index 000000000..491d0b8d0 --- /dev/null +++ b/node_modules/events/tests/index.js @@ -0,0 +1,56 @@ +var test = require('tape'); +var functionsHaveNames = require('functions-have-names'); +var hasSymbols = require('has-symbols'); + +require('./legacy-compat'); +var common = require('./common'); + +// we do this to easily wrap each file in a mocha test +// and also have browserify be able to statically analyze this file +var orig_require = require; +var require = function(file) { + test(file, function(t) { + // Store the tape object so tests can access it. + t.on('end', function () { delete common.test; }); + common.test = t; + + try { orig_require(file); } catch (err) { t.fail(err); } + t.end(); + }); +}; + +require('./add-listeners.js'); +require('./check-listener-leaks.js'); +require('./errors.js'); +require('./events-list.js'); +if (typeof Promise === 'function') { + require('./events-once.js'); +} else { + // Promise support is not available. + test('./events-once.js', { skip: true }, function () {}); +} +require('./listener-count.js'); +require('./listeners-side-effects.js'); +require('./listeners.js'); +require('./max-listeners.js'); +if (functionsHaveNames()) { + require('./method-names.js'); +} else { + // Function.name is not supported in IE + test('./method-names.js', { skip: true }, function () {}); +} +require('./modify-in-emit.js'); +require('./num-args.js'); +require('./once.js'); +require('./prepend.js'); +require('./set-max-listeners-side-effects.js'); +require('./special-event-names.js'); +require('./subclass.js'); +if (hasSymbols()) { + require('./symbols.js'); +} else { + // Symbol is not available. + test('./symbols.js', { skip: true }, function () {}); +} +require('./remove-all-listeners.js'); +require('./remove-listeners.js'); diff --git a/node_modules/events/tests/legacy-compat.js b/node_modules/events/tests/legacy-compat.js new file mode 100644 index 000000000..a402be6e2 --- /dev/null +++ b/node_modules/events/tests/legacy-compat.js @@ -0,0 +1,16 @@ +// sigh... life is hard +if (!global.console) { + console = {} +} + +var fns = ['log', 'error', 'trace']; +for (var i=0 ; ifoo should not be emitted'); +} + +e.once('foo', remove); +e.removeListener('foo', remove); +e.emit('foo'); + +e.once('e', common.mustCall(function() { + e.emit('e'); +})); + +e.once('e', common.mustCall()); + +e.emit('e'); + +// Verify that the listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.once('foo', null); +}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); + +{ + // once() has different code paths based on the number of arguments being + // emitted. Verify that all of the cases are covered. + var maxArgs = 4; + + for (var i = 0; i <= maxArgs; ++i) { + var ee = new EventEmitter(); + var args = ['foo']; + + for (var j = 0; j < i; ++j) + args.push(j); + + ee.once('foo', common.mustCall(function() { + var params = Array.prototype.slice.call(arguments); + var restArgs = args.slice(1); + assert.ok(Array.isArray(params)); + assert.strictEqual(params.length, restArgs.length); + for (var index = 0; index < params.length; index++) { + var param = params[index]; + assert.strictEqual(param, restArgs[index]); + } + })); + + EventEmitter.prototype.emit.apply(ee, args); + } +} diff --git a/node_modules/events/tests/prepend.js b/node_modules/events/tests/prepend.js new file mode 100644 index 000000000..79afde0bf --- /dev/null +++ b/node_modules/events/tests/prepend.js @@ -0,0 +1,31 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var myEE = new EventEmitter(); +var m = 0; +// This one comes last. +myEE.on('foo', common.mustCall(function () { + assert.strictEqual(m, 2); +})); + +// This one comes second. +myEE.prependListener('foo', common.mustCall(function () { + assert.strictEqual(m++, 1); +})); + +// This one comes first. +myEE.prependOnceListener('foo', + common.mustCall(function () { + assert.strictEqual(m++, 0); + })); + +myEE.emit('foo'); + +// Verify that the listener must be a function +assert.throws(function () { + var ee = new EventEmitter(); + ee.prependOnceListener('foo', null); +}, 'TypeError: The "listener" argument must be of type Function. Received type object'); diff --git a/node_modules/events/tests/remove-all-listeners.js b/node_modules/events/tests/remove-all-listeners.js new file mode 100644 index 000000000..622941cfa --- /dev/null +++ b/node_modules/events/tests/remove-all-listeners.js @@ -0,0 +1,133 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('./common'); +var assert = require('assert'); +var events = require('../'); +var test = require('tape'); + +function expect(expected) { + var actual = []; + test.onFinish(function() { + var sortedActual = actual.sort(); + var sortedExpected = expected.sort(); + assert.strictEqual(sortedActual.length, sortedExpected.length); + for (var index = 0; index < sortedActual.length; index++) { + var value = sortedActual[index]; + assert.strictEqual(value, sortedExpected[index]); + } + }); + function listener(name) { + actual.push(name); + } + return common.mustCall(listener, expected.length); +} + +{ + var ee = new events.EventEmitter(); + var noop = common.mustNotCall(); + ee.on('foo', noop); + ee.on('bar', noop); + ee.on('baz', noop); + ee.on('baz', noop); + var fooListeners = ee.listeners('foo'); + var barListeners = ee.listeners('bar'); + var bazListeners = ee.listeners('baz'); + ee.on('removeListener', expect(['bar', 'baz', 'baz'])); + ee.removeAllListeners('bar'); + ee.removeAllListeners('baz'); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], noop); + + listeners = ee.listeners('bar'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + listeners = ee.listeners('baz'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + // After calling removeAllListeners(), + // the old listeners array should stay unchanged. + assert.strictEqual(fooListeners.length, 1); + assert.strictEqual(fooListeners[0], noop); + assert.strictEqual(barListeners.length, 1); + assert.strictEqual(barListeners[0], noop); + assert.strictEqual(bazListeners.length, 2); + assert.strictEqual(bazListeners[0], noop); + assert.strictEqual(bazListeners[1], noop); + // After calling removeAllListeners(), + // new listeners arrays is different from the old. + assert.notStrictEqual(ee.listeners('bar'), barListeners); + assert.notStrictEqual(ee.listeners('baz'), bazListeners); +} + +{ + var ee = new events.EventEmitter(); + ee.on('foo', common.mustNotCall()); + ee.on('bar', common.mustNotCall()); + // Expect LIFO order + ee.on('removeListener', expect(['foo', 'bar', 'removeListener'])); + ee.on('removeListener', expect(['foo', 'bar'])); + ee.removeAllListeners(); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + listeners = ee.listeners('bar'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new events.EventEmitter(); + ee.on('removeListener', common.mustNotCall()); + // Check for regression where removeAllListeners() throws when + // there exists a 'removeListener' listener, but there exists + // no listeners for the provided event type. + assert.doesNotThrow(function () { ee.removeAllListeners(ee, 'foo') }); +} + +{ + var ee = new events.EventEmitter(); + var expectLength = 2; + ee.on('removeListener', function() { + assert.strictEqual(expectLength--, this.listeners('baz').length); + }); + ee.on('baz', common.mustNotCall()); + ee.on('baz', common.mustNotCall()); + ee.on('baz', common.mustNotCall()); + assert.strictEqual(ee.listeners('baz').length, expectLength + 1); + ee.removeAllListeners('baz'); + assert.strictEqual(ee.listeners('baz').length, 0); +} + +{ + var ee = new events.EventEmitter(); + assert.strictEqual(ee, ee.removeAllListeners()); +} + +{ + var ee = new events.EventEmitter(); + ee._events = undefined; + assert.strictEqual(ee, ee.removeAllListeners()); +} diff --git a/node_modules/events/tests/remove-listeners.js b/node_modules/events/tests/remove-listeners.js new file mode 100644 index 000000000..18e4d1651 --- /dev/null +++ b/node_modules/events/tests/remove-listeners.js @@ -0,0 +1,212 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +var listener1 = function listener1() {}; +var listener2 = function listener2() {}; + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + })); + ee.removeListener('hello', listener1); + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('removeListener', common.mustNotCall()); + ee.removeListener('hello', listener2); + + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener1); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('hello', listener2); + + var listeners; + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + })); + ee.removeListener('hello', listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + + function remove1() { + assert.fail('remove1 should not have been called'); + } + + function remove2() { + assert.fail('remove2 should not have been called'); + } + + ee.on('removeListener', common.mustCall(function(name, cb) { + if (cb !== remove1) return; + this.removeListener('quux', remove2); + this.emit('quux'); + }, 2)); + ee.on('quux', remove1); + ee.on('quux', remove2); + ee.removeListener('quux', remove1); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('hello', listener2); + + var listeners; + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + var listener3 = common.mustCall(function() { + ee.removeListener('hello', listener4); + }, 2); + var listener4 = common.mustCall(); + + ee.on('hello', listener3); + ee.on('hello', listener4); + + // listener4 will still be called although it is removed by listener 3. + ee.emit('hello'); + // This is so because the interal listener array at time of emit + // was [listener3,listener4] + + // Interal listener array [listener3] + ee.emit('hello'); +} + +{ + var ee = new EventEmitter(); + + ee.once('hello', listener1); + ee.on('removeListener', common.mustCall(function(eventName, listener) { + assert.strictEqual(eventName, 'hello'); + assert.strictEqual(listener, listener1); + })); + ee.emit('hello'); +} + +{ + var ee = new EventEmitter(); + + assert.strictEqual(ee, ee.removeListener('foo', function() {})); +} + +// Verify that the removed listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.removeListener('foo', null); +}, /^TypeError: The "listener" argument must be of type Function\. Received type object$/); + +{ + var ee = new EventEmitter(); + var listener = function() {}; + ee._events = undefined; + var e = ee.removeListener('foo', listener); + assert.strictEqual(e, ee); +} + +{ + var ee = new EventEmitter(); + + ee.on('foo', listener1); + ee.on('foo', listener2); + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener1); + assert.strictEqual(listeners[1], listener2); + + ee.removeListener('foo', listener1); + assert.strictEqual(ee._events.foo, listener2); + + ee.on('foo', listener1); + listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener2); + assert.strictEqual(listeners[1], listener1); + + ee.removeListener('foo', listener1); + assert.strictEqual(ee._events.foo, listener2); +} diff --git a/node_modules/events/tests/set-max-listeners-side-effects.js b/node_modules/events/tests/set-max-listeners-side-effects.js new file mode 100644 index 000000000..13dbb671e --- /dev/null +++ b/node_modules/events/tests/set-max-listeners-side-effects.js @@ -0,0 +1,31 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +require('./common'); +var assert = require('assert'); +var events = require('../'); + +var e = new events.EventEmitter(); + +if (Object.create) assert.ok(!(e._events instanceof Object)); +assert.strictEqual(Object.keys(e._events).length, 0); +e.setMaxListeners(5); +assert.strictEqual(Object.keys(e._events).length, 0); diff --git a/node_modules/events/tests/special-event-names.js b/node_modules/events/tests/special-event-names.js new file mode 100644 index 000000000..a2f0b744a --- /dev/null +++ b/node_modules/events/tests/special-event-names.js @@ -0,0 +1,45 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var ee = new EventEmitter(); +var handler = function() {}; + +assert.strictEqual(ee.eventNames().length, 0); + +assert.strictEqual(ee._events.hasOwnProperty, undefined); +assert.strictEqual(ee._events.toString, undefined); + +ee.on('__defineGetter__', handler); +ee.on('toString', handler); +ee.on('__proto__', handler); + +assert.strictEqual(ee.eventNames()[0], '__defineGetter__'); +assert.strictEqual(ee.eventNames()[1], 'toString'); + +assert.strictEqual(ee.listeners('__defineGetter__').length, 1); +assert.strictEqual(ee.listeners('__defineGetter__')[0], handler); +assert.strictEqual(ee.listeners('toString').length, 1); +assert.strictEqual(ee.listeners('toString')[0], handler); + +// Only run __proto__ tests if that property can actually be set +if ({ __proto__: 'ok' }.__proto__ === 'ok') { + assert.strictEqual(ee.eventNames().length, 3); + assert.strictEqual(ee.eventNames()[2], '__proto__'); + assert.strictEqual(ee.listeners('__proto__').length, 1); + assert.strictEqual(ee.listeners('__proto__')[0], handler); + + ee.on('__proto__', common.mustCall(function(val) { + assert.strictEqual(val, 1); + })); + ee.emit('__proto__', 1); + + process.on('__proto__', common.mustCall(function(val) { + assert.strictEqual(val, 1); + })); + process.emit('__proto__', 1); +} else { + console.log('# skipped __proto__') +} diff --git a/node_modules/events/tests/subclass.js b/node_modules/events/tests/subclass.js new file mode 100644 index 000000000..bd033fff4 --- /dev/null +++ b/node_modules/events/tests/subclass.js @@ -0,0 +1,66 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('./common'); +var test = require('tape'); +var assert = require('assert'); +var EventEmitter = require('../').EventEmitter; +var util = require('util'); + +util.inherits(MyEE, EventEmitter); + +function MyEE(cb) { + this.once(1, cb); + this.emit(1); + this.removeAllListeners(); + EventEmitter.call(this); +} + +var myee = new MyEE(common.mustCall()); + + +util.inherits(ErrorEE, EventEmitter); +function ErrorEE() { + this.emit('error', new Error('blerg')); +} + +assert.throws(function() { + new ErrorEE(); +}, /blerg/); + +test.onFinish(function() { + assert.ok(!(myee._events instanceof Object)); + assert.strictEqual(Object.keys(myee._events).length, 0); +}); + + +function MyEE2() { + EventEmitter.call(this); +} + +MyEE2.prototype = new EventEmitter(); + +var ee1 = new MyEE2(); +var ee2 = new MyEE2(); + +ee1.on('x', function() {}); + +assert.strictEqual(ee2.listenerCount('x'), 0); diff --git a/node_modules/events/tests/symbols.js b/node_modules/events/tests/symbols.js new file mode 100644 index 000000000..0721f0ec0 --- /dev/null +++ b/node_modules/events/tests/symbols.js @@ -0,0 +1,25 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var ee = new EventEmitter(); +var foo = Symbol('foo'); +var listener = common.mustCall(); + +ee.on(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 1); +assert.strictEqual(ee.listeners(foo)[0], listener); + +ee.emit(foo); + +ee.removeAllListeners(); +assert.strictEqual(ee.listeners(foo).length, 0); + +ee.on(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 1); +assert.strictEqual(ee.listeners(foo)[0], listener); + +ee.removeListener(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 0); diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json index 916b152b9..4e6452ab7 100644 --- a/node_modules/fast-deep-equal/package.json +++ b/node_modules/fast-deep-equal/package.json @@ -1,33 +1,40 @@ { - "name": "fast-deep-equal", - "version": "3.1.3", - "description": "Fast deep equal", - "main": "index.js", - "scripts": { - "eslint": "eslint *.js benchmark/*.js spec/*.js", - "build": "node build", - "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./", - "test-spec": "mocha spec/*.spec.js -R spec", - "test-cov": "nyc npm run test-spec", - "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts", - "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov", - "prepublish": "npm run build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" - }, - "keywords": [ - "fast", - "equal", - "deep-equal" + "_args": [ + [ + "fast-deep-equal@3.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Evgeny Poberezkin", - "license": "MIT", + "_development": true, + "_from": "fast-deep-equal@3.1.3", + "_id": "fast-deep-equal@3.1.3", + "_inBundle": false, + "_integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "_location": "/fast-deep-equal", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fast-deep-equal@3.1.3", + "name": "fast-deep-equal", + "escapedName": "fast-deep-equal", + "rawSpec": "3.1.3", + "saveSpec": null, + "fetchSpec": "3.1.3" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "_spec": "3.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Evgeny Poberezkin" + }, "bugs": { "url": "https://github.com/epoberezkin/fast-deep-equal/issues" }, - "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "description": "Fast deep equal", "devDependencies": { "coveralls": "^3.1.0", "dot": "^1.1.2", @@ -40,6 +47,22 @@ "sinon": "^9.0.2", "typescript": "^3.9.5" }, + "files": [ + "index.js", + "index.d.ts", + "react.js", + "react.d.ts", + "es6/" + ], + "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", + "keywords": [ + "fast", + "equal", + "deep-equal" + ], + "license": "MIT", + "main": "index.js", + "name": "fast-deep-equal", "nyc": { "exclude": [ "**/spec/**", @@ -50,12 +73,20 @@ "text-summary" ] }, - "files": [ - "index.js", - "index.d.ts", - "react.js", - "react.d.ts", - "es6/" - ], - "types": "index.d.ts" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" + }, + "scripts": { + "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./", + "build": "node build", + "eslint": "eslint *.js benchmark/*.js spec/*.js", + "prepublish": "npm run build", + "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov", + "test-cov": "nyc npm run test-spec", + "test-spec": "mocha spec/*.spec.js -R spec", + "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts" + }, + "types": "index.d.ts", + "version": "3.1.3" +} diff --git a/node_modules/fast-diff/package.json b/node_modules/fast-diff/package.json index ad043feca..2d4b5bd1e 100644 --- a/node_modules/fast-diff/package.json +++ b/node_modules/fast-diff/package.json @@ -1,26 +1,60 @@ { - "name": "fast-diff", - "version": "1.2.0", - "description": "Fast Javascript text diff", - "author": "Jason Chen ", - "main": "diff.js", - "types": "diff.d.ts", - "devDependencies": { - "lodash": "~3.9.3", - "seedrandom": "~2.4.0" + "_args": [ + [ + "fast-diff@1.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "fast-diff@1.2.0", + "_id": "fast-diff@1.2.0", + "_inBundle": false, + "_integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "_location": "/fast-diff", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fast-diff@1.2.0", + "name": "fast-diff", + "escapedName": "fast-diff", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" }, - "repository": { - "type": "git", - "url": "https://github.com/jhchen/fast-diff" + "_requiredBy": [ + "/concordance", + "/prettier-linter-helpers" + ], + "_resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jason Chen", + "email": "jhchen7@gmail.com" }, "bugs": { "url": "https://github.com/jhchen/fast-diff/issues" }, + "description": "Fast Javascript text diff", + "devDependencies": { + "lodash": "~3.9.3", + "seedrandom": "~2.4.0" + }, + "homepage": "https://github.com/jhchen/fast-diff#readme", + "keywords": [ + "diff" + ], + "license": "Apache-2.0", + "main": "diff.js", + "name": "fast-diff", + "repository": { + "type": "git", + "url": "git+https://github.com/jhchen/fast-diff.git" + }, "scripts": { "test": "node test.js" }, - "license": "Apache-2.0", - "keywords": [ - "diff" - ] -} \ No newline at end of file + "types": "diff.d.ts", + "version": "1.2.0" +} diff --git a/node_modules/fast-glob/package.json b/node_modules/fast-glob/package.json index 9a8744041..b51ea60f2 100644 --- a/node_modules/fast-glob/package.json +++ b/node_modules/fast-glob/package.json @@ -1,24 +1,51 @@ { - "name": "fast-glob", - "version": "3.2.2", - "description": "It's a very fast and efficient glob library for Node.js", - "license": "MIT", - "repository": "mrmlnc/fast-glob", + "_args": [ + [ + "fast-glob@3.2.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "fast-glob@3.2.2", + "_id": "fast-glob@3.2.2", + "_inBundle": false, + "_integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", + "_location": "/fast-glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fast-glob@3.2.2", + "name": "fast-glob", + "escapedName": "fast-glob", + "rawSpec": "3.2.2", + "saveSpec": null, + "fetchSpec": "3.2.2" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree/globby", + "/del/globby", + "/globby" + ], + "_resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "_spec": "3.2.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Denis Malinochkin", "url": "https://mrmlnc.com" }, - "engines": { - "node": ">=8" + "bugs": { + "url": "https://github.com/mrmlnc/fast-glob/issues" }, - "main": "out/index.js", - "typings": "out/index.d.ts", - "keywords": [ - "glob", - "patterns", - "fast", - "implementation" - ], + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + }, + "description": "It's a very fast and efficient glob library for Node.js", "devDependencies": { "@nodelib/fs.macchiato": "^1.0.1", "@types/compute-stdev": "^1.0.0", @@ -46,40 +73,51 @@ "tiny-glob": "^0.2.6", "typescript": "^3.6.3" }, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "engines": { + "node": ">=8" + }, + "homepage": "https://github.com/mrmlnc/fast-glob#readme", + "keywords": [ + "glob", + "patterns", + "fast", + "implementation" + ], + "license": "MIT", + "main": "out/index.js", + "name": "fast-glob", + "repository": { + "type": "git", + "url": "git+https://github.com/mrmlnc/fast-glob.git" }, "scripts": { - "clean": "rimraf out", - "lint": "eslint \"src/**/*.ts\" --cache", - "compile": "tsc", - "test": "mocha \"out/**/*.spec.js\" -s 0", - "smoke": "mocha \"out/**/*.smoke.js\" -s 0", - "smoke:sync": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(sync\\)\"", - "smoke:async": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(async\\)\"", - "smoke:stream": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(stream\\)\"", - "build": "npm run clean && npm run compile && npm run lint && npm test", - "watch": "npm run clean && npm run compile -- --sourceMap --watch", "bench": "npm run bench-async && npm run bench-stream && npm run bench-sync", "bench-async": "npm run bench-async-flatten && npm run bench-async-deep && npm run bench-async-partial-flatten && npm run bench-async-partial-deep", - "bench-stream": "npm run bench-stream-flatten && npm run bench-stream-deep && npm run bench-stream-partial-flatten && npm run bench-stream-partial-deep", - "bench-sync": "npm run bench-sync-flatten && npm run bench-sync-deep && npm run bench-sync-partial-flatten && npm run bench-sync-partial-deep", - "bench-async-flatten": "node ./out/benchmark --mode async --pattern \"*\"", "bench-async-deep": "node ./out/benchmark --mode async --pattern \"**\"", - "bench-async-partial-flatten": "node ./out/benchmark --mode async --pattern \"{fixtures,out}/{first,second}/*\"", + "bench-async-flatten": "node ./out/benchmark --mode async --pattern \"*\"", "bench-async-partial-deep": "node ./out/benchmark --mode async --pattern \"{fixtures,out}/**\"", - "bench-stream-flatten": "node ./out/benchmark --mode stream --pattern \"*\"", + "bench-async-partial-flatten": "node ./out/benchmark --mode async --pattern \"{fixtures,out}/{first,second}/*\"", + "bench-stream": "npm run bench-stream-flatten && npm run bench-stream-deep && npm run bench-stream-partial-flatten && npm run bench-stream-partial-deep", "bench-stream-deep": "node ./out/benchmark --mode stream --pattern \"**\"", - "bench-stream-partial-flatten": "node ./out/benchmark --mode stream --pattern \"{fixtures,out}/{first,second}/*\"", + "bench-stream-flatten": "node ./out/benchmark --mode stream --pattern \"*\"", "bench-stream-partial-deep": "node ./out/benchmark --mode stream --pattern \"{fixtures,out}/**\"", - "bench-sync-flatten": "node ./out/benchmark --mode sync --pattern \"*\"", + "bench-stream-partial-flatten": "node ./out/benchmark --mode stream --pattern \"{fixtures,out}/{first,second}/*\"", + "bench-sync": "npm run bench-sync-flatten && npm run bench-sync-deep && npm run bench-sync-partial-flatten && npm run bench-sync-partial-deep", "bench-sync-deep": "node ./out/benchmark --mode sync --pattern \"**\"", + "bench-sync-flatten": "node ./out/benchmark --mode sync --pattern \"*\"", + "bench-sync-partial-deep": "node ./out/benchmark --mode sync --pattern \"{fixtures,out}/**\"", "bench-sync-partial-flatten": "node ./out/benchmark --mode sync --pattern \"{fixtures,out}/{first,second}/*\"", - "bench-sync-partial-deep": "node ./out/benchmark --mode sync --pattern \"{fixtures,out}/**\"" - } -} \ No newline at end of file + "build": "npm run clean && npm run compile && npm run lint && npm test", + "clean": "rimraf out", + "compile": "tsc", + "lint": "eslint \"src/**/*.ts\" --cache", + "smoke": "mocha \"out/**/*.smoke.js\" -s 0", + "smoke:async": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(async\\)\"", + "smoke:stream": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(stream\\)\"", + "smoke:sync": "mocha \"out/**/*.smoke.js\" -s 0 --grep \"\\(sync\\)\"", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "watch": "npm run clean && npm run compile -- --sourceMap --watch" + }, + "typings": "out/index.d.ts", + "version": "3.2.2" +} diff --git a/node_modules/fast-json-stable-stringify/package.json b/node_modules/fast-json-stable-stringify/package.json index 730ca8e2a..77743ef63 100644 --- a/node_modules/fast-json-stable-stringify/package.json +++ b/node_modules/fast-json-stable-stringify/package.json @@ -1,10 +1,43 @@ { - "name": "fast-json-stable-stringify", - "version": "2.1.0", - "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", - "main": "index.js", - "types": "index.d.ts", + "_args": [ + [ + "fast-json-stable-stringify@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "fast-json-stable-stringify@2.1.0", + "_id": "fast-json-stable-stringify@2.1.0", + "_inBundle": false, + "_integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "_location": "/fast-json-stable-stringify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fast-json-stable-stringify@2.1.0", + "name": "fast-json-stable-stringify", + "escapedName": "fast-json-stable-stringify", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues" + }, "dependencies": {}, + "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", "devDependencies": { "benchmark": "^2.1.4", "coveralls": "^3.0.0", @@ -16,15 +49,6 @@ "pre-commit": "^1.2.2", "tape": "^4.11.0" }, - "scripts": { - "eslint": "eslint index.js test", - "test-spec": "tape test/*.js", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" - }, "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify", "keywords": [ "json", @@ -33,12 +57,9 @@ "hash", "stable" ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "license": "MIT", + "main": "index.js", + "name": "fast-json-stable-stringify", "nyc": { "exclude": [ "test", @@ -48,5 +69,16 @@ "lcov", "text-summary" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git" + }, + "scripts": { + "eslint": "eslint index.js test", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "tape test/*.js" + }, + "types": "index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/fast-levenshtein/package.json b/node_modules/fast-levenshtein/package.json index 62d117567..6e4ec40b6 100644 --- a/node_modules/fast-levenshtein/package.json +++ b/node_modules/fast-levenshtein/package.json @@ -1,17 +1,42 @@ { - "name": "fast-levenshtein", - "version": "2.0.6", - "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.", - "main": "levenshtein.js", - "files": [ - "levenshtein.js" + "_args": [ + [ + "fast-levenshtein@2.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "build": "grunt build", - "prepublish": "npm run build", - "benchmark": "grunt benchmark", - "test": "mocha" + "_development": true, + "_from": "fast-levenshtein@2.0.6", + "_id": "fast-levenshtein@2.0.6", + "_inBundle": false, + "_integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "_location": "/fast-levenshtein", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fast-levenshtein@2.0.6", + "name": "fast-levenshtein", + "escapedName": "fast-levenshtein", + "rawSpec": "2.0.6", + "saveSpec": null, + "fetchSpec": "2.0.6" }, + "_requiredBy": [ + "/optionator" + ], + "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "_spec": "2.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ramesh Nair", + "email": "ram@hiddentao.com", + "url": "http://www.hiddentao.com/" + }, + "bugs": { + "url": "https://github.com/hiddentao/fast-levenshtein/issues" + }, + "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.", "devDependencies": { "chai": "~1.5.0", "grunt": "~0.4.1", @@ -25,15 +50,27 @@ "lodash": "^4.0.1", "mocha": "~1.9.0" }, - "repository": { - "type": "git", - "url": "https://github.com/hiddentao/fast-levenshtein.git" - }, + "files": [ + "levenshtein.js" + ], + "homepage": "https://github.com/hiddentao/fast-levenshtein#readme", "keywords": [ "levenshtein", "distance", "string" ], - "author": "Ramesh Nair (http://www.hiddentao.com/)", - "license": "MIT" -} \ No newline at end of file + "license": "MIT", + "main": "levenshtein.js", + "name": "fast-levenshtein", + "repository": { + "type": "git", + "url": "git+https://github.com/hiddentao/fast-levenshtein.git" + }, + "scripts": { + "benchmark": "grunt benchmark", + "build": "grunt build", + "prepublish": "npm run build", + "test": "mocha" + }, + "version": "2.0.6" +} diff --git a/node_modules/fastq/package.json b/node_modules/fastq/package.json index 41c544d73..e8fd4f8b7 100644 --- a/node_modules/fastq/package.json +++ b/node_modules/fastq/package.json @@ -1,36 +1,44 @@ { - "name": "fastq", - "version": "1.8.0", - "description": "Fast, in memory work queue", - "main": "queue.js", - "scripts": { - "lint": "standard --verbose | snazzy", - "unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test/test.js", - "coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js", - "test:report": "npm run lint && npm run unit:report", - "test": "npm run lint && npm run unit && npm run typescript", - "typescript": "tsc --project ./test/tsconfig.json", - "legacy": "tape test/test.js" - }, - "pre-commit": [ - "test" + "_args": [ + [ + "fastq@1.8.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/fastq.git" + "_development": true, + "_from": "fastq@1.8.0", + "_id": "fastq@1.8.0", + "_inBundle": false, + "_integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==", + "_location": "/fastq", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fastq@1.8.0", + "name": "fastq", + "escapedName": "fastq", + "rawSpec": "1.8.0", + "saveSpec": null, + "fetchSpec": "1.8.0" }, - "keywords": [ - "fast", - "queue", - "async", - "worker" + "_requiredBy": [ + "/@nodelib/fs.walk" ], - "author": "Matteo Collina ", - "license": "ISC", + "_resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", + "_spec": "1.8.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, "bugs": { "url": "https://github.com/mcollina/fastq/issues" }, - "homepage": "https://github.com/mcollina/fastq#readme", + "dependencies": { + "reusify": "^1.0.4" + }, + "description": "Fast, in memory work queue", "devDependencies": { "async": "^3.1.0", "neo-async": "^2.6.1", @@ -41,7 +49,31 @@ "tape": "^4.13.2", "typescript": "^3.8.3" }, - "dependencies": { - "reusify": "^1.0.4" - } -} \ No newline at end of file + "homepage": "https://github.com/mcollina/fastq#readme", + "keywords": [ + "fast", + "queue", + "async", + "worker" + ], + "license": "ISC", + "main": "queue.js", + "name": "fastq", + "pre-commit": [ + "test" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/fastq.git" + }, + "scripts": { + "coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js", + "legacy": "tape test/test.js", + "lint": "standard --verbose | snazzy", + "test": "npm run lint && npm run unit && npm run typescript", + "test:report": "npm run lint && npm run unit:report", + "typescript": "tsc --project ./test/tsconfig.json", + "unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test/test.js" + }, + "version": "1.8.0" +} diff --git a/node_modules/figures/package.json b/node_modules/figures/package.json index fac166e88..3fdff68d7 100644 --- a/node_modules/figures/package.json +++ b/node_modules/figures/package.json @@ -1,26 +1,60 @@ { - "name": "figures", - "version": "3.2.0", - "description": "Unicode symbols with Windows CMD fallbacks", - "license": "MIT", - "repository": "sindresorhus/figures", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "figures@3.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "figures@3.2.0", + "_id": "figures@3.2.0", + "_inBundle": false, + "_integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "_location": "/figures", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "figures@3.2.0", + "name": "figures", + "escapedName": "figures", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/figures/issues" + }, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "description": "Unicode symbols with Windows CMD fallbacks", + "devDependencies": { + "ava": "^1.4.1", + "markdown-table": "^1.1.2", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "make": "./makefile.js" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/figures#readme", "keywords": [ "unicode", "cli", @@ -33,13 +67,15 @@ "figures", "fallback" ], - "dependencies": { - "escape-string-regexp": "^1.0.5" + "license": "MIT", + "name": "figures", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/figures.git" }, - "devDependencies": { - "ava": "^1.4.1", - "markdown-table": "^1.1.2", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "make": "./makefile.js", + "test": "xo && ava && tsd" + }, + "version": "3.2.0" +} diff --git a/node_modules/file-entry-cache/package.json b/node_modules/file-entry-cache/package.json index c15ee913c..2bac627c5 100644 --- a/node_modules/file-entry-cache/package.json +++ b/node_modules/file-entry-cache/package.json @@ -1,53 +1,40 @@ { - "name": "file-entry-cache", - "version": "5.0.1", - "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", - "repository": "royriojas/file-entry-cache", - "license": "MIT", + "_args": [ + [ + "file-entry-cache@5.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "file-entry-cache@5.0.1", + "_id": "file-entry-cache@5.0.1", + "_inBundle": false, + "_integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "_location": "/file-entry-cache", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "file-entry-cache@5.0.1", + "name": "file-entry-cache", + "escapedName": "file-entry-cache", + "rawSpec": "5.0.1", + "saveSpec": null, + "fetchSpec": "5.0.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "_spec": "5.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Roy Riojas", "url": "http://royriojas.com" }, - "main": "cache.js", - "files": [ - "cache.js" - ], - "engines": { - "node": ">=4" + "bugs": { + "url": "https://github.com/royriojas/file-entry-cache/issues" }, - "scripts": { - "beautify": "esbeautifier 'cache.js' 'test/**/*.js' 'perf.js'", - "beautify-check": "npm run beautify -- -k", - "eslint": "eslinter 'cache.js' 'specs/**/*.js' 'perf.js'", - "lint": "npm run beautify && npm run eslint", - "verify": "npm run beautify-check && npm run eslint", - "install-hooks": "prepush install && changelogx install-hook && precommit install", - "changelog": "changelogx -f markdown -o ./changelog.md", - "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "pre-v": "npm run test", - "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", - "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", - "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", - "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", - "test": "npm run verify --silent && mocha -R spec test/specs", - "perf": "node perf.js", - "cover": "istanbul cover test/runner.js html text-summary", - "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" - }, - "prepush": [ - "npm run verify" - ], - "precommit": [ - "npm run verify" - ], - "keywords": [ - "file cache", - "task cache files", - "file cache", - "key par", - "key value", - "cache" - ], "changelogx": { "ignoreRegExp": [ "BLD: Release", @@ -60,6 +47,10 @@ "issueIDURL": "https://github.com/royriojas/file-entry-cache/issues/{0}", "projectName": "file-entry-cache" }, + "dependencies": { + "flat-cache": "^2.0.1" + }, + "description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process", "devDependencies": { "chai": "^3.2.0", "changelogx": "3.0.0", @@ -78,7 +69,52 @@ "watch-run": "^1.2.1", "write": "^0.3.1" }, - "dependencies": { - "flat-cache": "^2.0.1" - } -} \ No newline at end of file + "engines": { + "node": ">=4" + }, + "files": [ + "cache.js" + ], + "homepage": "https://github.com/royriojas/file-entry-cache#readme", + "keywords": [ + "file cache", + "task cache files", + "file cache", + "key par", + "key value", + "cache" + ], + "license": "MIT", + "main": "cache.js", + "name": "file-entry-cache", + "precommit": [ + "npm run verify" + ], + "prepush": [ + "npm run verify" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/royriojas/file-entry-cache.git" + }, + "scripts": { + "beautify": "esbeautifier 'cache.js' 'test/**/*.js' 'perf.js'", + "beautify-check": "npm run beautify -- -k", + "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", + "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", + "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", + "changelog": "changelogx -f markdown -o ./changelog.md", + "cover": "istanbul cover test/runner.js html text-summary", + "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", + "eslint": "eslinter 'cache.js' 'specs/**/*.js' 'perf.js'", + "install-hooks": "prepush install && changelogx install-hook && precommit install", + "lint": "npm run beautify && npm run eslint", + "perf": "node perf.js", + "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", + "pre-v": "npm run test", + "test": "npm run verify --silent && mocha -R spec test/specs", + "verify": "npm run beautify-check && npm run eslint", + "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" + }, + "version": "5.0.1" +} diff --git a/node_modules/file-url/package.json b/node_modules/file-url/package.json index dbcd4f1b4..fd4f03a5a 100644 --- a/node_modules/file-url/package.json +++ b/node_modules/file-url/package.json @@ -1,24 +1,54 @@ { - "name": "file-url", - "version": "3.0.0", - "description": "Convert a file path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`", - "license": "MIT", - "repository": "sindresorhus/file-url", + "_args": [ + [ + "file-url@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "file-url@3.0.0", + "_id": "file-url@3.0.0", + "_inBundle": false, + "_integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "_location": "/file-url", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "file-url@3.0.0", + "name": "file-url", + "escapedName": "file-url", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/file-url/issues" + }, + "description": "Convert a file path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/file-url#readme", "keywords": [ "file", "url", @@ -27,9 +57,14 @@ "scheme", "slash" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "file-url", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/file-url.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.0" +} diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json index c3868058f..a6c68142f 100644 --- a/node_modules/fill-range/package.json +++ b/node_modules/fill-range/package.json @@ -1,38 +1,76 @@ { - "name": "fill-range", - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "version": "7.0.1", - "homepage": "https://github.com/jonschlinkert/fill-range", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Edo Rivai (edo.rivai.nl)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Paul Miller (paulmillr.com)", - "Rouven Weßling (www.rouvenwessling.de)", - "(https://github.com/wtgtybhertgeghgtwtg)" + "_args": [ + [ + "fill-range@7.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/fill-range", + "_development": true, + "_from": "fill-range@7.0.1", + "_id": "fill-range@7.0.1", + "_inBundle": false, + "_integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "_location": "/fill-range", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fill-range@7.0.1", + "name": "fill-range", + "escapedName": "fill-range", + "rawSpec": "7.0.1", + "saveSpec": null, + "fetchSpec": "7.0.1" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "_spec": "7.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/fill-range/issues" }, - "license": "MIT", - "files": [ - "index.js" + "contributors": [ + { + "name": "Edo Rivai", + "url": "edo.rivai.nl" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Paul Miller", + "url": "paulmillr.com" + }, + { + "name": "Rouven Weßling", + "url": "www.rouvenwessling.de" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "mocha" - }, "dependencies": { "to-regex-range": "^5.0.1" }, + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", "devDependencies": { "gulp-format-md": "^2.0.0", "mocha": "^6.1.1" }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/fill-range", "keywords": [ "alpha", "alphabetical", @@ -53,6 +91,16 @@ "regex", "sh" ], + "license": "MIT", + "main": "index.js", + "name": "fill-range", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/fill-range.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "toc": false, "layout": "default", @@ -65,5 +113,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "7.0.1" +} diff --git a/node_modules/find-up/package.json b/node_modules/find-up/package.json index 39a30757f..d9d657bc1 100644 --- a/node_modules/find-up/package.json +++ b/node_modules/find-up/package.json @@ -1,24 +1,62 @@ { - "name": "find-up", - "version": "4.1.0", - "description": "Find a file or directory by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", + "_args": [ + [ + "find-up@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "find-up@4.1.0", + "_id": "find-up@4.1.0", + "_inBundle": false, + "_integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "_location": "/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "find-up@4.1.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/pkg-dir", + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "description": "Find a file or directory by walking up parent directories", + "devDependencies": { + "ava": "^2.1.0", + "is-path-inside": "^2.1.0", + "tempy": "^0.3.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/find-up#readme", "keywords": [ "find", "up", @@ -39,15 +77,14 @@ "walking", "path" ], - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" }, - "devDependencies": { - "ava": "^2.1.0", - "is-path-inside": "^2.1.0", - "tempy": "^0.3.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.1.0" +} diff --git a/node_modules/flat-cache/node_modules/rimraf/package.json b/node_modules/flat-cache/node_modules/rimraf/package.json index 653e305a4..1df12011d 100644 --- a/node_modules/flat-cache/node_modules/rimraf/package.json +++ b/node_modules/flat-cache/node_modules/rimraf/package.json @@ -1,29 +1,71 @@ { - "name": "rimraf", - "version": "2.6.3", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": "git://github.com/isaacs/rimraf.git", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags", - "test": "tap test/*.js" + "_args": [ + [ + "rimraf@2.6.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "rimraf@2.6.3", + "_id": "rimraf@2.6.3", + "_inBundle": false, + "_integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "_location": "/flat-cache/rimraf", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "rimraf@2.6.3", + "name": "rimraf", + "escapedName": "rimraf", + "rawSpec": "2.6.3", + "saveSpec": null, + "fetchSpec": "2.6.3" + }, + "_requiredBy": [ + "/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "_spec": "2.6.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "rimraf": "bin.js" + }, + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" }, - "bin": "./bin.js", "dependencies": { "glob": "^7.1.3" }, + "description": "A deep deletion module for node (like `rm -rf`)", + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^12.1.1" + }, "files": [ "LICENSE", "README.md", "bin.js", "rimraf.js" ], - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^12.1.1" - } -} \ No newline at end of file + "homepage": "https://github.com/isaacs/rimraf#readme", + "license": "ISC", + "main": "rimraf.js", + "name": "rimraf", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js" + }, + "version": "2.6.3" +} diff --git a/node_modules/flat-cache/package.json b/node_modules/flat-cache/package.json index 503289344..caee40f2a 100644 --- a/node_modules/flat-cache/package.json +++ b/node_modules/flat-cache/package.json @@ -1,57 +1,42 @@ { - "name": "flat-cache", - "version": "2.0.1", - "description": "A stupidly simple key/value storage using files to persist some data", - "repository": "royriojas/flat-cache", - "license": "MIT", + "_args": [ + [ + "flat-cache@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "flat-cache@2.0.1", + "_id": "flat-cache@2.0.1", + "_inBundle": false, + "_integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "_location": "/flat-cache", + "_phantomChildren": { + "glob": "7.1.6" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "flat-cache@2.0.1", + "name": "flat-cache", + "escapedName": "flat-cache", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/file-entry-cache" + ], + "_resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Roy Riojas", "url": "http://royriojas.com" }, - "main": "cache.js", - "files": [ - "cache.js", - "utils.js", - "del.js" - ], - "engines": { - "node": ">=4" + "bugs": { + "url": "https://github.com/royriojas/flat-cache/issues" }, - "precommit": [ - "npm run verify --silent" - ], - "prepush": [ - "npm run verify --silent" - ], - "scripts": { - "beautify": "esbeautifier 'cache.js' 'utils.js' 'del.js' 'test/specs/**/*.js'", - "beautify-check": "npm run beautify -- -k", - "eslint": "eslinter 'cache.js' 'utils.js' 'del.js' 'specs/**/*.js'", - "eslint-fix": "npm run eslint -- --fix", - "autofix": "npm run beautify && npm run eslint-fix", - "check": "npm run beautify-check && npm run eslint", - "verify": "npm run check && npm run test:cache", - "install-hooks": "prepush install && changelogx install-hook && precommit install", - "changelog": "changelogx -f markdown -o ./changelog.md", - "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", - "pre-v": "npm run verify", - "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", - "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", - "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", - "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", - "test:cache": "mocha -R spec test/specs", - "test": "npm run verify --silent", - "cover": "istanbul cover test/runner.js html text-summary", - "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" - }, - "keywords": [ - "json cache", - "simple cache", - "file cache", - "key par", - "key value", - "cache" - ], "changelogx": { "ignoreRegExp": [ "BLD: Release", @@ -64,6 +49,12 @@ "issueIDURL": "https://github.com/royriojas/flat-cache/issues/{0}", "projectName": "flat-cache" }, + "dependencies": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "description": "A stupidly simple key/value storage using files to persist some data", "devDependencies": { "chai": "^3.2.0", "changelogx": "3.0.0", @@ -79,9 +70,56 @@ "sinon-chai": "^2.8.0", "watch-run": "^1.2.2" }, - "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - } -} \ No newline at end of file + "engines": { + "node": ">=4" + }, + "files": [ + "cache.js", + "utils.js", + "del.js" + ], + "homepage": "https://github.com/royriojas/flat-cache#readme", + "keywords": [ + "json cache", + "simple cache", + "file cache", + "key par", + "key value", + "cache" + ], + "license": "MIT", + "main": "cache.js", + "name": "flat-cache", + "precommit": [ + "npm run verify --silent" + ], + "prepush": [ + "npm run verify --silent" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/royriojas/flat-cache.git" + }, + "scripts": { + "autofix": "npm run beautify && npm run eslint-fix", + "beautify": "esbeautifier 'cache.js' 'utils.js' 'del.js' 'test/specs/**/*.js'", + "beautify-check": "npm run beautify -- -k", + "bump-major": "npm run pre-v && npm version major -m 'BLD: Release v%s' && npm run post-v", + "bump-minor": "npm run pre-v && npm version minor -m 'BLD: Release v%s' && npm run post-v", + "bump-patch": "npm run pre-v && npm version patch -m 'BLD: Release v%s' && npm run post-v", + "changelog": "changelogx -f markdown -o ./changelog.md", + "check": "npm run beautify-check && npm run eslint", + "cover": "istanbul cover test/runner.js html text-summary", + "do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify", + "eslint": "eslinter 'cache.js' 'utils.js' 'del.js' 'specs/**/*.js'", + "eslint-fix": "npm run eslint -- --fix", + "install-hooks": "prepush install && changelogx install-hook && precommit install", + "post-v": "npm run do-changelog && git push --no-verify && git push --tags --no-verify", + "pre-v": "npm run verify", + "test": "npm run verify --silent", + "test:cache": "mocha -R spec test/specs", + "verify": "npm run check && npm run test:cache", + "watch": "watch-run -i -p 'test/specs/**/*.js' istanbul cover test/runner.js html text-summary" + }, + "version": "2.0.1" +} diff --git a/node_modules/flatted/package.json b/node_modules/flatted/package.json index 4a366597f..97e229e14 100644 --- a/node_modules/flatted/package.json +++ b/node_modules/flatted/package.json @@ -1,38 +1,40 @@ { - "name": "flatted", - "version": "2.0.2", - "description": "A super light and fast circular JSON parser.", - "unpkg": "min.js", - "main": "cjs/index.js", - "module": "esm/index.js", - "types": "types.d.ts", - "scripts": { - "bench": "node test/bench.js", - "build": "npm run cjs && npm test && npm run esm && npm run min && npm run size", - "cjs": "cp index.js cjs/index.js; echo 'module.exports = Flatted;' >> cjs/index.js", - "esm": "cp index.js esm/index.js; echo 'export default Flatted;' >> esm/index.js; echo 'export var parse = Flatted.parse;' >> esm/index.js; echo 'export var stringify = Flatted.stringify;' >> esm/index.js", - "min": "echo '/*! (c) 2018, Andrea Giammarchi, (ISC) */'>min.js && uglifyjs index.js --support-ie8 -c -m >> min.js", - "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c9 min.js | wc -c;cat min.js | brotli | wc -c", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "nyc node test/index.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/WebReflection/flatted.git" - }, - "keywords": [ - "circular", - "JSON", - "fast", - "parser", - "minimal" + "_args": [ + [ + "flatted@2.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Andrea Giammarchi", - "license": "ISC", + "_development": true, + "_from": "flatted@2.0.2", + "_id": "flatted@2.0.2", + "_inBundle": false, + "_integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "_location": "/flatted", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "flatted@2.0.2", + "name": "flatted", + "escapedName": "flatted", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Andrea Giammarchi" + }, "bugs": { "url": "https://github.com/WebReflection/flatted/issues" }, - "homepage": "https://github.com/WebReflection/flatted#readme", + "description": "A super light and fast circular JSON parser.", "devDependencies": { "circular-json": "^0.5.9", "circular-json-es6": "^2.0.2", @@ -40,5 +42,34 @@ "jsan": "^3.1.13", "nyc": "^15.0.0", "uglify-js": "^3.8.1" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/WebReflection/flatted#readme", + "keywords": [ + "circular", + "JSON", + "fast", + "parser", + "minimal" + ], + "license": "ISC", + "main": "cjs/index.js", + "module": "esm/index.js", + "name": "flatted", + "repository": { + "type": "git", + "url": "git+https://github.com/WebReflection/flatted.git" + }, + "scripts": { + "bench": "node test/bench.js", + "build": "npm run cjs && npm test && npm run esm && npm run min && npm run size", + "cjs": "cp index.js cjs/index.js; echo 'module.exports = Flatted;' >> cjs/index.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "esm": "cp index.js esm/index.js; echo 'export default Flatted;' >> esm/index.js; echo 'export var parse = Flatted.parse;' >> esm/index.js; echo 'export var stringify = Flatted.stringify;' >> esm/index.js", + "min": "echo '/*! (c) 2018, Andrea Giammarchi, (ISC) */'>min.js && uglifyjs index.js --support-ie8 -c -m >> min.js", + "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c9 min.js | wc -c;cat min.js | brotli | wc -c", + "test": "nyc node test/index.js" + }, + "types": "types.d.ts", + "unpkg": "min.js", + "version": "2.0.2" +} diff --git a/node_modules/form-data/License b/node_modules/form-data/License new file mode 100644 index 000000000..c7ff12a2f --- /dev/null +++ b/node_modules/form-data/License @@ -0,0 +1,19 @@ +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/node_modules/form-data/README.md b/node_modules/form-data/README.md new file mode 100644 index 000000000..f6b2ae913 --- /dev/null +++ b/node_modules/form-data/README.md @@ -0,0 +1,350 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.5.1.svg?label=linux:4.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.5.1.svg?label=macos:4.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/v2.5.1.svg?label=windows:4.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.5.1.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Array_ getHeaders( [**Array** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Array_ getHeaders( [**Array** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/form-data/README.md.bak b/node_modules/form-data/README.md.bak new file mode 100644 index 000000000..6077db9ad --- /dev/null +++ b/node_modules/form-data/README.md.bak @@ -0,0 +1,350 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:4.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:4.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=windows:4.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Array_ getHeaders( [**Array** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append( 'my_string', 'my value' ); +form.append( 'my_integer', 1 ); +form.append( 'my_boolean', true ); +form.append( 'my_buffer', new Buffer(10) ); +form.append( 'my_array_as_json', JSON.stringify( ['bird','cute'] ) ) +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg' ); + +// provide an object. +form.append( 'my_file', fs.createReadStream('/foo/bar.jpg'), {filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806} ); +``` + +#### _Array_ getHeaders( [**Array** _userHeaders_] ) +This method ads the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. A boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append( 'my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73]) ); +form.append( 'my_file', fs.readFileSync('/foo/bar.jpg') ); + +axios.post( 'https://example.com/path/to/api', + form.getBuffer(), + form.getHeaders() + ) +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength( **function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit( _params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append( 'my_string', 'Hello World' ); + +form.submit( 'http://example.com/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) +.then(response => response) +.catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/form-data/index.d.ts b/node_modules/form-data/index.d.ts new file mode 100644 index 000000000..255292d7e --- /dev/null +++ b/node_modules/form-data/index.d.ts @@ -0,0 +1,51 @@ +// Definitions by: Carlos Ballesteros Velasco +// Leon Yu +// BendingBender +// Maple Miao + +/// +import * as stream from 'stream'; +import * as http from 'http'; + +export = FormData; + +interface Options { + writable?: boolean; + readable?: boolean; + dataSize?: number; + maxDataSize?: number; + pauseStreams?: boolean; +} + +declare class FormData extends stream.Readable { + constructor(options?: Options); + append(key: string, value: any, options?: FormData.AppendOptions | string): void; + getHeaders(): FormData.Headers; + submit( + params: string | FormData.SubmitOptions, + callback?: (error: Error | null, response: http.IncomingMessage) => void + ): http.ClientRequest; + getBuffer(): Buffer; + getBoundary(): string; + getLength(callback: (err: Error | null, length: number) => void): void; + getLengthSync(): number; + hasKnownLength(): boolean; +} + +declare namespace FormData { + interface Headers { + [key: string]: any; + } + + interface AppendOptions { + header?: string | Headers; + knownLength?: number; + filename?: string; + filepath?: string; + contentType?: string; + } + + interface SubmitOptions extends http.RequestOptions { + protocol?: 'https:' | 'http:'; + } +} diff --git a/node_modules/form-data/lib/browser.js b/node_modules/form-data/lib/browser.js new file mode 100644 index 000000000..09e7c70e6 --- /dev/null +++ b/node_modules/form-data/lib/browser.js @@ -0,0 +1,2 @@ +/* eslint-env browser */ +module.exports = typeof self == 'object' ? self.FormData : window.FormData; diff --git a/node_modules/form-data/lib/form_data.js b/node_modules/form-data/lib/form_data.js new file mode 100644 index 000000000..9c07e32c0 --- /dev/null +++ b/node_modules/form-data/lib/form_data.js @@ -0,0 +1,483 @@ +var CombinedStream = require('combined-stream'); +var util = require('util'); +var path = require('path'); +var http = require('http'); +var https = require('https'); +var parseUrl = require('url').parse; +var fs = require('fs'); +var mime = require('mime-types'); +var asynckit = require('asynckit'); +var populate = require('./populate.js'); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + this.pipe(request); + if (cb) { + request.on('error', cb); + request.on('response', cb.bind(this, null)); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; diff --git a/node_modules/form-data/lib/populate.js b/node_modules/form-data/lib/populate.js new file mode 100644 index 000000000..4d35738dd --- /dev/null +++ b/node_modules/form-data/lib/populate.js @@ -0,0 +1,10 @@ +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; diff --git a/node_modules/form-data/package.json b/node_modules/form-data/package.json new file mode 100644 index 000000000..cb559aafe --- /dev/null +++ b/node_modules/form-data/package.json @@ -0,0 +1,101 @@ +{ + "_from": "form-data@^2.5.0", + "_id": "form-data@2.5.1", + "_inBundle": false, + "_integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "_location": "/form-data", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "form-data@^2.5.0", + "name": "form-data", + "escapedName": "form-data", + "rawSpec": "^2.5.0", + "saveSpec": null, + "fetchSpec": "^2.5.0" + }, + "_requiredBy": [ + "/@azure/ms-rest-js" + ], + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "_shasum": "f2cbec57b5e59e23716e128fe44d4e5dd23895f4", + "_spec": "form-data@^2.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@azure/ms-rest-js", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "browser": "./lib/browser", + "bugs": { + "url": "https://github.com/form-data/form-data/issues" + }, + "bundleDependencies": false, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "deprecated": false, + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "devDependencies": { + "@types/node": "^12.0.10", + "browserify": "^13.1.1", + "browserify-istanbul": "^2.0.0", + "coveralls": "^3.0.4", + "cross-spawn": "^6.0.5", + "eslint": "^6.0.1", + "fake": "^0.2.2", + "far": "^0.0.7", + "formidable": "^1.0.17", + "in-publish": "^2.0.0", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.13", + "pkgfiles": "^2.3.0", + "pre-commit": "^1.1.3", + "request": "^2.88.0", + "rimraf": "^2.7.1", + "tape": "^4.6.2", + "typescript": "^3.5.2" + }, + "engines": { + "node": ">= 0.12" + }, + "homepage": "https://github.com/form-data/form-data#readme", + "license": "MIT", + "main": "./lib/form_data", + "name": "form-data", + "pre-commit": [ + "lint", + "ci-test", + "check" + ], + "repository": { + "type": "git", + "url": "git://github.com/form-data/form-data.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", + "check": "istanbul check-coverage coverage/coverage*.json", + "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", + "ci-test": "npm run test && npm run browser && npm run report", + "debug": "verbose=1 ./test/run.js", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "postpublish": "npm run restore-readme", + "posttest": "istanbul report lcov text", + "predebug": "rimraf coverage test/tmp", + "prepublish": "in-publish && npm run update-readme || not-in-publish", + "pretest": "rimraf coverage test/tmp", + "report": "istanbul report lcov text", + "restore-readme": "mv README.md.bak README.md", + "test": "istanbul cover test/run.js", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" + }, + "typings": "./index.d.ts", + "version": "2.5.1" +} diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json index 6e98eaab9..261a43147 100644 --- a/node_modules/fs.realpath/package.json +++ b/node_modules/fs.realpath/package.json @@ -1,26 +1,63 @@ { - "name": "fs.realpath", - "version": "1.0.0", - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "main": "index.js", + "_args": [ + [ + "fs.realpath@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "fs.realpath@1.0.0", + "_id": "fs.realpath@1.0.0", + "_inBundle": false, + "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "_location": "/fs.realpath", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fs.realpath@1.0.0", + "name": "fs.realpath", + "escapedName": "fs.realpath", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/fs.realpath/issues" + }, "dependencies": {}, + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", "devDependencies": {}, - "scripts": { - "test": "tap test/*.js --cov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, + "files": [ + "old.js", + "index.js" + ], + "homepage": "https://github.com/isaacs/fs.realpath#readme", "keywords": [ "realpath", "fs", "polyfill" ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "license": "ISC", - "files": [ - "old.js", - "index.js" - ] -} \ No newline at end of file + "main": "index.js", + "name": "fs.realpath", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "1.0.0" +} diff --git a/node_modules/fs/package.json b/node_modules/fs/package.json index f1fa735a7..cfb40b0e2 100644 --- a/node_modules/fs/package.json +++ b/node_modules/fs/package.json @@ -1,20 +1,48 @@ { - "name": "fs", - "version": "0.0.1-security", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "_args": [ + [ + "fs@0.0.1-security", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "fs@0.0.1-security", + "_id": "fs@0.0.1-security", + "_inBundle": false, + "_integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=", + "_location": "/fs", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fs@0.0.1-security", + "name": "fs", + "escapedName": "fs", + "rawSpec": "0.0.1-security", + "saveSpec": null, + "fetchSpec": "0.0.1-security" }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "_spec": "0.0.1-security", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": "", + "bugs": { + "url": "https://github.com/npm/security-holder/issues" + }, + "description": "This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.", + "homepage": "https://github.com/npm/security-holder#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "fs", "repository": { "type": "git", "url": "git+https://github.com/npm/security-holder.git" }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/security-holder/issues" + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" }, - "homepage": "https://github.com/npm/security-holder#readme" -} \ No newline at end of file + "version": "0.0.1-security" +} diff --git a/node_modules/fsevents/README.md b/node_modules/fsevents/README.md deleted file mode 100644 index 382fe6db0..000000000 --- a/node_modules/fsevents/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# fsevents [![NPM](https://nodei.co/npm/fsevents.png)](https://nodei.co/npm/fsevents/) - -Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) - -The FSEvents API in MacOS allows applications to register for notifications of -changes to a given directory tree. It is a very fast and lightweight alternative -to kqueue. - -This is a low-level library. For a cross-platform file watching module that -uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). - -## Installation - -Supports only **Node.js v8.16 and higher**. - -```sh -npm install fsevents -``` - -## Usage - -```js -const fsevents = require('fsevents'); -const stop = fsevents.watch(__dirname, (path, flags, id) => { - const info = fsevents.getInfo(path, flags, id); -}); // To start observation -stop(); // To end observation -``` - -The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a -a change in the file system. It takes three arguments: - -###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` - - * `path: string` - the item in the filesystem that have been changed - * `flags: number` - a numeric value describing what the change was - * `id: string` - an unique-id identifying this specific event - - Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. - -###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` - -The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure -that is easier to digest to determine what the change was. - -The `FsEventsInfo` has the following shape: - -```js -/** - * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent - * @typedef {'file'|'directory'|'symlink'} FsEventsType - */ -{ - "event": "created", - "path": "file.txt", // {FsEventsEvent} - "type": "file", // {FsEventsType} - "changes": { - "inode": true, // Had iNode Meta-Information changed - "finder": false, // Had Finder Meta-Data changed - "access": false, // Had access permissions changed - "xattrs": false // Had xAttributes changed - }, - "flags": 0x100000000 -} -``` - -## Engine compatibility - -- v2 supports node 8.16+ -- v1.2.8 supports node 6+ -- v1.2.7 supports node 4+ - -## License - -The MIT License Copyright (C) 2010-2019 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. - -Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/node_modules/fsevents/fsevents.d.ts b/node_modules/fsevents/fsevents.d.ts deleted file mode 100644 index adbb28d37..000000000 --- a/node_modules/fsevents/fsevents.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -declare type Event = - | 'created' - | 'cloned' - | 'modified' - | 'deleted' - | 'moved' - | 'root-changed' - | 'unknown'; -declare type Type = 'file' | 'directory' | 'symlink'; -declare type FileChanges = { - inode: boolean; - finder: boolean; - access: boolean; - xattrs: boolean; -}; -declare type Info = { - event: Event; - path: string; - type: Type; - changes: FileChanges; - flags: number; -}; -declare type WatchHandler = (path: string, flags: number, id: string) => void; -export declare function watch( - path: string, - handler: WatchHandler, -): () => Promise; -export declare function getInfo(path: string, flags: number): Info; -export declare const constants: { - None: 0x00000000; - MustScanSubDirs: 0x00000001; - UserDropped: 0x00000002; - KernelDropped: 0x00000004; - EventIdsWrapped: 0x00000008; - HistoryDone: 0x00000010; - RootChanged: 0x00000020; - Mount: 0x00000040; - Unmount: 0x00000080; - ItemCreated: 0x00000100; - ItemRemoved: 0x00000200; - ItemInodeMetaMod: 0x00000400; - ItemRenamed: 0x00000800; - ItemModified: 0x00001000; - ItemFinderInfoMod: 0x00002000; - ItemChangeOwner: 0x00004000; - ItemXattrMod: 0x00008000; - ItemIsFile: 0x00010000; - ItemIsDir: 0x00020000; - ItemIsSymlink: 0x00040000; - ItemIsHardlink: 0x00100000; - ItemIsLastHardlink: 0x00200000; - OwnEvent: 0x00080000; - ItemCloned: 0x00400000; -}; -export {} diff --git a/node_modules/fsevents/fsevents.js b/node_modules/fsevents/fsevents.js deleted file mode 100644 index bf7334b28..000000000 --- a/node_modules/fsevents/fsevents.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - ** © 2018 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller - ** Licensed under MIT License. - */ - -/* jshint node:true */ -'use strict'; - -if (process.platform !== 'darwin') { - throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); -} - -const Native = require('./fsevents.node'); -const events = Native.constants; - -function watch(path, handler) { - if (typeof path !== 'string') { - throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); - } - if (typeof handler !== 'function') { - throw new TypeError(`fsevents argument 2 must be a function and not a ${typeof handler}`); - } - - let instance = Native.start(path, handler); - if (!instance) throw new Error(`could not watch: ${path}`); - return () => { - const result = instance - ? Promise.resolve(instance).then(Native.stop) - : Promise.resolve(undefined); - instance = undefined; - return result; - }; -} - -function getInfo(path, flags) { - return { - path, - flags, - event: getEventType(flags), - type: getFileType(flags), - changes: getFileChanges(flags) - }; -} - -function getFileType(flags) { - if (events.ItemIsFile & flags) return 'file'; - if (events.ItemIsDir & flags) return 'directory'; - if (events.ItemIsSymlink & flags) return 'symlink'; -} -function anyIsTrue(obj) { - for (let key in obj) { - if (obj[key]) return true; - } - return false; -} -function getEventType(flags) { - if (events.ItemRemoved & flags) return 'deleted'; - if (events.ItemRenamed & flags) return 'moved'; - if (events.ItemCreated & flags) return 'created'; - if (events.ItemModified & flags) return 'modified'; - if (events.RootChanged & flags) return 'root-changed'; - if (events.ItemCloned & flags) return 'cloned'; - if (anyIsTrue(flags)) return 'modified'; - return 'unknown'; -} -function getFileChanges(flags) { - return { - inode: !!(events.ItemInodeMetaMod & flags), - finder: !!(events.ItemFinderInfoMod & flags), - access: !!(events.ItemChangeOwner & flags), - xattrs: !!(events.ItemXattrMod & flags) - }; -} - -exports.watch = watch; -exports.getInfo = getInfo; -exports.constants = events; diff --git a/node_modules/fsevents/fsevents.node b/node_modules/fsevents/fsevents.node deleted file mode 100755 index 83af92f7b..000000000 Binary files a/node_modules/fsevents/fsevents.node and /dev/null differ diff --git a/node_modules/fsevents/package.json b/node_modules/fsevents/package.json deleted file mode 100644 index d3b732346..000000000 --- a/node_modules/fsevents/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "fsevents", - "version": "2.1.2", - "description": "Native Access to MacOS FSEvents", - "main": "fsevents.js", - "types": "fsevents.d.ts", - "os": [ - "darwin" - ], - "files": [ - "fsevents.d.ts", - "fsevents.js", - "fsevents.node" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - }, - "scripts": { - "clean": "node-gyp clean && rm -f fsevents.node", - "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", - "test": "/bin/bash ./test.sh 2>/dev/null", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/fsevents/fsevents.git" - }, - "keywords": [ - "fsevents", - "mac" - ], - "contributors": [ - { - "name": "Philipp Dunkel", - "email": "pip@pipobscure.com" - }, - { - "name": "Ben Noordhuis", - "email": "info@bnoordhuis.nl" - }, - { - "name": "Elan Shankar", - "email": "elan.shanker@gmail.com" - }, - { - "name": "Miroslav Bajtoš", - "email": "mbajtoss@gmail.com" - }, - { - "name": "Paul Miller", - "url": "https://paulmillr.com" - } - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/fsevents/fsevents/issues" - }, - "homepage": "https://github.com/fsevents/fsevents" -} \ No newline at end of file diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json index 0dd444554..8df10b8ee 100644 --- a/node_modules/function-bind/package.json +++ b/node_modules/function-bind/package.json @@ -1,17 +1,44 @@ { - "name": "function-bind", - "version": "1.1.1", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" + "_args": [ + [ + "function-bind@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Raynos ", - "repository": "git://github.com/Raynos/function-bind.git", - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", + "_development": true, + "_from": "function-bind@1.1.1", + "_id": "function-bind@1.1.1", + "_inBundle": false, + "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "_location": "/function-bind", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "function-bind@1.1.1", + "name": "function-bind", + "escapedName": "function-bind", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/es-abstract", + "/has", + "/object.assign/es-abstract", + "/object.values" + ], + "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, "contributors": [ { "name": "Raynos" @@ -21,11 +48,8 @@ "url": "https://github.com/ljharb" } ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, "dependencies": {}, + "description": "Implementation of Function.prototype.bind", "devDependencies": { "@ljharb/eslint-config": "^12.2.1", "covert": "^1.1.0", @@ -33,16 +57,29 @@ "jscs": "^3.0.7", "tape": "^4.8.0" }, + "homepage": "https://github.com/Raynos/function-bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], "license": "MIT", + "main": "index", + "name": "function-bind", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/function-bind.git" + }, "scripts": { + "coverage": "covert test/*.js", + "eslint": "eslint *.js */*.js", + "jscs": "jscs *.js */*.js", + "lint": "npm run jscs && npm run eslint", + "posttest": "npm run coverage -- --quiet", "pretest": "npm run lint", "test": "npm run tests-only", - "posttest": "npm run coverage -- --quiet", - "tests-only": "node test", - "coverage": "covert test/*.js", - "lint": "npm run jscs && npm run eslint", - "jscs": "jscs *.js */*.js", - "eslint": "eslint *.js */*.js" + "tests-only": "node test" }, "testling": { "files": "test/index.js", @@ -59,5 +96,6 @@ "iphone/6.0..latest", "android-browser/4.2..latest" ] - } -} \ No newline at end of file + }, + "version": "1.1.1" +} diff --git a/node_modules/functional-red-black-tree/package.json b/node_modules/functional-red-black-tree/package.json index a8cacfdee..22fe9c8f2 100644 --- a/node_modules/functional-red-black-tree/package.json +++ b/node_modules/functional-red-black-tree/package.json @@ -1,23 +1,50 @@ { - "name": "functional-red-black-tree", - "version": "1.0.1", - "description": "A fully persistent balanced binary search tree", - "main": "rbtree.js", - "directories": { - "test": "test" + "_args": [ + [ + "functional-red-black-tree@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "functional-red-black-tree@1.0.1", + "_id": "functional-red-black-tree@1.0.1", + "_inBundle": false, + "_integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "_location": "/functional-red-black-tree", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "functional-red-black-tree@1.0.1", + "name": "functional-red-black-tree", + "escapedName": "functional-red-black-tree", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/@typescript-eslint/eslint-plugin", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mikola Lysenko" + }, + "bugs": { + "url": "https://github.com/mikolalysenko/functional-red-black-tree/issues" }, "dependencies": {}, + "description": "A fully persistent balanced binary search tree", "devDependencies": { "iota-array": "^0.0.1", "tape": "^2.12.0" }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/mikolalysenko/functional-red-black-tree.git" + "directories": { + "test": "test" }, + "homepage": "https://github.com/mikolalysenko/functional-red-black-tree#readme", "keywords": [ "functional", "red", @@ -32,9 +59,15 @@ "data", "structure" ], - "author": "Mikola Lysenko", "license": "MIT", - "bugs": { - "url": "https://github.com/mikolalysenko/functional-red-black-tree/issues" - } -} \ No newline at end of file + "main": "rbtree.js", + "name": "functional-red-black-tree", + "repository": { + "type": "git", + "url": "git://github.com/mikolalysenko/functional-red-black-tree.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json index 3218e973a..a04950e1a 100644 --- a/node_modules/get-caller-file/package.json +++ b/node_modules/get-caller-file/package.json @@ -1,31 +1,40 @@ { - "name": "get-caller-file", - "version": "2.0.5", - "description": "", - "main": "index.js", - "directories": { - "test": "tests" - }, - "files": [ - "index.js", - "index.js.map", - "index.d.ts" + "_args": [ + [ + "get-caller-file@2.0.5", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepare": "tsc", - "test": "mocha test", - "test:debug": "mocha test" + "_development": true, + "_from": "get-caller-file@2.0.5", + "_id": "get-caller-file@2.0.5", + "_inBundle": false, + "_integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "_location": "/get-caller-file", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-caller-file@2.0.5", + "name": "get-caller-file", + "escapedName": "get-caller-file", + "rawSpec": "2.0.5", + "saveSpec": null, + "fetchSpec": "2.0.5" }, - "repository": { - "type": "git", - "url": "git+https://github.com/stefanpenner/get-caller-file.git" + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "_spec": "2.0.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Stefan Penner" }, - "author": "Stefan Penner", - "license": "ISC", "bugs": { "url": "https://github.com/stefanpenner/get-caller-file/issues" }, - "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "description": "[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", "devDependencies": { "@types/chai": "^4.1.7", "@types/ensure-posix-path": "^1.0.0", @@ -36,7 +45,29 @@ "mocha": "^5.2.0", "typescript": "^3.3.3333" }, + "directories": { + "test": "tests" + }, "engines": { "node": "6.* || 8.* || >= 10.*" - } -} \ No newline at end of file + }, + "files": [ + "index.js", + "index.js.map", + "index.d.ts" + ], + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "license": "ISC", + "main": "index.js", + "name": "get-caller-file", + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "scripts": { + "prepare": "tsc", + "test": "mocha test", + "test:debug": "mocha test" + }, + "version": "2.0.5" +} diff --git a/node_modules/get-stdin/package.json b/node_modules/get-stdin/package.json index d3be1a8ba..d73a3b24c 100644 --- a/node_modules/get-stdin/package.json +++ b/node_modules/get-stdin/package.json @@ -1,23 +1,53 @@ { - "name": "get-stdin", - "version": "6.0.0", - "description": "Get stdin as a string or buffer", - "license": "MIT", - "repository": "sindresorhus/get-stdin", + "_args": [ + [ + "get-stdin@6.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "get-stdin@6.0.0", + "_id": "get-stdin@6.0.0", + "_inBundle": false, + "_integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "_location": "/get-stdin", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stdin@6.0.0", + "name": "get-stdin", + "escapedName": "get-stdin", + "rawSpec": "6.0.0", + "saveSpec": null, + "fetchSpec": "6.0.0" + }, + "_requiredBy": [ + "/eslint-config-prettier" + ], + "_resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "_spec": "6.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stdin/issues" + }, + "description": "Get stdin as a string or buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava test.js test-buffer.js && echo unicorns | node test-real.js" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/get-stdin#readme", "keywords": [ "std", "stdin", @@ -28,8 +58,14 @@ "process", "read" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "get-stdin", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stdin.git" + }, + "scripts": { + "test": "xo && ava test.js test-buffer.js && echo unicorns | node test-real.js" + }, + "version": "6.0.0" +} diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json index a78fba1fb..f74baa683 100644 --- a/node_modules/get-stream/package.json +++ b/node_modules/get-stream/package.json @@ -1,24 +1,58 @@ { - "name": "get-stream", - "version": "4.1.0", - "description": "Get a stream as a string, buffer, or array", - "license": "MIT", - "repository": "sindresorhus/get-stream", + "_args": [ + [ + "get-stream@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "get-stream@4.1.0", + "_id": "get-stream@4.1.0", + "_inBundle": false, + "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stream@4.1.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": { + "pump": "^3.0.0" + }, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "buffer-stream.js" ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", "keywords": [ "get", "stream", @@ -35,12 +69,14 @@ "array", "object" ], - "dependencies": { - "pump": "^3.0.0" + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" }, - "devDependencies": { - "ava": "*", - "into-stream": "^3.0.0", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json index d7f8b7f28..000906c4a 100644 --- a/node_modules/glob-parent/package.json +++ b/node_modules/glob-parent/package.json @@ -1,32 +1,57 @@ { - "name": "glob-parent", - "version": "5.1.1", - "description": "Extract the non-magic parent path from a glob string.", - "author": "Gulp Team (https://gulpjs.com/)", + "_args": [ + [ + "glob-parent@5.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "glob-parent@5.1.1", + "_id": "glob-parent@5.1.1", + "_inBundle": false, + "_integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "_location": "/glob-parent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "glob-parent@5.1.1", + "name": "glob-parent", + "escapedName": "glob-parent", + "rawSpec": "5.1.1", + "saveSpec": null, + "fetchSpec": "5.1.1" + }, + "_requiredBy": [ + "/chokidar", + "/eslint", + "/fast-glob" + ], + "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "_spec": "5.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "https://gulpjs.com/" + }, + "bugs": { + "url": "https://github.com/gulpjs/glob-parent/issues" + }, "contributors": [ - "Elan Shanker (https://github.com/es128)", - "Blaine Bublitz " + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + } ], - "repository": "gulpjs/glob-parent", - "license": "ISC", - "engines": { - "node": ">= 6" - }, - "main": "index.js", - "files": [ - "LICENSE", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only", - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, "dependencies": { "is-glob": "^4.0.1" }, + "description": "Extract the non-magic parent path from a glob string.", "devDependencies": { "coveralls": "^3.0.11", "eslint": "^2.13.1", @@ -35,6 +60,14 @@ "mocha": "^6.0.2", "nyc": "^13.3.0" }, + "engines": { + "node": ">= 6" + }, + "files": [ + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/gulpjs/glob-parent#readme", "keywords": [ "glob", "parent", @@ -44,5 +77,20 @@ "directory", "base", "wildcard" - ] -} \ No newline at end of file + ], + "license": "ISC", + "main": "index.js", + "name": "glob-parent", + "repository": { + "type": "git", + "url": "git+https://github.com/gulpjs/glob-parent.git" + }, + "scripts": { + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" + }, + "version": "5.1.1" +} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json index dbfa78ee8..6455c6c8a 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -1,20 +1,42 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "glob", - "description": "a little globber", - "version": "7.1.6", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" + "_args": [ + [ + "glob@7.1.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": "*" + "_development": true, + "_from": "glob@7.1.6", + "_id": "glob@7.1.6", + "_inBundle": false, + "_integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "_location": "/glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "glob@7.1.6", + "name": "glob", + "escapedName": "glob", + "rawSpec": "7.1.6", + "saveSpec": null, + "fetchSpec": "7.1.6" + }, + "_requiredBy": [ + "/del/globby", + "/flat-cache/rimraf", + "/rimraf" + ], + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "_spec": "7.1.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" }, "dependencies": { "fs.realpath": "^1.0.0", @@ -24,23 +46,40 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, + "description": "a little globber", "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", "tap": "^12.0.1", "tick": "0.0.6" }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "node benchclean.js" + "engines": { + "node": "*" }, - "license": "ISC", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], "funding": { "url": "https://github.com/sponsors/isaacs" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "license": "ISC", + "main": "glob.js", + "name": "glob", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "bench": "bash benchmark.sh", + "benchclean": "node benchclean.js", + "prepublish": "npm run benchclean", + "prof": "bash prof.sh && cat profile.txt", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + }, + "version": "7.1.6" +} diff --git a/node_modules/global-dirs/package.json b/node_modules/global-dirs/package.json index 1f11cd0f6..df292df52 100644 --- a/node_modules/global-dirs/package.json +++ b/node_modules/global-dirs/package.json @@ -1,24 +1,60 @@ { - "name": "global-dirs", - "version": "2.0.1", - "description": "Get the directory of globally installed packages and binaries", - "license": "MIT", - "repository": "sindresorhus/global-dirs", + "_args": [ + [ + "global-dirs@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "global-dirs@2.0.1", + "_id": "global-dirs@2.0.1", + "_inBundle": false, + "_integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "_location": "/global-dirs", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "global-dirs@2.0.1", + "name": "global-dirs", + "escapedName": "global-dirs", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/is-installed-globally" + ], + "_resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/global-dirs/issues" + }, + "dependencies": { + "ini": "^1.3.5" + }, + "description": "Get the directory of globally installed packages and binaries", + "devDependencies": { + "ava": "^2.4.0", + "execa": "^3.2.0", + "import-fresh": "^3.1.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/global-dirs#readme", "keywords": [ "global", "prefix", @@ -42,14 +78,14 @@ "root", "resolve" ], - "dependencies": { - "ini": "^1.3.5" + "license": "MIT", + "name": "global-dirs", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/global-dirs.git" }, - "devDependencies": { - "ava": "^2.4.0", - "execa": "^3.2.0", - "import-fresh": "^3.1.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.1" +} diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json index eeeced780..9c83a3f05 100644 --- a/node_modules/globals/package.json +++ b/node_modules/globals/package.json @@ -1,26 +1,61 @@ { - "name": "globals", - "version": "12.4.0", - "description": "Global identifiers from different JavaScript environments", - "license": "MIT", - "repository": "sindresorhus/globals", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "globals@12.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "globals@12.4.0", + "_id": "globals@12.4.0", + "_inBundle": false, + "_integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "_location": "/globals", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "globals@12.4.0", + "name": "globals", + "escapedName": "globals", + "rawSpec": "12.4.0", + "saveSpec": null, + "fetchSpec": "12.4.0" + }, + "_requiredBy": [ + "/@eslint/eslintrc", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "_spec": "12.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/globals/issues" + }, + "dependencies": { + "type-fest": "^0.8.1" + }, + "description": "Global identifiers from different JavaScript environments", + "devDependencies": { + "ava": "^2.2.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "index.d.ts", "globals.json" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/globals#readme", "keywords": [ "globals", "global", @@ -31,22 +66,24 @@ "eslint", "environments" ], - "dependencies": { - "type-fest": "^0.8.1" + "license": "MIT", + "name": "globals", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/globals.git" }, - "devDependencies": { - "ava": "^2.2.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - }, - "xo": { - "ignores": [ - "get-browser-globals.js" - ] + "scripts": { + "test": "xo && ava" }, "tsd": { "compilerOptions": { "resolveJsonModule": true } + }, + "version": "12.4.0", + "xo": { + "ignores": [ + "get-browser-globals.js" + ] } -} \ No newline at end of file +} diff --git a/node_modules/globby/package.json b/node_modules/globby/package.json index 08a3b169d..18b43b2ea 100644 --- a/node_modules/globby/package.json +++ b/node_modules/globby/package.json @@ -1,28 +1,71 @@ { - "name": "globby", - "version": "11.0.0", - "description": "User-friendly glob matching", - "license": "MIT", - "repository": "sindresorhus/globby", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "globby@11.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "globby@11.0.0", + "_id": "globby@11.0.0", + "_inBundle": false, + "_integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==", + "_location": "/globby", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "globby@11.0.0", + "name": "globby", + "escapedName": "globby", + "rawSpec": "11.0.0", + "saveSpec": null, + "fetchSpec": "11.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz", + "_spec": "11.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/globby/issues" + }, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "description": "User-friendly glob matching", + "devDependencies": { + "ava": "^2.1.0", + "get-stream": "^5.1.0", + "glob-stream": "^6.1.0", + "globby": "github:sindresorhus/globby#master", + "matcha": "^0.7.0", + "rimraf": "^3.0.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=10" }, - "scripts": { - "bench": "npm update glob-stream fast-glob && matcha bench.js", - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "gitignore.js", "stream-utils.js" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/globby#readme", "keywords": [ "all", "array", @@ -56,27 +99,20 @@ "gitignore", "git" ], - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" + "license": "MIT", + "name": "globby", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/globby.git" }, - "devDependencies": { - "ava": "^2.1.0", - "get-stream": "^5.1.0", - "glob-stream": "^6.1.0", - "globby": "sindresorhus/globby#master", - "matcha": "^0.7.0", - "rimraf": "^3.0.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" + "scripts": { + "bench": "npm update glob-stream fast-glob && matcha bench.js", + "test": "xo && ava && tsd" }, + "version": "11.0.0", "xo": { "ignores": [ "fixtures" ] } -} \ No newline at end of file +} diff --git a/node_modules/got/package.json b/node_modules/got/package.json index 28c396adb..46bd5c227 100644 --- a/node_modules/got/package.json +++ b/node_modules/got/package.json @@ -1,38 +1,43 @@ { - "name": "got", - "version": "9.6.0", - "description": "Simplified HTTP requests", - "license": "MIT", - "repository": "sindresorhus/got", - "main": "source", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "test": "xo && nyc ava", - "release": "np" - }, - "files": [ - "source" + "_args": [ + [ + "got@9.6.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "keywords": [ - "http", - "https", - "get", - "got", - "url", - "uri", - "request", - "util", - "utility", - "simple", - "curl", - "wget", - "fetch", - "net", - "network", - "electron" + "_development": true, + "_from": "got@9.6.0", + "_id": "got@9.6.0", + "_inBundle": false, + "_integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "_location": "/got", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "got@9.6.0", + "name": "got", + "escapedName": "got", + "rawSpec": "9.6.0", + "saveSpec": null, + "fetchSpec": "9.6.0" + }, + "_requiredBy": [ + "/package-json" ], + "_resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "_spec": "9.6.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "ava": { + "concurrency": 4 + }, + "browser": { + "decompress-response": false, + "electron": false + }, + "bugs": { + "url": "https://github.com/sindresorhus/got/issues" + }, "dependencies": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -46,6 +51,7 @@ "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" }, + "description": "Simplified HTTP requests", "devDependencies": { "ava": "^1.1.0", "coveralls": "^3.0.0", @@ -64,11 +70,41 @@ "tough-cookie": "^3.0.0", "xo": "^0.24.0" }, - "ava": { - "concurrency": 4 + "engines": { + "node": ">=8.6" }, - "browser": { - "decompress-response": false, - "electron": false - } -} \ No newline at end of file + "files": [ + "source" + ], + "homepage": "https://github.com/sindresorhus/got#readme", + "keywords": [ + "http", + "https", + "get", + "got", + "url", + "uri", + "request", + "util", + "utility", + "simple", + "curl", + "wget", + "fetch", + "net", + "network", + "electron" + ], + "license": "MIT", + "main": "source", + "name": "got", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/got.git" + }, + "scripts": { + "release": "np", + "test": "xo && nyc ava" + }, + "version": "9.6.0" +} diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json index 77a29b3da..b87f7d2df 100644 --- a/node_modules/graceful-fs/package.json +++ b/node_modules/graceful-fs/package.json @@ -1,21 +1,58 @@ { - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.3", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-graceful-fs" + "_args": [ + [ + "graceful-fs@4.2.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "graceful-fs@4.2.3", + "_id": "graceful-fs@4.2.3", + "_inBundle": false, + "_integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "_location": "/graceful-fs", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "graceful-fs@4.2.3", + "name": "graceful-fs", + "escapedName": "graceful-fs", + "rawSpec": "4.2.3", + "saveSpec": null, + "fetchSpec": "4.2.3" + }, + "_requiredBy": [ + "/configstore", + "/del", + "/load-json-file", + "/read-pkg-up/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "_spec": "4.2.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "dependencies": {}, + "description": "A drop-in replacement for fs, making various improvements.", + "devDependencies": { + "import-fresh": "^2.0.0", + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^12.7.0" }, - "main": "graceful-fs.js", "directories": { "test": "test" }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "test": "node test.js | tap -" - }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js", + "clone.js" + ], + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", "keywords": [ "fs", "module", @@ -33,18 +70,17 @@ "EACCESS" ], "license": "ISC", - "devDependencies": { - "import-fresh": "^2.0.0", - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^12.7.0" + "main": "graceful-fs.js", + "name": "graceful-fs", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js", - "clone.js" - ], - "dependencies": {} -} \ No newline at end of file + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "node test.js | tap -" + }, + "version": "4.2.3" +} diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json index ff188fa37..a2a05f7aa 100644 --- a/node_modules/has-flag/package.json +++ b/node_modules/has-flag/package.json @@ -1,23 +1,53 @@ { - "name": "has-flag", - "version": "3.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", + "_args": [ + [ + "has-flag@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-flag@3.0.0", + "_id": "has-flag@3.0.0", + "_inBundle": false, + "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "_location": "/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-flag@3.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", "keywords": [ "has", "check", @@ -37,8 +67,14 @@ "minimist", "optimist" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json index 29a9176e5..eb12e3449 100644 --- a/node_modules/has-symbols/package.json +++ b/node_modules/has-symbols/package.json @@ -1,13 +1,51 @@ { - "name": "has-symbols", - "version": "1.0.1", + "_args": [ + [ + "has-symbols@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-symbols@1.0.1", + "_id": "has-symbols@1.0.1", + "_inBundle": false, + "_integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "_location": "/has-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-symbols@1.0.1", + "name": "has-symbols", + "escapedName": "has-symbols", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/es-abstract", + "/is-regex", + "/is-symbol", + "/object.assign", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" }, "contributors": [ { @@ -16,28 +54,24 @@ "url": "http://ljharb.codes" } ], + "dependencies": {}, "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npx aud", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", - "test:stock": "node test", - "test:staging": "node --harmony --es-staging test", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", - "lint": "eslint *.js", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + "devDependencies": { + "@ljharb/eslint-config": "^15.0.1", + "auto-changelog": "^1.16.2", + "core-js": "^2.6.10", + "eslint": "^6.6.0", + "get-own-property-symbols": "^0.9.4", + "safe-publish-latest": "^1.1.4", + "tape": "^4.11.0" }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/has-symbols.git" + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", "keywords": [ "Symbol", "symbols", @@ -48,15 +82,27 @@ "core-js", "ES6" ], - "dependencies": {}, - "devDependencies": { - "@ljharb/eslint-config": "^15.0.1", - "auto-changelog": "^1.16.2", - "core-js": "^2.6.10", - "eslint": "^6.6.0", - "get-own-property-symbols": "^0.9.4", - "safe-publish-latest": "^1.1.4", - "tape": "^4.11.0" + "license": "MIT", + "main": "index.js", + "name": "has-symbols", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/has-symbols.git" + }, + "scripts": { + "lint": "eslint *.js", + "posttest": "npx aud", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", + "test:staging": "node --harmony --es-staging test", + "test:stock": "node test", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", + "version": "auto-changelog && git add CHANGELOG.md" }, "testling": { "files": "test/index.js", @@ -76,14 +122,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - } -} \ No newline at end of file + "version": "1.0.1" +} diff --git a/node_modules/has-yarn/package.json b/node_modules/has-yarn/package.json index fcadde721..0a8c256a6 100644 --- a/node_modules/has-yarn/package.json +++ b/node_modules/has-yarn/package.json @@ -1,24 +1,55 @@ { - "name": "has-yarn", - "version": "2.1.0", - "description": "Check if a project is using Yarn", - "license": "MIT", - "repository": "sindresorhus/has-yarn", + "_args": [ + [ + "has-yarn@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-yarn@2.1.0", + "_id": "has-yarn@2.1.0", + "_inBundle": false, + "_integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "_location": "/has-yarn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-yarn@2.1.0", + "name": "has-yarn", + "escapedName": "has-yarn", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-yarn/issues" + }, + "description": "Check if a project is using Yarn", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/has-yarn#readme", "keywords": [ "yarn", "has", @@ -31,9 +62,14 @@ "manager", "npm" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-yarn", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-yarn.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/has/package.json b/node_modules/has/package.json index bee8485c0..85c7c5b5a 100644 --- a/node_modules/has/package.json +++ b/node_modules/has/package.json @@ -1,12 +1,43 @@ { - "name": "has", - "description": "Object.prototype.hasOwnProperty.call shortcut", - "version": "1.0.3", - "homepage": "https://github.com/tarruda/has", + "_args": [ + [ + "has@1.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has@1.0.3", + "_id": "has@1.0.3", + "_inBundle": false, + "_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "_location": "/has", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has@1.0.3", + "name": "has", + "escapedName": "has", + "rawSpec": "1.0.3", + "saveSpec": null, + "fetchSpec": "1.0.3" + }, + "_requiredBy": [ + "/es-abstract", + "/eslint-plugin-import", + "/object.assign/es-abstract", + "/object.values" + ], + "_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "_spec": "1.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Thiago de Arruda", "email": "tpadilha84@gmail.com" }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, "contributors": [ { "name": "Jordan Harband", @@ -14,24 +45,10 @@ "url": "http://ljharb.codes" } ], - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src", "dependencies": { "function-bind": "^1.1.1" }, + "description": "Object.prototype.hasOwnProperty.call shortcut", "devDependencies": { "@ljharb/eslint-config": "^12.2.1", "eslint": "^4.19.1", @@ -40,9 +57,24 @@ "engines": { "node": ">= 0.4.0" }, + "homepage": "https://github.com/tarruda/has", + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "name": "has", + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, "scripts": { "lint": "eslint .", "pretest": "npm run lint", "test": "tape test" - } -} \ No newline at end of file + }, + "version": "1.0.3" +} diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index 3ff3c095e..bd78546db 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,32 +1,42 @@ { - "name": "hosted-git-info", - "version": "2.8.8", - "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/hosted-git-info.git" - }, - "keywords": [ - "git", - "github", - "bitbucket", - "gitlab" + "_args": [ + [ + "hosted-git-info@2.8.8", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Rebecca Turner (http://re-becca.org)", - "license": "ISC", + "_development": true, + "_from": "hosted-git-info@2.8.8", + "_id": "hosted-git-info@2.8.8", + "_inBundle": false, + "_integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "_location": "/hosted-git-info", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "hosted-git-info@2.8.8", + "name": "hosted-git-info", + "escapedName": "hosted-git-info", + "rawSpec": "2.8.8", + "saveSpec": null, + "fetchSpec": "2.8.8" + }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "_spec": "2.8.8", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, "bugs": { "url": "https://github.com/npm/hosted-git-info/issues" }, - "homepage": "https://github.com/npm/hosted-git-info", - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", - "posttest": "standard", - "release": "standard-version -s", - "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", - "test": "tap -J --coverage=90 --no-esm test/*.js" - }, + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { "standard": "^11.0.1", "standard-version": "^4.4.0", @@ -36,5 +46,28 @@ "index.js", "git-host.js", "git-host-info.js" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/npm/hosted-git-info", + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "license": "ISC", + "main": "index.js", + "name": "hosted-git-info", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "scripts": { + "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", + "posttest": "standard", + "prerelease": "npm t", + "release": "standard-version -s", + "test": "tap -J --coverage=90 --no-esm test/*.js", + "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js" + }, + "version": "2.8.8" +} diff --git a/node_modules/http-cache-semantics/package.json b/node_modules/http-cache-semantics/package.json index 125b72b51..1f5566f05 100644 --- a/node_modules/http-cache-semantics/package.json +++ b/node_modules/http-cache-semantics/package.json @@ -1,17 +1,42 @@ { - "name": "http-cache-semantics", - "version": "4.1.0", - "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", - "repository": "https://github.com/kornelski/http-cache-semantics.git", - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" + "_args": [ + [ + "http-cache-semantics@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Kornel Lesiński (https://kornel.ski/)", - "license": "BSD-2-Clause", + "_development": true, + "_from": "http-cache-semantics@4.1.0", + "_id": "http-cache-semantics@4.1.0", + "_inBundle": false, + "_integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "_location": "/http-cache-semantics", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "http-cache-semantics@4.1.0", + "name": "http-cache-semantics", + "escapedName": "http-cache-semantics", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Kornel Lesiński", + "email": "kornel@geekhood.net", + "url": "https://kornel.ski/" + }, + "bugs": { + "url": "https://github.com/kornelski/http-cache-semantics/issues" + }, + "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", "devDependencies": { "eslint": "^5.13.0", "eslint-plugin-prettier": "^3.0.1", @@ -20,5 +45,20 @@ "mocha": "^5.1.0", "prettier": "^1.14.3", "prettier-eslint-cli": "^4.7.1" - } -} \ No newline at end of file + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kornelski/http-cache-semantics#readme", + "license": "BSD-2-Clause", + "main": "index.js", + "name": "http-cache-semantics", + "repository": { + "type": "git", + "url": "git+https://github.com/kornelski/http-cache-semantics.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "4.1.0" +} diff --git a/node_modules/ignore-by-default/package.json b/node_modules/ignore-by-default/package.json index 30225ada3..a1c074b93 100644 --- a/node_modules/ignore-by-default/package.json +++ b/node_modules/ignore-by-default/package.json @@ -1,18 +1,49 @@ { - "name": "ignore-by-default", - "version": "1.0.1", + "_args": [ + [ + "ignore-by-default@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ignore-by-default@1.0.1", + "_id": "ignore-by-default@1.0.1", + "_inBundle": false, + "_integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "_location": "/ignore-by-default", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ignore-by-default@1.0.1", + "name": "ignore-by-default", + "escapedName": "ignore-by-default", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net/" + }, + "bugs": { + "url": "https://github.com/novemberborn/ignore-by-default/issues" + }, "description": "A list of directories you should ignore by default", - "main": "index.js", + "devDependencies": { + "figures": "^1.4.0", + "standard": "^6.0.4" + }, "files": [ "index.js" ], - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/novemberborn/ignore-by-default.git" - }, + "homepage": "https://github.com/novemberborn/ignore-by-default#readme", "keywords": [ "ignore", "chokidar", @@ -21,14 +52,15 @@ "glob", "pattern" ], - "author": "Mark Wubben (https://novemberborn.net/)", "license": "ISC", - "bugs": { - "url": "https://github.com/novemberborn/ignore-by-default/issues" + "main": "index.js", + "name": "ignore-by-default", + "repository": { + "type": "git", + "url": "git+https://github.com/novemberborn/ignore-by-default.git" }, - "homepage": "https://github.com/novemberborn/ignore-by-default#readme", - "devDependencies": { - "figures": "^1.4.0", - "standard": "^6.0.4" - } -} \ No newline at end of file + "scripts": { + "test": "standard && node test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/ignore/package.json b/node_modules/ignore/package.json index fe7029497..dfad81e73 100644 --- a/node_modules/ignore/package.json +++ b/node_modules/ignore/package.json @@ -1,52 +1,43 @@ { - "name": "ignore", - "version": "5.1.4", - "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", - "files": [ - "legacy.js", - "index.js", - "index.d.ts", - "LICENSE-MIT" + "_args": [ + [ + "ignore@5.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepublishOnly": "npm run build", - "build": "babel -o legacy.js index.js", - "test:lint": "eslint .", - "test:tsc": "tsc ./test/ts/simple.ts --lib ES6", - "test:ts": "node ./test/ts/simple.js", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js", - "test:others": "tap test/others.js", - "test:cases": "tap test/*.js --coverage", - "test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases", - "test": "npm run test:only", - "test:win32": "IGNORE_TEST_WIN32=1 npm run test", - "posttest": "tap --coverage-report=html && codecov" + "_development": true, + "_from": "ignore@5.1.4", + "_id": "ignore@5.1.4", + "_inBundle": false, + "_integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "_location": "/ignore", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ignore@5.1.4", + "name": "ignore", + "escapedName": "ignore", + "rawSpec": "5.1.4", + "saveSpec": null, + "fetchSpec": "5.1.4" }, - "repository": { - "type": "git", - "url": "git@github.com:kaelzhang/node-ignore.git" - }, - "keywords": [ - "ignore", - ".gitignore", - "gitignore", - "npmignore", - "rules", - "manager", - "filter", - "regexp", - "regex", - "fnmatch", - "glob", - "asterisks", - "regular-expression" + "_requiredBy": [ + "/@typescript-eslint/typescript-estree/globby", + "/del/globby", + "/eslint-plugin-eslint-comments", + "/globby" ], - "author": "kael", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "_spec": "5.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "kael" + }, "bugs": { "url": "https://github.com/kaelzhang/node-ignore/issues" }, + "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", "devDependencies": { "@babel/cli": "^7.5.5", "@babel/core": "^7.5.5", @@ -66,5 +57,49 @@ }, "engines": { "node": ">= 4" - } -} \ No newline at end of file + }, + "files": [ + "legacy.js", + "index.js", + "index.d.ts", + "LICENSE-MIT" + ], + "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "keywords": [ + "ignore", + ".gitignore", + "gitignore", + "npmignore", + "rules", + "manager", + "filter", + "regexp", + "regex", + "fnmatch", + "glob", + "asterisks", + "regular-expression" + ], + "license": "MIT", + "name": "ignore", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" + }, + "scripts": { + "build": "babel -o legacy.js index.js", + "posttest": "tap --coverage-report=html && codecov", + "prepublishOnly": "npm run build", + "test": "npm run test:only", + "test:cases": "tap test/*.js --coverage", + "test:git": "tap test/git-check-ignore.js", + "test:ignore": "tap test/ignore.js", + "test:lint": "eslint .", + "test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases", + "test:others": "tap test/others.js", + "test:ts": "node ./test/ts/simple.js", + "test:tsc": "tsc ./test/ts/simple.ts --lib ES6", + "test:win32": "IGNORE_TEST_WIN32=1 npm run test" + }, + "version": "5.1.4" +} diff --git a/node_modules/import-fresh/node_modules/resolve-from/package.json b/node_modules/import-fresh/node_modules/resolve-from/package.json index 65f1e2bcb..035411a71 100644 --- a/node_modules/import-fresh/node_modules/resolve-from/package.json +++ b/node_modules/import-fresh/node_modules/resolve-from/package.json @@ -1,23 +1,53 @@ { - "name": "resolve-from", - "version": "4.0.0", - "description": "Resolve the path of a module like `require.resolve()` but from a given path", - "license": "MIT", - "repository": "sindresorhus/resolve-from", + "_args": [ + [ + "resolve-from@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "resolve-from@4.0.0", + "_id": "resolve-from@4.0.0", + "_inBundle": false, + "_integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "_location": "/import-fresh/resolve-from", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "resolve-from@4.0.0", + "name": "resolve-from", + "escapedName": "resolve-from", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/import-fresh" + ], + "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/resolve-from/issues" + }, + "description": "Resolve the path of a module like `require.resolve()` but from a given path", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/resolve-from#readme", "keywords": [ "require", "resolve", @@ -27,8 +57,14 @@ "like", "import" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "resolve-from", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/resolve-from.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/node_modules/import-fresh/package.json b/node_modules/import-fresh/package.json index d33a99e07..4aa01c1ba 100644 --- a/node_modules/import-fresh/package.json +++ b/node_modules/import-fresh/package.json @@ -1,25 +1,61 @@ { - "name": "import-fresh", - "version": "3.2.1", - "description": "Import a module while bypassing the cache", - "license": "MIT", - "repository": "sindresorhus/import-fresh", + "_args": [ + [ + "import-fresh@3.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "import-fresh@3.2.1", + "_id": "import-fresh@3.2.1", + "_inBundle": false, + "_integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "_location": "/import-fresh", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "import-fresh@3.2.1", + "name": "import-fresh", + "escapedName": "import-fresh", + "rawSpec": "3.2.1", + "saveSpec": null, + "fetchSpec": "3.2.1" + }, + "_requiredBy": [ + "/@eslint/eslintrc", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "_spec": "3.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/import-fresh/issues" + }, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "description": "Import a module while bypassing the cache", + "devDependencies": { + "ava": "^1.0.1", + "heapdump": "^0.3.12", + "tsd": "^0.7.3", + "xo": "^0.23.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd", - "heapdump": "node heapdump.js" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/import-fresh#readme", "keywords": [ "require", "cache", @@ -29,14 +65,15 @@ "fresh", "bypass" ], - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "license": "MIT", + "name": "import-fresh", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/import-fresh.git" }, - "devDependencies": { - "ava": "^1.0.1", - "heapdump": "^0.3.12", - "tsd": "^0.7.3", - "xo": "^0.23.0" - } -} \ No newline at end of file + "scripts": { + "heapdump": "node heapdump.js", + "test": "xo && ava && tsd" + }, + "version": "3.2.1" +} diff --git a/node_modules/import-lazy/package.json b/node_modules/import-lazy/package.json index 8cca7bba1..abc2f85f3 100644 --- a/node_modules/import-lazy/package.json +++ b/node_modules/import-lazy/package.json @@ -1,29 +1,59 @@ { - "name": "import-lazy", - "version": "2.1.0", - "description": "Import modules lazily", - "license": "MIT", - "repository": "sindresorhus/import-lazy", + "_args": [ + [ + "import-lazy@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "import-lazy@2.1.0", + "_id": "import-lazy@2.1.0", + "_inBundle": false, + "_integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "_location": "/import-lazy", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "import-lazy@2.1.0", + "name": "import-lazy", + "escapedName": "import-lazy", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/import-lazy/issues" + }, "contributors": [ { "name": "Jorge Bucaran", "email": "jbucaran@me.com" } ], + "description": "Import modules lazily", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/import-lazy#readme", "keywords": [ "import", "require", @@ -37,8 +67,14 @@ "proxy", "proxies" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "import-lazy", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/import-lazy.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/node_modules/import-local/package.json b/node_modules/import-local/package.json index c07a5c4be..3cf4a74a7 100644 --- a/node_modules/import-local/package.json +++ b/node_modules/import-local/package.json @@ -1,9 +1,33 @@ { - "name": "import-local", - "version": "3.0.2", - "description": "Let a globally installed package use a locally installed version of itself if available", - "license": "MIT", - "repository": "sindresorhus/import-local", + "_args": [ + [ + "import-local@3.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "import-local@3.0.2", + "_id": "import-local@3.0.2", + "_inBundle": false, + "_integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "_location": "/import-local", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "import-local@3.0.2", + "name": "import-local", + "escapedName": "import-local", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -12,16 +36,29 @@ "bin": { "import-local-fixture": "fixtures/cli.js" }, + "bugs": { + "url": "https://github.com/sindresorhus/import-local/issues" + }, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "description": "Let a globally installed package use a locally installed version of itself if available", + "devDependencies": { + "ava": "2.1.0", + "cpy": "^7.0.1", + "del": "^4.1.1", + "execa": "^2.0.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "fixtures/cli.js" ], + "homepage": "https://github.com/sindresorhus/import-local#readme", "keywords": [ "import", "local", @@ -32,20 +69,19 @@ "prefer", "cli" ], - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" + "license": "MIT", + "name": "import-local", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/import-local.git" }, - "devDependencies": { - "ava": "2.1.0", - "cpy": "^7.0.1", - "del": "^4.1.1", - "execa": "^2.0.1", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava" }, + "version": "3.0.2", "xo": { "ignores": [ "fixtures" ] } -} \ No newline at end of file +} diff --git a/node_modules/imurmurhash/package.json b/node_modules/imurmurhash/package.json index 1e91c12bd..8f26c4879 100644 --- a/node_modules/imurmurhash/package.json +++ b/node_modules/imurmurhash/package.json @@ -1,22 +1,55 @@ { - "name": "imurmurhash", - "version": "0.1.4", + "_args": [ + [ + "imurmurhash@0.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "imurmurhash@0.1.4", + "_id": "imurmurhash@0.1.4", + "_inBundle": false, + "_integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "_location": "/imurmurhash", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "imurmurhash@0.1.4", + "name": "imurmurhash", + "escapedName": "imurmurhash", + "rawSpec": "0.1.4", + "saveSpec": null, + "fetchSpec": "0.1.4" + }, + "_requiredBy": [ + "/eslint", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "_spec": "0.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "dependencies": {}, "description": "An incremental implementation of MurmurHash3", - "homepage": "https://github.com/jensyt/imurmurhash-js", - "main": "imurmurhash.js", + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, "files": [ "imurmurhash.js", "imurmurhash.min.js", "package.json", "README.md" ], - "repository": { - "type": "git", - "url": "https://github.com/jensyt/imurmurhash-js" - }, - "bugs": { - "url": "https://github.com/jensyt/imurmurhash-js/issues" - }, + "homepage": "https://github.com/jensyt/imurmurhash-js", "keywords": [ "murmur", "murmurhash", @@ -24,15 +57,12 @@ "hash", "incremental" ], - "author": { - "name": "Jens Taylor", - "email": "jensyt@gmail.com", - "url": "https://github.com/homebrewing" - }, "license": "MIT", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": ">=0.8.19" - } -} \ No newline at end of file + "main": "imurmurhash.js", + "name": "imurmurhash", + "repository": { + "type": "git", + "url": "git+https://github.com/jensyt/imurmurhash-js.git" + }, + "version": "0.1.4" +} diff --git a/node_modules/indent-string/package.json b/node_modules/indent-string/package.json index 5db5db01a..d6113de22 100644 --- a/node_modules/indent-string/package.json +++ b/node_modules/indent-string/package.json @@ -1,24 +1,56 @@ { - "name": "indent-string", - "version": "4.0.0", - "description": "Indent each line in a string", - "license": "MIT", - "repository": "sindresorhus/indent-string", + "_args": [ + [ + "indent-string@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "indent-string@4.0.0", + "_id": "indent-string@4.0.0", + "_inBundle": false, + "_integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "_location": "/indent-string", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "indent-string@4.0.0", + "name": "indent-string", + "escapedName": "indent-string", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/aggregate-error", + "/ava" + ], + "_resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/indent-string/issues" + }, + "description": "Indent each line in a string", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/indent-string#readme", "keywords": [ "indent", "string", @@ -29,9 +61,14 @@ "each", "every" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "indent-string", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/indent-string.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json index b7095d05d..c05751795 100644 --- a/node_modules/inflight/package.json +++ b/node_modules/inflight/package.json @@ -1,29 +1,62 @@ { - "name": "inflight", - "version": "1.0.6", - "description": "Add callbacks to requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" + "_args": [ + [ + "inflight@1.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "inflight@1.0.6", + "_id": "inflight@1.0.6", + "_inBundle": false, + "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "_location": "/inflight", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "inflight@1.0.6", + "name": "inflight", + "escapedName": "inflight", + "rawSpec": "1.0.6", + "saveSpec": null, + "fetchSpec": "1.0.6" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "_spec": "1.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, "dependencies": { "once": "^1.3.0", "wrappy": "1" }, + "description": "Add callbacks to requests in flight to avoid async duplication", "devDependencies": { "tap": "^7.1.2" }, + "files": [ + "inflight.js" + ], + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "main": "inflight.js", + "name": "inflight", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/inflight.git" + }, "scripts": { "test": "tap test.js --100" }, - "repository": { - "type": "git", - "url": "https://github.com/npm/inflight.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC" -} \ No newline at end of file + "version": "1.0.6" +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json index 47220feb9..ac812b045 100644 --- a/node_modules/inherits/package.json +++ b/node_modules/inherits/package.json @@ -1,7 +1,46 @@ { - "name": "inherits", + "_args": [ + [ + "inherits@2.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "inherits@2.0.3", + "_id": "inherits@2.0.3", + "_inBundle": false, + "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "_location": "/inherits", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "inherits@2.0.3", + "name": "inherits", + "escapedName": "inherits", + "rawSpec": "2.0.3", + "saveSpec": null, + "fetchSpec": "2.0.3" + }, + "_requiredBy": [ + "/glob", + "/util" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_spec": "2.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.3", + "devDependencies": { + "tap": "^7.1.0" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "homepage": "https://github.com/isaacs/inherits#readme", "keywords": [ "inheritance", "class", @@ -12,18 +51,15 @@ "browser", "browserify" ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": "git://github.com/isaacs/inherits", "license": "ISC", + "main": "./inherits.js", + "name": "inherits", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, "scripts": { "test": "node test" }, - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ] -} \ No newline at end of file + "version": "2.0.3" +} diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json index 49027d955..19096fddc 100644 --- a/node_modules/ini/package.json +++ b/node_modules/ini/package.json @@ -1,30 +1,68 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "ini", - "description": "An ini encoder/decoder for node", - "version": "1.3.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/ini.git" + "_args": [ + [ + "ini@1.3.5", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ini@1.3.5", + "_id": "ini@1.3.5", + "_inBundle": false, + "_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "_location": "/ini", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ini@1.3.5", + "name": "ini", + "escapedName": "ini", + "rawSpec": "1.3.5", + "saveSpec": null, + "fetchSpec": "1.3.5" }, - "main": "ini.js", - "scripts": { - "pretest": "standard ini.js", - "test": "tap test/*.js --100 -J", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "_requiredBy": [ + "/global-dirs", + "/rc" + ], + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "_spec": "1.3.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" }, - "engines": { - "node": "*" + "bugs": { + "url": "https://github.com/isaacs/ini/issues" }, "dependencies": {}, + "description": "An ini encoder/decoder for node", "devDependencies": { "standard": "^10.0.3", "tap": "^10.7.3 || 11" }, - "license": "ISC", + "engines": { + "node": "*" + }, "files": [ "ini.js" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/isaacs/ini#readme", + "license": "ISC", + "main": "ini.js", + "name": "ini", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "pretest": "standard ini.js", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "1.3.5" +} diff --git a/node_modules/ip-regex/index.js b/node_modules/ip-regex/index.js new file mode 100644 index 000000000..973e5f41c --- /dev/null +++ b/node_modules/ip-regex/index.js @@ -0,0 +1,24 @@ +'use strict'; + +const v4 = '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}'; + +const v6seg = '[0-9a-fA-F]{1,4}'; +const v6 = ` +( +(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +)(%[0-9a-zA-Z]{1,})? // %eth0 %1 +`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); + +const ip = module.exports = opts => opts && opts.exact ? + new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) : + new RegExp(`(?:${v4})|(?:${v6})`, 'g'); + +ip.v4 = opts => opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, 'g'); +ip.v6 = opts => opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, 'g'); diff --git a/node_modules/ip-regex/license b/node_modules/ip-regex/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/ip-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ip-regex/package.json b/node_modules/ip-regex/package.json new file mode 100644 index 000000000..c3dee670b --- /dev/null +++ b/node_modules/ip-regex/package.json @@ -0,0 +1,77 @@ +{ + "_from": "ip-regex@^2.1.0", + "_id": "ip-regex@2.1.0", + "_inBundle": false, + "_integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "_location": "/ip-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ip-regex@^2.1.0", + "name": "ip-regex", + "escapedName": "ip-regex", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/tough-cookie" + ], + "_resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "_shasum": "fa78bf5d2e6913c911ce9f819ee5146bb6d844e9", + "_spec": "ip-regex@^2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/tough-cookie", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ip-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/ip-regex#readme", + "keywords": [ + "ip", + "ipv6", + "ipv4", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "text", + "pattern", + "internet", + "protocol", + "address", + "validate" + ], + "license": "MIT", + "name": "ip-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ip-regex.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/ip-regex/readme.md b/node_modules/ip-regex/readme.md new file mode 100644 index 000000000..66bc7f273 --- /dev/null +++ b/node_modules/ip-regex/readme.md @@ -0,0 +1,63 @@ +# ip-regex [![Build Status](https://travis-ci.org/sindresorhus/ip-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ip-regex) + +> Regular expression for matching IP addresses + + +## Install + +``` +$ npm install --save ip-regex +``` + + +## Usage + +```js +const ipRegex = require('ip-regex'); + +// Contains an IP address? +ipRegex().test('unicorn 192.168.0.1'); +//=> true + +// Is an IP address? +ipRegex({exact: true}).test('unicorn 192.168.0.1'); +//=> false + +ipRegex.v6({exact: true}).test('1:2:3:4:5:6:7:8'); +//=> true + +'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex()); +//=> ['192.168.0.1', '1:2:3:4:5:6:7:8'] +``` + + +## API + +### ipRegex([options]) + +Returns a regex for matching both IPv4 and IPv6. + +### ipRegex.v4([options]) + +Returns a regex for matching IPv4. + +### ipRegex.v6([options]) + +Returns a regex for matching IPv6. + +#### options.exact + +Type: `boolean`
      +Default: `false` *(Matches any IP address in a string)* + +Only match an exact string. Useful with `RegExp#test()` to check if a string is an IP address. + + +## Related + +- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/irregular-plurals/package.json b/node_modules/irregular-plurals/package.json index cf9707d52..f5120bd26 100644 --- a/node_modules/irregular-plurals/package.json +++ b/node_modules/irregular-plurals/package.json @@ -1,25 +1,56 @@ { - "name": "irregular-plurals", - "version": "3.2.0", - "description": "Map of nouns to their irregular plural form", - "license": "MIT", - "repository": "sindresorhus/irregular-plurals", + "_args": [ + [ + "irregular-plurals@3.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "irregular-plurals@3.2.0", + "_id": "irregular-plurals@3.2.0", + "_inBundle": false, + "_integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==", + "_location": "/irregular-plurals", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "irregular-plurals@3.2.0", + "name": "irregular-plurals", + "escapedName": "irregular-plurals", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/plur" + ], + "_resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/irregular-plurals/issues" + }, + "description": "Map of nouns to their irregular plural form", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "irregular-plurals.json" ], + "homepage": "https://github.com/sindresorhus/irregular-plurals#readme", "keywords": [ "word", "words", @@ -33,14 +64,19 @@ "noun", "nouns" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "license": "MIT", + "name": "irregular-plurals", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/irregular-plurals.git" + }, + "scripts": { + "test": "xo && ava && tsd" }, "tsd": { "compilerOptions": { "resolveJsonModule": true } - } -} \ No newline at end of file + }, + "version": "3.2.0" +} diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json index 47b168d29..205de763f 100644 --- a/node_modules/is-arrayish/package.json +++ b/node_modules/is-arrayish/package.json @@ -1,8 +1,50 @@ { - "name": "is-arrayish", + "_args": [ + [ + "is-arrayish@0.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-arrayish@0.2.1", + "_id": "is-arrayish@0.2.1", + "_inBundle": false, + "_integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "_location": "/is-arrayish", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-arrayish@0.2.1", + "name": "is-arrayish", + "escapedName": "is-arrayish", + "rawSpec": "0.2.1", + "saveSpec": null, + "fetchSpec": "0.2.1" + }, + "_requiredBy": [ + "/error-ex" + ], + "_resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "_spec": "0.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Qix", + "url": "http://github.com/qix-" + }, + "bugs": { + "url": "https://github.com/qix-/node-is-arrayish/issues" + }, "description": "Determines if an object can be used as an array", - "version": "0.2.1", - "author": "Qix (http://github.com/qix-)", + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.6.1" + }, + "homepage": "https://github.com/qix-/node-is-arrayish#readme", "keywords": [ "is", "array", @@ -15,20 +57,14 @@ "type" ], "license": "MIT", + "name": "is-arrayish", + "repository": { + "type": "git", + "url": "git+https://github.com/qix-/node-is-arrayish.git" + }, "scripts": { "pretest": "xo", "test": "mocha --compilers coffee:coffee-script/register" }, - "repository": { - "type": "git", - "url": "https://github.com/qix-/node-is-arrayish.git" - }, - "devDependencies": { - "coffee-script": "^1.9.3", - "coveralls": "^2.11.2", - "istanbul": "^0.3.17", - "mocha": "^2.2.5", - "should": "^7.0.1", - "xo": "^0.6.1" - } -} \ No newline at end of file + "version": "0.2.1" +} diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json index e3bdf2a7f..cd3e17ba5 100644 --- a/node_modules/is-binary-path/package.json +++ b/node_modules/is-binary-path/package.json @@ -1,24 +1,58 @@ { - "name": "is-binary-path", - "version": "2.1.0", - "description": "Check if a file path is a binary file", - "license": "MIT", - "repository": "sindresorhus/is-binary-path", + "_args": [ + [ + "is-binary-path@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-binary-path@2.1.0", + "_id": "is-binary-path@2.1.0", + "_inBundle": false, + "_integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "_location": "/is-binary-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-binary-path@2.1.0", + "name": "is-binary-path", + "escapedName": "is-binary-path", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-binary-path/issues" + }, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "description": "Check if a file path is a binary file", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-binary-path#readme", "keywords": [ "binary", "extensions", @@ -29,12 +63,14 @@ "detect", "is" ], - "dependencies": { - "binary-extensions": "^2.0.0" + "license": "MIT", + "name": "is-binary-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-binary-path.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json index 9f304ee57..4e7566008 100644 --- a/node_modules/is-buffer/package.json +++ b/node_modules/is-buffer/package.json @@ -1,7 +1,32 @@ { - "name": "is-buffer", - "description": "Determine if an object is a Buffer", - "version": "1.1.6", + "_args": [ + [ + "is-buffer@1.1.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "is-buffer@1.1.6", + "_id": "is-buffer@1.1.6", + "_inBundle": false, + "_integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "_location": "/is-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-buffer@1.1.6", + "name": "is-buffer", + "escapedName": "is-buffer", + "rawSpec": "1.1.6", + "saveSpec": null, + "fetchSpec": "1.1.6" + }, + "_requiredBy": [ + "/md5" + ], + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "_spec": "1.1.6", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", @@ -11,11 +36,13 @@ "url": "https://github.com/feross/is-buffer/issues" }, "dependencies": {}, + "description": "Determine if an object is a Buffer", "devDependencies": { "standard": "*", "tape": "^4.0.0", "zuul": "^3.0.0" }, + "homepage": "https://github.com/feross/is-buffer#readme", "keywords": [ "buffer", "buffers", @@ -35,6 +62,7 @@ ], "license": "MIT", "main": "index.js", + "name": "is-buffer", "repository": { "type": "git", "url": "git://github.com/feross/is-buffer.git" @@ -47,5 +75,6 @@ }, "testling": { "files": "test/*.js" - } -} \ No newline at end of file + }, + "version": "1.1.6" +} diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json index 937ad9352..a3f3a5abc 100644 --- a/node_modules/is-callable/package.json +++ b/node_modules/is-callable/package.json @@ -1,13 +1,42 @@ { - "name": "is-callable", - "version": "1.2.1", + "_args": [ + [ + "is-callable@1.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-callable@1.2.1", + "_id": "is-callable@1.2.1", + "_inBundle": false, + "_integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==", + "_location": "/is-callable", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-callable@1.2.1", + "name": "is-callable", + "escapedName": "is-callable", + "rawSpec": "1.2.1", + "saveSpec": null, + "fetchSpec": "1.2.1" + }, + "_requiredBy": [ + "/es-abstract", + "/es-to-primitive", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", + "_spec": "1.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bugs": { + "url": "https://github.com/ljharb/is-callable/issues" }, "contributors": [ { @@ -16,45 +45,8 @@ "url": "http://ljharb.codes" } ], - "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npx aud --production", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging", - "test:stock": "node test", - "test:staging": "node --es-staging test", - "coverage": "npm run --silent istanbul", - "covert": "covert test", - "covert:quiet": "covert test --quiet", - "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", - "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", - "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", - "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test --dir coverage-harmony", - "istanbul:std": "istanbul cover test --report html --dir coverage-std", - "prelint": "eclint check *", - "lint": "eslint ." - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-callable.git" - }, - "keywords": [ - "Function", - "function", - "callable", - "generator", - "generator function", - "arrow", - "arrow function", - "ES6", - "toStringTag", - "@@toStringTag" - ], "dependencies": {}, + "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", "devDependencies": { "@ljharb/eslint-config": "^17.2.0", "aud": "^1.1.2", @@ -71,6 +63,56 @@ "safe-publish-latest": "^1.1.4", "tape": "^5.0.1" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "ignore": [ + "rimraf" + ] + }, + "homepage": "https://github.com/ljharb/is-callable#readme", + "keywords": [ + "Function", + "function", + "callable", + "generator", + "generator function", + "arrow", + "arrow function", + "ES6", + "toStringTag", + "@@toStringTag" + ], + "license": "MIT", + "main": "index.js", + "name": "is-callable", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-callable.git" + }, + "scripts": { + "coverage": "npm run --silent istanbul", + "covert": "covert test", + "covert:quiet": "covert test --quiet", + "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", + "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", + "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test --dir coverage-harmony", + "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", + "istanbul:std": "istanbul cover test --report html --dir coverage-std", + "lint": "eslint .", + "posttest": "npx aud --production", + "prelint": "eclint check *", + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "test:staging": "node --es-staging test", + "test:stock": "node test", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -89,12 +131,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "greenkeeper": { - "ignore": [ - "rimraf" - ] - } -} \ No newline at end of file + "version": "1.2.1" +} diff --git a/node_modules/is-ci/package.json b/node_modules/is-ci/package.json index 3900a0420..f7f2c467a 100644 --- a/node_modules/is-ci/package.json +++ b/node_modules/is-ci/package.json @@ -1,23 +1,57 @@ { - "name": "is-ci", - "version": "2.0.0", - "description": "Detect if the current environment is a CI server", - "bin": "bin.js", - "main": "index.js", + "_args": [ + [ + "is-ci@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-ci@2.0.0", + "_id": "is-ci@2.0.0", + "_inBundle": false, + "_integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "_location": "/is-ci", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-ci@2.0.0", + "name": "is-ci", + "escapedName": "is-ci", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Thomas Watson Steen", + "email": "w@tson.dk", + "url": "https://twitter.com/wa7son" + }, + "bin": { + "is-ci": "bin.js" + }, + "bugs": { + "url": "https://github.com/watson/is-ci/issues" + }, + "coordinates": [ + 55.778272, + 12.593116 + ], "dependencies": { "ci-info": "^2.0.0" }, + "description": "Detect if the current environment is a CI server", "devDependencies": { "clear-module": "^3.0.0", "standard": "^12.0.1" }, - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/watson/is-ci.git" - }, + "homepage": "https://github.com/watson/is-ci", "keywords": [ "ci", "continuous", @@ -25,14 +59,15 @@ "test", "detect" ], - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", "license": "MIT", - "bugs": { - "url": "https://github.com/watson/is-ci/issues" + "main": "index.js", + "name": "is-ci", + "repository": { + "type": "git", + "url": "git+https://github.com/watson/is-ci.git" }, - "homepage": "https://github.com/watson/is-ci", - "coordinates": [ - 55.778272, - 12.593116 - ] -} \ No newline at end of file + "scripts": { + "test": "standard && node test.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/is-date-object/package.json b/node_modules/is-date-object/package.json index 5226a735c..e4b9101cb 100644 --- a/node_modules/is-date-object/package.json +++ b/node_modules/is-date-object/package.json @@ -1,36 +1,48 @@ { - "name": "is-date-object", - "version": "1.0.2", - "author": "Jordan Harband", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test", - "posttest": "npx aud", - "coverage": "covert test/index.js", - "lint": "eslint .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-date-object.git" - }, - "keywords": [ - "Date", - "ES6", - "toStringTag", - "@@toStringTag", - "Date object" + "_args": [ + [ + "is-date-object@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "is-date-object@1.0.2", + "_id": "is-date-object@1.0.2", + "_inBundle": false, + "_integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "_location": "/is-date-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-date-object@1.0.2", + "name": "is-date-object", + "escapedName": "is-date-object", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/es-to-primitive" + ], + "_resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "bugs": { + "url": "https://github.com/ljharb/is-date-object/issues" + }, "dependencies": {}, + "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", "devDependencies": { "@ljharb/eslint-config": "^15.0.2", "auto-changelog": "^1.16.2", @@ -42,6 +54,38 @@ "safe-publish-latest": "^1.1.4", "tape": "^4.12.0" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/is-date-object#readme", + "keywords": [ + "Date", + "ES6", + "toStringTag", + "@@toStringTag", + "Date object" + ], + "license": "MIT", + "main": "index.js", + "name": "is-date-object", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-date-object.git" + }, + "scripts": { + "coverage": "covert test/index.js", + "lint": "eslint .", + "posttest": "npx aud", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test", + "version": "auto-changelog && git add CHANGELOG.md" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -60,14 +104,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - } -} \ No newline at end of file + "version": "1.0.2" +} diff --git a/node_modules/is-error/package.json b/node_modules/is-error/package.json index 441791f23..400ba4fb3 100644 --- a/node_modules/is-error/package.json +++ b/node_modules/is-error/package.json @@ -1,20 +1,51 @@ { - "name": "is-error", - "version": "2.2.2", - "description": "Detect whether a value is an error", - "keywords": [], - "author": "Raynos ", - "repository": "git://github.com/mk-pmb/is-error-js.git", - "main": "index", - "homepage": "https://github.com/mk-pmb/is-error-js", + "_args": [ + [ + "is-error@2.2.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-error@2.2.2", + "_id": "is-error@2.2.2", + "_inBundle": false, + "_integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==", + "_location": "/is-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-error@2.2.2", + "name": "is-error", + "escapedName": "is-error", + "rawSpec": "2.2.2", + "saveSpec": null, + "fetchSpec": "2.2.2" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", + "_spec": "2.2.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, "bugs": { "url": "https://github.com/mk-pmb/is-error-js/issues" }, "contributors": [ - "Raynos", - "M.K. (https://github.com/mk-pmb)" + { + "name": "Raynos" + }, + { + "name": "M.K.", + "url": "https://github.com/mk-pmb" + } ], "dependencies": {}, + "description": "Detect whether a value is an error", "devDependencies": { "coveralls": "^2.10.0", "istanbul": "^0.3.5", @@ -24,22 +55,31 @@ "tap-spec": "^2.1.1", "tape": "^3.4.0" }, - "license": "MIT", - "scripts": { - "test": "npm run jshint -s && npm run cover -s", - "unit-test": "node test/index.js | tap-spec", - "jshint": "lint-trap .", - "cover": "istanbul cover --report html --print detail -- test/index.js && npm run check-cover -s", - "check-cover": "istanbul check-coverage --branches=100 --lines=100 --functions=100", - "view-cover": "opn ./coverage/index.html", - "travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || true)" - }, "engine": { "node": ">= 0.8.x" }, + "homepage": "https://github.com/mk-pmb/is-error-js", + "keywords": [], + "license": "MIT", + "main": "index", + "name": "is-error", + "ngen-version": "5.1.0", "pre-commit": [ "test" ], "pre-commit.silent": true, - "ngen-version": "5.1.0" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git://github.com/mk-pmb/is-error-js.git" + }, + "scripts": { + "check-cover": "istanbul check-coverage --branches=100 --lines=100 --functions=100", + "cover": "istanbul cover --report html --print detail -- test/index.js && npm run check-cover -s", + "jshint": "lint-trap .", + "test": "npm run jshint -s && npm run cover -s", + "travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || true)", + "unit-test": "node test/index.js | tap-spec", + "view-cover": "opn ./coverage/index.html" + }, + "version": "2.2.2" +} diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json index 00ad5c9fc..1d5c3a766 100644 --- a/node_modules/is-extglob/package.json +++ b/node_modules/is-extglob/package.json @@ -1,28 +1,52 @@ { - "name": "is-extglob", - "description": "Returns true if a string has an extglob.", - "version": "2.1.1", - "homepage": "https://github.com/jonschlinkert/is-extglob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/is-extglob", + "_args": [ + [ + "is-extglob@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-extglob@2.1.1", + "_id": "is-extglob@2.1.1", + "_inBundle": false, + "_integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "_location": "/is-extglob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-extglob@2.1.1", + "name": "is-extglob", + "escapedName": "is-extglob", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/is-glob" + ], + "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/is-extglob/issues" }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, + "description": "Returns true if a string has an extglob.", "devDependencies": { "gulp-format-md": "^0.1.10", "mocha": "^3.0.2" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-extglob", "keywords": [ "bash", "braces", @@ -42,6 +66,16 @@ "string", "test" ], + "license": "MIT", + "main": "index.js", + "name": "is-extglob", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extglob.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "toc": false, "layout": "default", @@ -65,5 +99,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "2.1.1" +} diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json index a67414558..23cbcc118 100644 --- a/node_modules/is-fullwidth-code-point/package.json +++ b/node_modules/is-fullwidth-code-point/package.json @@ -1,24 +1,56 @@ { - "name": "is-fullwidth-code-point", - "version": "3.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", + "_args": [ + [ + "is-fullwidth-code-point@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-fullwidth-code-point@3.0.0", + "_id": "is-fullwidth-code-point@3.0.0", + "_inBundle": false, + "_integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "_location": "/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-fullwidth-code-point@3.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/slice-ansi", + "/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", "keywords": [ "fullwidth", "full-width", @@ -34,9 +66,14 @@ "detect", "check" ], - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "3.0.0" +} diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json index b7afb44d2..14093135e 100644 --- a/node_modules/is-glob/package.json +++ b/node_modules/is-glob/package.json @@ -1,36 +1,73 @@ { - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "version": "4.0.1", - "homepage": "https://github.com/micromatch/is-glob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Daniel Perez (https://tuvistavie.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" + "_args": [ + [ + "is-glob@4.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "micromatch/is-glob", + "_development": true, + "_from": "is-glob@4.0.1", + "_id": "is-glob@4.0.1", + "_inBundle": false, + "_integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "_location": "/is-glob", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-glob@4.0.1", + "name": "is-glob", + "escapedName": "is-glob", + "rawSpec": "4.0.1", + "saveSpec": null, + "fetchSpec": "4.0.1" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree", + "/chokidar", + "/del", + "/eslint", + "/glob-parent" + ], + "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "_spec": "4.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/micromatch/is-glob/issues" }, - "license": "MIT", - "files": [ - "index.js" + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Daniel Perez", + "url": "https://tuvistavie.com" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, "dependencies": { "is-extglob": "^2.1.1" }, + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", "devDependencies": { "gulp-format-md": "^0.1.10", "mocha": "^3.0.2" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/micromatch/is-glob", "keywords": [ "bash", "braces", @@ -50,6 +87,16 @@ "string", "test" ], + "license": "MIT", + "main": "index.js", + "name": "is-glob", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/is-glob.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "layout": "default", "plugins": [ @@ -77,5 +124,6 @@ "verb", "vinyl" ] - } -} \ No newline at end of file + }, + "version": "4.0.1" +} diff --git a/node_modules/is-installed-globally/package.json b/node_modules/is-installed-globally/package.json index bad8f8918..dc6c6a5d5 100644 --- a/node_modules/is-installed-globally/package.json +++ b/node_modules/is-installed-globally/package.json @@ -1,25 +1,64 @@ { - "name": "is-installed-globally", - "version": "0.3.2", - "description": "Check if your package was installed globally", - "license": "MIT", - "repository": "sindresorhus/is-installed-globally", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "is-installed-globally@0.3.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-installed-globally@0.3.2", + "_id": "is-installed-globally@0.3.2", + "_inBundle": false, + "_integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "_location": "/is-installed-globally", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-installed-globally@0.3.2", + "name": "is-installed-globally", + "escapedName": "is-installed-globally", + "rawSpec": "0.3.2", + "saveSpec": null, + "fetchSpec": "0.3.2" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "_spec": "0.3.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-installed-globally/issues" + }, + "dependencies": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + }, + "description": "Check if your package was installed globally", + "devDependencies": { + "ava": "^2.4.0", + "cpy": "^7.3.0", + "del": "^5.1.0", + "execa": "^2.0.4", + "make-dir": "^3.0.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/is-installed-globally#readme", "keywords": [ "global", "package", @@ -38,17 +77,14 @@ "bin", "binary" ], - "dependencies": { - "global-dirs": "^2.0.1", - "is-path-inside": "^3.0.1" + "license": "MIT", + "name": "is-installed-globally", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-installed-globally.git" }, - "devDependencies": { - "ava": "^2.4.0", - "cpy": "^7.3.0", - "del": "^5.1.0", - "execa": "^2.0.4", - "make-dir": "^3.0.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "0.3.2" +} diff --git a/node_modules/is-interactive/package.json b/node_modules/is-interactive/package.json index 2c0f4c55d..652d6cad5 100644 --- a/node_modules/is-interactive/package.json +++ b/node_modules/is-interactive/package.json @@ -1,24 +1,56 @@ { - "name": "is-interactive", - "version": "1.0.0", - "description": "Check if stdout or stderr is interactive", - "license": "MIT", - "repository": "sindresorhus/is-interactive", + "_args": [ + [ + "is-interactive@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-interactive@1.0.0", + "_id": "is-interactive@1.0.0", + "_inBundle": false, + "_integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "_location": "/is-interactive", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-interactive@1.0.0", + "name": "is-interactive", + "escapedName": "is-interactive", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/ora" + ], + "_resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-interactive/issues" + }, + "description": "Check if stdout or stderr is interactive", + "devDependencies": { + "@types/node": "^12.0.12", + "ava": "^2.1.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-interactive#readme", "keywords": [ "interactive", "stdout", @@ -29,10 +61,14 @@ "shell", "tty" ], - "devDependencies": { - "@types/node": "^12.0.12", - "ava": "^2.1.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-interactive", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-interactive.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "1.0.0" +} diff --git a/node_modules/is-negative-zero/package.json b/node_modules/is-negative-zero/package.json index addc9f894..e3681f769 100644 --- a/node_modules/is-negative-zero/package.json +++ b/node_modules/is-negative-zero/package.json @@ -1,25 +1,51 @@ { - "name": "is-negative-zero", - "version": "2.0.0", - "description": "Is this value negative zero? === will lie to you", - "author": "Jordan Harband", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "npm run lint && node test.js && npm run coverage-quiet", - "coverage": "covert test.js", - "coverage-quiet": "covert test.js --quiet", - "lint": "npm run jscs && npm run eslint", - "jscs": "jscs *.js", - "eslint": "eslint *.js" + "_args": [ + [ + "is-negative-zero@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-negative-zero@2.0.0", + "_id": "is-negative-zero@2.0.0", + "_inBundle": false, + "_integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "_location": "/is-negative-zero", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-negative-zero@2.0.0", + "name": "is-negative-zero", + "escapedName": "is-negative-zero", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-negative-zero.git" + "_requiredBy": [ + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband" }, "bugs": { "url": "https://github.com/ljharb/is-negative-zero/issues" }, + "dependencies": {}, + "description": "Is this value negative zero? === will lie to you", + "devDependencies": { + "@ljharb/eslint-config": "^1.0.3", + "covert": "^1.1.0", + "eslint": "^1.0.0-rc-3", + "jscs": "^1.13.1", + "tape": "^4.0.1" + }, + "engines": { + "node": ">= 0.4" + }, "homepage": "https://github.com/ljharb/is-negative-zero", "keywords": [ "is", @@ -31,13 +57,20 @@ "0", "-0" ], - "dependencies": {}, - "devDependencies": { - "tape": "^4.0.1", - "covert": "^1.1.0", - "jscs": "^1.13.1", - "eslint": "^1.0.0-rc-3", - "@ljharb/eslint-config": "^1.0.3" + "license": "MIT", + "main": "index.js", + "name": "is-negative-zero", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-negative-zero.git" + }, + "scripts": { + "coverage": "covert test.js", + "coverage-quiet": "covert test.js --quiet", + "eslint": "eslint *.js", + "jscs": "jscs *.js", + "lint": "npm run jscs && npm run eslint", + "test": "npm run lint && node test.js && npm run coverage-quiet" }, "testling": { "files": "test.js", @@ -58,7 +91,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "2.0.0" +} diff --git a/node_modules/is-npm/package.json b/node_modules/is-npm/package.json index 07c9dcb40..57183944f 100644 --- a/node_modules/is-npm/package.json +++ b/node_modules/is-npm/package.json @@ -1,24 +1,55 @@ { - "name": "is-npm", - "version": "4.0.0", - "description": "Check if your code is running as an npm script", - "license": "MIT", - "repository": "sindresorhus/is-npm", + "_args": [ + [ + "is-npm@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-npm@4.0.0", + "_id": "is-npm@4.0.0", + "_inBundle": false, + "_integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "_location": "/is-npm", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-npm@4.0.0", + "name": "is-npm", + "escapedName": "is-npm", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-npm/issues" + }, + "description": "Check if your code is running as an npm script", + "devDependencies": { + "ava": "^2.4.0", + "tsd-check": "^0.6.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-npm#readme", "keywords": [ "npm", "is", @@ -29,9 +60,14 @@ "run", "script" ], - "devDependencies": { - "ava": "^2.4.0", - "tsd-check": "^0.6.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-npm", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-npm.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "4.0.0" +} diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json index 1749833c1..5db8f72f8 100644 --- a/node_modules/is-number/package.json +++ b/node_modules/is-number/package.json @@ -1,35 +1,68 @@ { - "name": "is-number", - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "version": "7.0.0", - "homepage": "https://github.com/jonschlinkert/is-number", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Olsten Larck (https://i.am.charlike.online)", - "Rouven Weßling (www.rouvenwessling.de)" + "_args": [ + [ + "is-number@7.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/is-number", + "_development": true, + "_from": "is-number@7.0.0", + "_id": "is-number@7.0.0", + "_inBundle": false, + "_integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "_location": "/is-number", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-number@7.0.0", + "name": "is-number", + "escapedName": "is-number", + "rawSpec": "7.0.0", + "saveSpec": null, + "fetchSpec": "7.0.0" + }, + "_requiredBy": [ + "/to-regex-range" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "_spec": "7.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/is-number/issues" }, - "license": "MIT", - "files": [ - "index.js" + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Olsten Larck", + "url": "https://i.am.charlike.online" + }, + { + "name": "Rouven Weßling", + "url": "www.rouvenwessling.de" + } ], - "main": "index.js", - "engines": { - "node": ">=0.12.0" - }, - "scripts": { - "test": "mocha" - }, + "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", "devDependencies": { "ansi": "^0.3.1", "benchmark": "^2.1.4", "gulp-format-md": "^1.0.0", "mocha": "^3.5.3" }, + "engines": { + "node": ">=0.12.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-number", "keywords": [ "cast", "check", @@ -58,6 +91,16 @@ "typeof", "value" ], + "license": "MIT", + "main": "index.js", + "name": "is-number", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "toc": false, "layout": "default", @@ -78,5 +121,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "7.0.0" +} diff --git a/node_modules/is-obj/package.json b/node_modules/is-obj/package.json index 1485e78dd..2ca3f06fb 100644 --- a/node_modules/is-obj/package.json +++ b/node_modules/is-obj/package.json @@ -1,24 +1,55 @@ { - "name": "is-obj", - "version": "2.0.0", - "description": "Check if a value is an object", - "license": "MIT", - "repository": "sindresorhus/is-obj", + "_args": [ + [ + "is-obj@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-obj@2.0.0", + "_id": "is-obj@2.0.0", + "_inBundle": false, + "_integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "_location": "/is-obj", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-obj@2.0.0", + "name": "is-obj", + "escapedName": "is-obj", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/dot-prop" + ], + "_resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-obj/issues" + }, + "description": "Check if a value is an object", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-obj#readme", "keywords": [ "object", "is", @@ -26,9 +57,14 @@ "test", "type" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-obj", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-obj.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.0" +} diff --git a/node_modules/is-path-cwd/package.json b/node_modules/is-path-cwd/package.json index 064cba0b0..01a0b4669 100644 --- a/node_modules/is-path-cwd/package.json +++ b/node_modules/is-path-cwd/package.json @@ -1,24 +1,55 @@ { - "name": "is-path-cwd", - "version": "2.2.0", - "description": "Check if a path is the current working directory", - "license": "MIT", - "repository": "sindresorhus/is-path-cwd", + "_args": [ + [ + "is-path-cwd@2.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-path-cwd@2.2.0", + "_id": "is-path-cwd@2.2.0", + "_inBundle": false, + "_integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "_location": "/is-path-cwd", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-path-cwd@2.2.0", + "name": "is-path-cwd", + "escapedName": "is-path-cwd", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/del" + ], + "_resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-cwd/issues" + }, + "description": "Check if a path is the current working directory", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-path-cwd#readme", "keywords": [ "path", "cwd", @@ -28,9 +59,14 @@ "file", "folder" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-path-cwd", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-cwd.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.2.0" +} diff --git a/node_modules/is-path-inside/package.json b/node_modules/is-path-inside/package.json index 8d9d9343a..cfbba0ade 100644 --- a/node_modules/is-path-inside/package.json +++ b/node_modules/is-path-inside/package.json @@ -1,24 +1,56 @@ { - "name": "is-path-inside", - "version": "3.0.2", - "description": "Check if a path is inside another path", - "license": "MIT", - "repository": "sindresorhus/is-path-inside", + "_args": [ + [ + "is-path-inside@3.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-path-inside@3.0.2", + "_id": "is-path-inside@3.0.2", + "_inBundle": false, + "_integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "_location": "/is-path-inside", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-path-inside@3.0.2", + "name": "is-path-inside", + "escapedName": "is-path-inside", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/del", + "/is-installed-globally" + ], + "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-inside/issues" + }, + "description": "Check if a path is inside another path", + "devDependencies": { + "ava": "^2.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/is-path-inside#readme", "keywords": [ "path", "inside", @@ -28,9 +60,14 @@ "file", "resolve" ], - "devDependencies": { - "ava": "^2.1.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "is-path-inside", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-inside.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.2" +} diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json index 986ffab26..5f9cdebb1 100644 --- a/node_modules/is-plain-object/package.json +++ b/node_modules/is-plain-object/package.json @@ -1,41 +1,61 @@ { - "name": "is-plain-object", - "description": "Returns true if an object was created by the `Object` constructor.", - "version": "3.0.0", - "homepage": "https://github.com/jonschlinkert/is-plain-object", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Osman Nuri Okumuş (http://onokumus.com)", - "Steven Vachon (https://svachon.com)", - "(https://github.com/wtgtybhertgeghgtwtg)" + "_args": [ + [ + "is-plain-object@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/is-plain-object", + "_development": true, + "_from": "is-plain-object@3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/is-plain-object/issues" }, - "license": "MIT", - "main": "index.cjs.js", - "module": "index.js", - "types": "index.d.ts", - "files": [ - "index.d.ts", - "index.js", - "index.cjs.js" + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "build": "rollup -c", - "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", - "test_node": "mocha -r esm", - "test": "npm run test_node && npm run build && npm run test_browser", - "prepare": "rollup -c" - }, "dependencies": { "isobject": "^4.0.0" }, + "description": "Returns true if an object was created by the `Object` constructor.", "devDependencies": { "chai": "^4.2.0", "esm": "^3.2.22", @@ -45,6 +65,15 @@ "rollup": "^1.10.1", "rollup-plugin-node-resolve": "^4.2.3" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", "keywords": [ "check", "is", @@ -59,6 +88,22 @@ "typeof", "value" ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", "verb": { "toc": false, "layout": "default", @@ -78,5 +123,6 @@ "lint": { "reflinks": true } - } -} \ No newline at end of file + }, + "version": "3.0.0" +} diff --git a/node_modules/is-promise/package.json b/node_modules/is-promise/package.json index e729cac00..c0caaab72 100644 --- a/node_modules/is-promise/package.json +++ b/node_modules/is-promise/package.json @@ -1,16 +1,40 @@ { - "name": "is-promise", - "version": "3.0.0", - "description": "Test whether an object looks like a promises-a+ promise", - "main": "./index.js", - "scripts": { - "test": "node test" - }, - "files": [ - "index.js", - "index.mjs", - "index.d.ts" + "_args": [ + [ + "is-promise@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "is-promise@3.0.0", + "_id": "is-promise@3.0.0", + "_inBundle": false, + "_integrity": "sha512-aTHJ4BvETyySzLhguH+7sL4b8765eecqq7ZrHVuhZr3FjCL/IV+LsvisEeH+9d0AkChYny3ad1KEL+mKy4ot7A==", + "_location": "/is-promise", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-promise@3.0.0", + "name": "is-promise", + "escapedName": "is-promise", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/is-promise/issues" + }, + "description": "Test whether an object looks like a promises-a+ promise", "exports": { ".": [ { @@ -21,10 +45,21 @@ "./index.js" ] }, + "files": [ + "index.js", + "index.mjs", + "index.d.ts" + ], + "homepage": "https://github.com/then/is-promise#readme", + "license": "MIT", + "main": "./index.js", + "name": "is-promise", "repository": { "type": "git", - "url": "https://github.com/then/is-promise.git" + "url": "git+https://github.com/then/is-promise.git" }, - "author": "ForbesLindesay", - "license": "MIT" -} \ No newline at end of file + "scripts": { + "test": "node test" + }, + "version": "3.0.0" +} diff --git a/node_modules/is-regex/package.json b/node_modules/is-regex/package.json index f6c38a7c6..bcc1035ac 100644 --- a/node_modules/is-regex/package.json +++ b/node_modules/is-regex/package.json @@ -1,44 +1,53 @@ { - "name": "is-regex", - "version": "1.1.1", - "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "_args": [ + [ + "is-regex@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-regex@1.1.1", + "_id": "is-regex@1.1.1", + "_inBundle": false, + "_integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "_location": "/is-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-regex@1.1.1", + "name": "is-regex", + "escapedName": "is-regex", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" }, - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test", - "posttest": "npx aud --production", - "coverage": "covert test/index.js", - "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + "_requiredBy": [ + "/es-abstract", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-regex.git" + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true }, "bugs": { "url": "https://github.com/ljharb/is-regex/issues" }, - "homepage": "https://github.com/ljharb/is-regex", - "keywords": [ - "regex", - "regexp", - "is", - "regular expression", - "regular", - "expression" - ], "dependencies": { "has-symbols": "^1.0.1" }, + "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", "devDependencies": { "@ljharb/eslint-config": "^17.1.0", "aud": "^1.1.2", @@ -50,6 +59,40 @@ "safe-publish-latest": "^1.1.4", "tape": "^5.0.1" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/is-regex", + "keywords": [ + "regex", + "regexp", + "is", + "regular expression", + "regular", + "expression" + ], + "license": "MIT", + "main": "index.js", + "name": "is-regex", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-regex.git" + }, + "scripts": { + "coverage": "covert test/index.js", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "lint": "eslint .", + "posttest": "npx aud --production", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test", + "version": "auto-changelog && git add CHANGELOG.md" + }, "testling": { "files": "test.js", "browsers": [ @@ -69,15 +112,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - } -} \ No newline at end of file + "version": "1.1.1" +} diff --git a/node_modules/is-string/package.json b/node_modules/is-string/package.json index 0ef60f2e9..098aa585c 100644 --- a/node_modules/is-string/package.json +++ b/node_modules/is-string/package.json @@ -1,38 +1,49 @@ { - "name": "is-string", - "version": "1.0.5", - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "tests-only": "node --harmony --es-staging test", - "test": "npm run tests-only", - "posttest": "npx aud", - "coverage": "covert test/index.js", - "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-string.git" - }, - "keywords": [ - "String", - "string", - "ES6", - "toStringTag", - "@@toStringTag", - "String object" + "_args": [ + [ + "is-string@1.0.5", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "is-string@1.0.5", + "_id": "is-string@1.0.5", + "_inBundle": false, + "_integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "_location": "/is-string", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-string@1.0.5", + "name": "is-string", + "escapedName": "is-string", + "rawSpec": "1.0.5", + "saveSpec": null, + "fetchSpec": "1.0.5" + }, + "_requiredBy": [ + "/array-includes" + ], + "_resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "_spec": "1.0.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "bugs": { + "url": "https://github.com/ljharb/is-string/issues" + }, "dependencies": {}, + "description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", "devDependencies": { "@ljharb/eslint-config": "^15.0.2", "auto-changelog": "^1.16.2", @@ -45,6 +56,40 @@ "safe-publish-latest": "^1.1.4", "tape": "^4.12.0" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/is-string#readme", + "keywords": [ + "String", + "string", + "ES6", + "toStringTag", + "@@toStringTag", + "String object" + ], + "license": "MIT", + "main": "index.js", + "name": "is-string", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-string.git" + }, + "scripts": { + "coverage": "covert test/index.js", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "lint": "eslint .", + "posttest": "npx aud", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test", + "version": "auto-changelog && git add CHANGELOG.md" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -63,14 +108,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - } -} \ No newline at end of file + "version": "1.0.5" +} diff --git a/node_modules/is-symbol/package.json b/node_modules/is-symbol/package.json index f9e2cbd80..d359d214a 100644 --- a/node_modules/is-symbol/package.json +++ b/node_modules/is-symbol/package.json @@ -1,40 +1,51 @@ { - "name": "is-symbol", - "version": "1.0.3", - "description": "Determine if a value is an ES6 Symbol or not.", - "main": "index.js", - "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "tests-only": "node --es-staging --harmony test", - "test": "npm run tests-only", - "posttest": "npx aud", - "coverage": "covert test", - "lint": "eslint .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/is-symbol.git" - }, - "keywords": [ - "symbol", - "es6", - "is", - "Symbol" + "_args": [ + [ + "is-symbol@1.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "_development": true, + "_from": "is-symbol@1.0.3", + "_id": "is-symbol@1.0.3", + "_inBundle": false, + "_integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "_location": "/is-symbol", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-symbol@1.0.3", + "name": "is-symbol", + "escapedName": "is-symbol", + "rawSpec": "1.0.3", + "saveSpec": null, + "fetchSpec": "1.0.3" + }, + "_requiredBy": [ + "/es-to-primitive" + ], + "_resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "_spec": "1.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false }, - "license": "MIT", "bugs": { "url": "https://github.com/inspect-js/is-symbol/issues" }, "dependencies": { "has-symbols": "^1.0.1" }, + "description": "Determine if a value is an ES6 Symbol or not.", "devDependencies": { "@ljharb/eslint-config": "^15.0.2", "auto-changelog": "^1.16.2", @@ -45,6 +56,37 @@ "semver": "^6.3.0", "tape": "^4.11.0" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/inspect-js/is-symbol#readme", + "keywords": [ + "symbol", + "es6", + "is", + "Symbol" + ], + "license": "MIT", + "main": "index.js", + "name": "is-symbol", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-symbol.git" + }, + "scripts": { + "coverage": "covert test", + "lint": "eslint .", + "posttest": "npx aud", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --es-staging --harmony test", + "version": "auto-changelog && git add CHANGELOG.md" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -63,14 +105,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - } -} \ No newline at end of file + "version": "1.0.3" +} diff --git a/node_modules/is-typedarray/package.json b/node_modules/is-typedarray/package.json index 6fc813ab7..85958b29c 100644 --- a/node_modules/is-typedarray/package.json +++ b/node_modules/is-typedarray/package.json @@ -1,21 +1,48 @@ { - "name": "is-typedarray", - "version": "1.0.0", - "description": "Detect whether or not an object is a Typed Array", - "main": "index.js", - "scripts": { - "test": "node test" + "_args": [ + [ + "is-typedarray@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-typedarray@1.0.0", + "_id": "is-typedarray@1.0.0", + "_inBundle": false, + "_integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "_location": "/is-typedarray", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-typedarray@1.0.0", + "name": "is-typedarray", + "escapedName": "is-typedarray", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/typedarray-to-buffer", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "bugs": { + "url": "https://github.com/hughsk/is-typedarray/issues" }, - "author": "Hugh Kennedy (http://hughsk.io/)", - "license": "MIT", "dependencies": {}, + "description": "Detect whether or not an object is a Typed Array", "devDependencies": { "tape": "^2.13.1" }, - "repository": { - "type": "git", - "url": "git://github.com/hughsk/is-typedarray.git" - }, + "homepage": "https://github.com/hughsk/is-typedarray", "keywords": [ "typed", "array", @@ -23,8 +50,15 @@ "is", "util" ], - "bugs": { - "url": "https://github.com/hughsk/is-typedarray/issues" + "license": "MIT", + "main": "index.js", + "name": "is-typedarray", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/is-typedarray.git" }, - "homepage": "https://github.com/hughsk/is-typedarray" -} \ No newline at end of file + "scripts": { + "test": "node test" + }, + "version": "1.0.0" +} diff --git a/node_modules/is-yarn-global/package.json b/node_modules/is-yarn-global/package.json index 25b0e3dfc..ffce96653 100644 --- a/node_modules/is-yarn-global/package.json +++ b/node_modules/is-yarn-global/package.json @@ -1,15 +1,54 @@ { - "name": "is-yarn-global", - "version": "0.3.0", - "description": "Check if installed by yarn globally without any `fs` calls", - "repository": "git@github.com:LitoMore/is-yarn-global.git", - "author": "LitoMore (litomore@gmail.com)", - "license": "MIT", - "scripts": { - "test": "xo" + "_args": [ + [ + "is-yarn-global@0.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "is-yarn-global@0.3.0", + "_id": "is-yarn-global@0.3.0", + "_inBundle": false, + "_integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "_location": "/is-yarn-global", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-yarn-global@0.3.0", + "name": "is-yarn-global", + "escapedName": "is-yarn-global", + "rawSpec": "0.3.0", + "saveSpec": null, + "fetchSpec": "0.3.0" }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "_spec": "0.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "LitoMore", + "url": "litomore@gmail.com" + }, + "bugs": { + "url": "https://github.com/LitoMore/is-yarn-global/issues" + }, + "description": "Check if installed by yarn globally without any `fs` calls", "devDependencies": { "ava": "^0.24.0", "xo": "^0.18.2" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/LitoMore/is-yarn-global#readme", + "license": "MIT", + "name": "is-yarn-global", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/LitoMore/is-yarn-global.git" + }, + "scripts": { + "test": "xo" + }, + "version": "0.3.0" +} diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json index 615e6c214..ea2f565a9 100644 --- a/node_modules/isarray/package.json +++ b/node_modules/isarray/package.json @@ -1,29 +1,61 @@ { - "name": "isarray", - "description": "Array#isArray for older browsers", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "homepage": "https://github.com/juliangruber/isarray", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "*" - }, - "keywords": [ - "browser", - "isarray", - "array" + "_args": [ + [ + "isarray@0.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inBundle": false, + "_integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "_location": "/isarray", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isarray@0.0.1", + "name": "isarray", + "escapedName": "isarray", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" + }, + "_requiredBy": [ + "/path-to-regexp" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_spec": "0.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, - "license": "MIT" -} \ No newline at end of file + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "name": "isarray", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json index 5e8bc7867..10ad98ec2 100644 --- a/node_modules/isexe/package.json +++ b/node_modules/isexe/package.json @@ -1,31 +1,64 @@ { - "name": "isexe", - "version": "2.0.0", - "description": "Minimal module to check if a file is executable.", - "main": "index.js", - "directories": { - "test": "test" + "_args": [ + [ + "isexe@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "isexe@2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isexe@2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" }, + "_requiredBy": [ + "/eslint/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "description": "Minimal module to check if a file is executable.", "devDependencies": { "mkdirp": "^0.5.1", "rimraf": "^2.5.0", "tap": "^10.3.0" }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "directories": { + "test": "test" }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], "license": "ISC", + "main": "index.js", + "name": "isexe", "repository": { "type": "git", "url": "git+https://github.com/isaacs/isexe.git" }, - "keywords": [], - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" }, - "homepage": "https://github.com/isaacs/isexe#readme" -} \ No newline at end of file + "version": "2.0.0" +} diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json index c59d1ba3a..6d7452aec 100644 --- a/node_modules/isobject/package.json +++ b/node_modules/isobject/package.json @@ -1,43 +1,78 @@ { - "name": "isobject", - "description": "Returns true if the value is an object and not an array or null.", - "version": "4.0.0", - "homepage": "https://github.com/jonschlinkert/isobject", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "(https://github.com/LeSuisse)", - "Brian Woodward (https://twitter.com/doowb)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Magnús Dæhlen (https://github.com/magnudae)", - "Tom MacWright (https://macwright.org)" + "_args": [ + [ + "isobject@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "jonschlinkert/isobject", + "_development": true, + "_from": "isobject@4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isobject@4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/jonschlinkert/isobject/issues" }, - "license": "MIT", - "files": [ - "index.d.ts", - "index.cjs.js", - "index.js" + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } ], - "main": "index.cjs.js", - "module": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "build": "rollup -i index.js -o index.cjs.js -f cjs", - "test": "mocha -r esm", - "prepublish": "npm run build" - }, "dependencies": {}, + "description": "Returns true if the value is an object and not an array or null.", "devDependencies": { "esm": "^3.2.22", "gulp-format-md": "^0.1.9", "mocha": "^2.4.5", "rollup": "^1.10.1" }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", "keywords": [ "check", "is", @@ -52,6 +87,19 @@ "typeof", "value" ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, "types": "index.d.ts", "verb": { "related": { @@ -76,5 +124,6 @@ "reflinks": [ "verb" ] - } -} \ No newline at end of file + }, + "version": "4.0.0" +} diff --git a/node_modules/js-string-escape/package.json b/node_modules/js-string-escape/package.json index 5675486fe..54473f2de 100644 --- a/node_modules/js-string-escape/package.json +++ b/node_modules/js-string-escape/package.json @@ -1,15 +1,58 @@ { - "name": "js-string-escape", - "version": "1.0.1", + "_args": [ + [ + "js-string-escape@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "js-string-escape@1.0.1", + "_id": "js-string-escape@1.0.1", + "_inBundle": false, + "_integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "_location": "/js-string-escape", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "js-string-escape@1.0.1", + "name": "js-string-escape", + "escapedName": "js-string-escape", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jo Liss", + "email": "joliss42@gmail.com" + }, + "bugs": { + "url": "https://github.com/joliss/js-string-escape/issues" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "http://mathiasbynens.be/" + } + ], "description": "Escape strings for use as JavaScript string literals", - "main": "index.js", - "scripts": { - "test": "tap test" + "devDependencies": { + "punycode": "~> 1.2.1", + "tap": "~> 0.4.2" }, - "repository": { - "type": "git", - "url": "https://github.com/joliss/js-string-escape" + "engines": { + "node": ">= 0.8" }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/joliss/js-string-escape#readme", "keywords": [ "string", "escape", @@ -17,22 +60,15 @@ "javascript", "ecmascript" ], - "author": "Jo Liss ", - "contributors": [ - { - "name": "Mathias Bynens", - "url": "http://mathiasbynens.be/" - } - ], "license": "MIT", - "devDependencies": { - "tap": "~> 0.4.2", - "punycode": "~> 1.2.1" + "main": "index.js", + "name": "js-string-escape", + "repository": { + "type": "git", + "url": "git+https://github.com/joliss/js-string-escape.git" }, - "engines": { - "node": ">= 0.8" + "scripts": { + "test": "tap test" }, - "files": [ - "index.js" - ] -} \ No newline at end of file + "version": "1.0.1" +} diff --git a/node_modules/js-tokens/package.json b/node_modules/js-tokens/package.json index a4c280b67..d424bd6a7 100644 --- a/node_modules/js-tokens/package.json +++ b/node_modules/js-tokens/package.json @@ -1,9 +1,50 @@ { - "name": "js-tokens", - "version": "4.0.0", - "author": "Simon Lydell", - "license": "MIT", + "_args": [ + [ + "js-tokens@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "js-tokens@4.0.0", + "_id": "js-tokens@4.0.0", + "_inBundle": false, + "_integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "_location": "/js-tokens", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "js-tokens@4.0.0", + "name": "js-tokens", + "escapedName": "js-tokens", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@babel/highlight" + ], + "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Simon Lydell" + }, + "bugs": { + "url": "https://github.com/lydell/js-tokens/issues" + }, "description": "A regex that tokenizes JavaScript.", + "devDependencies": { + "coffeescript": "2.1.1", + "esprima": "4.0.0", + "everything.js": "1.0.3", + "mocha": "5.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/lydell/js-tokens#readme", "keywords": [ "JavaScript", "js", @@ -11,20 +52,17 @@ "tokenize", "regex" ], - "files": [ - "index.js" - ], - "repository": "lydell/js-tokens", - "scripts": { - "test": "mocha --ui tdd", - "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", - "build": "node generate-index.js", - "dev": "npm run build && npm test" + "license": "MIT", + "name": "js-tokens", + "repository": { + "type": "git", + "url": "git+https://github.com/lydell/js-tokens.git" }, - "devDependencies": { - "coffeescript": "2.1.1", - "esprima": "4.0.0", - "everything.js": "1.0.3", - "mocha": "5.0.0" - } -} \ No newline at end of file + "scripts": { + "build": "node generate-index.js", + "dev": "npm run build && npm test", + "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", + "test": "mocha --ui tdd" + }, + "version": "4.0.0" +} diff --git a/node_modules/js-yaml/node_modules/esprima/package.json b/node_modules/js-yaml/node_modules/esprima/package.json index 55d445995..8596725ea 100644 --- a/node_modules/js-yaml/node_modules/esprima/package.json +++ b/node_modules/js-yaml/node_modules/esprima/package.json @@ -1,39 +1,44 @@ { - "name": "esprima", - "description": "ECMAScript parsing infrastructure for multipurpose analysis", - "homepage": "http://esprima.org", - "main": "dist/esprima.js", - "bin": { - "esparse": "./bin/esparse.js", - "esvalidate": "./bin/esvalidate.js" - }, - "version": "4.0.1", - "files": [ - "bin", - "dist/esprima.js" + "_args": [ + [ + "esprima@4.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "engines": { - "node": ">=4" + "_from": "esprima@4.0.1", + "_id": "esprima@4.0.1", + "_inBundle": false, + "_integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "_location": "/js-yaml/esprima", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "esprima@4.0.1", + "name": "esprima", + "escapedName": "esprima", + "rawSpec": "4.0.1", + "saveSpec": null, + "fetchSpec": "4.0.1" }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "_spec": "4.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Ariya Hidayat", "email": "ariya.hidayat@gmail.com" }, - "maintainers": [ - { - "name": "Ariya Hidayat", - "email": "ariya.hidayat@gmail.com", - "web": "http://ariya.ofilabs.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/jquery/esprima.git" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "bugs": { "url": "https://github.com/jquery/esprima/issues" }, - "license": "BSD-2-Clause", + "description": "ECMAScript parsing infrastructure for multipurpose analysis", "devDependencies": { "codecov.io": "~0.1.6", "escomplex-js": "1.2.0", @@ -62,6 +67,14 @@ "unicode-8.0.0": "~0.7.0", "webpack": "~1.14.0" }, + "engines": { + "node": ">=4" + }, + "files": [ + "bin", + "dist/esprima.js" + ], + "homepage": "http://esprima.org", "keywords": [ "ast", "ecmascript", @@ -70,43 +83,58 @@ "parser", "syntax" ], + "license": "BSD-2-Clause", + "main": "dist/esprima.js", + "maintainers": [ + { + "name": "Ariya Hidayat", + "email": "ariya.hidayat@gmail.com", + "url": "http://ariya.ofilabs.com" + } + ], + "name": "esprima", + "repository": { + "type": "git", + "url": "git+https://github.com/jquery/esprima.git" + }, "scripts": { - "check-version": "node test/check-version.js", - "tslint": "tslint src/*.ts", - "code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js", - "format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js", - "complexity": "node test/check-complexity.js", - "static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity", - "hostile-env-tests": "node test/hostile-environment-tests.js", - "unit-tests": "node test/unit-tests.js", - "api-tests": "mocha -R dot test/api-tests.js", - "grammar-tests": "node test/grammar-tests.js", - "regression-tests": "node test/regression-tests.js", "all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests", - "verify-line-ending": "node test/verify-line-ending.js", - "generate-fixtures": "node tools/generate-fixtures.js", - "browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run", - "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", - "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", - "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", - "saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", "analyze-coverage": "istanbul cover test/unit-tests.js", - "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", - "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", - "compile": "tsc -p src/ && webpack && node tools/fixupbundle.js", - "test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis", - "prepublish": "npm run compile", - "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", + "api-tests": "mocha -R dot test/api-tests.js", + "appveyor": "npm run compile && npm run all-tests && npm run browser-tests", + "benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer", "benchmark-parser": "node -expose_gc test/benchmark-parser.js", "benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js", - "benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer", - "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", - "downstream": "node test/downstream.js", - "travis": "npm test", + "browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run", + "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", + "check-version": "node test/check-version.js", "circleci": "npm test && npm run codecov && npm run downstream", - "appveyor": "npm run compile && npm run all-tests && npm run browser-tests", + "code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js", + "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", + "compile": "tsc -p src/ && webpack && node tools/fixupbundle.js", + "complexity": "node test/check-complexity.js", + "downstream": "node test/downstream.js", "droneio": "npm run compile && npm run all-tests && npm run saucelabs", + "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", + "format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js", + "generate-fixtures": "node tools/generate-fixtures.js", "generate-regex": "node tools/generate-identifier-regex.js", - "generate-xhtml-entities": "node tools/generate-xhtml-entities.js" - } -} \ No newline at end of file + "generate-xhtml-entities": "node tools/generate-xhtml-entities.js", + "grammar-tests": "node test/grammar-tests.js", + "hostile-env-tests": "node test/hostile-environment-tests.js", + "prepublish": "npm run compile", + "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", + "regression-tests": "node test/regression-tests.js", + "saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", + "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", + "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", + "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", + "static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity", + "test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis", + "travis": "npm test", + "tslint": "tslint src/*.ts", + "unit-tests": "node test/unit-tests.js", + "verify-line-ending": "node test/verify-line-ending.js" + }, + "version": "4.0.1" +} diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json index dbaa43e0c..20ab245f9 100644 --- a/node_modules/js-yaml/package.json +++ b/node_modules/js-yaml/package.json @@ -1,35 +1,67 @@ { - "name": "js-yaml", - "version": "3.13.1", - "description": "YAML 1.2 parser and serializer", - "keywords": [ - "yaml", - "parser", - "serializer", - "pyyaml" + "_args": [ + [ + "js-yaml@3.13.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "homepage": "https://github.com/nodeca/js-yaml", - "author": "Vladimir Zapparov ", - "contributors": [ - "Aleksey V Zapparov (http://www.ixti.net/)", - "Vitaly Puzrin (https://github.com/puzrin)", - "Martin Grenfell (http://got-ravings.blogspot.com)" - ], - "license": "MIT", - "repository": "nodeca/js-yaml", - "files": [ - "index.js", - "lib/", - "bin/", - "dist/" + "_from": "js-yaml@3.13.1", + "_id": "js-yaml@3.13.1", + "_inBundle": false, + "_integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "_location": "/js-yaml", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "js-yaml@3.13.1", + "name": "js-yaml", + "escapedName": "js-yaml", + "rawSpec": "3.13.1", + "saveSpec": null, + "fetchSpec": "3.13.1" + }, + "_requiredBy": [ + "/", + "/@eslint/eslintrc", + "/eslint", + "/supertap" ], + "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "_spec": "3.13.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Vladimir Zapparov", + "email": "dervus.grim@gmail.com" + }, "bin": { "js-yaml": "bin/js-yaml.js" }, + "bugs": { + "url": "https://github.com/nodeca/js-yaml/issues" + }, + "contributors": [ + { + "name": "Aleksey V Zapparov", + "email": "ixti@member.fsf.org", + "url": "http://www.ixti.net/" + }, + { + "name": "Vitaly Puzrin", + "email": "vitaly@rcdesign.ru", + "url": "https://github.com/puzrin" + }, + { + "name": "Martin Grenfell", + "email": "martin.grenfell@gmail.com", + "url": "http://got-ravings.blogspot.com" + } + ], "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, + "description": "YAML 1.2 parser and serializer", "devDependencies": { "ansi": "^0.3.1", "benchmark": "^2.1.4", @@ -41,7 +73,27 @@ "mocha": "^5.2.0", "uglify-js": "^3.0.1" }, + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" + ], + "homepage": "https://github.com/nodeca/js-yaml", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" + ], + "license": "MIT", + "name": "js-yaml", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/js-yaml.git" + }, "scripts": { "test": "make test" - } -} \ No newline at end of file + }, + "version": "3.13.1" +} diff --git a/node_modules/json-buffer/package.json b/node_modules/json-buffer/package.json index 3c51a6781..a77f7641a 100644 --- a/node_modules/json-buffer/package.json +++ b/node_modules/json-buffer/package.json @@ -1,20 +1,55 @@ { - "name": "json-buffer", + "_args": [ + [ + "json-buffer@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "json-buffer@3.0.0", + "_id": "json-buffer@3.0.0", + "_inBundle": false, + "_integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "_location": "/json-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-buffer@3.0.0", + "name": "json-buffer", + "escapedName": "json-buffer", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/keyv" + ], + "_resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/json-buffer/issues" + }, "description": "JSON parse & stringify that supports binary via bops & base64", - "version": "3.0.0", + "devDependencies": { + "tape": "^4.6.3" + }, "homepage": "https://github.com/dominictarr/json-buffer", + "license": "MIT", + "name": "json-buffer", "repository": { "type": "git", "url": "git://github.com/dominictarr/json-buffer.git" }, - "devDependencies": { - "tape": "^4.6.3" - }, "scripts": { "test": "set -e; for t in test/*.js; do node $t; done" }, - "author": "Dominic Tarr (http://dominictarr.com)", - "license": "MIT", "testling": { "files": "test/*.js", "browsers": [ @@ -30,5 +65,6 @@ "iphone/6.0..latest", "android-browser/4.2..latest" ] - } -} \ No newline at end of file + }, + "version": "3.0.0" +} diff --git a/node_modules/json-parse-better-errors/package.json b/node_modules/json-parse-better-errors/package.json index 89b9301d6..9630de34a 100644 --- a/node_modules/json-parse-better-errors/package.json +++ b/node_modules/json-parse-better-errors/package.json @@ -1,38 +1,40 @@ { - "name": "json-parse-better-errors", - "version": "1.0.2", - "description": "JSON.parse with context information on error", - "main": "index.js", - "files": [ - "*.js" + "_args": [ + [ + "json-parse-better-errors@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish && git push --follow-tags", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --coverage test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + "_development": true, + "_from": "json-parse-better-errors@1.0.2", + "_id": "json-parse-better-errors@1.0.2", + "_inBundle": false, + "_integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "_location": "/json-parse-better-errors", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-parse-better-errors@1.0.2", + "name": "json-parse-better-errors", + "escapedName": "json-parse-better-errors", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" }, - "repository": "https://github.com/zkat/json-parse-better-errors", - "keywords": [ - "JSON", - "parser" + "_requiredBy": [ + "/parse-json", + "/read-pkg/parse-json" ], + "_resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" + "email": "kzm@zkat.tech" }, - "license": "MIT", - "devDependencies": { - "nyc": "^10.3.2", - "standard": "^9.0.2", - "standard-version": "^4.1.0", - "tap": "^10.3.3", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "bugs": { + "url": "https://github.com/zkat/json-parse-better-errors/issues" }, "config": { "nyc": { @@ -41,5 +43,39 @@ "test/**" ] } - } -} \ No newline at end of file + }, + "description": "JSON.parse with context information on error", + "devDependencies": { + "nyc": "^10.3.2", + "standard": "^9.0.2", + "standard-version": "^4.1.0", + "tap": "^10.3.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js" + ], + "homepage": "https://github.com/zkat/json-parse-better-errors#readme", + "keywords": [ + "JSON", + "parser" + ], + "license": "MIT", + "main": "index.js", + "name": "json-parse-better-errors", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/json-parse-better-errors.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "1.0.2" +} diff --git a/node_modules/json-schema-traverse/package.json b/node_modules/json-schema-traverse/package.json index e2d61a06d..7270e2d23 100644 --- a/node_modules/json-schema-traverse/package.json +++ b/node_modules/json-schema-traverse/package.json @@ -1,28 +1,40 @@ { - "name": "json-schema-traverse", - "version": "0.4.1", - "description": "Traverse JSON Schema passing each schema object to callback", - "main": "index.js", - "scripts": { - "eslint": "eslint index.js spec", - "test-spec": "mocha spec -R spec", - "test": "npm run eslint && nyc npm run test-spec" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" - }, - "keywords": [ - "JSON-Schema", - "traverse", - "iterate" + "_args": [ + [ + "json-schema-traverse@0.4.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "author": "Evgeny Poberezkin", - "license": "MIT", + "_development": true, + "_from": "json-schema-traverse@0.4.1", + "_id": "json-schema-traverse@0.4.1", + "_inBundle": false, + "_integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "_location": "/json-schema-traverse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-schema-traverse@0.4.1", + "name": "json-schema-traverse", + "escapedName": "json-schema-traverse", + "rawSpec": "0.4.1", + "saveSpec": null, + "fetchSpec": "0.4.1" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "_spec": "0.4.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Evgeny Poberezkin" + }, "bugs": { "url": "https://github.com/epoberezkin/json-schema-traverse/issues" }, - "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "description": "Traverse JSON Schema passing each schema object to callback", "devDependencies": { "coveralls": "^2.13.1", "eslint": "^3.19.0", @@ -30,6 +42,15 @@ "nyc": "^11.0.2", "pre-commit": "^1.2.2" }, + "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "keywords": [ + "JSON-Schema", + "traverse", + "iterate" + ], + "license": "MIT", + "main": "index.js", + "name": "json-schema-traverse", "nyc": { "exclude": [ "**/spec/**", @@ -39,5 +60,15 @@ "lcov", "text-summary" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + }, + "scripts": { + "eslint": "eslint index.js spec", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "mocha spec -R spec" + }, + "version": "0.4.1" +} diff --git a/node_modules/json-stable-stringify-without-jsonify/package.json b/node_modules/json-stable-stringify-without-jsonify/package.json index 8c86b9552..2198189d0 100644 --- a/node_modules/json-stable-stringify-without-jsonify/package.json +++ b/node_modules/json-stable-stringify-without-jsonify/package.json @@ -1,12 +1,62 @@ { - "name": "json-stable-stringify-without-jsonify", - "version": "1.0.1", - "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies", - "main": "index.js", + "_args": [ + [ + "json-stable-stringify-without-jsonify@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "json-stable-stringify-without-jsonify@1.0.1", + "_id": "json-stable-stringify-without-jsonify@1.0.1", + "_inBundle": false, + "_integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "_location": "/json-stable-stringify-without-jsonify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-stable-stringify-without-jsonify@1.0.1", + "name": "json-stable-stringify-without-jsonify", + "escapedName": "json-stable-stringify-without-jsonify", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/samn/json-stable-stringify/issues" + }, "dependencies": {}, + "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies", "devDependencies": { "tape": "~1.0.4" }, + "homepage": "https://github.com/samn/json-stable-stringify", + "keywords": [ + "json", + "stringify", + "deterministic", + "hash", + "sort", + "stable" + ], + "license": "MIT", + "main": "index.js", + "name": "json-stable-stringify-without-jsonify", + "repository": { + "type": "git", + "url": "git://github.com/samn/json-stable-stringify.git" + }, "scripts": { "test": "tape test/*.js" }, @@ -22,23 +72,5 @@ "opera/latest" ] }, - "repository": { - "type": "git", - "url": "git://github.com/samn/json-stable-stringify.git" - }, - "homepage": "https://github.com/samn/json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "sort", - "stable" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT" -} \ No newline at end of file + "version": "1.0.1" +} diff --git a/node_modules/json-stringify-safe/package.json b/node_modules/json-stringify-safe/package.json index 7493a587d..d9e3d15d9 100644 --- a/node_modules/json-stringify-safe/package.json +++ b/node_modules/json-stringify-safe/package.json @@ -1,31 +1,70 @@ { - "name": "json-stringify-safe", - "version": "5.0.1", + "_args": [ + [ + "json-stringify-safe@5.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "json-stringify-safe@5.0.1", + "_id": "json-stringify-safe@5.0.1", + "_inBundle": false, + "_integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "_location": "/json-stringify-safe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-stringify-safe@5.0.1", + "name": "json-stringify-safe", + "escapedName": "json-stringify-safe", + "rawSpec": "5.0.1", + "saveSpec": null, + "fetchSpec": "5.0.1" + }, + "_requiredBy": [ + "/nock" + ], + "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "_spec": "5.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/json-stringify-safe/issues" + }, + "contributors": [ + { + "name": "Andri Möll", + "email": "andri@dot.ee", + "url": "http://themoll.com" + } + ], "description": "Like JSON.stringify, but doesn't blow up on circular refs.", + "devDependencies": { + "mocha": ">= 2.1.0 < 3", + "must": ">= 0.12 < 0.13", + "sinon": ">= 1.12.2 < 2" + }, + "homepage": "https://github.com/isaacs/json-stringify-safe", "keywords": [ "json", "stringify", "circular", "safe" ], - "homepage": "https://github.com/isaacs/json-stringify-safe", - "bugs": "https://github.com/isaacs/json-stringify-safe/issues", - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "contributors": [ - "Andri Möll (http://themoll.com)" - ], "license": "ISC", + "main": "stringify.js", + "name": "json-stringify-safe", "repository": { "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe" + "url": "git://github.com/isaacs/json-stringify-safe.git" }, - "main": "stringify.js", "scripts": { "test": "node test.js" }, - "devDependencies": { - "mocha": ">= 2.1.0 < 3", - "must": ">= 0.12 < 0.13", - "sinon": ">= 1.12.2 < 2" - } -} \ No newline at end of file + "version": "5.0.1" +} diff --git a/node_modules/json5/package.json b/node_modules/json5/package.json index 17bd44316..24e2747d8 100644 --- a/node_modules/json5/package.json +++ b/node_modules/json5/package.json @@ -1,49 +1,62 @@ { - "name": "json5", - "version": "1.0.1", - "description": "JSON for humans.", - "main": "lib/index.js", - "bin": "lib/cli.js", + "_args": [ + [ + "json5@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "json5@1.0.1", + "_id": "json5@1.0.1", + "_inBundle": false, + "_integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "_location": "/json5", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json5@1.0.1", + "name": "json5", + "escapedName": "json5", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/tsconfig-paths" + ], + "_resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Aseem Kishore", + "email": "aseem.kishore@gmail.com" + }, + "bin": { + "json5": "lib/cli.js" + }, "browser": "dist/index.js", - "files": [ - "lib/", - "dist/" - ], - "scripts": { - "build": "babel-node build/build.js && babel src -d lib && rollup -c", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "lint": "eslint --fix build src", - "prepublishOnly": "npm run lint && npm test && npm run production", - "pretest": "cross-env NODE_ENV=test npm run build", - "preversion": "npm run lint && npm test && npm run production", - "production": "cross-env NODE_ENV=production npm run build", - "test": "nyc --reporter=html --reporter=text mocha" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/json5/json5.git" - }, - "keywords": [ - "json", - "json5", - "es5", - "es2015", - "ecmascript" - ], - "author": "Aseem Kishore ", - "contributors": [ - "Max Nanasy ", - "Andrew Eisenberg ", - "Jordan Tucker " - ], - "license": "MIT", "bugs": { "url": "https://github.com/json5/json5/issues" }, - "homepage": "http://json5.org/", + "contributors": [ + { + "name": "Max Nanasy", + "email": "max.nanasy@gmail.com" + }, + { + "name": "Andrew Eisenberg", + "email": "andrew@eisenberg.as" + }, + { + "name": "Jordan Tucker", + "email": "jordanbtucker@gmail.com" + } + ], "dependencies": { "minimist": "^1.2.0" }, + "description": "JSON for humans.", "devDependencies": { "babel-cli": "^6.26.0", "babel-core": "^6.26.0", @@ -72,5 +85,35 @@ "rollup-plugin-uglify": "^3.0.0", "sinon": "^4.4.2", "unicode-9.0.0": "^0.7.5" - } -} \ No newline at end of file + }, + "files": [ + "lib/", + "dist/" + ], + "homepage": "http://json5.org/", + "keywords": [ + "json", + "json5", + "es5", + "es2015", + "ecmascript" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "json5", + "repository": { + "type": "git", + "url": "git+https://github.com/json5/json5.git" + }, + "scripts": { + "build": "babel-node build/build.js && babel src -d lib && rollup -c", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint --fix build src", + "prepublishOnly": "npm run lint && npm test && npm run production", + "pretest": "cross-env NODE_ENV=test npm run build", + "preversion": "npm run lint && npm test && npm run production", + "production": "cross-env NODE_ENV=production npm run build", + "test": "nyc --reporter=html --reporter=text mocha" + }, + "version": "1.0.1" +} diff --git a/node_modules/jsonschema/package.json b/node_modules/jsonschema/package.json index 8d384e2d4..ac526c55f 100644 --- a/node_modules/jsonschema/package.json +++ b/node_modules/jsonschema/package.json @@ -1,25 +1,55 @@ { - "author": "Tom de Grunt ", - "name": "jsonschema", - "version": "1.2.6", - "license": "MIT", - "dependencies": {}, + "_args": [ + [ + "jsonschema@1.2.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "jsonschema@1.2.6", + "_id": "jsonschema@1.2.6", + "_inBundle": false, + "_integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==", + "_location": "/jsonschema", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "jsonschema@1.2.6", + "name": "jsonschema", + "escapedName": "jsonschema", + "rawSpec": "1.2.6", + "saveSpec": null, + "fetchSpec": "1.2.6" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz", + "_spec": "1.2.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Tom de Grunt", + "email": "tom@degrunt.nl" + }, + "bugs": { + "url": "https://github.com/tdegrunt/jsonschema/issues" + }, "contributors": [ { "name": "Austin Wright" } ], - "main": "./lib", - "typings": "./lib/index.d.ts", + "dependencies": {}, + "description": "A fast and easy to use JSON Schema validator", "devDependencies": { + "chai": "~1.5.0", "json-metaschema": "^1.2.0", - "mocha": "~3", - "chai": "~1.5.0" + "mocha": "~3" }, - "optionalDependencies": {}, "engines": { "node": "*" }, + "homepage": "https://github.com/tdegrunt/jsonschema#readme", "keywords": [ "json", "schema", @@ -27,12 +57,17 @@ "validator", "validation" ], + "license": "MIT", + "main": "./lib", + "name": "jsonschema", + "optionalDependencies": {}, "repository": { "type": "git", "url": "git://github.com/tdegrunt/jsonschema.git" }, - "description": "A fast and easy to use JSON Schema validator", "scripts": { - "test": "./node_modules/.bin/mocha -R spec" - } -} \ No newline at end of file + "test": "mocha -R spec" + }, + "typings": "./lib/index.d.ts", + "version": "1.2.6" +} diff --git a/node_modules/just-extend/package.json b/node_modules/just-extend/package.json index b41a5ec89..879659675 100644 --- a/node_modules/just-extend/package.json +++ b/node_modules/just-extend/package.json @@ -1,12 +1,41 @@ { - "name": "just-extend", - "version": "4.1.0", - "description": "extend an object", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "_args": [ + [ + "just-extend@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "just-extend@4.1.0", + "_id": "just-extend@4.1.0", + "_inBundle": false, + "_integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "_location": "/just-extend", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "just-extend@4.1.0", + "name": "just-extend", + "escapedName": "just-extend", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" }, - "repository": "https://github.com/angus-c/just", + "_requiredBy": [ + "/nise" + ], + "_resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Angus Croll" + }, + "bugs": { + "url": "https://github.com/angus-c/just/issues" + }, + "description": "extend an object", + "homepage": "https://github.com/angus-c/just#readme", "keywords": [ "object", "assign", @@ -18,9 +47,15 @@ "no-dependencies", "just" ], - "author": "Angus Croll", "license": "MIT", - "bugs": { - "url": "https://github.com/angus-c/just/issues" - } -} \ No newline at end of file + "main": "index.js", + "name": "just-extend", + "repository": { + "type": "git", + "url": "git+https://github.com/angus-c/just.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "4.1.0" +} diff --git a/node_modules/keyv/package.json b/node_modules/keyv/package.json index e179afca8..f21e385de 100644 --- a/node_modules/keyv/package.json +++ b/node_modules/keyv/package.json @@ -1,20 +1,61 @@ { - "name": "keyv", - "version": "3.1.0", + "_args": [ + [ + "keyv@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "keyv@3.1.0", + "_id": "keyv@3.1.0", + "_inBundle": false, + "_integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "_location": "/keyv", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "keyv@3.1.0", + "name": "keyv", + "escapedName": "keyv", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Luke Childs", + "email": "lukechilds123@gmail.com", + "url": "http://lukechilds.co.uk" + }, + "bugs": { + "url": "https://github.com/lukechilds/keyv/issues" + }, + "dependencies": { + "json-buffer": "3.0.0" + }, "description": "Simple key-value storage with support for multiple backends", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava test/keyv.js", - "test:full": "xo && nyc ava --serial", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/keyv.git" + "devDependencies": { + "@keyv/mongo": "*", + "@keyv/mysql": "*", + "@keyv/postgres": "*", + "@keyv/redis": "*", + "@keyv/sqlite": "*", + "@keyv/test-suite": "*", + "ava": "^0.25.0", + "coveralls": "^3.0.0", + "eslint-config-xo-lukechilds": "^1.0.0", + "nyc": "^11.0.3", + "this": "^1.0.2", + "timekeeper": "^2.0.0", + "xo": "^0.20.1" }, + "homepage": "https://github.com/lukechilds/keyv", "keywords": [ "key", "value", @@ -22,28 +63,20 @@ "cache", "ttl" ], - "author": "Luke Childs (http://lukechilds.co.uk)", "license": "MIT", - "bugs": { - "url": "https://github.com/lukechilds/keyv/issues" + "main": "src/index.js", + "name": "keyv", + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/keyv.git" }, - "homepage": "https://github.com/lukechilds/keyv", - "dependencies": { - "json-buffer": "3.0.0" + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava test/keyv.js", + "test:full": "xo && nyc ava --serial" }, - "devDependencies": { - "ava": "^0.25.0", - "coveralls": "^3.0.0", - "eslint-config-xo-lukechilds": "^1.0.0", - "@keyv/mongo": "*", - "@keyv/mysql": "*", - "@keyv/postgres": "*", - "@keyv/redis": "*", - "@keyv/sqlite": "*", - "@keyv/test-suite": "*", - "nyc": "^11.0.3", - "this": "^1.0.2", - "timekeeper": "^2.0.0", - "xo": "^0.20.1" + "version": "3.1.0", + "xo": { + "extends": "xo-lukechilds" } -} \ No newline at end of file +} diff --git a/node_modules/latest-version/package.json b/node_modules/latest-version/package.json index 601992a28..8f7e52664 100644 --- a/node_modules/latest-version/package.json +++ b/node_modules/latest-version/package.json @@ -1,24 +1,60 @@ { - "name": "latest-version", - "version": "5.1.0", - "description": "Get the latest version of an npm package", - "license": "MIT", - "repository": "sindresorhus/latest-version", + "_args": [ + [ + "latest-version@5.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "latest-version@5.1.0", + "_id": "latest-version@5.1.0", + "_inBundle": false, + "_integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "_location": "/latest-version", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "latest-version@5.1.0", + "name": "latest-version", + "escapedName": "latest-version", + "rawSpec": "5.1.0", + "saveSpec": null, + "fetchSpec": "5.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "_spec": "5.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/latest-version/issues" + }, + "dependencies": { + "package-json": "^6.3.0" + }, + "description": "Get the latest version of an npm package", + "devDependencies": { + "ava": "^1.4.1", + "semver": "^6.0.0", + "semver-regex": "^2.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/latest-version#readme", "keywords": [ "latest", "version", @@ -29,14 +65,14 @@ "current", "module" ], - "dependencies": { - "package-json": "^6.3.0" + "license": "MIT", + "name": "latest-version", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/latest-version.git" }, - "devDependencies": { - "ava": "^1.4.1", - "semver": "^6.0.0", - "semver-regex": "^2.0.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.1.0" +} diff --git a/node_modules/levn/package.json b/node_modules/levn/package.json index 5f56e3762..803ffb60b 100644 --- a/node_modules/levn/package.json +++ b/node_modules/levn/package.json @@ -1,8 +1,58 @@ { - "name": "levn", - "version": "0.4.1", - "author": "George Zahariev ", + "_args": [ + [ + "levn@0.4.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "levn@0.4.1", + "_id": "levn@0.4.1", + "_inBundle": false, + "_integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "_location": "/levn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "levn@0.4.1", + "name": "levn", + "escapedName": "levn", + "rawSpec": "0.4.1", + "saveSpec": null, + "fetchSpec": "0.4.1" + }, + "_requiredBy": [ + "/eslint", + "/optionator" + ], + "_resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "_spec": "0.4.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/levn/issues" + }, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, "description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible", + "devDependencies": { + "livescript": "^1.6.0", + "mocha": "^7.1.1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib", + "README.md", + "LICENSE" + ], "homepage": "https://github.com/gkz/levn", "keywords": [ "levn", @@ -17,17 +67,9 @@ "typed", "flexible" ], - "files": [ - "lib", - "README.md", - "LICENSE" - ], - "main": "./lib/", - "bugs": "https://github.com/gkz/levn/issues", "license": "MIT", - "engines": { - "node": ">= 0.8.0" - }, + "main": "./lib/", + "name": "levn", "repository": { "type": "git", "url": "git://github.com/gkz/levn.git" @@ -35,12 +77,5 @@ "scripts": { "test": "make test" }, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "devDependencies": { - "livescript": "^1.6.0", - "mocha": "^7.1.1" - } -} \ No newline at end of file + "version": "0.4.1" +} diff --git a/node_modules/lines-and-columns/package.json b/node_modules/lines-and-columns/package.json index 646cb2301..cb1434d64 100644 --- a/node_modules/lines-and-columns/package.json +++ b/node_modules/lines-and-columns/package.json @@ -1,37 +1,41 @@ { - "name": "lines-and-columns", - "description": "Maps lines and columns to character offsets and back.", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "scripts": { - "lint": "tslint --config tslint.json --project tsconfig.json --type-check", - "lint-fix": "tslint --config tslint.json --project tsconfig.json --type-check --fix", - "prebuild": "rm -rf dist", - "build": "./script/build", - "pretest": "npm run build", - "test": "mocha", - "prepublish": "npm run lint && npm run build", - "semantic-release": "semantic-release pre && npm publish && semantic-release post" - }, - "files": [ - "dist" + "_args": [ + [ + "lines-and-columns@1.1.6", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "https://github.com/eventualbuddha/lines-and-columns.git" + "_development": true, + "_from": "lines-and-columns@1.1.6", + "_id": "lines-and-columns@1.1.6", + "_inBundle": false, + "_integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "_location": "/lines-and-columns", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lines-and-columns@1.1.6", + "name": "lines-and-columns", + "escapedName": "lines-and-columns", + "rawSpec": "1.1.6", + "saveSpec": null, + "fetchSpec": "1.1.6" }, - "keywords": [ - "lines", - "columns", - "parser" + "_requiredBy": [ + "/read-pkg/parse-json" ], - "author": "Brian Donovan ", - "license": "MIT", + "_resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "_spec": "1.1.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Brian Donovan", + "email": "me@brian-donovan.com" + }, "bugs": { "url": "https://github.com/eventualbuddha/lines-and-columns/issues" }, - "homepage": "https://github.com/eventualbuddha/lines-and-columns#readme", + "description": "Maps lines and columns to character offsets and back.", "devDependencies": { "@types/mocha": "^2.2.34", "@types/node": "^6.0.52", @@ -41,5 +45,33 @@ "tslint": "^4.1.1", "typescript": "^2.1.4" }, + "files": [ + "dist" + ], + "homepage": "https://github.com/eventualbuddha/lines-and-columns#readme", + "keywords": [ + "lines", + "columns", + "parser" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.mjs", + "name": "lines-and-columns", + "repository": { + "type": "git", + "url": "git+https://github.com/eventualbuddha/lines-and-columns.git" + }, + "scripts": { + "build": "./script/build", + "lint": "tslint --config tslint.json --project tsconfig.json --type-check", + "lint-fix": "tslint --config tslint.json --project tsconfig.json --type-check --fix", + "prebuild": "rm -rf dist", + "prepublish": "npm run lint && npm run build", + "pretest": "npm run build", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "mocha" + }, + "types": "dist/index.d.ts", "version": "1.1.6" -} \ No newline at end of file +} diff --git a/node_modules/load-json-file/node_modules/strip-bom/package.json b/node_modules/load-json-file/node_modules/strip-bom/package.json index f37e6ab2e..e29702140 100644 --- a/node_modules/load-json-file/node_modules/strip-bom/package.json +++ b/node_modules/load-json-file/node_modules/strip-bom/package.json @@ -1,23 +1,53 @@ { - "name": "strip-bom", - "version": "3.0.0", - "description": "Strip UTF-8 byte order mark (BOM) from a string", - "license": "MIT", - "repository": "sindresorhus/strip-bom", + "_args": [ + [ + "strip-bom@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "strip-bom@3.0.0", + "_id": "strip-bom@3.0.0", + "_inBundle": false, + "_integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "_location": "/load-json-file/strip-bom", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-bom@3.0.0", + "name": "strip-bom", + "escapedName": "strip-bom", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-bom/issues" + }, + "description": "Strip UTF-8 byte order mark (BOM) from a string", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/strip-bom#readme", "keywords": [ "strip", "bom", @@ -33,8 +63,14 @@ "text", "string" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "strip-bom", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-bom.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/load-json-file/node_modules/type-fest/package.json b/node_modules/load-json-file/node_modules/type-fest/package.json index e0a025de5..6fba461af 100644 --- a/node_modules/load-json-file/node_modules/type-fest/package.json +++ b/node_modules/load-json-file/node_modules/type-fest/package.json @@ -1,24 +1,57 @@ { - "name": "type-fest", - "version": "0.3.1", - "description": "A collection of essential TypeScript types", - "license": "(MIT OR CC0-1.0)", - "repository": "sindresorhus/type-fest", + "_args": [ + [ + "type-fest@0.3.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "type-fest@0.3.1", + "_id": "type-fest@0.3.1", + "_inBundle": false, + "_integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "_location": "/load-json-file/type-fest", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "type-fest@0.3.1", + "name": "type-fest", + "escapedName": "type-fest", + "rawSpec": "0.3.1", + "saveSpec": null, + "fetchSpec": "0.3.1" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "_spec": "0.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/type-fest/issues" + }, + "description": "A collection of essential TypeScript types", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.3.0", + "@typescript-eslint/eslint-plugin": "^1.5.0", + "eslint-config-xo-typescript": "^0.9.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && tsd" - }, "files": [ "index.d.ts", "source" ], + "homepage": "https://github.com/sindresorhus/type-fest#readme", "keywords": [ "typescript", "ts", @@ -30,13 +63,16 @@ "merge", "json" ], - "devDependencies": { - "@sindresorhus/tsconfig": "^0.3.0", - "@typescript-eslint/eslint-plugin": "^1.5.0", - "eslint-config-xo-typescript": "^0.9.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "license": "(MIT OR CC0-1.0)", + "name": "type-fest", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/type-fest.git" }, + "scripts": { + "test": "xo && tsd" + }, + "version": "0.3.1", "xo": { "extends": "xo-typescript", "extensions": [ @@ -46,4 +82,4 @@ "import/no-unresolved": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json index 644fa615e..529184da7 100644 --- a/node_modules/load-json-file/package.json +++ b/node_modules/load-json-file/package.json @@ -1,24 +1,62 @@ { - "name": "load-json-file", - "version": "5.3.0", - "description": "Read and parse a JSON file", - "license": "MIT", - "repository": "sindresorhus/load-json-file", + "_args": [ + [ + "load-json-file@5.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "load-json-file@5.3.0", + "_id": "load-json-file@5.3.0", + "_inBundle": false, + "_integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "_location": "/load-json-file", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "load-json-file@5.3.0", + "name": "load-json-file", + "escapedName": "load-json-file", + "rawSpec": "5.3.0", + "saveSpec": null, + "fetchSpec": "5.3.0" + }, + "_requiredBy": [ + "/pkg-conf" + ], + "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "_spec": "5.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/load-json-file/issues" + }, + "dependencies": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "description": "Read and parse a JSON file", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/load-json-file#readme", "keywords": [ "read", "json", @@ -28,16 +66,14 @@ "graceful", "load" ], - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" + "license": "MIT", + "name": "load-json-file", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/load-json-file.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.3.0" +} diff --git a/node_modules/locate-path/package.json b/node_modules/locate-path/package.json index c3cac4f11..b50da0df4 100644 --- a/node_modules/locate-path/package.json +++ b/node_modules/locate-path/package.json @@ -1,24 +1,58 @@ { - "name": "locate-path", - "version": "5.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", + "_args": [ + [ + "locate-path@5.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "locate-path@5.0.0", + "_id": "locate-path@5.0.0", + "_inBundle": false, + "_integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "_location": "/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "locate-path@5.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "dependencies": { + "p-locate": "^4.1.0" + }, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", "keywords": [ "locate", "path", @@ -34,12 +68,14 @@ "iterable", "iterator" ], - "dependencies": { - "p-locate": "^4.1.0" + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.0.0" +} diff --git a/node_modules/lodash.camelcase/package.json b/node_modules/lodash.camelcase/package.json index d1c3337e7..0255691aa 100644 --- a/node_modules/lodash.camelcase/package.json +++ b/node_modules/lodash.camelcase/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.camelcase", - "version": "4.3.0", + "_args": [ + [ + "lodash.camelcase@4.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.camelcase@4.3.0", + "_id": "lodash.camelcase@4.3.0", + "_inBundle": false, + "_integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "_location": "/lodash.camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.camelcase@4.3.0", + "name": "lodash.camelcase", + "escapedName": "lodash.camelcase", + "rawSpec": "4.3.0", + "saveSpec": null, + "fetchSpec": "4.3.0" + }, + "_requiredBy": [ + "/eslint-plugin-filenames" + ], + "_resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "_spec": "4.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.camelCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, camelcase", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "camelcase" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.3.0" +} diff --git a/node_modules/lodash.clonedeep/package.json b/node_modules/lodash.clonedeep/package.json index 06e0a424b..e03cfbd0a 100644 --- a/node_modules/lodash.clonedeep/package.json +++ b/node_modules/lodash.clonedeep/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.clonedeep", - "version": "4.5.0", + "_args": [ + [ + "lodash.clonedeep@4.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.clonedeep@4.5.0", + "_id": "lodash.clonedeep@4.5.0", + "_inBundle": false, + "_integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "_location": "/lodash.clonedeep", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.clonedeep@4.5.0", + "name": "lodash.clonedeep", + "escapedName": "lodash.clonedeep", + "rawSpec": "4.5.0", + "saveSpec": null, + "fetchSpec": "4.5.0" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "_spec": "4.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.cloneDeep` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, clonedeep", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "clonedeep" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.clonedeep", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.5.0" +} diff --git a/node_modules/lodash.flattendeep/package.json b/node_modules/lodash.flattendeep/package.json index 24bf32a74..17e02e867 100644 --- a/node_modules/lodash.flattendeep/package.json +++ b/node_modules/lodash.flattendeep/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.flattendeep", - "version": "4.4.0", + "_args": [ + [ + "lodash.flattendeep@4.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.flattendeep@4.4.0", + "_id": "lodash.flattendeep@4.4.0", + "_inBundle": false, + "_integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "_location": "/lodash.flattendeep", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.flattendeep@4.4.0", + "name": "lodash.flattendeep", + "escapedName": "lodash.flattendeep", + "rawSpec": "4.4.0", + "saveSpec": null, + "fetchSpec": "4.4.0" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "_spec": "4.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.flattenDeep` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, flattendeep", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "flattendeep" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.flattendeep", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.4.0" +} diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json index cb3be35f7..96d775bd4 100644 --- a/node_modules/lodash.get/package.json +++ b/node_modules/lodash.get/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.get", - "version": "4.4.2", + "_args": [ + [ + "lodash.get@4.4.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.get@4.4.2", + "_id": "lodash.get@4.4.2", + "_inBundle": false, + "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "_location": "/lodash.get", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.get@4.4.2", + "name": "lodash.get", + "escapedName": "lodash.get", + "rawSpec": "4.4.2", + "saveSpec": null, + "fetchSpec": "4.4.2" + }, + "_requiredBy": [ + "/@sinonjs/samsam" + ], + "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "_spec": "4.4.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.get` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, get", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "get" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.get", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.4.2" +} diff --git a/node_modules/lodash.islength/package.json b/node_modules/lodash.islength/package.json index e8687664b..7eb827534 100644 --- a/node_modules/lodash.islength/package.json +++ b/node_modules/lodash.islength/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.islength", - "version": "4.0.1", + "_args": [ + [ + "lodash.islength@4.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.islength@4.0.1", + "_id": "lodash.islength@4.0.1", + "_inBundle": false, + "_integrity": "sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc=", + "_location": "/lodash.islength", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.islength@4.0.1", + "name": "lodash.islength", + "escapedName": "lodash.islength", + "rawSpec": "4.0.1", + "saveSpec": null, + "fetchSpec": "4.0.1" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/lodash.islength/-/lodash.islength-4.0.1.tgz", + "_spec": "4.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine@iceddev.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.isLength` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, islength", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "islength" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.islength", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.0.1" +} diff --git a/node_modules/lodash.kebabcase/package.json b/node_modules/lodash.kebabcase/package.json index 9644a22ff..87ee1aa24 100644 --- a/node_modules/lodash.kebabcase/package.json +++ b/node_modules/lodash.kebabcase/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.kebabcase", - "version": "4.1.1", + "_args": [ + [ + "lodash.kebabcase@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.kebabcase@4.1.1", + "_id": "lodash.kebabcase@4.1.1", + "_inBundle": false, + "_integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "_location": "/lodash.kebabcase", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.kebabcase@4.1.1", + "name": "lodash.kebabcase", + "escapedName": "lodash.kebabcase", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" + }, + "_requiredBy": [ + "/eslint-plugin-filenames" + ], + "_resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.kebabCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, kebabcase", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "kebabcase" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.kebabcase", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.1.1" +} diff --git a/node_modules/lodash.merge/package.json b/node_modules/lodash.merge/package.json index 41a93f294..5bafc5e32 100644 --- a/node_modules/lodash.merge/package.json +++ b/node_modules/lodash.merge/package.json @@ -1,18 +1,65 @@ { - "name": "lodash.merge", - "version": "4.6.2", + "_args": [ + [ + "lodash.merge@4.6.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.merge@4.6.2", + "_id": "lodash.merge@4.6.2", + "_inBundle": false, + "_integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "_location": "/lodash.merge", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.merge@4.6.2", + "name": "lodash.merge", + "escapedName": "lodash.merge", + "rawSpec": "4.6.2", + "saveSpec": null, + "fetchSpec": "4.6.2" + }, + "_requiredBy": [ + "/concordance" + ], + "_resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "_spec": "4.6.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be" + } + ], "description": "The Lodash method `_.merge` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, merge", - "author": "John-David Dalton ", - "contributors": [ - "John-David Dalton ", - "Mathias Bynens " + "keywords": [ + "lodash-modularized", + "merge" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.merge", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.6.2" +} diff --git a/node_modules/lodash.snakecase/package.json b/node_modules/lodash.snakecase/package.json index be31f5e11..f0bbd7f06 100644 --- a/node_modules/lodash.snakecase/package.json +++ b/node_modules/lodash.snakecase/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.snakecase", - "version": "4.1.1", + "_args": [ + [ + "lodash.snakecase@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.snakecase@4.1.1", + "_id": "lodash.snakecase@4.1.1", + "_inBundle": false, + "_integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "_location": "/lodash.snakecase", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.snakecase@4.1.1", + "name": "lodash.snakecase", + "escapedName": "lodash.snakecase", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" + }, + "_requiredBy": [ + "/eslint-plugin-filenames" + ], + "_resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.snakeCase` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, snakecase", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "snakecase" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.snakecase", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.1.1" +} diff --git a/node_modules/lodash.upperfirst/package.json b/node_modules/lodash.upperfirst/package.json index cb46cf1e6..2f1a2abb2 100644 --- a/node_modules/lodash.upperfirst/package.json +++ b/node_modules/lodash.upperfirst/package.json @@ -1,19 +1,73 @@ { - "name": "lodash.upperfirst", - "version": "4.3.1", + "_args": [ + [ + "lodash.upperfirst@4.3.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash.upperfirst@4.3.1", + "_id": "lodash.upperfirst@4.3.1", + "_inBundle": false, + "_integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "_location": "/lodash.upperfirst", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.upperfirst@4.3.1", + "name": "lodash.upperfirst", + "escapedName": "lodash.upperfirst", + "rawSpec": "4.3.1", + "saveSpec": null, + "fetchSpec": "4.3.1" + }, + "_requiredBy": [ + "/eslint-plugin-filenames" + ], + "_resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "_spec": "4.3.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], "description": "The lodash method `_.upperFirst` exported as a module.", "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, upperfirst", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" + "keywords": [ + "lodash-modularized", + "upperfirst" ], - "repository": "lodash/lodash", + "license": "MIT", + "name": "lodash.upperfirst", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.3.1" +} diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json index ef6c08de2..7a272c065 100644 --- a/node_modules/lodash/package.json +++ b/node_modules/lodash/package.json @@ -1,19 +1,72 @@ { - "name": "lodash", - "version": "4.17.19", + "_args": [ + [ + "lodash@4.17.19", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lodash@4.17.19", + "_id": "lodash@4.17.19", + "_inBundle": false, + "_integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "_location": "/lodash", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash@4.17.19", + "name": "lodash", + "escapedName": "lodash", + "rawSpec": "4.17.19", + "saveSpec": null, + "fetchSpec": "4.17.19" + }, + "_requiredBy": [ + "/@eslint/eslintrc", + "/@typescript-eslint/typescript-estree", + "/ava", + "/eslint", + "/nock", + "/table" + ], + "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "_spec": "4.17.19", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be" + } + ], "description": "Lodash modular utilities.", - "keywords": "modules, stdlib, util", "homepage": "https://lodash.com/", - "repository": "lodash/lodash", "icon": "https://lodash.com/icon.svg", + "keywords": [ + "modules", + "stdlib", + "util" + ], "license": "MIT", "main": "lodash.js", - "author": "John-David Dalton ", - "contributors": [ - "John-David Dalton ", - "Mathias Bynens " - ], + "name": "lodash", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" - } -} \ No newline at end of file + }, + "version": "4.17.19" +} diff --git a/node_modules/log-symbols/package.json b/node_modules/log-symbols/package.json index a7bb760a1..a9f52bbd9 100644 --- a/node_modules/log-symbols/package.json +++ b/node_modules/log-symbols/package.json @@ -1,25 +1,61 @@ { - "name": "log-symbols", - "version": "3.0.0", - "description": "Colored symbols for various log levels. Example: `✔︎ Success`", - "license": "MIT", - "repository": "sindresorhus/log-symbols", + "_args": [ + [ + "log-symbols@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "log-symbols@3.0.0", + "_id": "log-symbols@3.0.0", + "_inBundle": false, + "_integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "_location": "/log-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "log-symbols@3.0.0", + "name": "log-symbols", + "escapedName": "log-symbols", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ora" + ], + "_resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/sindresorhus/log-symbols/issues" + }, + "dependencies": { + "chalk": "^2.4.2" + }, + "description": "Colored symbols for various log levels. Example: `✔︎ Success`", + "devDependencies": { + "ava": "^1.4.1", + "strip-ansi": "^5.2.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "browser.js" ], + "homepage": "https://github.com/sindresorhus/log-symbols#readme", "keywords": [ "unicode", "cli", @@ -37,14 +73,14 @@ "terminal", "stdout" ], - "dependencies": { - "chalk": "^2.4.2" + "license": "MIT", + "name": "log-symbols", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/log-symbols.git" }, - "devDependencies": { - "ava": "^1.4.1", - "strip-ansi": "^5.2.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava && tsd" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "3.0.0" +} diff --git a/node_modules/long/package.json b/node_modules/long/package.json index 922ef794d..82900767a 100644 --- a/node_modules/long/package.json +++ b/node_modules/long/package.json @@ -1,28 +1,44 @@ { - "name": "long", - "version": "4.0.0", - "author": "Daniel Wirtz ", - "description": "A Long class for representing a 64-bit two's-complement integer value.", - "main": "src/long.js", - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/long.js.git" + "_args": [ + [ + "long@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "long@4.0.0", + "_id": "long@4.0.0", + "_inBundle": false, + "_integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "_location": "/long", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "long@4.0.0", + "name": "long", + "escapedName": "long", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Daniel Wirtz", + "email": "dcode@dcode.io" }, "bugs": { "url": "https://github.com/dcodeIO/long.js/issues" }, - "keywords": [ - "math" - ], "dependencies": {}, + "description": "A Long class for representing a 64-bit two's-complement integer value.", "devDependencies": { "webpack": "^3.10.0" }, - "license": "Apache-2.0", - "scripts": { - "build": "webpack", - "test": "node tests" - }, "files": [ "index.js", "LICENSE", @@ -30,5 +46,21 @@ "src/long.js", "dist/long.js", "dist/long.js.map" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/dcodeIO/long.js#readme", + "keywords": [ + "math" + ], + "license": "Apache-2.0", + "main": "src/long.js", + "name": "long", + "repository": { + "type": "git", + "url": "git+https://github.com/dcodeIO/long.js.git" + }, + "scripts": { + "build": "webpack", + "test": "node tests" + }, + "version": "4.0.0" +} diff --git a/node_modules/lowercase-keys/package.json b/node_modules/lowercase-keys/package.json index e28b4c1dd..685e668f2 100644 --- a/node_modules/lowercase-keys/package.json +++ b/node_modules/lowercase-keys/package.json @@ -1,23 +1,53 @@ { - "name": "lowercase-keys", - "version": "1.0.1", - "description": "Lowercase the keys of an object", - "license": "MIT", - "repository": "sindresorhus/lowercase-keys", + "_args": [ + [ + "lowercase-keys@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "lowercase-keys@1.0.1", + "_id": "lowercase-keys@1.0.1", + "_inBundle": false, + "_integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "_location": "/lowercase-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lowercase-keys@1.0.1", + "name": "lowercase-keys", + "escapedName": "lowercase-keys", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/got", + "/responselike" + ], + "_resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/lowercase-keys/issues" + }, + "description": "Lowercase the keys of an object", + "devDependencies": { + "ava": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/lowercase-keys#readme", "keywords": [ "object", "assign", @@ -29,7 +59,14 @@ "keys", "key" ], - "devDependencies": { - "ava": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "lowercase-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lowercase-keys.git" + }, + "scripts": { + "test": "ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/make-dir/node_modules/semver/package.json b/node_modules/make-dir/node_modules/semver/package.json index a330b56c2..8b63079c8 100644 --- a/node_modules/make-dir/node_modules/semver/package.json +++ b/node_modules/make-dir/node_modules/semver/package.json @@ -1,28 +1,64 @@ { - "name": "semver", - "version": "6.3.0", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "_args": [ + [ + "semver@6.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "semver@6.3.0", + "_id": "semver@6.3.0", + "_inBundle": false, + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_location": "/make-dir/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@6.3.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "6.3.0", + "saveSpec": null, + "fetchSpec": "6.3.0" }, + "_requiredBy": [ + "/make-dir" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_spec": "6.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "semver": "bin/semver.js" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^14.3.1" }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver.js" - }, "files": [ "bin", "range.bnf", "semver.js" ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true - } -} \ No newline at end of file + }, + "version": "6.3.0" +} diff --git a/node_modules/make-dir/package.json b/node_modules/make-dir/package.json index f644e281a..50d494e81 100644 --- a/node_modules/make-dir/package.json +++ b/node_modules/make-dir/package.json @@ -1,25 +1,66 @@ { - "name": "make-dir", - "version": "3.0.2", - "description": "Make a directory and its parents if needed - Think `mkdir -p`", - "license": "MIT", - "repository": "sindresorhus/make-dir", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "make-dir@3.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "make-dir@3.0.2", + "_id": "make-dir@3.0.2", + "_inBundle": false, + "_integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "_location": "/make-dir", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "make-dir@3.0.2", + "name": "make-dir", + "escapedName": "make-dir", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/configstore" + ], + "_resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/make-dir/issues" + }, + "dependencies": { + "semver": "^6.0.0" + }, + "description": "Make a directory and its parents if needed - Think `mkdir -p`", + "devDependencies": { + "@types/graceful-fs": "^4.1.3", + "@types/node": "^13.7.1", + "ava": "^1.4.0", + "codecov": "^3.2.0", + "graceful-fs": "^4.1.15", + "nyc": "^15.0.0", + "path-type": "^4.0.0", + "tempy": "^0.2.1", + "tsd": "^0.11.0", + "xo": "^0.25.4" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/make-dir#readme", "keywords": [ "mkdir", "mkdirp", @@ -41,19 +82,14 @@ "filesystem", "file-system" ], - "dependencies": { - "semver": "^6.0.0" + "license": "MIT", + "name": "make-dir", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/make-dir.git" }, - "devDependencies": { - "@types/graceful-fs": "^4.1.3", - "@types/node": "^13.7.1", - "ava": "^1.4.0", - "codecov": "^3.2.0", - "graceful-fs": "^4.1.15", - "nyc": "^15.0.0", - "path-type": "^4.0.0", - "tempy": "^0.2.1", - "tsd": "^0.11.0", - "xo": "^0.25.4" - } -} \ No newline at end of file + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "version": "3.0.2" +} diff --git a/node_modules/map-age-cleaner/package.json b/node_modules/map-age-cleaner/package.json index 4478f2268..022e4a238 100644 --- a/node_modules/map-age-cleaner/package.json +++ b/node_modules/map-age-cleaner/package.json @@ -1,42 +1,45 @@ { - "name": "map-age-cleaner", - "version": "0.1.3", - "description": "Automatically cleanup expired items in a Map", - "license": "MIT", - "repository": "SamVerschueren/map-age-cleaner", + "_args": [ + [ + "map-age-cleaner@0.1.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "map-age-cleaner@0.1.3", + "_id": "map-age-cleaner@0.1.3", + "_inBundle": false, + "_integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "_location": "/map-age-cleaner", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "map-age-cleaner@0.1.3", + "name": "map-age-cleaner", + "escapedName": "map-age-cleaner", + "rawSpec": "0.1.3", + "saveSpec": null, + "fetchSpec": "0.1.3" + }, + "_requiredBy": [ + "/mem" + ], + "_resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "_spec": "0.1.3", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sam Verschueren", "email": "sam.verschueren@gmail.com", "url": "github.com/SamVerschueren" }, - "main": "dist/index.js", - "engines": { - "node": ">=6" + "bugs": { + "url": "https://github.com/SamVerschueren/map-age-cleaner/issues" }, - "scripts": { - "prepublishOnly": "npm run build", - "pretest": "npm run build -- --sourceMap", - "test": "npm run lint && nyc ava dist/test.js", - "lint": "tslint --format stylish --project .", - "build": "npm run clean && tsc", - "clean": "del-cli dist" - }, - "files": [ - "dist/index.js", - "dist/index.d.ts" - ], - "keywords": [ - "map", - "age", - "cleaner", - "maxage", - "expire", - "expiration", - "expiring" - ], "dependencies": { "p-defer": "^1.0.0" }, + "description": "Automatically cleanup expired items in a Map", "devDependencies": { "@types/delay": "^2.0.1", "@types/node": "^10.7.1", @@ -49,11 +52,44 @@ "tslint-xo": "^0.9.0", "typescript": "^3.0.1" }, - "typings": "dist/index.d.ts", - "sideEffects": false, + "engines": { + "node": ">=6" + }, + "files": [ + "dist/index.js", + "dist/index.d.ts" + ], + "homepage": "https://github.com/SamVerschueren/map-age-cleaner#readme", + "keywords": [ + "map", + "age", + "cleaner", + "maxage", + "expire", + "expiration", + "expiring" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "map-age-cleaner", "nyc": { "exclude": [ "dist/test.js" ] - } -} \ No newline at end of file + }, + "repository": { + "type": "git", + "url": "git+https://github.com/SamVerschueren/map-age-cleaner.git" + }, + "scripts": { + "build": "npm run clean && tsc", + "clean": "del-cli dist", + "lint": "tslint --format stylish --project .", + "prepublishOnly": "npm run build", + "pretest": "npm run build -- --sourceMap", + "test": "npm run lint && nyc ava dist/test.js" + }, + "sideEffects": false, + "typings": "dist/index.d.ts", + "version": "0.1.3" +} diff --git a/node_modules/matcher/node_modules/escape-string-regexp/package.json b/node_modules/matcher/node_modules/escape-string-regexp/package.json index 053b31334..0d4b4085e 100644 --- a/node_modules/matcher/node_modules/escape-string-regexp/package.json +++ b/node_modules/matcher/node_modules/escape-string-regexp/package.json @@ -1,25 +1,56 @@ { - "name": "escape-string-regexp", - "version": "4.0.0", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": "sindresorhus/escape-string-regexp", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "escape-string-regexp@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "escape-string-regexp@4.0.0", + "_id": "escape-string-regexp@4.0.0", + "_inBundle": false, + "_integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "_location": "/matcher/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-string-regexp@4.0.0", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/matcher" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.11.0", + "xo": "^0.28.3" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", "keywords": [ "escape", "regex", @@ -30,9 +61,14 @@ "special", "characters" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.11.0", - "xo": "^0.28.3" - } -} \ No newline at end of file + "license": "MIT", + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/matcher/package.json b/node_modules/matcher/package.json index af3a3845f..8c81e0ffa 100644 --- a/node_modules/matcher/package.json +++ b/node_modules/matcher/package.json @@ -1,25 +1,59 @@ { - "name": "matcher", - "version": "3.0.0", - "description": "Simple wildcard matching", - "license": "MIT", - "repository": "sindresorhus/matcher", + "_args": [ + [ + "matcher@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "matcher@3.0.0", + "_id": "matcher@3.0.0", + "_inBundle": false, + "_integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "_location": "/matcher", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "matcher@3.0.0", + "name": "matcher", + "escapedName": "matcher", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/matcher/issues" + }, + "dependencies": { + "escape-string-regexp": "^4.0.0" + }, + "description": "Simple wildcard matching", + "devDependencies": { + "ava": "^2.4.0", + "matcha": "^0.7.0", + "tsd": "^0.11.0", + "xo": "^0.30.0" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "matcha bench.js" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/matcher#readme", "keywords": [ "matcher", "matching", @@ -37,18 +71,20 @@ "globbing", "minimatch" ], - "dependencies": { - "escape-string-regexp": "^4.0.0" + "license": "MIT", + "name": "matcher", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/matcher.git" }, - "devDependencies": { - "ava": "^2.4.0", - "matcha": "^0.7.0", - "tsd": "^0.11.0", - "xo": "^0.30.0" + "scripts": { + "bench": "matcha bench.js", + "test": "xo && ava && tsd" }, + "version": "3.0.0", "xo": { "rules": { "@typescript-eslint/member-ordering": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/md5-hex/package.json b/node_modules/md5-hex/package.json index a71c11260..f577e3a8a 100644 --- a/node_modules/md5-hex/package.json +++ b/node_modules/md5-hex/package.json @@ -1,25 +1,61 @@ { - "name": "md5-hex", - "version": "3.0.1", - "description": "Create a MD5 hash with hex encoding", - "license": "MIT", - "repository": "sindresorhus/md5-hex", + "_args": [ + [ + "md5-hex@3.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "md5-hex@3.0.1", + "_id": "md5-hex@3.0.1", + "_inBundle": false, + "_integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", + "_location": "/md5-hex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "md5-hex@3.0.1", + "name": "md5-hex", + "escapedName": "md5-hex", + "rawSpec": "3.0.1", + "saveSpec": null, + "fetchSpec": "3.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", + "_spec": "3.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/sindresorhus/md5-hex/issues" + }, + "dependencies": { + "blueimp-md5": "^2.10.0" + }, + "description": "Create a MD5 hash with hex encoding", + "devDependencies": { + "@types/node": "^12.6.2", + "ava": "^2.2.0", + "tsd": "^0.7.4", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts", "browser.js" ], + "homepage": "https://github.com/sindresorhus/md5-hex#readme", "keywords": [ "hash", "crypto", @@ -28,14 +64,14 @@ "buffer", "browser" ], - "dependencies": { - "blueimp-md5": "^2.10.0" + "license": "MIT", + "name": "md5-hex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/md5-hex.git" }, - "devDependencies": { - "@types/node": "^12.6.2", - "ava": "^2.2.0", - "tsd": "^0.7.4", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava && tsd" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "3.0.1" +} diff --git a/node_modules/md5-o-matic/package.json b/node_modules/md5-o-matic/package.json index 72382adbc..31481281a 100644 --- a/node_modules/md5-o-matic/package.json +++ b/node_modules/md5-o-matic/package.json @@ -1,18 +1,48 @@ { - "name": "md5-o-matic", - "version": "0.1.1", + "_args": [ + [ + "md5-o-matic@0.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "md5-o-matic@0.1.1", + "_id": "md5-o-matic@0.1.1", + "_inBundle": false, + "_integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=", + "_location": "/md5-o-matic", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "md5-o-matic@0.1.1", + "name": "md5-o-matic", + "escapedName": "md5-o-matic", + "rawSpec": "0.1.1", + "saveSpec": null, + "fetchSpec": "0.1.1" + }, + "_requiredBy": [ + "/concordance/md5-hex" + ], + "_resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz", + "_spec": "0.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Trent Millar" + }, + "bugs": { + "url": "https://github.com/trentmillar/md5-o-matic/issues" + }, "description": "Fast and simple MD5 hashing utility with zero module dependencies. View MD5 Shootout results, http://jsperf.com/md5-shootout/39", - "main": "lib/md5omatic.js", + "devDependencies": { + "mocha": "", + "should": "" + }, "directories": { "test": "test" }, - "scripts": { - "test": "mocha test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/trentmillar/md5-o-matic.git" - }, + "homepage": "https://github.com/trentmillar/md5-o-matic", "keywords": [ "md5", "hashing", @@ -22,23 +52,20 @@ "fast", "md5-o-matic" ], - "readmeFilename": "README.md", - "author": { - "name": "Trent Millar" - }, "licenses": [ { "type": "MIT", "url": "https://github.com/trentmillar/md5-o-matic/blob/master/LICENSE" } ], - "devDependencies": { - "mocha": "", - "should": "" + "main": "lib/md5omatic.js", + "name": "md5-o-matic", + "repository": { + "type": "git", + "url": "git://github.com/trentmillar/md5-o-matic.git" }, - "readme": "# md5-o-matic\n\nMD5 Shootout and how it stacks up - http://jsperf.com/md5-shootout/39\nMD5-o-matic provides simple & fast MD5 hashing for Node.js that requires no other module dependencies.\n", - "bugs": { - "url": "https://github.com/trentmillar/md5-o-matic/issues" + "scripts": { + "test": "mocha test/*.js" }, - "homepage": "https://github.com/trentmillar/md5-o-matic" -} \ No newline at end of file + "version": "0.1.1" +} diff --git a/node_modules/md5/package.json b/node_modules/md5/package.json index fdcac15a4..e715bf8c3 100644 --- a/node_modules/md5/package.json +++ b/node_modules/md5/package.json @@ -1,36 +1,71 @@ { - "name": "md5", - "description": "js function for hashing messages with MD5", - "version": "2.2.1", - "author": "Paul Vorbach (http://paul.vorba.ch)", - "contributors": [ - "salba" + "_args": [ + [ + "md5@2.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_from": "md5@2.2.1", + "_id": "md5@2.2.1", + "_inBundle": false, + "_integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "_location": "/md5", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "md5@2.2.1", + "name": "md5", + "escapedName": "md5", + "rawSpec": "2.2.1", + "saveSpec": null, + "fetchSpec": "2.2.1" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "_spec": "2.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch" + }, + "bugs": { + "url": "https://github.com/pvorb/node-md5/issues" + }, + "contributors": [ + { + "name": "salba" + } + ], + "dependencies": { + "charenc": "~0.0.1", + "crypt": "~0.0.1", + "is-buffer": "~1.1.1" + }, + "description": "js function for hashing messages with MD5", + "devDependencies": { + "mocha": "~2.3.4" + }, + "homepage": "https://github.com/pvorb/node-md5#readme", + "license": "BSD-3-Clause", + "main": "md5.js", + "name": "md5", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-md5.git" + }, + "scripts": { + "test": "mocha" + }, "tags": [ "md5", "hash", "encryption", "message digest" ], - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-md5.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-md5/issues" - }, - "main": "md5.js", - "scripts": { - "test": "mocha" - }, - "dependencies": { - "charenc": "~0.0.1", - "crypt": "~0.0.1", - "is-buffer": "~1.1.1" - }, - "devDependencies": { - "mocha": "~2.3.4" - }, - "optionalDependencies": {}, - "license": "BSD-3-Clause" -} \ No newline at end of file + "version": "2.2.1" +} diff --git a/node_modules/mem/node_modules/mimic-fn/package.json b/node_modules/mem/node_modules/mimic-fn/package.json index ac43d06ca..ce014e1cf 100644 --- a/node_modules/mem/node_modules/mimic-fn/package.json +++ b/node_modules/mem/node_modules/mimic-fn/package.json @@ -1,24 +1,55 @@ { - "name": "mimic-fn", - "version": "3.0.0", - "description": "Make a function mimic another one", - "license": "MIT", - "repository": "sindresorhus/mimic-fn", + "_args": [ + [ + "mimic-fn@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "mimic-fn@3.0.0", + "_id": "mimic-fn@3.0.0", + "_inBundle": false, + "_integrity": "sha512-PiVO95TKvhiwgSwg1IdLYlCTdul38yZxZMIcnDSFIBUm4BNZha2qpQ4GpJ++15bHoKDtrW2D69lMfFwdFYtNZQ==", + "_location": "/mem/mimic-fn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mimic-fn@3.0.0", + "name": "mimic-fn", + "escapedName": "mimic-fn", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/mem" + ], + "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-fn/issues" + }, + "description": "Make a function mimic another one", + "devDependencies": { + "ava": "^2.1.0", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/mimic-fn#readme", "keywords": [ "function", "mimic", @@ -34,9 +65,14 @@ "infer", "change" ], - "devDependencies": { - "ava": "^2.1.0", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "mimic-fn", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-fn.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.0" +} diff --git a/node_modules/mem/package.json b/node_modules/mem/package.json index dba9edb68..08b30873f 100644 --- a/node_modules/mem/package.json +++ b/node_modules/mem/package.json @@ -1,24 +1,61 @@ { - "name": "mem", - "version": "6.1.0", - "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", - "license": "MIT", - "repository": "sindresorhus/mem", + "_args": [ + [ + "mem@6.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "mem@6.1.0", + "_id": "mem@6.1.0", + "_inBundle": false, + "_integrity": "sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==", + "_location": "/mem", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mem@6.1.0", + "name": "mem", + "escapedName": "mem", + "rawSpec": "6.1.0", + "saveSpec": null, + "fetchSpec": "6.1.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/mem/-/mem-6.1.0.tgz", + "_spec": "6.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/mem/issues" + }, + "dependencies": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^3.0.0" + }, + "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", + "devDependencies": { + "ava": "^2.4.0", + "delay": "^4.1.0", + "serialize-javascript": "^2.1.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/mem#readme", "keywords": [ "memoize", "function", @@ -32,15 +69,14 @@ "expire", "promise" ], - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.0.0" + "license": "MIT", + "name": "mem", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mem.git" }, - "devDependencies": { - "ava": "^2.4.0", - "delay": "^4.1.0", - "serialize-javascript": "^2.1.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "6.1.0" +} diff --git a/node_modules/merge2/package.json b/node_modules/merge2/package.json index 1e09cf88b..a14853874 100644 --- a/node_modules/merge2/package.json +++ b/node_modules/merge2/package.json @@ -1,16 +1,58 @@ { - "name": "merge2", - "description": "Merge multiple streams into one stream in sequence or parallel.", + "_args": [ + [ + "merge2@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "merge2@1.3.0", + "_id": "merge2@1.3.0", + "_inBundle": false, + "_integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "_location": "/merge2", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "merge2@1.3.0", + "name": "merge2", + "escapedName": "merge2", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/@typescript-eslint/typescript-estree/globby", + "/del/globby", + "/fast-glob", + "/globby" + ], + "_resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "authors": [ "Yan Qing " ], - "license": "MIT", - "version": "1.3.0", - "main": "./index.js", - "repository": { - "type": "git", - "url": "git@github.com:teambition/merge2.git" + "bugs": { + "url": "https://github.com/teambition/merge2/issues" }, + "dependencies": {}, + "description": "Merge multiple streams into one stream in sequence or parallel.", + "devDependencies": { + "standard": "^14.2.0", + "through2": "^3.0.1", + "thunks": "^4.9.5", + "tman": "^1.9.0", + "to-through": "^2.0.0" + }, + "engines": { + "node": ">= 6" + }, + "files": [ + "README.md", + "index.js" + ], "homepage": "https://github.com/teambition/merge2", "keywords": [ "merge2", @@ -22,22 +64,15 @@ "merge stream", "sync" ], - "engines": { - "node": ">= 6" - }, - "dependencies": {}, - "devDependencies": { - "standard": "^14.2.0", - "through2": "^3.0.1", - "thunks": "^4.9.5", - "tman": "^1.9.0", - "to-through": "^2.0.0" + "license": "MIT", + "main": "./index.js", + "name": "merge2", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/teambition/merge2.git" }, "scripts": { "test": "standard && tman" }, - "files": [ - "README.md", - "index.js" - ] -} \ No newline at end of file + "version": "1.3.0" +} diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json index 0b870b1fe..573816ff1 100644 --- a/node_modules/micromatch/package.json +++ b/node_modules/micromatch/package.json @@ -1,44 +1,104 @@ { - "name": "micromatch", - "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.", - "version": "4.0.2", - "homepage": "https://github.com/micromatch/micromatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "(https://github.com/DianeLooney)", - "Amila Welihinda (amilajack.com)", - "Bogdan Chadkin (https://github.com/TrySound)", - "Brian Woodward (https://twitter.com/doowb)", - "Devon Govett (http://badassjs.com)", - "Elan Shanker (https://github.com/es128)", - "Fabrício Matté (https://ultcombo.js.org)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Martin Kolárik (https://kolarik.sk)", - "Olsten Larck (https://i.am.charlike.online)", - "Paul Miller (paulmillr.com)", - "Tom Byrer (https://github.com/tomByrer)", - "Tyler Akins (http://rumkin.com)", - "Peter Bright (https://github.com/drpizza)" + "_args": [ + [ + "micromatch@4.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": "micromatch/micromatch", + "_development": true, + "_from": "micromatch@4.0.2", + "_id": "micromatch@4.0.2", + "_inBundle": false, + "_integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "_location": "/micromatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "micromatch@4.0.2", + "name": "micromatch", + "escapedName": "micromatch", + "rawSpec": "4.0.2", + "saveSpec": null, + "fetchSpec": "4.0.2" + }, + "_requiredBy": [ + "#DEV:/", + "/fast-glob" + ], + "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "_spec": "4.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/micromatch/micromatch/issues" }, - "license": "MIT", - "files": [ - "index.js" + "contributors": [ + { + "url": "https://github.com/DianeLooney" + }, + { + "name": "Amila Welihinda", + "url": "amilajack.com" + }, + { + "name": "Bogdan Chadkin", + "url": "https://github.com/TrySound" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Devon Govett", + "url": "http://badassjs.com" + }, + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Fabrício Matté", + "url": "https://ultcombo.js.org" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Martin Kolárik", + "url": "https://kolarik.sk" + }, + { + "name": "Olsten Larck", + "url": "https://i.am.charlike.online" + }, + { + "name": "Paul Miller", + "url": "paulmillr.com" + }, + { + "name": "Tom Byrer", + "url": "https://github.com/tomByrer" + }, + { + "name": "Tyler Akins", + "url": "http://rumkin.com" + }, + { + "name": "Peter Bright", + "email": "drpizza@quiscalusmexicanus.org", + "url": "https://github.com/drpizza" + } ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "mocha" - }, "dependencies": { "braces": "^3.0.1", "picomatch": "^2.0.5" }, + "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.", "devDependencies": { "fill-range": "^7.0.1", "gulp-format-md": "^2.0.0", @@ -46,6 +106,13 @@ "mocha": "^5.2.0", "time-require": "github:jonschlinkert/time-require" }, + "engines": { + "node": ">=8" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/micromatch/micromatch", "keywords": [ "bash", "bracket", @@ -86,6 +153,16 @@ "star", "wildcard" ], + "license": "MIT", + "main": "index.js", + "name": "micromatch", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/micromatch.git" + }, + "scripts": { + "test": "mocha" + }, "verb": { "toc": "collapsible", "layout": "default", @@ -114,5 +191,6 @@ "minimatch", "multimatch" ] - } -} \ No newline at end of file + }, + "version": "4.0.2" +} diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md new file mode 100644 index 000000000..85c0319c8 --- /dev/null +++ b/node_modules/mime-db/HISTORY.md @@ -0,0 +1,446 @@ +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/node_modules/fsevents/LICENSE b/node_modules/mime-db/LICENSE similarity index 90% rename from node_modules/fsevents/LICENSE rename to node_modules/mime-db/LICENSE index 00a0b2e9e..a7ae8ee9b 100644 --- a/node_modules/fsevents/LICENSE +++ b/node_modules/mime-db/LICENSE @@ -1,7 +1,7 @@ -MIT License ------------ -Copyright (C) 2010-2019 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md new file mode 100644 index 000000000..d6a6f80aa --- /dev/null +++ b/node_modules/mime-db/README.md @@ -0,0 +1,102 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a database of all mime types. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + + + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom.json` or +`src/custom-suffix.json`. + +The `src/custom.json` file is a JSON object with the MIME type as the keys +and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db +[travis-image]: https://badgen.net/travis/jshttp/mime-db/master +[travis-url]: https://travis-ci.org/jshttp/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json new file mode 100644 index 000000000..e69f352d9 --- /dev/null +++ b/node_modules/mime-db/db.json @@ -0,0 +1,8176 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma","es"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["keynote"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana" + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana" + }, + "image/avcs": { + "source": "iana" + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shex": { + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana" + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js new file mode 100644 index 000000000..551031f69 --- /dev/null +++ b/node_modules/mime-db/index.js @@ -0,0 +1,11 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json new file mode 100644 index 000000000..f1bc22d9f --- /dev/null +++ b/node_modules/mime-db/package.json @@ -0,0 +1,102 @@ +{ + "_from": "mime-db@1.44.0", + "_id": "mime-db@1.44.0", + "_inBundle": false, + "_integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "_location": "/mime-db", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mime-db@1.44.0", + "name": "mime-db", + "escapedName": "mime-db", + "rawSpec": "1.44.0", + "saveSpec": null, + "fetchSpec": "1.44.0" + }, + "_requiredBy": [ + "/mime-types" + ], + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "_shasum": "fa11c5eb0aca1334b4233cb4d52f10c5a6272f92", + "_spec": "mime-db@1.44.0", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/mime-types", + "bugs": { + "url": "https://github.com/jshttp/mime-db/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + { + "name": "Robert Kieffer", + "email": "robert@broofa.com", + "url": "http://github.com/broofa" + } + ], + "deprecated": false, + "description": "Media Type Database", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.8.9", + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.20.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "gnode": "0.1.2", + "mocha": "7.1.1", + "nyc": "15.0.1", + "raw-body": "2.4.1", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "homepage": "https://github.com/jshttp/mime-db#readme", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "license": "MIT", + "name": "mime-db", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-db.git" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + }, + "version": "1.44.0" +} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md new file mode 100644 index 000000000..e93149ae9 --- /dev/null +++ b/node_modules/mime-types/HISTORY.md @@ -0,0 +1,333 @@ +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + - Mark `text/less` as compressible + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Add additional compressible + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE new file mode 100644 index 000000000..06166077b --- /dev/null +++ b/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md new file mode 100644 index 000000000..3863339aa --- /dev/null +++ b/node_modules/mime-types/README.md @@ -0,0 +1,123 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + + + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + + + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + + + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + + + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + + + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types +[travis-image]: https://badgen.net/travis/jshttp/mime-types/master +[travis-url]: https://travis-ci.org/jshttp/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js new file mode 100644 index 000000000..b9f34d599 --- /dev/null +++ b/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json new file mode 100644 index 000000000..cb516180a --- /dev/null +++ b/node_modules/mime-types/package.json @@ -0,0 +1,89 @@ +{ + "_from": "mime-types@^2.1.12", + "_id": "mime-types@2.1.27", + "_inBundle": false, + "_integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "_location": "/mime-types", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "mime-types@^2.1.12", + "name": "mime-types", + "escapedName": "mime-types", + "rawSpec": "^2.1.12", + "saveSpec": null, + "fetchSpec": "^2.1.12" + }, + "_requiredBy": [ + "/@azure/core-http/form-data", + "/@types/node-fetch/form-data", + "/form-data" + ], + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "_shasum": "47949f98e279ea53119f5722e0f34e529bec009f", + "_spec": "mime-types@^2.1.12", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/@types/node-fetch/node_modules/form-data", + "bugs": { + "url": "https://github.com/jshttp/mime-types/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jeremiah Senkpiel", + "email": "fishrock123@rocketmail.com", + "url": "https://searchbeam.jit.su" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-db": "1.44.0" + }, + "deprecated": false, + "description": "The ultimate javascript content-type utility.", + "devDependencies": { + "eslint": "6.8.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.20.2", + "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "mocha": "7.1.1", + "nyc": "15.0.1" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/jshttp/mime-types#readme", + "keywords": [ + "mime", + "types" + ], + "license": "MIT", + "name": "mime-types", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-types.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec test/test.js", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + }, + "version": "2.1.27" +} diff --git a/node_modules/mimic-fn/package.json b/node_modules/mimic-fn/package.json index cddfcb379..e60788d02 100644 --- a/node_modules/mimic-fn/package.json +++ b/node_modules/mimic-fn/package.json @@ -1,24 +1,55 @@ { - "name": "mimic-fn", - "version": "2.1.0", - "description": "Make a function mimic another one", - "license": "MIT", - "repository": "sindresorhus/mimic-fn", + "_args": [ + [ + "mimic-fn@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "mimic-fn@2.1.0", + "_id": "mimic-fn@2.1.0", + "_inBundle": false, + "_integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "_location": "/mimic-fn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mimic-fn@2.1.0", + "name": "mimic-fn", + "escapedName": "mimic-fn", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/onetime" + ], + "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-fn/issues" + }, + "description": "Make a function mimic another one", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/mimic-fn#readme", "keywords": [ "function", "mimic", @@ -34,9 +65,14 @@ "infer", "change" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "mimic-fn", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-fn.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/mimic-response/package.json b/node_modules/mimic-response/package.json index 953152b76..5899edd9c 100644 --- a/node_modules/mimic-response/package.json +++ b/node_modules/mimic-response/package.json @@ -1,23 +1,57 @@ { - "name": "mimic-response", - "version": "1.0.1", - "description": "Mimic a Node.js HTTP response stream", - "license": "MIT", - "repository": "sindresorhus/mimic-response", + "_args": [ + [ + "mimic-response@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "mimic-response@1.0.1", + "_id": "mimic-response@1.0.1", + "_inBundle": false, + "_integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "_location": "/mimic-response", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mimic-response@1.0.1", + "name": "mimic-response", + "escapedName": "mimic-response", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/clone-response", + "/decompress-response", + "/got" + ], + "_resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-response/issues" + }, + "description": "Mimic a Node.js HTTP response stream", + "devDependencies": { + "ava": "*", + "create-test-server": "^0.1.0", + "pify": "^3.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/mimic-response#readme", "keywords": [ "mimic", "response", @@ -28,10 +62,14 @@ "get", "core" ], - "devDependencies": { - "ava": "*", - "create-test-server": "^0.1.0", - "pify": "^3.0.0", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "mimic-response", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-response.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index 8c89ea278..5a57a4786 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -1,30 +1,71 @@ { - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "3.0.4", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" + "_args": [ + [ + "minimatch@3.0.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "minimatch@3.0.4", + "_id": "minimatch@3.0.4", + "_inBundle": false, + "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "_location": "/minimatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "minimatch@3.0.4", + "name": "minimatch", + "escapedName": "minimatch", + "rawSpec": "3.0.4", + "saveSpec": null, + "fetchSpec": "3.0.4" }, - "main": "minimatch.js", - "scripts": { - "test": "tap test/*.js --cov", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "_requiredBy": [ + "/@actions/glob", + "/@eslint/eslintrc", + "/eslint", + "/eslint-plugin-import", + "/glob" + ], + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "_spec": "3.0.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" }, - "engines": { - "node": "*" + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" }, "dependencies": { "brace-expansion": "^1.1.7" }, + "description": "a glob matcher in javascript", "devDependencies": { "tap": "^10.3.2" }, - "license": "ISC", + "engines": { + "node": "*" + }, "files": [ "minimatch.js" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/isaacs/minimatch#readme", + "license": "ISC", + "main": "minimatch.js", + "name": "minimatch", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --cov" + }, + "version": "3.0.4" +} diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index 6d7171689..2b9141e95 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,16 +1,67 @@ { - "name": "minimist", - "version": "1.2.5", + "_args": [ + [ + "minimist@1.2.5", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "minimist@1.2.5", + "_id": "minimist@1.2.5", + "_inBundle": false, + "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "_location": "/minimist", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "minimist@1.2.5", + "name": "minimist", + "escapedName": "minimist", + "rawSpec": "1.2.5", + "saveSpec": null, + "fetchSpec": "1.2.5" + }, + "_requiredBy": [ + "/json5", + "/mkdirp", + "/rc", + "/tsconfig-paths" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "_spec": "1.2.5", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, "description": "parse argument options", - "main": "index.js", "devDependencies": { "covert": "^1.0.0", "tap": "~0.4.0", "tape": "^3.5.0" }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "license": "MIT", + "main": "index.js", + "name": "minimist", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, "scripts": { - "test": "tap test/*.js", - "coverage": "covert test/*.js" + "coverage": "covert test/*.js", + "test": "tap test/*.js" }, "testling": { "files": "test/*.js", @@ -25,21 +76,5 @@ "opera/12" ] }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT" -} \ No newline at end of file + "version": "1.2.5" +} diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json index b335f1ae0..483868045 100644 --- a/node_modules/mkdirp/package.json +++ b/node_modules/mkdirp/package.json @@ -1,34 +1,73 @@ { - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.5.4", - "publishConfig": { - "tag": "legacy" - }, - "author": "James Halliday (http://substack.net)", - "main": "index.js", - "keywords": [ - "mkdir", - "directory" + "_args": [ + [ + "mkdirp@0.5.4", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "https://github.com/substack/node-mkdirp.git" + "_development": true, + "_from": "mkdirp@0.5.4", + "_id": "mkdirp@0.5.4", + "_inBundle": false, + "_integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "_location": "/mkdirp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mkdirp@0.5.4", + "name": "mkdirp", + "escapedName": "mkdirp", + "rawSpec": "0.5.4", + "saveSpec": null, + "fetchSpec": "0.5.4" }, - "scripts": { - "test": "tap test/*.js" + "_requiredBy": [ + "/write" + ], + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", + "_spec": "0.5.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" }, "dependencies": { "minimist": "^1.2.5" }, + "description": "Recursively mkdir, like `mkdir -p`", "devDependencies": { "mock-fs": "^3.7.0", "tap": "^5.4.2" }, - "bin": "bin/cmd.js", - "license": "MIT", "files": [ "bin", "index.js" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/substack/node-mkdirp#readme", + "keywords": [ + "mkdir", + "directory" + ], + "license": "MIT", + "main": "index.js", + "name": "mkdirp", + "publishConfig": { + "tag": "legacy" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.5.4" +} diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json index 3408eef7c..a82dd4952 100644 --- a/node_modules/ms/package.json +++ b/node_modules/ms/package.json @@ -1,16 +1,44 @@ { - "name": "ms", - "version": "2.1.2", - "description": "Tiny millisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" + "_args": [ + [ + "ms@2.1.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" + "_development": true, + "_from": "ms@2.1.2", + "_id": "ms@2.1.2", + "_inBundle": false, + "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "_location": "/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.1.2", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.1.2", + "saveSpec": null, + "fetchSpec": "2.1.2" + }, + "_requiredBy": [ + "/ava", + "/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "_spec": "2.1.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "description": "Tiny millisecond conversion utility", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" }, "eslintConfig": { "extends": "eslint:recommended", @@ -19,6 +47,11 @@ "es6": true } }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", "lint-staged": { "*.js": [ "npm run lint", @@ -26,12 +59,16 @@ "git add" ] }, - "license": "MIT", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - } -} \ No newline at end of file + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.1.2" +} diff --git a/node_modules/mute-stream/package.json b/node_modules/mute-stream/package.json index dcd78bedf..37ce43e0e 100644 --- a/node_modules/mute-stream/package.json +++ b/node_modules/mute-stream/package.json @@ -1,29 +1,66 @@ { - "name": "mute-stream", - "version": "0.0.8", - "main": "mute.js", - "directories": { - "test": "test" + "_args": [ + [ + "mute-stream@0.0.8", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "mute-stream@0.0.8", + "_id": "mute-stream@0.0.8", + "_inBundle": false, + "_integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "_location": "/mute-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "mute-stream@0.0.8", + "name": "mute-stream", + "escapedName": "mute-stream", + "rawSpec": "0.0.8", + "saveSpec": null, + "fetchSpec": "0.0.8" }, + "_requiredBy": [ + "/ora" + ], + "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "_spec": "0.0.8", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/mute-stream/issues" + }, + "description": "Bytes go in, but they don't come out (when muted).", "devDependencies": { "tap": "^12.1.1" }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/mute-stream" + "directories": { + "test": "test" }, + "files": [ + "mute.js" + ], + "homepage": "https://github.com/isaacs/mute-stream#readme", "keywords": [ "mute", "stream", "pipe" ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "license": "ISC", - "description": "Bytes go in, but they don't come out (when muted).", - "files": [ - "mute.js" - ] -} \ No newline at end of file + "main": "mute.js", + "name": "mute-stream", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/mute-stream.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "0.0.8" +} diff --git a/node_modules/natural-compare/package.json b/node_modules/natural-compare/package.json index 54360999f..196b5eaa0 100644 --- a/node_modules/natural-compare/package.json +++ b/node_modules/natural-compare/package.json @@ -1,10 +1,55 @@ { - "name": "natural-compare", - "version": "1.4.0", - "stability": 3, - "author": "Lauri Rooden (https://github.com/litejs/natural-compare-lite)", - "license": "MIT", + "_args": [ + [ + "natural-compare@1.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "natural-compare@1.4.0", + "_id": "natural-compare@1.4.0", + "_inBundle": false, + "_integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "_location": "/natural-compare", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "natural-compare@1.4.0", + "name": "natural-compare", + "escapedName": "natural-compare", + "rawSpec": "1.4.0", + "saveSpec": null, + "fetchSpec": "1.4.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "_spec": "1.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Lauri Rooden", + "url": "https://github.com/litejs/natural-compare-lite" + }, + "bugs": { + "url": "https://github.com/litejs/natural-compare-lite/issues" + }, + "buildman": { + "dist/index-min.js": { + "banner": "/*! litejs.com/MIT-LICENSE.txt */", + "input": "index.js" + } + }, "description": "Compare strings containing a mix of letters and numbers in the way a human being would in sort order.", + "devDependencies": { + "buildman": "*", + "testman": "*" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/litejs/natural-compare-lite#readme", "keywords": [ "string", "natural", @@ -16,27 +61,17 @@ "alphanum", "litejs" ], + "license": "MIT", "main": "index.js", - "readmeFilename": "README.md", - "files": [ - "index.js" - ], + "name": "natural-compare", + "repository": { + "type": "git", + "url": "git://github.com/litejs/natural-compare-lite.git" + }, "scripts": { "build": "node node_modules/buildman/index.js --all", "test": "node tests/index.js" }, - "repository": "git://github.com/litejs/natural-compare-lite.git", - "bugs": { - "url": "https://github.com/litejs/natural-compare-lite/issues" - }, - "devDependencies": { - "buildman": "*", - "testman": "*" - }, - "buildman": { - "dist/index-min.js": { - "banner": "/*! litejs.com/MIT-LICENSE.txt */", - "input": "index.js" - } - } -} \ No newline at end of file + "stability": 3, + "version": "1.4.0" +} diff --git a/node_modules/nise/package.json b/node_modules/nise/package.json index e42d985f8..6c4bf4e72 100644 --- a/node_modules/nise/package.json +++ b/node_modules/nise/package.json @@ -1,47 +1,49 @@ { - "name": "nise", - "version": "4.0.3", - "description": "Fake XHR and server", - "keywords": [ - "test", - "testing", - "fake", - "mock", - "xhr", - "server" + "_args": [ + [ + "nise@4.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "http://github.com/sinonjs/nise.git" - }, - "main": "lib/index.js", - "module": "nise.js", - "scripts": { - "bundle": "browserify --no-detect-globals -s nise -o nise.js lib/index.js", - "lint": "eslint .", - "prepublish": "npm run bundle", - "prepublishOnly": "mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", - "test": "mocha lib/**/*.test.js", - "test:coverage": "nyc --reporter=lcov --reporter=text --all npm test -- --reporter dot", - "test:headless": "mochify --https-server --plugin [ proxyquire-universal ] --no-detect-globals test/global-hack.js lib/**/*.test.js" + "_development": true, + "_from": "nise@4.0.3", + "_id": "nise@4.0.3", + "_inBundle": false, + "_integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "_location": "/nise", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "nise@4.0.3", + "name": "nise", + "escapedName": "nise", + "rawSpec": "4.0.3", + "saveSpec": null, + "fetchSpec": "4.0.3" }, + "_requiredBy": [ + "/sinon" + ], + "_resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", + "_spec": "4.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": "", "browser": { "jsdom": false, "jsdom-global": false }, - "author": "", - "license": "BSD-3-Clause", - "nyc": { - "exclude": [ - "nise.js", - "coverage/**", - "**/*.test.js" - ] + "bugs": { + "url": "https://github.com/sinonjs/nise/issues" }, - "files": [ - "nise.js", - "lib/**/*.js" - ], + "dependencies": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + }, + "description": "Fake XHR and server", "devDependencies": { "@sinonjs/referee": "^4.0.0", "browserify": "^16.2.3", @@ -63,17 +65,48 @@ "proxyquireify": "^3.2.1", "sinon": "^9.0.0" }, - "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - }, + "files": [ + "nise.js", + "lib/**/*.js" + ], + "homepage": "https://github.com/sinonjs/nise#readme", "husky": { "hooks": { "pre-commit": "npm run lint -- --fix && npm run test", "pre-push": "npm run lint && npm run test" } - } -} \ No newline at end of file + }, + "keywords": [ + "test", + "testing", + "fake", + "mock", + "xhr", + "server" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "module": "nise.js", + "name": "nise", + "nyc": { + "exclude": [ + "nise.js", + "coverage/**", + "**/*.test.js" + ] + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/sinonjs/nise.git" + }, + "scripts": { + "bundle": "browserify --no-detect-globals -s nise -o nise.js lib/index.js", + "lint": "eslint .", + "prepublish": "npm run bundle", + "prepublishOnly": "mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin", + "test": "mocha lib/**/*.test.js", + "test:coverage": "nyc --reporter=lcov --reporter=text --all npm test -- --reporter dot", + "test:headless": "mochify --https-server --plugin [ proxyquire-universal ] --no-detect-globals test/global-hack.js lib/**/*.test.js" + }, + "version": "4.0.3" +} diff --git a/node_modules/nock/package.json b/node_modules/nock/package.json index 9f0f2004f..823e521e8 100644 --- a/node_modules/nock/package.json +++ b/node_modules/nock/package.json @@ -1,33 +1,50 @@ { - "name": "nock", - "description": "HTTP server mocking and expectations library for Node.js", - "tags": [ - "Mock", - "HTTP", - "testing", - "isolation" + "_args": [ + [ + "nock@12.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "version": "12.0.3", - "author": "Pedro Teixeira ", - "repository": { - "type": "git", - "url": "https://github.com/nock/nock.git" + "_development": true, + "_from": "nock@12.0.3", + "_id": "nock@12.0.3", + "_inBundle": false, + "_integrity": "sha512-QNb/j8kbFnKCiyqi9C5DD0jH/FubFGj5rt9NQFONXwQm3IPB0CULECg/eS3AU1KgZb/6SwUa4/DTRKhVxkGABw==", + "_location": "/nock", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "nock@12.0.3", + "name": "nock", + "escapedName": "nock", + "rawSpec": "12.0.3", + "saveSpec": null, + "fetchSpec": "12.0.3" + }, + "_requiredBy": [ + "#DEV:/", + "/@types/nock" + ], + "_resolved": "https://registry.npmjs.org/nock/-/nock-12.0.3.tgz", + "_spec": "12.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Pedro Teixeira", + "email": "pedro.teixeira@gmail.com" }, "bugs": { "url": "http://github.com/nock/nock/issues" }, - "engines": { - "node": ">= 10.13" - }, - "main": "./index.js", - "types": "types", "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.13", "propagate": "^2.0.0" }, + "description": "HTTP server mocking and expectations library for Node.js", "devDependencies": { + "@sinonjs/fake-timers": "^6.0.0", "assert-rejects": "^1.0.0", "chai": "^4.1.2", "dirty-chai": "^2.0.1", @@ -41,7 +58,6 @@ "eslint-plugin-promise": "^4.1.1", "eslint-plugin-standard": "^4.0.0", "got": "^10.5.2", - "@sinonjs/fake-timers": "^6.0.0", "mocha": "^7.0.1", "npm-run-all": "^4.1.5", "nyc": "^15.0.0", @@ -55,9 +71,34 @@ "superagent": "^5.0.2", "tap": "14.6.1" }, + "engines": { + "node": ">= 10.13" + }, + "files": [ + "index.js", + "lib", + "types/index.d.ts" + ], + "homepage": "https://github.com/nock/nock#readme", + "license": "MIT", + "main": "./index.js", + "name": "nock", + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ], + "exclude": [ + "tests/" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nock/nock.git" + }, "scripts": { - "format:fix": "prettier --write '**/*.{js,json,md,ts,yml,yaml}'", "format": "prettier --check '**/*.{js,json,md,ts,yml,yaml}'", + "format:fix": "prettier --write '**/*.{js,json,md,ts,yml,yaml}'", "lint": "run-p lint:js lint:ts", "lint:js": "eslint --cache --cache-location './.cache/eslint' '**/*.js'", "lint:js:fix": "eslint --cache --cache-location './.cache/eslint' --fix '**/*.js'", @@ -68,19 +109,12 @@ "test:mocha": "nyc mocha $(grep -lr '^\\s*it(' tests)", "test:tap": "tap --100 --coverage --coverage-report=text ./tests/test_*.js" }, - "nyc": { - "reporter": [ - "lcov", - "text-summary" - ], - "exclude": [ - "tests/" - ] - }, - "license": "MIT", - "files": [ - "index.js", - "lib", - "types/index.d.ts" - ] -} \ No newline at end of file + "tags": [ + "Mock", + "HTTP", + "testing", + "isolation" + ], + "types": "types", + "version": "12.0.3" +} diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json index 27d2e44ee..264175214 100644 --- a/node_modules/node-fetch/package.json +++ b/node_modules/node-fetch/package.json @@ -1,41 +1,43 @@ { - "name": "node-fetch", - "version": "2.6.1", - "description": "A light-weight module that brings window.fetch to node.js", - "main": "lib/index", + "_args": [ + [ + "node-fetch@2.6.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "node-fetch@2.6.1", + "_id": "node-fetch@2.6.1", + "_inBundle": false, + "_integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "_location": "/node-fetch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "node-fetch@2.6.1", + "name": "node-fetch", + "escapedName": "node-fetch", + "rawSpec": "2.6.1", + "saveSpec": null, + "fetchSpec": "2.6.1" + }, + "_requiredBy": [ + "/@azure/core-http", + "/@azure/ms-rest-js", + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "_spec": "2.6.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "David Frank" + }, "browser": "./browser.js", - "module": "lib/index.mjs", - "files": [ - "lib/index.js", - "lib/index.mjs", - "lib/index.es.js", - "browser.js" - ], - "engines": { - "node": "4.x || >=6.0.0" - }, - "scripts": { - "build": "cross-env BABEL_ENV=rollup rollup -c", - "prepare": "npm run build", - "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js", - "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", - "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json" - }, - "repository": { - "type": "git", - "url": "https://github.com/bitinn/node-fetch.git" - }, - "keywords": [ - "fetch", - "http", - "promise" - ], - "author": "David Frank", - "license": "MIT", "bugs": { "url": "https://github.com/bitinn/node-fetch/issues" }, - "homepage": "https://github.com/bitinn/node-fetch", + "dependencies": {}, + "description": "A light-weight module that brings window.fetch to node.js", "devDependencies": { "@ungap/url-search-params": "^0.1.2", "abort-controller": "^1.1.0", @@ -62,5 +64,35 @@ "string-to-arraybuffer": "^1.0.2", "whatwg-url": "^5.0.0" }, - "dependencies": {} -} \ No newline at end of file + "engines": { + "node": "4.x || >=6.0.0" + }, + "files": [ + "lib/index.js", + "lib/index.mjs", + "lib/index.es.js", + "browser.js" + ], + "homepage": "https://github.com/bitinn/node-fetch", + "keywords": [ + "fetch", + "http", + "promise" + ], + "license": "MIT", + "main": "lib/index", + "module": "lib/index.mjs", + "name": "node-fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/bitinn/node-fetch.git" + }, + "scripts": { + "build": "cross-env BABEL_ENV=rollup rollup -c", + "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json", + "prepare": "npm run build", + "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", + "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" + }, + "version": "2.6.1" +} diff --git a/node_modules/normalize-package-data/node_modules/semver/package.json b/node_modules/normalize-package-data/node_modules/semver/package.json index 90e287ecf..0f8537d08 100644 --- a/node_modules/normalize-package-data/node_modules/semver/package.json +++ b/node_modules/normalize-package-data/node_modules/semver/package.json @@ -1,28 +1,64 @@ { - "name": "semver", - "version": "5.7.1", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "_args": [ + [ + "semver@5.7.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "semver@5.7.1", + "_id": "semver@5.7.1", + "_inBundle": false, + "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "_location": "/normalize-package-data/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@5.7.1", + "name": "semver", + "escapedName": "semver", + "rawSpec": "5.7.1", + "saveSpec": null, + "fetchSpec": "5.7.1" }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "_spec": "5.7.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "semver": "bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^13.0.0-rc.18" }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver" - }, "files": [ "bin", "range.bnf", "semver.js" ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true - } -} \ No newline at end of file + }, + "version": "5.7.1" +} diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json index b427a6052..31937e192 100644 --- a/node_modules/normalize-package-data/package.json +++ b/node_modules/normalize-package-data/package.json @@ -1,23 +1,62 @@ { - "name": "normalize-package-data", - "version": "2.5.0", - "author": "Meryn Stol ", - "description": "Normalizes data that can be found in package.json files.", - "license": "BSD-2-Clause", - "repository": { - "type": "git", - "url": "git://github.com/npm/normalize-package-data.git" + "_args": [ + [ + "normalize-package-data@2.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "normalize-package-data@2.5.0", + "_id": "normalize-package-data@2.5.0", + "_inBundle": false, + "_integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "_location": "/normalize-package-data", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "normalize-package-data@2.5.0", + "name": "normalize-package-data", + "escapedName": "normalize-package-data", + "rawSpec": "2.5.0", + "saveSpec": null, + "fetchSpec": "2.5.0" }, - "main": "lib/normalize.js", - "scripts": { - "test": "tap test/*.js" + "_requiredBy": [ + "/read-pkg", + "/read-pkg-up/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "_spec": "2.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" }, + "bugs": { + "url": "https://github.com/npm/normalize-package-data/issues" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" + }, + { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + } + ], "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" }, + "description": "Normalizes data that can be found in package.json files.", "devDependencies": { "async": "^2.6.1", "tap": "^12.4.0", @@ -27,5 +66,17 @@ "lib/*.js", "lib/*.json", "AUTHORS" - ] -} \ No newline at end of file + ], + "homepage": "https://github.com/npm/normalize-package-data#readme", + "license": "BSD-2-Clause", + "main": "lib/normalize.js", + "name": "normalize-package-data", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.5.0" +} diff --git a/node_modules/normalize-url/package.json b/node_modules/normalize-url/package.json index 84adbb278..5698ccb6e 100644 --- a/node_modules/normalize-url/package.json +++ b/node_modules/normalize-url/package.json @@ -1,24 +1,57 @@ { - "name": "normalize-url", - "version": "4.5.0", - "description": "Normalize a URL", - "license": "MIT", - "repository": "sindresorhus/normalize-url", + "_args": [ + [ + "normalize-url@4.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "normalize-url@4.5.0", + "_id": "normalize-url@4.5.0", + "_inBundle": false, + "_integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "_location": "/normalize-url", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "normalize-url@4.5.0", + "name": "normalize-url", + "escapedName": "normalize-url", + "rawSpec": "4.5.0", + "saveSpec": null, + "fetchSpec": "4.5.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "_spec": "4.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/normalize-url/issues" + }, + "description": "Normalize a URL", + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.6", + "nyc": "^14.1.1", + "tsd": "^0.8.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/normalize-url#readme", "keywords": [ "normalize", "url", @@ -34,11 +67,14 @@ "trim", "canonical" ], - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.6", - "nyc": "^14.1.1", - "tsd": "^0.8.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "normalize-url", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/normalize-url.git" + }, + "scripts": { + "test": "xo && nyc ava && tsd" + }, + "version": "4.5.0" +} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json index cabd07a0e..4ef987b6e 100644 --- a/node_modules/object-inspect/package.json +++ b/node_modules/object-inspect/package.json @@ -1,8 +1,46 @@ { - "name": "object-inspect", - "version": "1.8.0", + "_args": [ + [ + "object-inspect@1.8.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "object-inspect@1.8.0", + "_id": "object-inspect@1.8.0", + "_inBundle": false, + "_integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "_location": "/object-inspect", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "object-inspect@1.8.0", + "name": "object-inspect", + "escapedName": "object-inspect", + "rawSpec": "1.8.0", + "saveSpec": null, + "fetchSpec": "1.8.0" + }, + "_requiredBy": [ + "/es-abstract", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "_spec": "1.8.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "browser": { + "./util.inspect.js": false + }, + "bugs": { + "url": "https://github.com/inspect-js/object-inspect/issues" + }, "description": "string representations of objects in node and the browser", - "main": "index.js", "devDependencies": { "@ljharb/eslint-config": "^17.1.0", "aud": "^1.1.2", @@ -14,15 +52,39 @@ "string.prototype.repeat": "^1.0.0", "tape": "^5.0.1" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "ignore": [ + "nyc", + "core-js" + ] + }, + "homepage": "https://github.com/inspect-js/object-inspect", + "keywords": [ + "inspect", + "util.inspect", + "object", + "stringify", + "pretty" + ], + "license": "MIT", + "main": "index.js", + "name": "object-inspect", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/object-inspect.git" + }, "scripts": { + "coverage": "nyc npm run tests-only", + "lint": "eslint .", + "posttest": "npx aud --production", "prepublish": "safe-publish-latest", "pretest": "npm run lint", - "lint": "eslint .", - "test": "npm run tests-only", "pretests-only": "node test-core-js", - "tests-only": "tape test/*.js", - "posttest": "npx aud --production", - "coverage": "nyc npm run tests-only" + "test": "npm run tests-only", + "tests-only": "tape test/*.js" }, "testling": { "files": [ @@ -40,34 +102,5 @@ "android/latest" ] }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/object-inspect.git" - }, - "homepage": "https://github.com/inspect-js/object-inspect", - "keywords": [ - "inspect", - "util.inspect", - "object", - "stringify", - "pretty" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "browser": { - "./util.inspect.js": false - }, - "greenkeeper": { - "ignore": [ - "nyc", - "core-js" - ] - } -} \ No newline at end of file + "version": "1.8.0" +} diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json index f466e9979..8790cbfb7 100644 --- a/node_modules/object-keys/package.json +++ b/node_modules/object-keys/package.json @@ -1,11 +1,44 @@ { - "name": "object-keys", - "version": "1.1.1", + "_args": [ + [ + "object-keys@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "object-keys@1.1.1", + "_id": "object-keys@1.1.1", + "_inBundle": false, + "_integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "_location": "/object-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "object-keys@1.1.1", + "name": "object-keys", + "escapedName": "object-keys", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/define-properties", + "/es-abstract", + "/object.assign", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, + "bugs": { + "url": "https://github.com/ljharb/object-keys/issues" + }, "contributors": [ { "name": "Jordan Harband", @@ -29,32 +62,8 @@ "email": "git@gkatsev.com" } ], - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npm run --silent audit", - "tests-only": "node test/index.js", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "eslint .", - "preaudit": "npm install --package-lock --package-lock-only", - "audit": "npm audit", - "postaudit": "rm package-lock.json" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], "dependencies": {}, + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", "devDependencies": { "@ljharb/eslint-config": "^13.1.1", "covert": "^1.1.1", @@ -64,6 +73,35 @@ "is": "^3.3.0", "tape": "^4.9.2" }, + "engines": { + "node": ">= 0.4" + }, + "homepage": "https://github.com/ljharb/object-keys#readme", + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "license": "MIT", + "main": "index.js", + "name": "object-keys", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "scripts": { + "audit": "npm audit", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "eslint .", + "postaudit": "rm package-lock.json", + "posttest": "npm run --silent audit", + "preaudit": "npm install --package-lock --package-lock-only", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "tests-only": "node test/index.js" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -82,7 +120,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "1.1.1" +} diff --git a/node_modules/object.assign/node_modules/es-abstract/package.json b/node_modules/object.assign/node_modules/es-abstract/package.json index df6c20ac0..69a3d22dd 100644 --- a/node_modules/object.assign/node_modules/es-abstract/package.json +++ b/node_modules/object.assign/node_modules/es-abstract/package.json @@ -1,13 +1,40 @@ { - "name": "es-abstract", - "version": "1.18.0-next.0", + "_args": [ + [ + "es-abstract@1.18.0-next.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "es-abstract@1.18.0-next.0", + "_id": "es-abstract@1.18.0-next.0", + "_inBundle": false, + "_integrity": "sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ==", + "_location": "/object.assign/es-abstract", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "es-abstract@1.18.0-next.0", + "name": "es-abstract", + "escapedName": "es-abstract", + "rawSpec": "1.18.0-next.0", + "saveSpec": null, + "fetchSpec": "1.18.0-next.0" + }, + "_requiredBy": [ + "/object.assign" + ], + "_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.0.tgz", + "_spec": "1.18.0-next.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", "url": "http://ljharb.codes" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bugs": { + "url": "https://github.com/ljharb/es-abstract/issues" }, "contributors": [ { @@ -16,38 +43,6 @@ "url": "http://ljharb.codes" } ], - "description": "ECMAScript spec abstract operations.", - "license": "MIT", - "main": "index.js", - "scripts": { - "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", - "spackle": "node operations/spackle 1", - "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", - "prepublish": "safe-publish-latest && (not-in-publish || npm run spackle)", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "node test", - "coverage": "nyc npm run tests-only >/dev/null", - "postcoverage": "nyc report", - "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/es-abstract.git" - }, - "keywords": [ - "ECMAScript", - "ES", - "abstract", - "operation", - "abstract operation", - "JavaScript", - "ES5", - "ES6", - "ES7" - ], "dependencies": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", @@ -62,6 +57,7 @@ "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" }, + "description": "ECMAScript spec abstract operations.", "devDependencies": { "@ljharb/eslint-config": "^17.1.0", "array.prototype.indexof": "^1.0.0", @@ -85,6 +81,51 @@ "safe-publish-latest": "^1.1.4", "tape": "^5.0.1" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "greenkeeper": { + "//": "nyc is ignored because it requires node 4+, and we support older than that", + "ignore": [ + "nyc" + ] + }, + "homepage": "https://github.com/ljharb/es-abstract#readme", + "keywords": [ + "ECMAScript", + "ES", + "abstract", + "operation", + "abstract operation", + "JavaScript", + "ES5", + "ES6", + "ES7" + ], + "license": "MIT", + "main": "index.js", + "name": "es-abstract", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-abstract.git" + }, + "scripts": { + "coverage": "nyc npm run tests-only >/dev/null", + "eccheck": "eclint check *.js **/*.js > /dev/null", + "lint": "eslint .", + "postcoverage": "nyc report", + "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", + "posttest": "aud --production", + "prepublish": "safe-publish-latest && (not-in-publish || npm run spackle)", + "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", + "pretest": "npm run lint", + "spackle": "node operations/spackle 1", + "test": "npm run tests-only", + "tests-only": "node test" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -103,13 +144,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - }, - "greenkeeper": { - "//": "nyc is ignored because it requires node 4+, and we support older than that", - "ignore": [ - "nyc" - ] - } -} \ No newline at end of file + "version": "1.18.0-next.0" +} diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json index 8f5fa3968..83ffdf3f7 100644 --- a/node_modules/object.assign/package.json +++ b/node_modules/object.assign/package.json @@ -1,50 +1,60 @@ { - "name": "object.assign", - "version": "4.1.1", - "author": "Jordan Harband", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run --silent lint && es-shim-api --bound", - "test": "npm run --silent tests-only && npm run test:ses", - "posttest": "aud --production", - "tests-only": "npm run --silent test:implementation && npm run --silent test:shim", - "test:native": "node test/native", - "test:shim": "node test/shimmed", - "test:implementation": "node test", - "test:ses": "node test/ses-compat", - "coverage": "covert test/*.js", - "lint": "eslint .", - "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", - "prepublish": "safe-publish-latest && npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object.assign.git" - }, - "keywords": [ - "Object.assign", - "assign", - "ES6", - "extend", - "$.extend", - "jQuery", - "_.extend", - "Underscore", - "es-shim API", - "polyfill", - "shim" + "_args": [ + [ + "object.assign@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "object.assign@4.1.1", + "_id": "object.assign@4.1.1", + "_inBundle": false, + "_integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "_location": "/object.assign", + "_phantomChildren": { + "es-to-primitive": "1.2.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "has-symbols": "1.0.1", + "is-callable": "1.2.1", + "is-negative-zero": "2.0.0", + "is-regex": "1.1.1", + "object-inspect": "1.8.0", + "object-keys": "1.1.1", + "object.assign": "4.1.1", + "string.prototype.trimend": "1.0.1", + "string.prototype.trimstart": "1.0.1" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "object.assign@4.1.1", + "name": "object.assign", + "escapedName": "object.assign", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" + }, + "_requiredBy": [ + "/es-abstract", + "/object.assign/es-abstract" + ], + "_resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband" + }, + "bugs": { + "url": "https://github.com/ljharb/object.assign/issues" + }, "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" }, + "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", "devDependencies": { "@es-shims/api": "^2.1.2", "@ljharb/eslint-config": "^17.2.0", @@ -60,6 +70,47 @@ "ses": "^0.10.3", "tape": "^5.0.1" }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/object.assign#readme", + "keywords": [ + "Object.assign", + "assign", + "ES6", + "extend", + "$.extend", + "jQuery", + "_.extend", + "Underscore", + "es-shim API", + "polyfill", + "shim" + ], + "license": "MIT", + "main": "index.js", + "name": "object.assign", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.assign.git" + }, + "scripts": { + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "coverage": "covert test/*.js", + "lint": "eslint .", + "posttest": "aud --production", + "prepublish": "safe-publish-latest && npm run build", + "pretest": "npm run --silent lint && es-shim-api --bound", + "test": "npm run --silent tests-only && npm run test:ses", + "test:implementation": "node test", + "test:native": "node test/native", + "test:ses": "node test/ses-compat", + "test:shim": "node test/shimmed", + "tests-only": "npm run --silent test:implementation && npm run --silent test:shim" + }, "testling": { "files": "test/index.js", "browsers": [ @@ -78,7 +129,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "4.1.1" +} diff --git a/node_modules/object.values/package.json b/node_modules/object.values/package.json index 6ecd95947..34d43e204 100644 --- a/node_modules/object.values/package.json +++ b/node_modules/object.values/package.json @@ -1,27 +1,64 @@ { - "name": "object.values", - "version": "1.1.1", - "author": "Jordan Harband ", + "_args": [ + [ + "object.values@1.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "object.values@1.1.1", + "_id": "object.values@1.1.1", + "_inBundle": false, + "_integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "_location": "/object.values", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "object.values@1.1.1", + "name": "object.values", + "escapedName": "object.values", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "bugs": { + "url": "https://github.com/es-shims/Object.values/issues" + }, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + }, + "description": "ES2017 spec-compliant Object.values shim.", + "devDependencies": { + "@es-shims/api": "^2.1.2", + "@ljharb/eslint-config": "^15.0.2", + "array-map": "^0.0.0", + "covert": "^1.1.1", + "eslint": "^6.7.2", + "functions-have-names": "^1.2.0", + "object-keys": "^1.1.1", + "tape": "^4.11.0" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" }, - "description": "ES2017 spec-compliant Object.values shim.", - "license": "MIT", - "main": "index.js", - "scripts": { - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "npx aud", - "tests-only": "es-shim-api && npm run test:shimmed && npm run test:module", - "test:shimmed": "node test/shimmed", - "test:module": "node test/index", - "coverage": "covert test/*.js", - "lint": "eslint ." - }, - "repository": { - "type": "git", - "url": "git://github.com/es-shims/Object.values.git" - }, + "homepage": "https://github.com/es-shims/Object.values#readme", "keywords": [ "Object.values", "Object.keys", @@ -37,21 +74,22 @@ "polyfill", "es-shim API" ], - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" + "license": "MIT", + "main": "index.js", + "name": "object.values", + "repository": { + "type": "git", + "url": "git://github.com/es-shims/Object.values.git" }, - "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^15.0.2", - "array-map": "^0.0.0", - "covert": "^1.1.1", - "eslint": "^6.7.2", - "functions-have-names": "^1.2.0", - "object-keys": "^1.1.1", - "tape": "^4.11.0" + "scripts": { + "coverage": "covert test/*.js", + "lint": "eslint .", + "posttest": "npx aud", + "pretest": "npm run lint", + "test": "npm run tests-only", + "test:module": "node test/index", + "test:shimmed": "node test/shimmed", + "tests-only": "es-shim-api && npm run test:shimmed && npm run test:module" }, "testling": { "files": "test/index.js", @@ -71,7 +109,5 @@ "android-browser/4.2" ] }, - "engines": { - "node": ">= 0.4" - } -} \ No newline at end of file + "version": "1.1.1" +} diff --git a/node_modules/once/package.json b/node_modules/once/package.json index c827b2595..0d4d7c039 100644 --- a/node_modules/once/package.json +++ b/node_modules/once/package.json @@ -1,33 +1,74 @@ { - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" + "_args": [ + [ + "once@1.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "once@1.4.0", + "_id": "once@1.4.0", + "_inBundle": false, + "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "_location": "/once", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "once@1.4.0", + "name": "once", + "escapedName": "once", + "rawSpec": "1.4.0", + "saveSpec": null, + "fetchSpec": "1.4.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/end-of-stream", + "/glob", + "/inflight", + "/pump" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_spec": "1.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" }, "dependencies": { "wrappy": "1" }, + "description": "Run a function exactly one time", "devDependencies": { "tap": "^7.0.1" }, - "scripts": { - "test": "tap test/*.js" + "directories": { + "test": "test" }, "files": [ "once.js" ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, + "homepage": "https://github.com/isaacs/once#readme", "keywords": [ "once", "function", "one", "single" ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} \ No newline at end of file + "license": "ISC", + "main": "once.js", + "name": "once", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.0" +} diff --git a/node_modules/onetime/package.json b/node_modules/onetime/package.json index 19a7f198c..a53841ba0 100644 --- a/node_modules/onetime/package.json +++ b/node_modules/onetime/package.json @@ -1,24 +1,58 @@ { - "name": "onetime", - "version": "5.1.0", - "description": "Ensure a function is only called once", - "license": "MIT", - "repository": "sindresorhus/onetime", + "_args": [ + [ + "onetime@5.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "onetime@5.1.0", + "_id": "onetime@5.1.0", + "_inBundle": false, + "_integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "_location": "/onetime", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "onetime@5.1.0", + "name": "onetime", + "escapedName": "onetime", + "rawSpec": "5.1.0", + "saveSpec": null, + "fetchSpec": "5.1.0" + }, + "_requiredBy": [ + "/restore-cursor" + ], + "_resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "_spec": "5.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/onetime/issues" + }, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "description": "Ensure a function is only called once", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/onetime#readme", "keywords": [ "once", "function", @@ -31,12 +65,14 @@ "called", "prevent" ], - "dependencies": { - "mimic-fn": "^2.1.0" + "license": "MIT", + "name": "onetime", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/onetime.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.1.0" +} diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json index b35b4a868..cf8577925 100644 --- a/node_modules/optionator/package.json +++ b/node_modules/optionator/package.json @@ -1,8 +1,61 @@ { - "name": "optionator", - "version": "0.9.1", - "author": "George Zahariev ", + "_args": [ + [ + "optionator@0.9.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "optionator@0.9.1", + "_id": "optionator@0.9.1", + "_inBundle": false, + "_integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "_location": "/optionator", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "optionator@0.9.1", + "name": "optionator", + "escapedName": "optionator", + "rawSpec": "0.9.1", + "saveSpec": null, + "fetchSpec": "0.9.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "_spec": "0.9.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/optionator/issues" + }, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, "description": "option parsing and help generation", + "devDependencies": { + "livescript": "^1.6.0", + "mocha": "^7.1.1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib", + "README.md", + "LICENSE" + ], "homepage": "https://github.com/gkz/optionator", "keywords": [ "options", @@ -10,17 +63,9 @@ "option parsing", "cli" ], - "files": [ - "lib", - "README.md", - "LICENSE" - ], - "main": "./lib/", - "bugs": "https://github.com/gkz/optionator/issues", "license": "MIT", - "engines": { - "node": ">= 0.8.0" - }, + "main": "./lib/", + "name": "optionator", "repository": { "type": "git", "url": "git://github.com/gkz/optionator.git" @@ -28,16 +73,5 @@ "scripts": { "test": "make test" }, - "dependencies": { - "prelude-ls": "^1.2.1", - "deep-is": "^0.1.3", - "word-wrap": "^1.2.3", - "type-check": "^0.4.0", - "levn": "^0.4.1", - "fast-levenshtein": "^2.0.6" - }, - "devDependencies": { - "livescript": "^1.6.0", - "mocha": "^7.1.1" - } -} \ No newline at end of file + "version": "0.9.1" +} diff --git a/node_modules/ora/node_modules/ansi-styles/package.json b/node_modules/ora/node_modules/ansi-styles/package.json index 1a7731952..da72c9671 100644 --- a/node_modules/ora/node_modules/ansi-styles/package.json +++ b/node_modules/ora/node_modules/ansi-styles/package.json @@ -1,26 +1,62 @@ { - "name": "ansi-styles", - "version": "4.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "_args": [ + [ + "ansi-styles@4.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ansi-styles@4.2.1", + "_id": "ansi-styles@4.2.1", + "_inBundle": false, + "_integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "_location": "/ora/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ansi-styles@4.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "4.2.1", + "saveSpec": null, + "fetchSpec": "4.2.1" + }, + "_requiredBy": [ + "/ora/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "_spec": "4.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "homepage": "https://github.com/chalk/ansi-styles#readme", "keywords": [ "ansi", "styles", @@ -43,15 +79,15 @@ "command-line", "text" ], - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava && tsd" + }, + "version": "4.2.1" +} diff --git a/node_modules/ora/node_modules/chalk/package.json b/node_modules/ora/node_modules/chalk/package.json index b68e931e7..c249ed779 100644 --- a/node_modules/ora/node_modules/chalk/package.json +++ b/node_modules/ora/node_modules/chalk/package.json @@ -1,21 +1,60 @@ { - "name": "chalk", - "version": "3.0.0", + "_args": [ + [ + "chalk@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "chalk@3.0.0", + "_id": "chalk@3.0.0", + "_inBundle": false, + "_integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "_location": "/ora/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chalk@3.0.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ora" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "main": "source", + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^3.2.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^14.1.1", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, "files": [ "source", "index.d.ts" ], + "homepage": "https://github.com/chalk/chalk#readme", "keywords": [ "color", "colour", @@ -39,25 +78,22 @@ "command-line", "text" ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "license": "MIT", + "main": "source", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^3.2.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^14.1.1", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.25.3" + "scripts": { + "bench": "matcha benchmark.js", + "test": "xo && nyc ava && tsd" }, + "version": "3.0.0", "xo": { "rules": { "unicorn/prefer-string-slice": "off", "unicorn/prefer-includes": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/ora/node_modules/color-convert/package.json b/node_modules/ora/node_modules/color-convert/package.json index d169f869b..75e5184e9 100644 --- a/node_modules/ora/node_modules/color-convert/package.json +++ b/node_modules/ora/node_modules/color-convert/package.json @@ -1,17 +1,57 @@ { - "name": "color-convert", + "_args": [ + [ + "color-convert@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-convert@2.0.1", + "_id": "color-convert@2.0.1", + "_inBundle": false, + "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "_location": "/ora/color-convert", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-convert@2.0.1", + "name": "color-convert", + "escapedName": "color-convert", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/ora/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "~1.1.4" + }, "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" + "devDependencies": { + "chalk": "^2.4.2", + "xo": "^0.24.0" }, "engines": { "node": ">=7.0.0" }, + "files": [ + "index.js", + "conversions.js", + "route.js" + ], + "homepage": "https://github.com/Qix-/color-convert#readme", "keywords": [ "color", "colour", @@ -26,23 +66,22 @@ "ansi", "ansi16" ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], + "license": "MIT", + "name": "color-convert", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "2.0.1", "xo": { "rules": { "default-case": 0, "no-inline-comments": 0, "operator-linebreak": 0 } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" } -} \ No newline at end of file +} diff --git a/node_modules/ora/node_modules/color-name/package.json b/node_modules/ora/node_modules/color-name/package.json index fecb8dcfb..dbcb6e217 100644 --- a/node_modules/ora/node_modules/color-name/package.json +++ b/node_modules/ora/node_modules/color-name/package.json @@ -1,28 +1,60 @@ { - "name": "color-name", - "version": "1.1.4", + "_args": [ + [ + "color-name@1.1.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "color-name@1.1.4", + "_id": "color-name@1.1.4", + "_inBundle": false, + "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "_location": "/ora/color-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "color-name@1.1.4", + "name": "color-name", + "escapedName": "color-name", + "rawSpec": "1.1.4", + "saveSpec": null, + "fetchSpec": "1.1.4" + }, + "_requiredBy": [ + "/ora/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "_spec": "1.1.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, "description": "A list of color names and its values", - "main": "index.js", "files": [ "index.js" ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, + "homepage": "https://github.com/colorjs/color-name", "keywords": [ "color-name", "color", "color-keyword", "keyword" ], - "author": "DY ", "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" + "main": "index.js", + "name": "color-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/colorjs/color-name.git" }, - "homepage": "https://github.com/colorjs/color-name" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.1.4" +} diff --git a/node_modules/ora/node_modules/has-flag/package.json b/node_modules/ora/node_modules/has-flag/package.json index 55d0058e4..230359f43 100644 --- a/node_modules/ora/node_modules/has-flag/package.json +++ b/node_modules/ora/node_modules/has-flag/package.json @@ -1,24 +1,55 @@ { - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", + "_args": [ + [ + "has-flag@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "has-flag@4.0.0", + "_id": "has-flag@4.0.0", + "_inBundle": false, + "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "_location": "/ora/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "has-flag@4.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/ora/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", "keywords": [ "has", "check", @@ -38,9 +69,14 @@ "minimist", "optimist" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/ora/node_modules/supports-color/package.json b/node_modules/ora/node_modules/supports-color/package.json index 79856038d..f51a6dcfb 100644 --- a/node_modules/ora/node_modules/supports-color/package.json +++ b/node_modules/ora/node_modules/supports-color/package.json @@ -1,24 +1,59 @@ { - "name": "supports-color", - "version": "7.1.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", + "_args": [ + [ + "supports-color@7.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "supports-color@7.1.0", + "_id": "supports-color@7.1.0", + "_inBundle": false, + "_integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "_location": "/ora/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "supports-color@7.1.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "7.1.0", + "saveSpec": null, + "fetchSpec": "7.1.0" + }, + "_requiredBy": [ + "/ora/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "_spec": "7.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": { + "has-flag": "^4.0.0" + }, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js", "browser.js" ], + "homepage": "https://github.com/chalk/supports-color#readme", "keywords": [ "color", "colour", @@ -41,13 +76,14 @@ "truecolor", "16m" ], - "dependencies": { - "has-flag": "^4.0.0" + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava" }, - "browser": "browser.js" -} \ No newline at end of file + "version": "7.1.0" +} diff --git a/node_modules/ora/package.json b/node_modules/ora/package.json index f5e907f91..675865485 100644 --- a/node_modules/ora/package.json +++ b/node_modules/ora/package.json @@ -1,25 +1,70 @@ { - "name": "ora", - "version": "4.0.4", - "description": "Elegant terminal spinner", - "license": "MIT", - "repository": "sindresorhus/ora", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "ora@4.0.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "ora@4.0.4", + "_id": "ora@4.0.4", + "_inBundle": false, + "_integrity": "sha512-77iGeVU1cIdRhgFzCK8aw1fbtT1B/iZAvWjS+l/o1x0RShMgxHUZaD2yDpWsNCPwXg9z1ZA78Kbdvr8kBmG/Ww==", + "_location": "/ora", + "_phantomChildren": { + "@types/color-name": "1.1.1" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "ora@4.0.4", + "name": "ora", + "escapedName": "ora", + "rawSpec": "4.0.4", + "saveSpec": null, + "fetchSpec": "4.0.4" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/ora/-/ora-4.0.4.tgz", + "_spec": "4.0.4", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/ora/issues" + }, + "dependencies": { + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.2.0", + "is-interactive": "^1.0.0", + "log-symbols": "^3.0.0", + "mute-stream": "0.0.8", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "description": "Elegant terminal spinner", + "devDependencies": { + "@types/node": "^12.7.5", + "ava": "^2.4.0", + "get-stream": "^5.1.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/ora#readme", "keywords": [ "cli", "spinner", @@ -36,21 +81,14 @@ "wait", "idle" ], - "dependencies": { - "chalk": "^3.0.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.2.0", - "is-interactive": "^1.0.0", - "log-symbols": "^3.0.0", - "mute-stream": "0.0.8", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" + "license": "MIT", + "name": "ora", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ora.git" }, - "devDependencies": { - "@types/node": "^12.7.5", - "ava": "^2.4.0", - "get-stream": "^5.1.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.4" +} diff --git a/node_modules/p-cancelable/package.json b/node_modules/p-cancelable/package.json index 98d0b765a..64526dd48 100644 --- a/node_modules/p-cancelable/package.json +++ b/node_modules/p-cancelable/package.json @@ -1,24 +1,57 @@ { - "name": "p-cancelable", - "version": "1.1.0", - "description": "Create a promise that can be canceled", - "license": "MIT", - "repository": "sindresorhus/p-cancelable", + "_args": [ + [ + "p-cancelable@1.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-cancelable@1.1.0", + "_id": "p-cancelable@1.1.0", + "_inBundle": false, + "_integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "_location": "/p-cancelable", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-cancelable@1.1.0", + "name": "p-cancelable", + "escapedName": "p-cancelable", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-cancelable/issues" + }, + "description": "Create a promise that can be canceled", + "devDependencies": { + "ava": "^1.3.1", + "delay": "^4.1.0", + "promise.prototype.finally": "^3.1.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/p-cancelable#readme", "keywords": [ "promise", "cancelable", @@ -39,11 +72,14 @@ "promises", "bluebird" ], - "devDependencies": { - "ava": "^1.3.1", - "delay": "^4.1.0", - "promise.prototype.finally": "^3.1.0", - "tsd-check": "^0.3.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "p-cancelable", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-cancelable.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "1.1.0" +} diff --git a/node_modules/p-defer/package.json b/node_modules/p-defer/package.json index d7f9b811b..624999327 100644 --- a/node_modules/p-defer/package.json +++ b/node_modules/p-defer/package.json @@ -1,23 +1,53 @@ { - "name": "p-defer", - "version": "1.0.0", - "description": "Create a deferred promise", - "license": "MIT", - "repository": "sindresorhus/p-defer", + "_args": [ + [ + "p-defer@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-defer@1.0.0", + "_id": "p-defer@1.0.0", + "_inBundle": false, + "_integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "_location": "/p-defer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-defer@1.0.0", + "name": "p-defer", + "escapedName": "p-defer", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/map-age-cleaner" + ], + "_resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-defer/issues" + }, + "description": "Create a deferred promise", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-defer#readme", "keywords": [ "promise", "defer", @@ -31,11 +61,17 @@ "promises", "bluebird" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "p-defer", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-defer.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/p-limit/package.json b/node_modules/p-limit/package.json index 8a8f33e00..1278dde83 100644 --- a/node_modules/p-limit/package.json +++ b/node_modules/p-limit/package.json @@ -1,24 +1,63 @@ { - "name": "p-limit", - "version": "2.2.1", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", + "_args": [ + [ + "p-limit@2.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-limit@2.2.1", + "_id": "p-limit@2.2.1", + "_inBundle": false, + "_integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "_location": "/p-limit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-limit@2.2.1", + "name": "p-limit", + "escapedName": "p-limit", + "rawSpec": "2.2.1", + "saveSpec": null, + "fetchSpec": "2.2.1" + }, + "_requiredBy": [ + "/p-locate", + "/pkg-conf/p-locate" + ], + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "_spec": "2.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-limit/issues" + }, + "dependencies": { + "p-try": "^2.0.0" + }, + "description": "Run multiple promise-returning & async functions with limited concurrency", + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/p-limit#readme", "keywords": [ "promise", "limit", @@ -36,16 +75,14 @@ "promises", "bluebird" ], - "dependencies": { - "p-try": "^2.0.0" + "license": "MIT", + "name": "p-limit", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-limit.git" }, - "devDependencies": { - "ava": "^1.2.1", - "delay": "^4.1.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "tsd-check": "^0.3.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "2.2.1" +} diff --git a/node_modules/p-locate/package.json b/node_modules/p-locate/package.json index 24bf49512..578d61875 100644 --- a/node_modules/p-locate/package.json +++ b/node_modules/p-locate/package.json @@ -1,24 +1,61 @@ { - "name": "p-locate", - "version": "4.1.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", + "_args": [ + [ + "p-locate@4.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-locate@4.1.0", + "_id": "p-locate@4.1.0", + "_inBundle": false, + "_integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "_location": "/p-locate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-locate@4.1.0", + "name": "p-locate", + "escapedName": "p-locate", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "dependencies": { + "p-limit": "^2.2.0" + }, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "^1.4.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "time-span": "^3.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/p-locate#readme", "keywords": [ "promise", "locate", @@ -39,15 +76,14 @@ "promises", "bluebird" ], - "dependencies": { - "p-limit": "^2.2.0" + "license": "MIT", + "name": "p-locate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" }, - "devDependencies": { - "ava": "^1.4.1", - "delay": "^4.1.0", - "in-range": "^1.0.0", - "time-span": "^3.0.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.1.0" +} diff --git a/node_modules/p-map/package.json b/node_modules/p-map/package.json index 8782cb6af..b63df4071 100644 --- a/node_modules/p-map/package.json +++ b/node_modules/p-map/package.json @@ -1,25 +1,63 @@ { - "name": "p-map", - "version": "4.0.0", - "description": "Map over promises concurrently", - "license": "MIT", - "repository": "sindresorhus/p-map", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "p-map@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-map@4.0.0", + "_id": "p-map@4.0.0", + "_inBundle": false, + "_integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "_location": "/p-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-map@4.0.0", + "name": "p-map", + "escapedName": "p-map", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-map/issues" + }, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "description": "Map over promises concurrently", + "devDependencies": { + "ava": "^2.2.0", + "delay": "^4.1.0", + "in-range": "^2.0.0", + "random-int": "^2.0.0", + "time-span": "^3.1.0", + "tsd": "^0.7.4", + "xo": "^0.27.2" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/p-map#readme", "keywords": [ "promise", "map", @@ -38,16 +76,14 @@ "parallel", "bluebird" ], - "dependencies": { - "aggregate-error": "^3.0.0" + "license": "MIT", + "name": "p-map", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-map.git" }, - "devDependencies": { - "ava": "^2.2.0", - "delay": "^4.1.0", - "in-range": "^2.0.0", - "random-int": "^2.0.0", - "time-span": "^3.1.0", - "tsd": "^0.7.4", - "xo": "^0.27.2" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/p-try/package.json b/node_modules/p-try/package.json index 43c139fa7..491b15aa0 100644 --- a/node_modules/p-try/package.json +++ b/node_modules/p-try/package.json @@ -1,24 +1,55 @@ { - "name": "p-try", - "version": "2.2.0", - "description": "`Start a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", + "_args": [ + [ + "p-try@2.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-try@2.2.0", + "_id": "p-try@2.2.0", + "_inBundle": false, + "_integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "_location": "/p-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-try@2.2.0", + "name": "p-try", + "escapedName": "p-try", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/p-limit" + ], + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-try/issues" + }, + "description": "`Start a promise chain", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/p-try#readme", "keywords": [ "promise", "try", @@ -34,9 +65,14 @@ "shim", "bluebird" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "p-try", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-try.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.2.0" +} diff --git a/node_modules/package-json/node_modules/semver/package.json b/node_modules/package-json/node_modules/semver/package.json index a330b56c2..ead97939b 100644 --- a/node_modules/package-json/node_modules/semver/package.json +++ b/node_modules/package-json/node_modules/semver/package.json @@ -1,28 +1,64 @@ { - "name": "semver", - "version": "6.3.0", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "_args": [ + [ + "semver@6.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "semver@6.3.0", + "_id": "semver@6.3.0", + "_inBundle": false, + "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "_location": "/package-json/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@6.3.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "6.3.0", + "saveSpec": null, + "fetchSpec": "6.3.0" }, + "_requiredBy": [ + "/package-json" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "_spec": "6.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bin": { + "semver": "bin/semver.js" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^14.3.1" }, - "license": "ISC", - "repository": "https://github.com/npm/node-semver", - "bin": { - "semver": "./bin/semver.js" - }, "files": [ "bin", "range.bnf", "semver.js" ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, "tap": { "check-coverage": true - } -} \ No newline at end of file + }, + "version": "6.3.0" +} diff --git a/node_modules/package-json/package.json b/node_modules/package-json/package.json index f090b5552..3bbd882bc 100644 --- a/node_modules/package-json/package.json +++ b/node_modules/package-json/package.json @@ -1,24 +1,63 @@ { - "name": "package-json", - "version": "6.5.0", - "description": "Get metadata of a package from the npm registry", - "license": "MIT", - "repository": "sindresorhus/package-json", + "_args": [ + [ + "package-json@6.5.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "package-json@6.5.0", + "_id": "package-json@6.5.0", + "_inBundle": false, + "_integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "_location": "/package-json", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "package-json@6.5.0", + "name": "package-json", + "escapedName": "package-json", + "rawSpec": "6.5.0", + "saveSpec": null, + "fetchSpec": "6.5.0" + }, + "_requiredBy": [ + "/latest-version" + ], + "_resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "_spec": "6.5.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/package-json/issues" + }, + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "description": "Get metadata of a package from the npm registry", + "devDependencies": { + "@types/node": "^12.6.8", + "ava": "^2.2.0", + "mock-private-registry": "^1.1.2", + "tsd": "^0.7.4", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/package-json#readme", "keywords": [ "npm", "registry", @@ -30,17 +69,14 @@ "scope", "scoped" ], - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" + "license": "MIT", + "name": "package-json", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/package-json.git" }, - "devDependencies": { - "@types/node": "^12.6.8", - "ava": "^2.2.0", - "mock-private-registry": "^1.1.2", - "tsd": "^0.7.4", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "6.5.0" +} diff --git a/node_modules/parent-module/package.json b/node_modules/parent-module/package.json index 9b98a7099..c68760985 100644 --- a/node_modules/parent-module/package.json +++ b/node_modules/parent-module/package.json @@ -1,23 +1,57 @@ { - "name": "parent-module", - "version": "1.0.1", - "description": "Get the path of the parent module", - "license": "MIT", - "repository": "sindresorhus/parent-module", + "_args": [ + [ + "parent-module@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "parent-module@1.0.1", + "_id": "parent-module@1.0.1", + "_inBundle": false, + "_integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "_location": "/parent-module", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "parent-module@1.0.1", + "name": "parent-module", + "escapedName": "parent-module", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/import-fresh" + ], + "_resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/parent-module/issues" + }, + "dependencies": { + "callsites": "^3.0.0" + }, + "description": "Get the path of the parent module", + "devDependencies": { + "ava": "^1.4.1", + "execa": "^1.0.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/parent-module#readme", "keywords": [ "parent", "module", @@ -35,12 +69,14 @@ "function", "file" ], - "dependencies": { - "callsites": "^3.0.0" + "license": "MIT", + "name": "parent-module", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/parent-module.git" }, - "devDependencies": { - "ava": "^1.4.1", - "execa": "^1.0.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/parse-json/package.json b/node_modules/parse-json/package.json index 9bbcba68c..391152da9 100644 --- a/node_modules/parse-json/package.json +++ b/node_modules/parse-json/package.json @@ -1,24 +1,59 @@ { - "name": "parse-json", - "version": "4.0.0", - "description": "Parse JSON with more helpful errors", - "license": "MIT", - "repository": "sindresorhus/parse-json", + "_args": [ + [ + "parse-json@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "parse-json@4.0.0", + "_id": "parse-json@4.0.0", + "_inBundle": false, + "_integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "_location": "/parse-json", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "parse-json@4.0.0", + "name": "parse-json", + "escapedName": "parse-json", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/parse-json/issues" + }, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "description": "Parse JSON with more helpful errors", + "devDependencies": { + "ava": "*", + "nyc": "^11.2.1", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && nyc ava" - }, "files": [ "index.js", "vendor" ], + "homepage": "https://github.com/sindresorhus/parse-json#readme", "keywords": [ "parse", "json", @@ -31,13 +66,14 @@ "string", "str" ], - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "license": "MIT", + "name": "parse-json", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/parse-json.git" }, - "devDependencies": { - "ava": "*", - "nyc": "^11.2.1", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && nyc ava" + }, + "version": "4.0.0" +} diff --git a/node_modules/parse-ms/package.json b/node_modules/parse-ms/package.json index 556e3e088..86427d82b 100644 --- a/node_modules/parse-ms/package.json +++ b/node_modules/parse-ms/package.json @@ -1,24 +1,55 @@ { - "name": "parse-ms", - "version": "2.1.0", - "description": "Parse milliseconds into an object", - "license": "MIT", - "repository": "sindresorhus/parse-ms", + "_args": [ + [ + "parse-ms@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "parse-ms@2.1.0", + "_id": "parse-ms@2.1.0", + "_inBundle": false, + "_integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "_location": "/parse-ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "parse-ms@2.1.0", + "name": "parse-ms", + "escapedName": "parse-ms", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/pretty-ms" + ], + "_resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/parse-ms/issues" + }, + "description": "Parse milliseconds into an object", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/parse-ms#readme", "keywords": [ "browser", "parse", @@ -32,9 +63,14 @@ "range", "interval" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "parse-ms", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/parse-ms.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/path-exists/package.json b/node_modules/path-exists/package.json index 90039cc2f..28f840bdf 100644 --- a/node_modules/path-exists/package.json +++ b/node_modules/path-exists/package.json @@ -1,24 +1,55 @@ { - "name": "path-exists", - "version": "4.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", + "_args": [ + [ + "path-exists@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-exists@4.0.0", + "_id": "path-exists@4.0.0", + "_inBundle": false, + "_integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "_location": "/path-exists", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-exists@4.0.0", + "name": "path-exists", + "escapedName": "path-exists", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/find-up" + ], + "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-exists/issues" + }, + "description": "Check if a path exists", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/path-exists#readme", "keywords": [ "path", "exists", @@ -31,9 +62,14 @@ "access", "stat" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "path-exists", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-exists.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json index b17117f3e..d4486062d 100644 --- a/node_modules/path-is-absolute/package.json +++ b/node_modules/path-is-absolute/package.json @@ -1,23 +1,52 @@ { - "name": "path-is-absolute", - "version": "1.0.1", - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "license": "MIT", - "repository": "sindresorhus/path-is-absolute", + "_args": [ + [ + "path-is-absolute@1.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-is-absolute@1.0.1", + "_id": "path-is-absolute@1.0.1", + "_inBundle": false, + "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "_location": "/path-is-absolute", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-is-absolute@1.0.1", + "name": "path-is-absolute", + "escapedName": "path-is-absolute", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "devDependencies": { + "xo": "^0.16.0" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && node test.js" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", "keywords": [ "path", "paths", @@ -37,7 +66,14 @@ "detect", "check" ], - "devDependencies": { - "xo": "^0.16.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "path-is-absolute", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "scripts": { + "test": "xo && node test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json index b5cca7a87..1f379cd1f 100644 --- a/node_modules/path-parse/package.json +++ b/node_modules/path-parse/package.json @@ -1,15 +1,43 @@ { - "name": "path-parse", - "version": "1.0.6", + "_args": [ + [ + "path-parse@1.0.6", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-parse@1.0.6", + "_id": "path-parse@1.0.6", + "_inBundle": false, + "_integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "_location": "/path-parse", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-parse@1.0.6", + "name": "path-parse", + "escapedName": "path-parse", + "rawSpec": "1.0.6", + "saveSpec": null, + "fetchSpec": "1.0.6" + }, + "_requiredBy": [ + "/eslint-plugin-import/resolve", + "/resolve" + ], + "_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "_spec": "1.0.6", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Javier Blanco", + "email": "http://jbgutierrez.info" + }, + "bugs": { + "url": "https://github.com/jbgutierrez/path-parse/issues" + }, "description": "Node.js path.parse() ponyfill", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/jbgutierrez/path-parse.git" - }, + "homepage": "https://github.com/jbgutierrez/path-parse#readme", "keywords": [ "path", "paths", @@ -24,10 +52,15 @@ "polyfill", "shim" ], - "author": "Javier Blanco ", "license": "MIT", - "bugs": { - "url": "https://github.com/jbgutierrez/path-parse/issues" + "main": "index.js", + "name": "path-parse", + "repository": { + "type": "git", + "url": "git+https://github.com/jbgutierrez/path-parse.git" }, - "homepage": "https://github.com/jbgutierrez/path-parse#readme" -} \ No newline at end of file + "scripts": { + "test": "node test.js" + }, + "version": "1.0.6" +} diff --git a/node_modules/path-to-regexp/package.json b/node_modules/path-to-regexp/package.json index c58301982..57b8deadc 100644 --- a/node_modules/path-to-regexp/package.json +++ b/node_modules/path-to-regexp/package.json @@ -1,37 +1,45 @@ { - "name": "path-to-regexp", - "description": "Express style path to RegExp utility", - "version": "1.8.0", - "main": "index.js", - "typings": "index.d.ts", - "files": [ - "index.js", - "index.d.ts", - "LICENSE" + "_args": [ + [ + "path-to-regexp@1.8.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "lint": "standard", - "test-spec": "mocha --require ts-node/register -R spec --bail test.ts", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require ts-node/register -R spec test.ts", - "prepublish": "typings install", - "test": "npm run lint && npm run test-cov" + "_development": true, + "_from": "path-to-regexp@1.8.0", + "_id": "path-to-regexp@1.8.0", + "_inBundle": false, + "_integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "_location": "/path-to-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-to-regexp@1.8.0", + "name": "path-to-regexp", + "escapedName": "path-to-regexp", + "rawSpec": "1.8.0", + "saveSpec": null, + "fetchSpec": "1.8.0" }, - "keywords": [ - "express", - "regexp", - "route", - "routing" + "_requiredBy": [ + "/nise" ], + "_resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "_spec": "1.8.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "bugs": { + "url": "https://github.com/pillarjs/path-to-regexp/issues" + }, "component": { "scripts": { "path-to-regexp": "index.js" } }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/pillarjs/path-to-regexp.git" + "dependencies": { + "isarray": "0.0.1" }, + "description": "Express style path to RegExp utility", "devDependencies": { "chai": "^2.3.0", "istanbul": "~0.3.0", @@ -41,7 +49,32 @@ "typescript": "^1.8.7", "typings": "^1.0.4" }, - "dependencies": { - "isarray": "0.0.1" - } -} \ No newline at end of file + "files": [ + "index.js", + "index.d.ts", + "LICENSE" + ], + "homepage": "https://github.com/pillarjs/path-to-regexp#readme", + "keywords": [ + "express", + "regexp", + "route", + "routing" + ], + "license": "MIT", + "main": "index.js", + "name": "path-to-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/pillarjs/path-to-regexp.git" + }, + "scripts": { + "lint": "standard", + "prepublish": "typings install", + "test": "npm run lint && npm run test-cov", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require ts-node/register -R spec test.ts", + "test-spec": "mocha --require ts-node/register -R spec --bail test.ts" + }, + "typings": "index.d.ts", + "version": "1.8.0" +} diff --git a/node_modules/path-type/package.json b/node_modules/path-type/package.json index 25d8b90c3..2d0388464 100644 --- a/node_modules/path-type/package.json +++ b/node_modules/path-type/package.json @@ -1,24 +1,56 @@ { - "name": "path-type", - "version": "4.0.0", - "description": "Check if a path is a file, directory, or symlink", - "license": "MIT", - "repository": "sindresorhus/path-type", + "_args": [ + [ + "path-type@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-type@4.0.0", + "_id": "path-type@4.0.0", + "_inBundle": false, + "_integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "_location": "/path-type", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-type@4.0.0", + "name": "path-type", + "escapedName": "path-type", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/dir-glob" + ], + "_resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-type/issues" + }, + "description": "Check if a path is a file, directory, or symlink", + "devDependencies": { + "ava": "^1.3.1", + "nyc": "^13.3.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava && tsd-check" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/path-type#readme", "keywords": [ "path", "fs", @@ -36,10 +68,14 @@ "stats", "filesystem" ], - "devDependencies": { - "ava": "^1.3.1", - "nyc": "^13.3.0", - "tsd-check": "^0.3.0", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "path-type", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-type.git" + }, + "scripts": { + "test": "xo && nyc ava && tsd-check" + }, + "version": "4.0.0" +} diff --git a/node_modules/path/package.json b/node_modules/path/package.json index de70fbf83..6db1964fa 100644 --- a/node_modules/path/package.json +++ b/node_modules/path/package.json @@ -1,24 +1,55 @@ { + "_args": [ + [ + "path@0.12.7", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "path@0.12.7", + "_id": "path@0.12.7", + "_inBundle": false, + "_integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "_location": "/path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path@0.12.7", + "name": "path", + "escapedName": "path", + "rawSpec": "0.12.7", + "saveSpec": null, + "fetchSpec": "0.12.7" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "_spec": "0.12.7", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Joyent", "url": "http://www.joyent.com" }, - "name": "path", + "bugs": { + "url": "https://github.com/jinder/path/issues" + }, + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + }, "description": "Node.JS path module", + "homepage": "http://nodejs.org/docs/latest/api/path.html", "keywords": [ "ender", "path" ], "license": "MIT", - "version": "0.12.7", - "homepage": "http://nodejs.org/docs/latest/api/path.html", + "main": "./path.js", + "name": "path", "repository": { "type": "git", "url": "git://github.com/jinder/path.git" }, - "main": "./path.js", - "dependencies": { - "process": "^0.11.1", - "util": "^0.10.3" - } -} \ No newline at end of file + "version": "0.12.7" +} diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json index 882d1dff3..e92bca7ef 100755 --- a/node_modules/picomatch/package.json +++ b/node_modules/picomatch/package.json @@ -1,30 +1,45 @@ { - "name": "picomatch", - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "version": "2.2.2", - "homepage": "https://github.com/micromatch/picomatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "funding": "https://github.com/sponsors/jonschlinkert", - "repository": "micromatch/picomatch", + "_args": [ + [ + "picomatch@2.2.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "picomatch@2.2.2", + "_id": "picomatch@2.2.2", + "_inBundle": false, + "_integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "_location": "/picomatch", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "picomatch@2.2.2", + "name": "picomatch", + "escapedName": "picomatch", + "rawSpec": "2.2.2", + "saveSpec": null, + "fetchSpec": "2.2.2" + }, + "_requiredBy": [ + "/ava", + "/chokidar/anymatch", + "/fast-glob", + "/micromatch", + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "_spec": "2.2.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, "bugs": { "url": "https://github.com/micromatch/picomatch/issues" }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, + "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", "devDependencies": { "eslint": "^6.8.0", "fill-range": "^7.0.1", @@ -33,11 +48,23 @@ "nyc": "^15.0.0", "time-require": "github:jonschlinkert/time-require" }, + "engines": { + "node": ">=8.6" + }, + "files": [ + "index.js", + "lib" + ], + "funding": "https://github.com/sponsors/jonschlinkert", + "homepage": "https://github.com/micromatch/picomatch", "keywords": [ "glob", "match", "picomatch" ], + "license": "MIT", + "main": "index.js", + "name": "picomatch", "nyc": { "reporter": [ "html", @@ -45,6 +72,17 @@ "text-summary" ] }, + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/picomatch.git" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, "verb": { "toc": { "render": true, @@ -77,5 +115,6 @@ "nanomatch", "picomatch" ] - } -} \ No newline at end of file + }, + "version": "2.2.2" +} diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json index ea9e54fd5..a6f6efe78 100644 --- a/node_modules/pify/package.json +++ b/node_modules/pify/package.json @@ -1,24 +1,55 @@ { - "name": "pify", - "version": "4.0.1", - "description": "Promisify a callback-style function", - "license": "MIT", - "repository": "sindresorhus/pify", + "_args": [ + [ + "pify@4.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pify@4.0.1", + "_id": "pify@4.0.1", + "_inBundle": false, + "_integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "_location": "/pify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pify@4.0.1", + "name": "pify", + "escapedName": "pify", + "rawSpec": "4.0.1", + "saveSpec": null, + "fetchSpec": "4.0.1" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "_spec": "4.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "^0.25.0", + "pinkie-promise": "^2.0.0", + "v8-natives": "^1.1.0", + "xo": "^0.23.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava", - "optimization-test": "node --allow-natives-syntax optimization-test.js" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/pify#readme", "keywords": [ "promise", "promises", @@ -42,10 +73,15 @@ "es2015", "bluebird" ], - "devDependencies": { - "ava": "^0.25.0", - "pinkie-promise": "^2.0.0", - "v8-natives": "^1.1.0", - "xo": "^0.23.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava" + }, + "version": "4.0.1" +} diff --git a/node_modules/pkg-conf/node_modules/find-up/package.json b/node_modules/pkg-conf/node_modules/find-up/package.json index c4045d882..ea66c3026 100644 --- a/node_modules/pkg-conf/node_modules/find-up/package.json +++ b/node_modules/pkg-conf/node_modules/find-up/package.json @@ -1,23 +1,57 @@ { - "name": "find-up", - "version": "3.0.0", - "description": "Find a file or directory by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", + "_args": [ + [ + "find-up@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "find-up@3.0.0", + "_id": "find-up@3.0.0", + "_inBundle": false, + "_integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "_location": "/pkg-conf/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "find-up@3.0.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/pkg-conf" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "dependencies": { + "locate-path": "^3.0.0" + }, + "description": "Find a file or directory by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempy": "^0.2.1", + "xo": "*" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/find-up#readme", "keywords": [ "find", "up", @@ -39,12 +73,14 @@ "walking", "path" ], - "dependencies": { - "locate-path": "^3.0.0" + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" }, - "devDependencies": { - "ava": "*", - "tempy": "^0.2.1", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/pkg-conf/node_modules/locate-path/package.json b/node_modules/pkg-conf/node_modules/locate-path/package.json index ee35ddc2c..48b936a84 100644 --- a/node_modules/pkg-conf/node_modules/locate-path/package.json +++ b/node_modules/pkg-conf/node_modules/locate-path/package.json @@ -1,23 +1,57 @@ { - "name": "locate-path", - "version": "3.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", + "_args": [ + [ + "locate-path@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "locate-path@3.0.0", + "_id": "locate-path@3.0.0", + "_inBundle": false, + "_integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "_location": "/pkg-conf/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "locate-path@3.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/pkg-conf/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", "keywords": [ "locate", "path", @@ -33,12 +67,14 @@ "iterable", "iterator" ], - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/pkg-conf/node_modules/p-locate/package.json b/node_modules/pkg-conf/node_modules/p-locate/package.json index fd4966219..810c4e79d 100644 --- a/node_modules/pkg-conf/node_modules/p-locate/package.json +++ b/node_modules/pkg-conf/node_modules/p-locate/package.json @@ -1,23 +1,59 @@ { - "name": "p-locate", - "version": "3.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", + "_args": [ + [ + "p-locate@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-locate@3.0.0", + "_id": "p-locate@3.0.0", + "_inBundle": false, + "_integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "_location": "/pkg-conf/p-locate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-locate@3.0.0", + "name": "p-locate", + "escapedName": "p-locate", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/pkg-conf/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "dependencies": { + "p-limit": "^2.0.0" + }, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "*", + "delay": "^3.0.0", + "in-range": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-locate#readme", "keywords": [ "promise", "locate", @@ -38,14 +74,14 @@ "promises", "bluebird" ], - "dependencies": { - "p-limit": "^2.0.0" + "license": "MIT", + "name": "p-locate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" }, - "devDependencies": { - "ava": "*", - "delay": "^3.0.0", - "in-range": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/pkg-conf/node_modules/path-exists/package.json b/node_modules/pkg-conf/node_modules/path-exists/package.json index ed507545d..dd895e39d 100644 --- a/node_modules/pkg-conf/node_modules/path-exists/package.json +++ b/node_modules/pkg-conf/node_modules/path-exists/package.json @@ -1,23 +1,53 @@ { - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", + "_args": [ + [ + "path-exists@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-exists@3.0.0", + "_id": "path-exists@3.0.0", + "_inBundle": false, + "_integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "_location": "/pkg-conf/path-exists", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-exists@3.0.0", + "name": "path-exists", + "escapedName": "path-exists", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/pkg-conf/locate-path" + ], + "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-exists/issues" + }, + "description": "Check if a path exists", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/path-exists#readme", "keywords": [ "path", "exists", @@ -30,11 +60,17 @@ "access", "stat" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "path-exists", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-exists.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/pkg-conf/package.json b/node_modules/pkg-conf/package.json index 9b163c318..07f4ed461 100644 --- a/node_modules/pkg-conf/package.json +++ b/node_modules/pkg-conf/package.json @@ -1,24 +1,64 @@ { - "name": "pkg-conf", - "version": "3.1.0", - "description": "Get namespaced config from the closest package.json", - "license": "MIT", - "repository": "sindresorhus/pkg-conf", + "_args": [ + [ + "pkg-conf@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pkg-conf@3.1.0", + "_id": "pkg-conf@3.1.0", + "_inBundle": false, + "_integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "_location": "/pkg-conf", + "_phantomChildren": { + "p-limit": "2.2.1" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "pkg-conf@3.1.0", + "name": "pkg-conf", + "escapedName": "pkg-conf", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pkg-conf/issues" + }, + "dependencies": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "description": "Get namespaced config from the closest package.json", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=6" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "fixture": { + "foo": true + }, + "homepage": "https://github.com/sindresorhus/pkg-conf#readme", "keywords": [ "json", "read", @@ -36,16 +76,14 @@ "namespace", "namespaced" ], - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" + "license": "MIT", + "name": "pkg-conf", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pkg-conf.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava && tsd" }, - "fixture": { - "foo": true - } -} \ No newline at end of file + "version": "3.1.0" +} diff --git a/node_modules/pkg-dir/package.json b/node_modules/pkg-dir/package.json index 6759a9ce7..22b52d13d 100644 --- a/node_modules/pkg-dir/package.json +++ b/node_modules/pkg-dir/package.json @@ -1,24 +1,59 @@ { - "name": "pkg-dir", - "version": "4.2.0", - "description": "Find the root directory of a Node.js project or npm package", - "license": "MIT", - "repository": "sindresorhus/pkg-dir", + "_args": [ + [ + "pkg-dir@4.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pkg-dir@4.2.0", + "_id": "pkg-dir@4.2.0", + "_inBundle": false, + "_integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "_location": "/pkg-dir", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pkg-dir@4.2.0", + "name": "pkg-dir", + "escapedName": "pkg-dir", + "rawSpec": "4.2.0", + "saveSpec": null, + "fetchSpec": "4.2.0" + }, + "_requiredBy": [ + "/import-local" + ], + "_resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "_spec": "4.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pkg-dir/issues" + }, + "dependencies": { + "find-up": "^4.0.0" + }, + "description": "Find the root directory of a Node.js project or npm package", + "devDependencies": { + "ava": "^1.4.1", + "tempy": "^0.3.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/pkg-dir#readme", "keywords": [ "package", "json", @@ -44,13 +79,14 @@ "walking", "path" ], - "dependencies": { - "find-up": "^4.0.0" + "license": "MIT", + "name": "pkg-dir", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pkg-dir.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tempy": "^0.3.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.2.0" +} diff --git a/node_modules/plur/package.json b/node_modules/plur/package.json index fe91e1771..3c9920ef1 100644 --- a/node_modules/plur/package.json +++ b/node_modules/plur/package.json @@ -1,25 +1,59 @@ { - "name": "plur", - "version": "4.0.0", - "description": "Pluralize a word", - "license": "MIT", - "repository": "sindresorhus/plur", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "plur@4.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "plur@4.0.0", + "_id": "plur@4.0.0", + "_inBundle": false, + "_integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "_location": "/plur", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "plur@4.0.0", + "name": "plur", + "escapedName": "plur", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "https://sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/plur/issues" + }, + "dependencies": { + "irregular-plurals": "^3.2.0" + }, + "description": "Pluralize a word", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.11.0", + "xo": "^0.26.1" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/plur#readme", "keywords": [ "plural", "plurals", @@ -32,12 +66,14 @@ "noun", "nouns" ], - "dependencies": { - "irregular-plurals": "^3.2.0" + "license": "MIT", + "name": "plur", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/plur.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.11.0", - "xo": "^0.26.1" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "4.0.0" +} diff --git a/node_modules/prelude-ls/package.json b/node_modules/prelude-ls/package.json index af954a1c1..957112b8a 100644 --- a/node_modules/prelude-ls/package.json +++ b/node_modules/prelude-ls/package.json @@ -1,8 +1,59 @@ { - "name": "prelude-ls", - "version": "1.2.1", - "author": "George Zahariev ", + "_args": [ + [ + "prelude-ls@1.2.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "prelude-ls@1.2.1", + "_id": "prelude-ls@1.2.1", + "_inBundle": false, + "_integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "_location": "/prelude-ls", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "prelude-ls@1.2.1", + "name": "prelude-ls", + "escapedName": "prelude-ls", + "rawSpec": "1.2.1", + "saveSpec": null, + "fetchSpec": "1.2.1" + }, + "_requiredBy": [ + "/levn", + "/optionator", + "/type-check" + ], + "_resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "_spec": "1.2.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/prelude-ls/issues" + }, "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.", + "devDependencies": { + "browserify": "^16.5.1", + "livescript": "^1.6.0", + "mocha": "^7.1.1", + "sinon": "~8.0.1", + "uglify-js": "^3.8.1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib/", + "README.md", + "LICENSE" + ], + "homepage": "http://preludels.com", "keywords": [ "prelude", "livescript", @@ -17,18 +68,9 @@ "object", "string" ], - "main": "lib/", - "files": [ - "lib/", - "README.md", - "LICENSE" - ], - "homepage": "http://preludels.com", - "bugs": "https://github.com/gkz/prelude-ls/issues", "license": "MIT", - "engines": { - "node": ">= 0.8.0" - }, + "main": "lib/", + "name": "prelude-ls", "repository": { "type": "git", "url": "git://github.com/gkz/prelude-ls.git" @@ -36,11 +78,5 @@ "scripts": { "test": "make test" }, - "devDependencies": { - "livescript": "^1.6.0", - "uglify-js": "^3.8.1", - "mocha": "^7.1.1", - "browserify": "^16.5.1", - "sinon": "~8.0.1" - } -} \ No newline at end of file + "version": "1.2.1" +} diff --git a/node_modules/prepend-http/package.json b/node_modules/prepend-http/package.json index 9dfb56a48..2afa09b94 100644 --- a/node_modules/prepend-http/package.json +++ b/node_modules/prepend-http/package.json @@ -1,23 +1,53 @@ { - "name": "prepend-http", - "version": "2.0.0", - "description": "Prepend `http://` to humanized URLs like todomvc.com and localhost", - "license": "MIT", - "repository": "sindresorhus/prepend-http", + "_args": [ + [ + "prepend-http@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "prepend-http@2.0.0", + "_id": "prepend-http@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "_location": "/prepend-http", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "prepend-http@2.0.0", + "name": "prepend-http", + "escapedName": "prepend-http", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/url-parse-lax" + ], + "_resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/prepend-http/issues" + }, + "description": "Prepend `http://` to humanized URLs like todomvc.com and localhost", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/prepend-http#readme", "keywords": [ "prepend", "protocol", @@ -28,8 +58,14 @@ "https", "humanized" ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "prepend-http", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/prepend-http.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0" +} diff --git a/node_modules/prettier-linter-helpers/package.json b/node_modules/prettier-linter-helpers/package.json index 084fe3f84..9766b8467 100644 --- a/node_modules/prettier-linter-helpers/package.json +++ b/node_modules/prettier-linter-helpers/package.json @@ -1,29 +1,48 @@ { - "name": "prettier-linter-helpers", - "version": "1.0.0", - "description": "Utilities to help expose prettier output in linting tools", - "contributors": [ - "Ben Scott", - "Teddy Katz" + "_args": [ + [ + "prettier-linter-helpers@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "main": "index.js", - "license": "MIT", - "scripts": { - "lint": "eslint .", - "test": "npm run lint && mocha", - "format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/prettier/prettier-linter-helpers.git" + "_development": true, + "_from": "prettier-linter-helpers@1.0.0", + "_id": "prettier-linter-helpers@1.0.0", + "_inBundle": false, + "_integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "_location": "/prettier-linter-helpers", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "prettier-linter-helpers@1.0.0", + "name": "prettier-linter-helpers", + "escapedName": "prettier-linter-helpers", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" }, + "_requiredBy": [ + "/eslint-plugin-prettier" + ], + "_resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "bugs": { "url": "https://github.com/prettier/prettier-linter-helpers/issues" }, - "homepage": "https://github.com/prettier/prettier-linter-helpers#readme", + "contributors": [ + { + "name": "Ben Scott" + }, + { + "name": "Teddy Katz" + } + ], "dependencies": { "fast-diff": "^1.1.2" }, + "description": "Utilities to help expose prettier output in linting tools", "devDependencies": { "eslint": "^5.6.1", "eslint-config-prettier": "^3.1.0", @@ -34,5 +53,19 @@ }, "engines": { "node": ">=6.0.0" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/prettier/prettier-linter-helpers#readme", + "license": "MIT", + "main": "index.js", + "name": "prettier-linter-helpers", + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/prettier-linter-helpers.git" + }, + "scripts": { + "format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix", + "lint": "eslint .", + "test": "npm run lint && mocha" + }, + "version": "1.0.0" +} diff --git a/node_modules/prettier/package.json b/node_modules/prettier/package.json index 9a13a43d3..62e1af87a 100644 --- a/node_modules/prettier/package.json +++ b/node_modules/prettier/package.json @@ -1,22 +1,61 @@ { - "name": "prettier", - "version": "2.1.1", - "description": "Prettier is an opinionated code formatter", - "bin": "./bin-prettier.js", - "repository": "prettier/prettier", - "homepage": "https://prettier.io", - "author": "James Long", - "license": "MIT", - "main": "./index.js", + "_args": [ + [ + "prettier@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "prettier@2.1.1", + "_id": "prettier@2.1.1", + "_inBundle": false, + "_integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "_location": "/prettier", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "prettier@2.1.1", + "name": "prettier", + "escapedName": "prettier", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/eslint-plugin-github" + ], + "_resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Long" + }, + "bin": { + "prettier": "bin-prettier.js" + }, "browser": "./standalone.js", - "unpkg": "./standalone.js", + "bugs": { + "url": "https://github.com/prettier/prettier/issues" + }, + "description": "Prettier is an opinionated code formatter", "engines": { "node": ">=10.13.0" }, "files": [ "*.js" ], + "homepage": "https://prettier.io", + "license": "MIT", + "main": "./index.js", + "name": "prettier", + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/prettier.git" + }, "scripts": { "prepublishOnly": "node -e \"assert.equal(require('.').version, require('..').version)\"" - } -} \ No newline at end of file + }, + "unpkg": "./standalone.js", + "version": "2.1.1" +} diff --git a/node_modules/pretty-ms/package.json b/node_modules/pretty-ms/package.json index c491ffca7..7ae6afdc0 100644 --- a/node_modules/pretty-ms/package.json +++ b/node_modules/pretty-ms/package.json @@ -1,25 +1,59 @@ { - "name": "pretty-ms", - "version": "6.0.1", - "description": "Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`", - "license": "MIT", - "repository": "sindresorhus/pretty-ms", - "funding": "https://github.com/sponsors/sindresorhus", + "_args": [ + [ + "pretty-ms@6.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pretty-ms@6.0.1", + "_id": "pretty-ms@6.0.1", + "_inBundle": false, + "_integrity": "sha512-ke4njoVmlotekHlHyCZ3wI/c5AMT8peuHs8rKJqekj/oR5G8lND2dVpicFlUz5cbZgE290vvkMuDwfj/OcW1kw==", + "_location": "/pretty-ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pretty-ms@6.0.1", + "name": "pretty-ms", + "escapedName": "pretty-ms", + "rawSpec": "6.0.1", + "saveSpec": null, + "fetchSpec": "6.0.1" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-6.0.1.tgz", + "_spec": "6.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pretty-ms/issues" + }, + "dependencies": { + "parse-ms": "^2.1.0" + }, + "description": "Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`", + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.11.0", + "xo": "^0.25.3" + }, "engines": { "node": ">=10" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/pretty-ms#readme", "keywords": [ "pretty", "prettify", @@ -38,12 +72,14 @@ "number", "hrtime" ], - "dependencies": { - "parse-ms": "^2.1.0" + "license": "MIT", + "name": "pretty-ms", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pretty-ms.git" }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "6.0.1" +} diff --git a/node_modules/process/package.json b/node_modules/process/package.json index 390815d12..0068c04b0 100644 --- a/node_modules/process/package.json +++ b/node_modules/process/package.json @@ -1,27 +1,63 @@ { - "author": "Roman Shtylman ", - "name": "process", + "_args": [ + [ + "process@0.11.10", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_from": "process@0.11.10", + "_id": "process@0.11.10", + "_inBundle": false, + "_integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "_location": "/process", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "process@0.11.10", + "name": "process", + "escapedName": "process", + "rawSpec": "0.11.10", + "saveSpec": null, + "fetchSpec": "0.11.10" + }, + "_requiredBy": [ + "/@azure/core-http", + "/path" + ], + "_resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "_spec": "0.11.10", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/shtylman/node-process/issues" + }, "description": "process information for node.js and browsers", + "devDependencies": { + "mocha": "2.2.1", + "zuul": "^3.10.3" + }, + "engines": { + "node": ">= 0.6.0" + }, + "homepage": "https://github.com/shtylman/node-process#readme", "keywords": [ "process" ], - "scripts": { - "test": "mocha test.js", - "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js" - }, - "version": "0.11.10", + "license": "MIT", + "main": "./index.js", + "name": "process", "repository": { "type": "git", "url": "git://github.com/shtylman/node-process.git" }, - "license": "MIT", - "browser": "./browser.js", - "main": "./index.js", - "engines": { - "node": ">= 0.6.0" + "scripts": { + "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js", + "test": "mocha test.js" }, - "devDependencies": { - "mocha": "2.2.1", - "zuul": "^3.10.3" - } -} \ No newline at end of file + "version": "0.11.10" +} diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json index 87d8ff031..da410b8ce 100644 --- a/node_modules/progress/package.json +++ b/node_modules/progress/package.json @@ -1,26 +1,74 @@ { - "name": "progress", - "version": "2.0.3", - "description": "Flexible ascii progress bar", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress" + "_args": [ + [ + "progress@2.0.3", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "progress@2.0.3", + "_id": "progress@2.0.3", + "_inBundle": false, + "_integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "_location": "/progress", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "progress@2.0.3", + "name": "progress", + "escapedName": "progress", + "rawSpec": "2.0.3", + "saveSpec": null, + "fetchSpec": "2.0.3" }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "_spec": "2.0.3", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/visionmedia/node-progress/issues" + }, + "contributors": [ + { + "name": "Christoffer Hallas", + "email": "christoffer.hallas@gmail.com" + }, + { + "name": "Jordan Scales", + "email": "scalesjordan@gmail.com" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + }, + { + "name": "Marco Brack", + "email": "PapstDonB@Googlemail.com" + } + ], + "dependencies": {}, + "description": "Flexible ascii progress bar", + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/visionmedia/node-progress#readme", "keywords": [ "cli", "progress" ], - "author": "TJ Holowaychuk ", - "contributors": [ - "Christoffer Hallas ", - "Jordan Scales ", - "Andrew Rhyne ", - "Marco Brack " - ], - "dependencies": {}, + "license": "MIT", "main": "./index.js", - "engines": { - "node": ">=0.4.0" + "name": "progress", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-progress.git" }, - "license": "MIT" -} \ No newline at end of file + "version": "2.0.3" +} diff --git a/node_modules/propagate/package.json b/node_modules/propagate/package.json index b4df513bb..8a1cf2847 100644 --- a/node_modules/propagate/package.json +++ b/node_modules/propagate/package.json @@ -1,27 +1,47 @@ { - "name": "propagate", - "description": "Propagate events from one event emitter into another", - "keywords": [ - "event", - "events", - "emitter", - "eventemitter", - "propagation" + "_args": [ + [ + "propagate@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "version": "2.0.1", - "author": "Pedro Teixeira ", + "_development": true, + "_from": "propagate@2.0.1", + "_id": "propagate@2.0.1", + "_inBundle": false, + "_integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", + "_location": "/propagate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "propagate@2.0.1", + "name": "propagate", + "escapedName": "propagate", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/nock" + ], + "_resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Pedro Teixeira", + "email": "pedro.teixeira@gmail.com" + }, + "bugs": { + "url": "http://github.com/nock/propagate/issues" + }, "contributors": [ { "name": "Pedro Teixeira" } ], - "repository": "nock/propagate", - "homepage": "http://github.com/nock/propagate#readme", - "bugs": "http://github.com/nock/propagate/issues", - "engines": { - "node": ">= 8" - }, "dependencies": {}, + "description": "Propagate events from one event emitter into another", "devDependencies": { "eslint": "^5.16.0", "eslint-config-prettier": "^4.1.0", @@ -34,20 +54,37 @@ "semantic-release": "16.0.0-beta.18", "tap": "^12.6.1" }, - "scripts": { - "lint": "eslint \"**/*.js\"", - "unit": "tap tests/index.js", - "coverage": "tap --coverage-report=html && open coverage/lcov-report/index.html", - "prettier": "prettier --write \"**/*.@(js|md|yml|json)\"", - "prettier:check": "prettier --check \"**/*.@(js|md|yml|json)\"", - "pretest": "npm run lint", - "test": "npm run -s unit", - "posttest": "npm run -s prettier:check" + "engines": { + "node": ">= 8" }, + "homepage": "http://github.com/nock/propagate#readme", + "keywords": [ + "event", + "events", + "emitter", + "eventemitter", + "propagation" + ], + "license": "MIT", + "name": "propagate", "nyc": { "exclude": [ "tests/" ] }, - "license": "MIT" -} \ No newline at end of file + "repository": { + "type": "git", + "url": "git+https://github.com/nock/propagate.git" + }, + "scripts": { + "coverage": "tap --coverage-report=html && open coverage/lcov-report/index.html", + "lint": "eslint \"**/*.js\"", + "posttest": "npm run -s prettier:check", + "pretest": "npm run lint", + "prettier": "prettier --write \"**/*.@(js|md|yml|json)\"", + "prettier:check": "prettier --check \"**/*.@(js|md|yml|json)\"", + "test": "npm run -s unit", + "unit": "tap tests/index.js" + }, + "version": "2.0.1" +} diff --git a/node_modules/psl/LICENSE b/node_modules/psl/LICENSE new file mode 100644 index 000000000..78d792eda --- /dev/null +++ b/node_modules/psl/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2017 Lupo Montero lupomontero@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/psl/README.md b/node_modules/psl/README.md new file mode 100644 index 000000000..e876c3d6f --- /dev/null +++ b/node_modules/psl/README.md @@ -0,0 +1,215 @@ +# psl (Public Suffix List) + +[![NPM](https://nodei.co/npm/psl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/psl/) + +[![Greenkeeper badge](https://badges.greenkeeper.io/lupomontero/psl.svg)](https://greenkeeper.io/) +[![Build Status](https://travis-ci.org/lupomontero/psl.svg?branch=master)](https://travis-ci.org/lupomontero/psl) +[![devDependency Status](https://david-dm.org/lupomontero/psl/dev-status.png)](https://david-dm.org/lupomontero/psl#info=devDependencies) + +`psl` is a `JavaScript` domain name parser based on the +[Public Suffix List](https://publicsuffix.org/). + +This implementation is tested against the +[test data hosted by Mozilla](http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1) +and kindly provided by [Comodo](https://www.comodo.com/). + +Cross browser testing provided by +[BrowserStack](https://www.browserstack.com/) + +## What is the Public Suffix List? + +The Public Suffix List is a cross-vendor initiative to provide an accurate list +of domain name suffixes. + +The Public Suffix List is an initiative of the Mozilla Project, but is +maintained as a community resource. It is available for use in any software, +but was originally created to meet the needs of browser manufacturers. + +A "public suffix" is one under which Internet users can directly register names. +Some examples of public suffixes are ".com", ".co.uk" and "pvt.k12.wy.us". The +Public Suffix List is a list of all known public suffixes. + +Source: http://publicsuffix.org + + +## Installation + +### Node.js + +```sh +npm install --save psl +``` + +### Browser + +Download [psl.min.js](https://raw.githubusercontent.com/lupomontero/psl/master/dist/psl.min.js) +and include it in a script tag. + +```html + +``` + +This script is browserified and wrapped in a [umd](https://github.com/umdjs/umd) +wrapper so you should be able to use it standalone or together with a module +loader. + +## API + +### `psl.parse(domain)` + +Parse domain based on Public Suffix List. Returns an `Object` with the following +properties: + +* `tld`: Top level domain (this is the _public suffix_). +* `sld`: Second level domain (the first private part of the domain name). +* `domain`: The domain name is the `sld` + `tld`. +* `subdomain`: Optional parts left of the domain. + +#### Example: + +```js +var psl = require('psl'); + +// Parse domain without subdomain +var parsed = psl.parse('google.com'); +console.log(parsed.tld); // 'com' +console.log(parsed.sld); // 'google' +console.log(parsed.domain); // 'google.com' +console.log(parsed.subdomain); // null + +// Parse domain with subdomain +var parsed = psl.parse('www.google.com'); +console.log(parsed.tld); // 'com' +console.log(parsed.sld); // 'google' +console.log(parsed.domain); // 'google.com' +console.log(parsed.subdomain); // 'www' + +// Parse domain with nested subdomains +var parsed = psl.parse('a.b.c.d.foo.com'); +console.log(parsed.tld); // 'com' +console.log(parsed.sld); // 'foo' +console.log(parsed.domain); // 'foo.com' +console.log(parsed.subdomain); // 'a.b.c.d' +``` + +### `psl.get(domain)` + +Get domain name, `sld` + `tld`. Returns `null` if not valid. + +#### Example: + +```js +var psl = require('psl'); + +// null input. +psl.get(null); // null + +// Mixed case. +psl.get('COM'); // null +psl.get('example.COM'); // 'example.com' +psl.get('WwW.example.COM'); // 'example.com' + +// Unlisted TLD. +psl.get('example'); // null +psl.get('example.example'); // 'example.example' +psl.get('b.example.example'); // 'example.example' +psl.get('a.b.example.example'); // 'example.example' + +// TLD with only 1 rule. +psl.get('biz'); // null +psl.get('domain.biz'); // 'domain.biz' +psl.get('b.domain.biz'); // 'domain.biz' +psl.get('a.b.domain.biz'); // 'domain.biz' + +// TLD with some 2-level rules. +psl.get('uk.com'); // null); +psl.get('example.uk.com'); // 'example.uk.com'); +psl.get('b.example.uk.com'); // 'example.uk.com'); + +// More complex TLD. +psl.get('c.kobe.jp'); // null +psl.get('b.c.kobe.jp'); // 'b.c.kobe.jp' +psl.get('a.b.c.kobe.jp'); // 'b.c.kobe.jp' +psl.get('city.kobe.jp'); // 'city.kobe.jp' +psl.get('www.city.kobe.jp'); // 'city.kobe.jp' + +// IDN labels. +psl.get('食狮.com.cn'); // '食狮.com.cn' +psl.get('食狮.公司.cn'); // '食狮.公司.cn' +psl.get('www.食狮.公司.cn'); // '食狮.公司.cn' + +// Same as above, but punycoded. +psl.get('xn--85x722f.com.cn'); // 'xn--85x722f.com.cn' +psl.get('xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn' +psl.get('www.xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn' +``` + +### `psl.isValid(domain)` + +Check whether a domain has a valid Public Suffix. Returns a `Boolean` indicating +whether the domain has a valid Public Suffix. + +#### Example + +```js +var psl = require('psl'); + +psl.isValid('google.com'); // true +psl.isValid('www.google.com'); // true +psl.isValid('x.yz'); // false +``` + + +## Testing and Building + +Test are written using [`mocha`](https://mochajs.org/) and can be +run in two different environments: `node` and `phantomjs`. + +```sh +# This will run `eslint`, `mocha` and `karma`. +npm test + +# Individual test environments +# Run tests in node only. +./node_modules/.bin/mocha test +# Run tests in phantomjs only. +./node_modules/.bin/karma start ./karma.conf.js --single-run + +# Build data (parse raw list) and create dist files +npm run build +``` + +Feel free to fork if you see possible improvements! + + +## Acknowledgements + +* Mozilla Foundation's [Public Suffix List](https://publicsuffix.org/) +* Thanks to Rob Stradling of [Comodo](https://www.comodo.com/) for providing + test data. +* Inspired by [weppos/publicsuffix-ruby](https://github.com/weppos/publicsuffix-ruby) + + +## License + +The MIT License (MIT) + +Copyright (c) 2017 Lupo Montero + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/psl/browserstack-logo.svg b/node_modules/psl/browserstack-logo.svg new file mode 100644 index 000000000..195f64d2f --- /dev/null +++ b/node_modules/psl/browserstack-logo.svg @@ -0,0 +1,90 @@ + + + + +Browserstack-logo-white + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/node_modules/psl/data/rules.json b/node_modules/psl/data/rules.json new file mode 100644 index 000000000..e19abdc89 --- /dev/null +++ b/node_modules/psl/data/rules.json @@ -0,0 +1,8834 @@ +[ +"ac", +"com.ac", +"edu.ac", +"gov.ac", +"net.ac", +"mil.ac", +"org.ac", +"ad", +"nom.ad", +"ae", +"co.ae", +"net.ae", +"org.ae", +"sch.ae", +"ac.ae", +"gov.ae", +"mil.ae", +"aero", +"accident-investigation.aero", +"accident-prevention.aero", +"aerobatic.aero", +"aeroclub.aero", +"aerodrome.aero", +"agents.aero", +"aircraft.aero", +"airline.aero", +"airport.aero", +"air-surveillance.aero", +"airtraffic.aero", +"air-traffic-control.aero", +"ambulance.aero", +"amusement.aero", +"association.aero", +"author.aero", +"ballooning.aero", +"broker.aero", +"caa.aero", +"cargo.aero", +"catering.aero", +"certification.aero", +"championship.aero", +"charter.aero", +"civilaviation.aero", +"club.aero", +"conference.aero", +"consultant.aero", +"consulting.aero", +"control.aero", +"council.aero", +"crew.aero", +"design.aero", +"dgca.aero", +"educator.aero", +"emergency.aero", +"engine.aero", +"engineer.aero", +"entertainment.aero", +"equipment.aero", +"exchange.aero", +"express.aero", +"federation.aero", +"flight.aero", +"freight.aero", +"fuel.aero", +"gliding.aero", +"government.aero", +"groundhandling.aero", +"group.aero", +"hanggliding.aero", +"homebuilt.aero", +"insurance.aero", +"journal.aero", +"journalist.aero", +"leasing.aero", +"logistics.aero", +"magazine.aero", +"maintenance.aero", +"media.aero", +"microlight.aero", +"modelling.aero", +"navigation.aero", +"parachuting.aero", +"paragliding.aero", +"passenger-association.aero", +"pilot.aero", +"press.aero", +"production.aero", +"recreation.aero", +"repbody.aero", +"res.aero", +"research.aero", +"rotorcraft.aero", +"safety.aero", +"scientist.aero", +"services.aero", +"show.aero", +"skydiving.aero", +"software.aero", +"student.aero", +"trader.aero", +"trading.aero", +"trainer.aero", +"union.aero", +"workinggroup.aero", +"works.aero", +"af", +"gov.af", +"com.af", +"org.af", +"net.af", +"edu.af", +"ag", +"com.ag", +"org.ag", +"net.ag", +"co.ag", +"nom.ag", +"ai", +"off.ai", +"com.ai", +"net.ai", +"org.ai", +"al", +"com.al", +"edu.al", +"gov.al", +"mil.al", +"net.al", +"org.al", +"am", +"co.am", +"com.am", +"commune.am", +"net.am", +"org.am", +"ao", +"ed.ao", +"gv.ao", +"og.ao", +"co.ao", +"pb.ao", +"it.ao", +"aq", +"ar", +"com.ar", +"edu.ar", +"gob.ar", +"gov.ar", +"int.ar", +"mil.ar", +"musica.ar", +"net.ar", +"org.ar", +"tur.ar", +"arpa", +"e164.arpa", +"in-addr.arpa", +"ip6.arpa", +"iris.arpa", +"uri.arpa", +"urn.arpa", +"as", +"gov.as", +"asia", +"at", +"ac.at", +"co.at", +"gv.at", +"or.at", +"au", +"com.au", +"net.au", +"org.au", +"edu.au", +"gov.au", +"asn.au", +"id.au", +"info.au", +"conf.au", +"oz.au", +"act.au", +"nsw.au", +"nt.au", +"qld.au", +"sa.au", +"tas.au", +"vic.au", +"wa.au", +"act.edu.au", +"catholic.edu.au", +"nsw.edu.au", +"nt.edu.au", +"qld.edu.au", +"sa.edu.au", +"tas.edu.au", +"vic.edu.au", +"wa.edu.au", +"qld.gov.au", +"sa.gov.au", +"tas.gov.au", +"vic.gov.au", +"wa.gov.au", +"education.tas.edu.au", +"schools.nsw.edu.au", +"aw", +"com.aw", +"ax", +"az", +"com.az", +"net.az", +"int.az", +"gov.az", +"org.az", +"edu.az", +"info.az", +"pp.az", +"mil.az", +"name.az", +"pro.az", +"biz.az", +"ba", +"com.ba", +"edu.ba", +"gov.ba", +"mil.ba", +"net.ba", +"org.ba", +"bb", +"biz.bb", +"co.bb", +"com.bb", +"edu.bb", +"gov.bb", +"info.bb", +"net.bb", +"org.bb", +"store.bb", +"tv.bb", +"*.bd", +"be", +"ac.be", +"bf", +"gov.bf", +"bg", +"a.bg", +"b.bg", +"c.bg", +"d.bg", +"e.bg", +"f.bg", +"g.bg", +"h.bg", +"i.bg", +"j.bg", +"k.bg", +"l.bg", +"m.bg", +"n.bg", +"o.bg", +"p.bg", +"q.bg", +"r.bg", +"s.bg", +"t.bg", +"u.bg", +"v.bg", +"w.bg", +"x.bg", +"y.bg", +"z.bg", +"0.bg", +"1.bg", +"2.bg", +"3.bg", +"4.bg", +"5.bg", +"6.bg", +"7.bg", +"8.bg", +"9.bg", +"bh", +"com.bh", +"edu.bh", +"net.bh", +"org.bh", +"gov.bh", +"bi", +"co.bi", +"com.bi", +"edu.bi", +"or.bi", +"org.bi", +"biz", +"bj", +"asso.bj", +"barreau.bj", +"gouv.bj", +"bm", +"com.bm", +"edu.bm", +"gov.bm", +"net.bm", +"org.bm", +"bn", +"com.bn", +"edu.bn", +"gov.bn", +"net.bn", +"org.bn", +"bo", +"com.bo", +"edu.bo", +"gob.bo", +"int.bo", +"org.bo", +"net.bo", +"mil.bo", +"tv.bo", +"web.bo", +"academia.bo", +"agro.bo", +"arte.bo", +"blog.bo", +"bolivia.bo", +"ciencia.bo", +"cooperativa.bo", +"democracia.bo", +"deporte.bo", +"ecologia.bo", +"economia.bo", +"empresa.bo", +"indigena.bo", +"industria.bo", +"info.bo", +"medicina.bo", +"movimiento.bo", +"musica.bo", +"natural.bo", +"nombre.bo", +"noticias.bo", +"patria.bo", +"politica.bo", +"profesional.bo", +"plurinacional.bo", +"pueblo.bo", +"revista.bo", +"salud.bo", +"tecnologia.bo", +"tksat.bo", +"transporte.bo", +"wiki.bo", +"br", +"9guacu.br", +"abc.br", +"adm.br", +"adv.br", +"agr.br", +"aju.br", +"am.br", +"anani.br", +"aparecida.br", +"arq.br", +"art.br", +"ato.br", +"b.br", +"barueri.br", +"belem.br", +"bhz.br", +"bio.br", +"blog.br", +"bmd.br", +"boavista.br", +"bsb.br", +"campinagrande.br", +"campinas.br", +"caxias.br", +"cim.br", +"cng.br", +"cnt.br", +"com.br", +"contagem.br", +"coop.br", +"cri.br", +"cuiaba.br", +"curitiba.br", +"def.br", +"ecn.br", +"eco.br", +"edu.br", +"emp.br", +"eng.br", +"esp.br", +"etc.br", +"eti.br", +"far.br", +"feira.br", +"flog.br", +"floripa.br", +"fm.br", +"fnd.br", +"fortal.br", +"fot.br", +"foz.br", +"fst.br", +"g12.br", +"ggf.br", +"goiania.br", +"gov.br", +"ac.gov.br", +"al.gov.br", +"am.gov.br", +"ap.gov.br", +"ba.gov.br", +"ce.gov.br", +"df.gov.br", +"es.gov.br", +"go.gov.br", +"ma.gov.br", +"mg.gov.br", +"ms.gov.br", +"mt.gov.br", +"pa.gov.br", +"pb.gov.br", +"pe.gov.br", +"pi.gov.br", +"pr.gov.br", +"rj.gov.br", +"rn.gov.br", +"ro.gov.br", +"rr.gov.br", +"rs.gov.br", +"sc.gov.br", +"se.gov.br", +"sp.gov.br", +"to.gov.br", +"gru.br", +"imb.br", +"ind.br", +"inf.br", +"jab.br", +"jampa.br", +"jdf.br", +"joinville.br", +"jor.br", +"jus.br", +"leg.br", +"lel.br", +"londrina.br", +"macapa.br", +"maceio.br", +"manaus.br", +"maringa.br", +"mat.br", +"med.br", +"mil.br", +"morena.br", +"mp.br", +"mus.br", +"natal.br", +"net.br", +"niteroi.br", +"*.nom.br", +"not.br", +"ntr.br", +"odo.br", +"ong.br", +"org.br", +"osasco.br", +"palmas.br", +"poa.br", +"ppg.br", +"pro.br", +"psc.br", +"psi.br", +"pvh.br", +"qsl.br", +"radio.br", +"rec.br", +"recife.br", +"ribeirao.br", +"rio.br", +"riobranco.br", +"riopreto.br", +"salvador.br", +"sampa.br", +"santamaria.br", +"santoandre.br", +"saobernardo.br", +"saogonca.br", +"sjc.br", +"slg.br", +"slz.br", +"sorocaba.br", +"srv.br", +"taxi.br", +"tc.br", +"teo.br", +"the.br", +"tmp.br", +"trd.br", +"tur.br", +"tv.br", +"udi.br", +"vet.br", +"vix.br", +"vlog.br", +"wiki.br", +"zlg.br", +"bs", +"com.bs", +"net.bs", +"org.bs", +"edu.bs", +"gov.bs", +"bt", +"com.bt", +"edu.bt", +"gov.bt", +"net.bt", +"org.bt", +"bv", +"bw", +"co.bw", +"org.bw", +"by", +"gov.by", +"mil.by", +"com.by", +"of.by", +"bz", +"com.bz", +"net.bz", +"org.bz", +"edu.bz", +"gov.bz", +"ca", +"ab.ca", +"bc.ca", +"mb.ca", +"nb.ca", +"nf.ca", +"nl.ca", +"ns.ca", +"nt.ca", +"nu.ca", +"on.ca", +"pe.ca", +"qc.ca", +"sk.ca", +"yk.ca", +"gc.ca", +"cat", +"cc", +"cd", +"gov.cd", +"cf", +"cg", +"ch", +"ci", +"org.ci", +"or.ci", +"com.ci", +"co.ci", +"edu.ci", +"ed.ci", +"ac.ci", +"net.ci", +"go.ci", +"asso.ci", +"aéroport.ci", +"int.ci", +"presse.ci", +"md.ci", +"gouv.ci", +"*.ck", +"!www.ck", +"cl", +"aprendemas.cl", +"co.cl", +"gob.cl", +"gov.cl", +"mil.cl", +"cm", +"co.cm", +"com.cm", +"gov.cm", +"net.cm", +"cn", +"ac.cn", +"com.cn", +"edu.cn", +"gov.cn", +"net.cn", +"org.cn", +"mil.cn", +"公司.cn", +"网络.cn", +"網絡.cn", +"ah.cn", +"bj.cn", +"cq.cn", +"fj.cn", +"gd.cn", +"gs.cn", +"gz.cn", +"gx.cn", +"ha.cn", +"hb.cn", +"he.cn", +"hi.cn", +"hl.cn", +"hn.cn", +"jl.cn", +"js.cn", +"jx.cn", +"ln.cn", +"nm.cn", +"nx.cn", +"qh.cn", +"sc.cn", +"sd.cn", +"sh.cn", +"sn.cn", +"sx.cn", +"tj.cn", +"xj.cn", +"xz.cn", +"yn.cn", +"zj.cn", +"hk.cn", +"mo.cn", +"tw.cn", +"co", +"arts.co", +"com.co", +"edu.co", +"firm.co", +"gov.co", +"info.co", +"int.co", +"mil.co", +"net.co", +"nom.co", +"org.co", +"rec.co", +"web.co", +"com", +"coop", +"cr", +"ac.cr", +"co.cr", +"ed.cr", +"fi.cr", +"go.cr", +"or.cr", +"sa.cr", +"cu", +"com.cu", +"edu.cu", +"org.cu", +"net.cu", +"gov.cu", +"inf.cu", +"cv", +"cw", +"com.cw", +"edu.cw", +"net.cw", +"org.cw", +"cx", +"gov.cx", +"cy", +"ac.cy", +"biz.cy", +"com.cy", +"ekloges.cy", +"gov.cy", +"ltd.cy", +"name.cy", +"net.cy", +"org.cy", +"parliament.cy", +"press.cy", +"pro.cy", +"tm.cy", +"cz", +"de", +"dj", +"dk", +"dm", +"com.dm", +"net.dm", +"org.dm", +"edu.dm", +"gov.dm", +"do", +"art.do", +"com.do", +"edu.do", +"gob.do", +"gov.do", +"mil.do", +"net.do", +"org.do", +"sld.do", +"web.do", +"dz", +"com.dz", +"org.dz", +"net.dz", +"gov.dz", +"edu.dz", +"asso.dz", +"pol.dz", +"art.dz", +"ec", +"com.ec", +"info.ec", +"net.ec", +"fin.ec", +"k12.ec", +"med.ec", +"pro.ec", +"org.ec", +"edu.ec", +"gov.ec", +"gob.ec", +"mil.ec", +"edu", +"ee", +"edu.ee", +"gov.ee", +"riik.ee", +"lib.ee", +"med.ee", +"com.ee", +"pri.ee", +"aip.ee", +"org.ee", +"fie.ee", +"eg", +"com.eg", +"edu.eg", +"eun.eg", +"gov.eg", +"mil.eg", +"name.eg", +"net.eg", +"org.eg", +"sci.eg", +"*.er", +"es", +"com.es", +"nom.es", +"org.es", +"gob.es", +"edu.es", +"et", +"com.et", +"gov.et", +"org.et", +"edu.et", +"biz.et", +"name.et", +"info.et", +"net.et", +"eu", +"fi", +"aland.fi", +"fj", +"ac.fj", +"biz.fj", +"com.fj", +"gov.fj", +"info.fj", +"mil.fj", +"name.fj", +"net.fj", +"org.fj", +"pro.fj", +"*.fk", +"fm", +"fo", +"fr", +"asso.fr", +"com.fr", +"gouv.fr", +"nom.fr", +"prd.fr", +"tm.fr", +"aeroport.fr", +"avocat.fr", +"avoues.fr", +"cci.fr", +"chambagri.fr", +"chirurgiens-dentistes.fr", +"experts-comptables.fr", +"geometre-expert.fr", +"greta.fr", +"huissier-justice.fr", +"medecin.fr", +"notaires.fr", +"pharmacien.fr", +"port.fr", +"veterinaire.fr", +"ga", +"gb", +"gd", +"ge", +"com.ge", +"edu.ge", +"gov.ge", +"org.ge", +"mil.ge", +"net.ge", +"pvt.ge", +"gf", +"gg", +"co.gg", +"net.gg", +"org.gg", +"gh", +"com.gh", +"edu.gh", +"gov.gh", +"org.gh", +"mil.gh", +"gi", +"com.gi", +"ltd.gi", +"gov.gi", +"mod.gi", +"edu.gi", +"org.gi", +"gl", +"co.gl", +"com.gl", +"edu.gl", +"net.gl", +"org.gl", +"gm", +"gn", +"ac.gn", +"com.gn", +"edu.gn", +"gov.gn", +"org.gn", +"net.gn", +"gov", +"gp", +"com.gp", +"net.gp", +"mobi.gp", +"edu.gp", +"org.gp", +"asso.gp", +"gq", +"gr", +"com.gr", +"edu.gr", +"net.gr", +"org.gr", +"gov.gr", +"gs", +"gt", +"com.gt", +"edu.gt", +"gob.gt", +"ind.gt", +"mil.gt", +"net.gt", +"org.gt", +"gu", +"com.gu", +"edu.gu", +"gov.gu", +"guam.gu", +"info.gu", +"net.gu", +"org.gu", +"web.gu", +"gw", +"gy", +"co.gy", +"com.gy", +"edu.gy", +"gov.gy", +"net.gy", +"org.gy", +"hk", +"com.hk", +"edu.hk", +"gov.hk", +"idv.hk", +"net.hk", +"org.hk", +"公司.hk", +"教育.hk", +"敎育.hk", +"政府.hk", +"個人.hk", +"个人.hk", +"箇人.hk", +"網络.hk", +"网络.hk", +"组織.hk", +"網絡.hk", +"网絡.hk", +"组织.hk", +"組織.hk", +"組织.hk", +"hm", +"hn", +"com.hn", +"edu.hn", +"org.hn", +"net.hn", +"mil.hn", +"gob.hn", +"hr", +"iz.hr", +"from.hr", +"name.hr", +"com.hr", +"ht", +"com.ht", +"shop.ht", +"firm.ht", +"info.ht", +"adult.ht", +"net.ht", +"pro.ht", +"org.ht", +"med.ht", +"art.ht", +"coop.ht", +"pol.ht", +"asso.ht", +"edu.ht", +"rel.ht", +"gouv.ht", +"perso.ht", +"hu", +"co.hu", +"info.hu", +"org.hu", +"priv.hu", +"sport.hu", +"tm.hu", +"2000.hu", +"agrar.hu", +"bolt.hu", +"casino.hu", +"city.hu", +"erotica.hu", +"erotika.hu", +"film.hu", +"forum.hu", +"games.hu", +"hotel.hu", +"ingatlan.hu", +"jogasz.hu", +"konyvelo.hu", +"lakas.hu", +"media.hu", +"news.hu", +"reklam.hu", +"sex.hu", +"shop.hu", +"suli.hu", +"szex.hu", +"tozsde.hu", +"utazas.hu", +"video.hu", +"id", +"ac.id", +"biz.id", +"co.id", +"desa.id", +"go.id", +"mil.id", +"my.id", +"net.id", +"or.id", +"ponpes.id", +"sch.id", +"web.id", +"ie", +"gov.ie", +"il", +"ac.il", +"co.il", +"gov.il", +"idf.il", +"k12.il", +"muni.il", +"net.il", +"org.il", +"im", +"ac.im", +"co.im", +"com.im", +"ltd.co.im", +"net.im", +"org.im", +"plc.co.im", +"tt.im", +"tv.im", +"in", +"co.in", +"firm.in", +"net.in", +"org.in", +"gen.in", +"ind.in", +"nic.in", +"ac.in", +"edu.in", +"res.in", +"gov.in", +"mil.in", +"info", +"int", +"eu.int", +"io", +"com.io", +"iq", +"gov.iq", +"edu.iq", +"mil.iq", +"com.iq", +"org.iq", +"net.iq", +"ir", +"ac.ir", +"co.ir", +"gov.ir", +"id.ir", +"net.ir", +"org.ir", +"sch.ir", +"ایران.ir", +"ايران.ir", +"is", +"net.is", +"com.is", +"edu.is", +"gov.is", +"org.is", +"int.is", +"it", +"gov.it", +"edu.it", +"abr.it", +"abruzzo.it", +"aosta-valley.it", +"aostavalley.it", +"bas.it", +"basilicata.it", +"cal.it", +"calabria.it", +"cam.it", +"campania.it", +"emilia-romagna.it", +"emiliaromagna.it", +"emr.it", +"friuli-v-giulia.it", +"friuli-ve-giulia.it", +"friuli-vegiulia.it", +"friuli-venezia-giulia.it", +"friuli-veneziagiulia.it", +"friuli-vgiulia.it", +"friuliv-giulia.it", +"friulive-giulia.it", +"friulivegiulia.it", +"friulivenezia-giulia.it", +"friuliveneziagiulia.it", +"friulivgiulia.it", +"fvg.it", +"laz.it", +"lazio.it", +"lig.it", +"liguria.it", +"lom.it", +"lombardia.it", +"lombardy.it", +"lucania.it", +"mar.it", +"marche.it", +"mol.it", +"molise.it", +"piedmont.it", +"piemonte.it", +"pmn.it", +"pug.it", +"puglia.it", +"sar.it", +"sardegna.it", +"sardinia.it", +"sic.it", +"sicilia.it", +"sicily.it", +"taa.it", +"tos.it", +"toscana.it", +"trentin-sud-tirol.it", +"trentin-süd-tirol.it", +"trentin-sudtirol.it", +"trentin-südtirol.it", +"trentin-sued-tirol.it", +"trentin-suedtirol.it", +"trentino-a-adige.it", +"trentino-aadige.it", +"trentino-alto-adige.it", +"trentino-altoadige.it", +"trentino-s-tirol.it", +"trentino-stirol.it", +"trentino-sud-tirol.it", +"trentino-süd-tirol.it", +"trentino-sudtirol.it", +"trentino-südtirol.it", +"trentino-sued-tirol.it", +"trentino-suedtirol.it", +"trentino.it", +"trentinoa-adige.it", +"trentinoaadige.it", +"trentinoalto-adige.it", +"trentinoaltoadige.it", +"trentinos-tirol.it", +"trentinostirol.it", +"trentinosud-tirol.it", +"trentinosüd-tirol.it", +"trentinosudtirol.it", +"trentinosüdtirol.it", +"trentinosued-tirol.it", +"trentinosuedtirol.it", +"trentinsud-tirol.it", +"trentinsüd-tirol.it", +"trentinsudtirol.it", +"trentinsüdtirol.it", +"trentinsued-tirol.it", +"trentinsuedtirol.it", +"tuscany.it", +"umb.it", +"umbria.it", +"val-d-aosta.it", +"val-daosta.it", +"vald-aosta.it", +"valdaosta.it", +"valle-aosta.it", +"valle-d-aosta.it", +"valle-daosta.it", +"valleaosta.it", +"valled-aosta.it", +"valledaosta.it", +"vallee-aoste.it", +"vallée-aoste.it", +"vallee-d-aoste.it", +"vallée-d-aoste.it", +"valleeaoste.it", +"valléeaoste.it", +"valleedaoste.it", +"valléedaoste.it", +"vao.it", +"vda.it", +"ven.it", +"veneto.it", +"ag.it", +"agrigento.it", +"al.it", +"alessandria.it", +"alto-adige.it", +"altoadige.it", +"an.it", +"ancona.it", +"andria-barletta-trani.it", +"andria-trani-barletta.it", +"andriabarlettatrani.it", +"andriatranibarletta.it", +"ao.it", +"aosta.it", +"aoste.it", +"ap.it", +"aq.it", +"aquila.it", +"ar.it", +"arezzo.it", +"ascoli-piceno.it", +"ascolipiceno.it", +"asti.it", +"at.it", +"av.it", +"avellino.it", +"ba.it", +"balsan-sudtirol.it", +"balsan-südtirol.it", +"balsan-suedtirol.it", +"balsan.it", +"bari.it", +"barletta-trani-andria.it", +"barlettatraniandria.it", +"belluno.it", +"benevento.it", +"bergamo.it", +"bg.it", +"bi.it", +"biella.it", +"bl.it", +"bn.it", +"bo.it", +"bologna.it", +"bolzano-altoadige.it", +"bolzano.it", +"bozen-sudtirol.it", +"bozen-südtirol.it", +"bozen-suedtirol.it", +"bozen.it", +"br.it", +"brescia.it", +"brindisi.it", +"bs.it", +"bt.it", +"bulsan-sudtirol.it", +"bulsan-südtirol.it", +"bulsan-suedtirol.it", +"bulsan.it", +"bz.it", +"ca.it", +"cagliari.it", +"caltanissetta.it", +"campidano-medio.it", +"campidanomedio.it", +"campobasso.it", +"carbonia-iglesias.it", +"carboniaiglesias.it", +"carrara-massa.it", +"carraramassa.it", +"caserta.it", +"catania.it", +"catanzaro.it", +"cb.it", +"ce.it", +"cesena-forli.it", +"cesena-forlì.it", +"cesenaforli.it", +"cesenaforlì.it", +"ch.it", +"chieti.it", +"ci.it", +"cl.it", +"cn.it", +"co.it", +"como.it", +"cosenza.it", +"cr.it", +"cremona.it", +"crotone.it", +"cs.it", +"ct.it", +"cuneo.it", +"cz.it", +"dell-ogliastra.it", +"dellogliastra.it", +"en.it", +"enna.it", +"fc.it", +"fe.it", +"fermo.it", +"ferrara.it", +"fg.it", +"fi.it", +"firenze.it", +"florence.it", +"fm.it", +"foggia.it", +"forli-cesena.it", +"forlì-cesena.it", +"forlicesena.it", +"forlìcesena.it", +"fr.it", +"frosinone.it", +"ge.it", +"genoa.it", +"genova.it", +"go.it", +"gorizia.it", +"gr.it", +"grosseto.it", +"iglesias-carbonia.it", +"iglesiascarbonia.it", +"im.it", +"imperia.it", +"is.it", +"isernia.it", +"kr.it", +"la-spezia.it", +"laquila.it", +"laspezia.it", +"latina.it", +"lc.it", +"le.it", +"lecce.it", +"lecco.it", +"li.it", +"livorno.it", +"lo.it", +"lodi.it", +"lt.it", +"lu.it", +"lucca.it", +"macerata.it", +"mantova.it", +"massa-carrara.it", +"massacarrara.it", +"matera.it", +"mb.it", +"mc.it", +"me.it", +"medio-campidano.it", +"mediocampidano.it", +"messina.it", +"mi.it", +"milan.it", +"milano.it", +"mn.it", +"mo.it", +"modena.it", +"monza-brianza.it", +"monza-e-della-brianza.it", +"monza.it", +"monzabrianza.it", +"monzaebrianza.it", +"monzaedellabrianza.it", +"ms.it", +"mt.it", +"na.it", +"naples.it", +"napoli.it", +"no.it", +"novara.it", +"nu.it", +"nuoro.it", +"og.it", +"ogliastra.it", +"olbia-tempio.it", +"olbiatempio.it", +"or.it", +"oristano.it", +"ot.it", +"pa.it", +"padova.it", +"padua.it", +"palermo.it", +"parma.it", +"pavia.it", +"pc.it", +"pd.it", +"pe.it", +"perugia.it", +"pesaro-urbino.it", +"pesarourbino.it", +"pescara.it", +"pg.it", +"pi.it", +"piacenza.it", +"pisa.it", +"pistoia.it", +"pn.it", +"po.it", +"pordenone.it", +"potenza.it", +"pr.it", +"prato.it", +"pt.it", +"pu.it", +"pv.it", +"pz.it", +"ra.it", +"ragusa.it", +"ravenna.it", +"rc.it", +"re.it", +"reggio-calabria.it", +"reggio-emilia.it", +"reggiocalabria.it", +"reggioemilia.it", +"rg.it", +"ri.it", +"rieti.it", +"rimini.it", +"rm.it", +"rn.it", +"ro.it", +"roma.it", +"rome.it", +"rovigo.it", +"sa.it", +"salerno.it", +"sassari.it", +"savona.it", +"si.it", +"siena.it", +"siracusa.it", +"so.it", +"sondrio.it", +"sp.it", +"sr.it", +"ss.it", +"suedtirol.it", +"südtirol.it", +"sv.it", +"ta.it", +"taranto.it", +"te.it", +"tempio-olbia.it", +"tempioolbia.it", +"teramo.it", +"terni.it", +"tn.it", +"to.it", +"torino.it", +"tp.it", +"tr.it", +"trani-andria-barletta.it", +"trani-barletta-andria.it", +"traniandriabarletta.it", +"tranibarlettaandria.it", +"trapani.it", +"trento.it", +"treviso.it", +"trieste.it", +"ts.it", +"turin.it", +"tv.it", +"ud.it", +"udine.it", +"urbino-pesaro.it", +"urbinopesaro.it", +"va.it", +"varese.it", +"vb.it", +"vc.it", +"ve.it", +"venezia.it", +"venice.it", +"verbania.it", +"vercelli.it", +"verona.it", +"vi.it", +"vibo-valentia.it", +"vibovalentia.it", +"vicenza.it", +"viterbo.it", +"vr.it", +"vs.it", +"vt.it", +"vv.it", +"je", +"co.je", +"net.je", +"org.je", +"*.jm", +"jo", +"com.jo", +"org.jo", +"net.jo", +"edu.jo", +"sch.jo", +"gov.jo", +"mil.jo", +"name.jo", +"jobs", +"jp", +"ac.jp", +"ad.jp", +"co.jp", +"ed.jp", +"go.jp", +"gr.jp", +"lg.jp", +"ne.jp", +"or.jp", +"aichi.jp", +"akita.jp", +"aomori.jp", +"chiba.jp", +"ehime.jp", +"fukui.jp", +"fukuoka.jp", +"fukushima.jp", +"gifu.jp", +"gunma.jp", +"hiroshima.jp", +"hokkaido.jp", +"hyogo.jp", +"ibaraki.jp", +"ishikawa.jp", +"iwate.jp", +"kagawa.jp", +"kagoshima.jp", +"kanagawa.jp", +"kochi.jp", +"kumamoto.jp", +"kyoto.jp", +"mie.jp", +"miyagi.jp", +"miyazaki.jp", +"nagano.jp", +"nagasaki.jp", +"nara.jp", +"niigata.jp", +"oita.jp", +"okayama.jp", +"okinawa.jp", +"osaka.jp", +"saga.jp", +"saitama.jp", +"shiga.jp", +"shimane.jp", +"shizuoka.jp", +"tochigi.jp", +"tokushima.jp", +"tokyo.jp", +"tottori.jp", +"toyama.jp", +"wakayama.jp", +"yamagata.jp", +"yamaguchi.jp", +"yamanashi.jp", +"栃木.jp", +"愛知.jp", +"愛媛.jp", +"兵庫.jp", +"熊本.jp", +"茨城.jp", +"北海道.jp", +"千葉.jp", +"和歌山.jp", +"長崎.jp", +"長野.jp", +"新潟.jp", +"青森.jp", +"静岡.jp", +"東京.jp", +"石川.jp", +"埼玉.jp", +"三重.jp", +"京都.jp", +"佐賀.jp", +"大分.jp", +"大阪.jp", +"奈良.jp", +"宮城.jp", +"宮崎.jp", +"富山.jp", +"山口.jp", +"山形.jp", +"山梨.jp", +"岩手.jp", +"岐阜.jp", +"岡山.jp", +"島根.jp", +"広島.jp", +"徳島.jp", +"沖縄.jp", +"滋賀.jp", +"神奈川.jp", +"福井.jp", +"福岡.jp", +"福島.jp", +"秋田.jp", +"群馬.jp", +"香川.jp", +"高知.jp", +"鳥取.jp", +"鹿児島.jp", +"*.kawasaki.jp", +"*.kitakyushu.jp", +"*.kobe.jp", +"*.nagoya.jp", +"*.sapporo.jp", +"*.sendai.jp", +"*.yokohama.jp", +"!city.kawasaki.jp", +"!city.kitakyushu.jp", +"!city.kobe.jp", +"!city.nagoya.jp", +"!city.sapporo.jp", +"!city.sendai.jp", +"!city.yokohama.jp", +"aisai.aichi.jp", +"ama.aichi.jp", +"anjo.aichi.jp", +"asuke.aichi.jp", +"chiryu.aichi.jp", +"chita.aichi.jp", +"fuso.aichi.jp", +"gamagori.aichi.jp", +"handa.aichi.jp", +"hazu.aichi.jp", +"hekinan.aichi.jp", +"higashiura.aichi.jp", +"ichinomiya.aichi.jp", +"inazawa.aichi.jp", +"inuyama.aichi.jp", +"isshiki.aichi.jp", +"iwakura.aichi.jp", +"kanie.aichi.jp", +"kariya.aichi.jp", +"kasugai.aichi.jp", +"kira.aichi.jp", +"kiyosu.aichi.jp", +"komaki.aichi.jp", +"konan.aichi.jp", +"kota.aichi.jp", +"mihama.aichi.jp", +"miyoshi.aichi.jp", +"nishio.aichi.jp", +"nisshin.aichi.jp", +"obu.aichi.jp", +"oguchi.aichi.jp", +"oharu.aichi.jp", +"okazaki.aichi.jp", +"owariasahi.aichi.jp", +"seto.aichi.jp", +"shikatsu.aichi.jp", +"shinshiro.aichi.jp", +"shitara.aichi.jp", +"tahara.aichi.jp", +"takahama.aichi.jp", +"tobishima.aichi.jp", +"toei.aichi.jp", +"togo.aichi.jp", +"tokai.aichi.jp", +"tokoname.aichi.jp", +"toyoake.aichi.jp", +"toyohashi.aichi.jp", +"toyokawa.aichi.jp", +"toyone.aichi.jp", +"toyota.aichi.jp", +"tsushima.aichi.jp", +"yatomi.aichi.jp", +"akita.akita.jp", +"daisen.akita.jp", +"fujisato.akita.jp", +"gojome.akita.jp", +"hachirogata.akita.jp", +"happou.akita.jp", +"higashinaruse.akita.jp", +"honjo.akita.jp", +"honjyo.akita.jp", +"ikawa.akita.jp", +"kamikoani.akita.jp", +"kamioka.akita.jp", +"katagami.akita.jp", +"kazuno.akita.jp", +"kitaakita.akita.jp", +"kosaka.akita.jp", +"kyowa.akita.jp", +"misato.akita.jp", +"mitane.akita.jp", +"moriyoshi.akita.jp", +"nikaho.akita.jp", +"noshiro.akita.jp", +"odate.akita.jp", +"oga.akita.jp", +"ogata.akita.jp", +"semboku.akita.jp", +"yokote.akita.jp", +"yurihonjo.akita.jp", +"aomori.aomori.jp", +"gonohe.aomori.jp", +"hachinohe.aomori.jp", +"hashikami.aomori.jp", +"hiranai.aomori.jp", +"hirosaki.aomori.jp", +"itayanagi.aomori.jp", +"kuroishi.aomori.jp", +"misawa.aomori.jp", +"mutsu.aomori.jp", +"nakadomari.aomori.jp", +"noheji.aomori.jp", +"oirase.aomori.jp", +"owani.aomori.jp", +"rokunohe.aomori.jp", +"sannohe.aomori.jp", +"shichinohe.aomori.jp", +"shingo.aomori.jp", +"takko.aomori.jp", +"towada.aomori.jp", +"tsugaru.aomori.jp", +"tsuruta.aomori.jp", +"abiko.chiba.jp", +"asahi.chiba.jp", +"chonan.chiba.jp", +"chosei.chiba.jp", +"choshi.chiba.jp", +"chuo.chiba.jp", +"funabashi.chiba.jp", +"futtsu.chiba.jp", +"hanamigawa.chiba.jp", +"ichihara.chiba.jp", +"ichikawa.chiba.jp", +"ichinomiya.chiba.jp", +"inzai.chiba.jp", +"isumi.chiba.jp", +"kamagaya.chiba.jp", +"kamogawa.chiba.jp", +"kashiwa.chiba.jp", +"katori.chiba.jp", +"katsuura.chiba.jp", +"kimitsu.chiba.jp", +"kisarazu.chiba.jp", +"kozaki.chiba.jp", +"kujukuri.chiba.jp", +"kyonan.chiba.jp", +"matsudo.chiba.jp", +"midori.chiba.jp", +"mihama.chiba.jp", +"minamiboso.chiba.jp", +"mobara.chiba.jp", +"mutsuzawa.chiba.jp", +"nagara.chiba.jp", +"nagareyama.chiba.jp", +"narashino.chiba.jp", +"narita.chiba.jp", +"noda.chiba.jp", +"oamishirasato.chiba.jp", +"omigawa.chiba.jp", +"onjuku.chiba.jp", +"otaki.chiba.jp", +"sakae.chiba.jp", +"sakura.chiba.jp", +"shimofusa.chiba.jp", +"shirako.chiba.jp", +"shiroi.chiba.jp", +"shisui.chiba.jp", +"sodegaura.chiba.jp", +"sosa.chiba.jp", +"tako.chiba.jp", +"tateyama.chiba.jp", +"togane.chiba.jp", +"tohnosho.chiba.jp", +"tomisato.chiba.jp", +"urayasu.chiba.jp", +"yachimata.chiba.jp", +"yachiyo.chiba.jp", +"yokaichiba.chiba.jp", +"yokoshibahikari.chiba.jp", +"yotsukaido.chiba.jp", +"ainan.ehime.jp", +"honai.ehime.jp", +"ikata.ehime.jp", +"imabari.ehime.jp", +"iyo.ehime.jp", +"kamijima.ehime.jp", +"kihoku.ehime.jp", +"kumakogen.ehime.jp", +"masaki.ehime.jp", +"matsuno.ehime.jp", +"matsuyama.ehime.jp", +"namikata.ehime.jp", +"niihama.ehime.jp", +"ozu.ehime.jp", +"saijo.ehime.jp", +"seiyo.ehime.jp", +"shikokuchuo.ehime.jp", +"tobe.ehime.jp", +"toon.ehime.jp", +"uchiko.ehime.jp", +"uwajima.ehime.jp", +"yawatahama.ehime.jp", +"echizen.fukui.jp", +"eiheiji.fukui.jp", +"fukui.fukui.jp", +"ikeda.fukui.jp", +"katsuyama.fukui.jp", +"mihama.fukui.jp", +"minamiechizen.fukui.jp", +"obama.fukui.jp", +"ohi.fukui.jp", +"ono.fukui.jp", +"sabae.fukui.jp", +"sakai.fukui.jp", +"takahama.fukui.jp", +"tsuruga.fukui.jp", +"wakasa.fukui.jp", +"ashiya.fukuoka.jp", +"buzen.fukuoka.jp", +"chikugo.fukuoka.jp", +"chikuho.fukuoka.jp", +"chikujo.fukuoka.jp", +"chikushino.fukuoka.jp", +"chikuzen.fukuoka.jp", +"chuo.fukuoka.jp", +"dazaifu.fukuoka.jp", +"fukuchi.fukuoka.jp", +"hakata.fukuoka.jp", +"higashi.fukuoka.jp", +"hirokawa.fukuoka.jp", +"hisayama.fukuoka.jp", +"iizuka.fukuoka.jp", +"inatsuki.fukuoka.jp", +"kaho.fukuoka.jp", +"kasuga.fukuoka.jp", +"kasuya.fukuoka.jp", +"kawara.fukuoka.jp", +"keisen.fukuoka.jp", +"koga.fukuoka.jp", +"kurate.fukuoka.jp", +"kurogi.fukuoka.jp", +"kurume.fukuoka.jp", +"minami.fukuoka.jp", +"miyako.fukuoka.jp", +"miyama.fukuoka.jp", +"miyawaka.fukuoka.jp", +"mizumaki.fukuoka.jp", +"munakata.fukuoka.jp", +"nakagawa.fukuoka.jp", +"nakama.fukuoka.jp", +"nishi.fukuoka.jp", +"nogata.fukuoka.jp", +"ogori.fukuoka.jp", +"okagaki.fukuoka.jp", +"okawa.fukuoka.jp", +"oki.fukuoka.jp", +"omuta.fukuoka.jp", +"onga.fukuoka.jp", +"onojo.fukuoka.jp", +"oto.fukuoka.jp", +"saigawa.fukuoka.jp", +"sasaguri.fukuoka.jp", +"shingu.fukuoka.jp", +"shinyoshitomi.fukuoka.jp", +"shonai.fukuoka.jp", +"soeda.fukuoka.jp", +"sue.fukuoka.jp", +"tachiarai.fukuoka.jp", +"tagawa.fukuoka.jp", +"takata.fukuoka.jp", +"toho.fukuoka.jp", +"toyotsu.fukuoka.jp", +"tsuiki.fukuoka.jp", +"ukiha.fukuoka.jp", +"umi.fukuoka.jp", +"usui.fukuoka.jp", +"yamada.fukuoka.jp", +"yame.fukuoka.jp", +"yanagawa.fukuoka.jp", +"yukuhashi.fukuoka.jp", +"aizubange.fukushima.jp", +"aizumisato.fukushima.jp", +"aizuwakamatsu.fukushima.jp", +"asakawa.fukushima.jp", +"bandai.fukushima.jp", +"date.fukushima.jp", +"fukushima.fukushima.jp", +"furudono.fukushima.jp", +"futaba.fukushima.jp", +"hanawa.fukushima.jp", +"higashi.fukushima.jp", +"hirata.fukushima.jp", +"hirono.fukushima.jp", +"iitate.fukushima.jp", +"inawashiro.fukushima.jp", +"ishikawa.fukushima.jp", +"iwaki.fukushima.jp", +"izumizaki.fukushima.jp", +"kagamiishi.fukushima.jp", +"kaneyama.fukushima.jp", +"kawamata.fukushima.jp", +"kitakata.fukushima.jp", +"kitashiobara.fukushima.jp", +"koori.fukushima.jp", +"koriyama.fukushima.jp", +"kunimi.fukushima.jp", +"miharu.fukushima.jp", +"mishima.fukushima.jp", +"namie.fukushima.jp", +"nango.fukushima.jp", +"nishiaizu.fukushima.jp", +"nishigo.fukushima.jp", +"okuma.fukushima.jp", +"omotego.fukushima.jp", +"ono.fukushima.jp", +"otama.fukushima.jp", +"samegawa.fukushima.jp", +"shimogo.fukushima.jp", +"shirakawa.fukushima.jp", +"showa.fukushima.jp", +"soma.fukushima.jp", +"sukagawa.fukushima.jp", +"taishin.fukushima.jp", +"tamakawa.fukushima.jp", +"tanagura.fukushima.jp", +"tenei.fukushima.jp", +"yabuki.fukushima.jp", +"yamato.fukushima.jp", +"yamatsuri.fukushima.jp", +"yanaizu.fukushima.jp", +"yugawa.fukushima.jp", +"anpachi.gifu.jp", +"ena.gifu.jp", +"gifu.gifu.jp", +"ginan.gifu.jp", +"godo.gifu.jp", +"gujo.gifu.jp", +"hashima.gifu.jp", +"hichiso.gifu.jp", +"hida.gifu.jp", +"higashishirakawa.gifu.jp", +"ibigawa.gifu.jp", +"ikeda.gifu.jp", +"kakamigahara.gifu.jp", +"kani.gifu.jp", +"kasahara.gifu.jp", +"kasamatsu.gifu.jp", +"kawaue.gifu.jp", +"kitagata.gifu.jp", +"mino.gifu.jp", +"minokamo.gifu.jp", +"mitake.gifu.jp", +"mizunami.gifu.jp", +"motosu.gifu.jp", +"nakatsugawa.gifu.jp", +"ogaki.gifu.jp", +"sakahogi.gifu.jp", +"seki.gifu.jp", +"sekigahara.gifu.jp", +"shirakawa.gifu.jp", +"tajimi.gifu.jp", +"takayama.gifu.jp", +"tarui.gifu.jp", +"toki.gifu.jp", +"tomika.gifu.jp", +"wanouchi.gifu.jp", +"yamagata.gifu.jp", +"yaotsu.gifu.jp", +"yoro.gifu.jp", +"annaka.gunma.jp", +"chiyoda.gunma.jp", +"fujioka.gunma.jp", +"higashiagatsuma.gunma.jp", +"isesaki.gunma.jp", +"itakura.gunma.jp", +"kanna.gunma.jp", +"kanra.gunma.jp", +"katashina.gunma.jp", +"kawaba.gunma.jp", +"kiryu.gunma.jp", +"kusatsu.gunma.jp", +"maebashi.gunma.jp", +"meiwa.gunma.jp", +"midori.gunma.jp", +"minakami.gunma.jp", +"naganohara.gunma.jp", +"nakanojo.gunma.jp", +"nanmoku.gunma.jp", +"numata.gunma.jp", +"oizumi.gunma.jp", +"ora.gunma.jp", +"ota.gunma.jp", +"shibukawa.gunma.jp", +"shimonita.gunma.jp", +"shinto.gunma.jp", +"showa.gunma.jp", +"takasaki.gunma.jp", +"takayama.gunma.jp", +"tamamura.gunma.jp", +"tatebayashi.gunma.jp", +"tomioka.gunma.jp", +"tsukiyono.gunma.jp", +"tsumagoi.gunma.jp", +"ueno.gunma.jp", +"yoshioka.gunma.jp", +"asaminami.hiroshima.jp", +"daiwa.hiroshima.jp", +"etajima.hiroshima.jp", +"fuchu.hiroshima.jp", +"fukuyama.hiroshima.jp", +"hatsukaichi.hiroshima.jp", +"higashihiroshima.hiroshima.jp", +"hongo.hiroshima.jp", +"jinsekikogen.hiroshima.jp", +"kaita.hiroshima.jp", +"kui.hiroshima.jp", +"kumano.hiroshima.jp", +"kure.hiroshima.jp", +"mihara.hiroshima.jp", +"miyoshi.hiroshima.jp", +"naka.hiroshima.jp", +"onomichi.hiroshima.jp", +"osakikamijima.hiroshima.jp", +"otake.hiroshima.jp", +"saka.hiroshima.jp", +"sera.hiroshima.jp", +"seranishi.hiroshima.jp", +"shinichi.hiroshima.jp", +"shobara.hiroshima.jp", +"takehara.hiroshima.jp", +"abashiri.hokkaido.jp", +"abira.hokkaido.jp", +"aibetsu.hokkaido.jp", +"akabira.hokkaido.jp", +"akkeshi.hokkaido.jp", +"asahikawa.hokkaido.jp", +"ashibetsu.hokkaido.jp", +"ashoro.hokkaido.jp", +"assabu.hokkaido.jp", +"atsuma.hokkaido.jp", +"bibai.hokkaido.jp", +"biei.hokkaido.jp", +"bifuka.hokkaido.jp", +"bihoro.hokkaido.jp", +"biratori.hokkaido.jp", +"chippubetsu.hokkaido.jp", +"chitose.hokkaido.jp", +"date.hokkaido.jp", +"ebetsu.hokkaido.jp", +"embetsu.hokkaido.jp", +"eniwa.hokkaido.jp", +"erimo.hokkaido.jp", +"esan.hokkaido.jp", +"esashi.hokkaido.jp", +"fukagawa.hokkaido.jp", +"fukushima.hokkaido.jp", +"furano.hokkaido.jp", +"furubira.hokkaido.jp", +"haboro.hokkaido.jp", +"hakodate.hokkaido.jp", +"hamatonbetsu.hokkaido.jp", +"hidaka.hokkaido.jp", +"higashikagura.hokkaido.jp", +"higashikawa.hokkaido.jp", +"hiroo.hokkaido.jp", +"hokuryu.hokkaido.jp", +"hokuto.hokkaido.jp", +"honbetsu.hokkaido.jp", +"horokanai.hokkaido.jp", +"horonobe.hokkaido.jp", +"ikeda.hokkaido.jp", +"imakane.hokkaido.jp", +"ishikari.hokkaido.jp", +"iwamizawa.hokkaido.jp", +"iwanai.hokkaido.jp", +"kamifurano.hokkaido.jp", +"kamikawa.hokkaido.jp", +"kamishihoro.hokkaido.jp", +"kamisunagawa.hokkaido.jp", +"kamoenai.hokkaido.jp", +"kayabe.hokkaido.jp", +"kembuchi.hokkaido.jp", +"kikonai.hokkaido.jp", +"kimobetsu.hokkaido.jp", +"kitahiroshima.hokkaido.jp", +"kitami.hokkaido.jp", +"kiyosato.hokkaido.jp", +"koshimizu.hokkaido.jp", +"kunneppu.hokkaido.jp", +"kuriyama.hokkaido.jp", +"kuromatsunai.hokkaido.jp", +"kushiro.hokkaido.jp", +"kutchan.hokkaido.jp", +"kyowa.hokkaido.jp", +"mashike.hokkaido.jp", +"matsumae.hokkaido.jp", +"mikasa.hokkaido.jp", +"minamifurano.hokkaido.jp", +"mombetsu.hokkaido.jp", +"moseushi.hokkaido.jp", +"mukawa.hokkaido.jp", +"muroran.hokkaido.jp", +"naie.hokkaido.jp", +"nakagawa.hokkaido.jp", +"nakasatsunai.hokkaido.jp", +"nakatombetsu.hokkaido.jp", +"nanae.hokkaido.jp", +"nanporo.hokkaido.jp", +"nayoro.hokkaido.jp", +"nemuro.hokkaido.jp", +"niikappu.hokkaido.jp", +"niki.hokkaido.jp", +"nishiokoppe.hokkaido.jp", +"noboribetsu.hokkaido.jp", +"numata.hokkaido.jp", +"obihiro.hokkaido.jp", +"obira.hokkaido.jp", +"oketo.hokkaido.jp", +"okoppe.hokkaido.jp", +"otaru.hokkaido.jp", +"otobe.hokkaido.jp", +"otofuke.hokkaido.jp", +"otoineppu.hokkaido.jp", +"oumu.hokkaido.jp", +"ozora.hokkaido.jp", +"pippu.hokkaido.jp", +"rankoshi.hokkaido.jp", +"rebun.hokkaido.jp", +"rikubetsu.hokkaido.jp", +"rishiri.hokkaido.jp", +"rishirifuji.hokkaido.jp", +"saroma.hokkaido.jp", +"sarufutsu.hokkaido.jp", +"shakotan.hokkaido.jp", +"shari.hokkaido.jp", +"shibecha.hokkaido.jp", +"shibetsu.hokkaido.jp", +"shikabe.hokkaido.jp", +"shikaoi.hokkaido.jp", +"shimamaki.hokkaido.jp", +"shimizu.hokkaido.jp", +"shimokawa.hokkaido.jp", +"shinshinotsu.hokkaido.jp", +"shintoku.hokkaido.jp", +"shiranuka.hokkaido.jp", +"shiraoi.hokkaido.jp", +"shiriuchi.hokkaido.jp", +"sobetsu.hokkaido.jp", +"sunagawa.hokkaido.jp", +"taiki.hokkaido.jp", +"takasu.hokkaido.jp", +"takikawa.hokkaido.jp", +"takinoue.hokkaido.jp", +"teshikaga.hokkaido.jp", +"tobetsu.hokkaido.jp", +"tohma.hokkaido.jp", +"tomakomai.hokkaido.jp", +"tomari.hokkaido.jp", +"toya.hokkaido.jp", +"toyako.hokkaido.jp", +"toyotomi.hokkaido.jp", +"toyoura.hokkaido.jp", +"tsubetsu.hokkaido.jp", +"tsukigata.hokkaido.jp", +"urakawa.hokkaido.jp", +"urausu.hokkaido.jp", +"uryu.hokkaido.jp", +"utashinai.hokkaido.jp", +"wakkanai.hokkaido.jp", +"wassamu.hokkaido.jp", +"yakumo.hokkaido.jp", +"yoichi.hokkaido.jp", +"aioi.hyogo.jp", +"akashi.hyogo.jp", +"ako.hyogo.jp", +"amagasaki.hyogo.jp", +"aogaki.hyogo.jp", +"asago.hyogo.jp", +"ashiya.hyogo.jp", +"awaji.hyogo.jp", +"fukusaki.hyogo.jp", +"goshiki.hyogo.jp", +"harima.hyogo.jp", +"himeji.hyogo.jp", +"ichikawa.hyogo.jp", +"inagawa.hyogo.jp", +"itami.hyogo.jp", +"kakogawa.hyogo.jp", +"kamigori.hyogo.jp", +"kamikawa.hyogo.jp", +"kasai.hyogo.jp", +"kasuga.hyogo.jp", +"kawanishi.hyogo.jp", +"miki.hyogo.jp", +"minamiawaji.hyogo.jp", +"nishinomiya.hyogo.jp", +"nishiwaki.hyogo.jp", +"ono.hyogo.jp", +"sanda.hyogo.jp", +"sannan.hyogo.jp", +"sasayama.hyogo.jp", +"sayo.hyogo.jp", +"shingu.hyogo.jp", +"shinonsen.hyogo.jp", +"shiso.hyogo.jp", +"sumoto.hyogo.jp", +"taishi.hyogo.jp", +"taka.hyogo.jp", +"takarazuka.hyogo.jp", +"takasago.hyogo.jp", +"takino.hyogo.jp", +"tamba.hyogo.jp", +"tatsuno.hyogo.jp", +"toyooka.hyogo.jp", +"yabu.hyogo.jp", +"yashiro.hyogo.jp", +"yoka.hyogo.jp", +"yokawa.hyogo.jp", +"ami.ibaraki.jp", +"asahi.ibaraki.jp", +"bando.ibaraki.jp", +"chikusei.ibaraki.jp", +"daigo.ibaraki.jp", +"fujishiro.ibaraki.jp", +"hitachi.ibaraki.jp", +"hitachinaka.ibaraki.jp", +"hitachiomiya.ibaraki.jp", +"hitachiota.ibaraki.jp", +"ibaraki.ibaraki.jp", +"ina.ibaraki.jp", +"inashiki.ibaraki.jp", +"itako.ibaraki.jp", +"iwama.ibaraki.jp", +"joso.ibaraki.jp", +"kamisu.ibaraki.jp", +"kasama.ibaraki.jp", +"kashima.ibaraki.jp", +"kasumigaura.ibaraki.jp", +"koga.ibaraki.jp", +"miho.ibaraki.jp", +"mito.ibaraki.jp", +"moriya.ibaraki.jp", +"naka.ibaraki.jp", +"namegata.ibaraki.jp", +"oarai.ibaraki.jp", +"ogawa.ibaraki.jp", +"omitama.ibaraki.jp", +"ryugasaki.ibaraki.jp", +"sakai.ibaraki.jp", +"sakuragawa.ibaraki.jp", +"shimodate.ibaraki.jp", +"shimotsuma.ibaraki.jp", +"shirosato.ibaraki.jp", +"sowa.ibaraki.jp", +"suifu.ibaraki.jp", +"takahagi.ibaraki.jp", +"tamatsukuri.ibaraki.jp", +"tokai.ibaraki.jp", +"tomobe.ibaraki.jp", +"tone.ibaraki.jp", +"toride.ibaraki.jp", +"tsuchiura.ibaraki.jp", +"tsukuba.ibaraki.jp", +"uchihara.ibaraki.jp", +"ushiku.ibaraki.jp", +"yachiyo.ibaraki.jp", +"yamagata.ibaraki.jp", +"yawara.ibaraki.jp", +"yuki.ibaraki.jp", +"anamizu.ishikawa.jp", +"hakui.ishikawa.jp", +"hakusan.ishikawa.jp", +"kaga.ishikawa.jp", +"kahoku.ishikawa.jp", +"kanazawa.ishikawa.jp", +"kawakita.ishikawa.jp", +"komatsu.ishikawa.jp", +"nakanoto.ishikawa.jp", +"nanao.ishikawa.jp", +"nomi.ishikawa.jp", +"nonoichi.ishikawa.jp", +"noto.ishikawa.jp", +"shika.ishikawa.jp", +"suzu.ishikawa.jp", +"tsubata.ishikawa.jp", +"tsurugi.ishikawa.jp", +"uchinada.ishikawa.jp", +"wajima.ishikawa.jp", +"fudai.iwate.jp", +"fujisawa.iwate.jp", +"hanamaki.iwate.jp", +"hiraizumi.iwate.jp", +"hirono.iwate.jp", +"ichinohe.iwate.jp", +"ichinoseki.iwate.jp", +"iwaizumi.iwate.jp", +"iwate.iwate.jp", +"joboji.iwate.jp", +"kamaishi.iwate.jp", +"kanegasaki.iwate.jp", +"karumai.iwate.jp", +"kawai.iwate.jp", +"kitakami.iwate.jp", +"kuji.iwate.jp", +"kunohe.iwate.jp", +"kuzumaki.iwate.jp", +"miyako.iwate.jp", +"mizusawa.iwate.jp", +"morioka.iwate.jp", +"ninohe.iwate.jp", +"noda.iwate.jp", +"ofunato.iwate.jp", +"oshu.iwate.jp", +"otsuchi.iwate.jp", +"rikuzentakata.iwate.jp", +"shiwa.iwate.jp", +"shizukuishi.iwate.jp", +"sumita.iwate.jp", +"tanohata.iwate.jp", +"tono.iwate.jp", +"yahaba.iwate.jp", +"yamada.iwate.jp", +"ayagawa.kagawa.jp", +"higashikagawa.kagawa.jp", +"kanonji.kagawa.jp", +"kotohira.kagawa.jp", +"manno.kagawa.jp", +"marugame.kagawa.jp", +"mitoyo.kagawa.jp", +"naoshima.kagawa.jp", +"sanuki.kagawa.jp", +"tadotsu.kagawa.jp", +"takamatsu.kagawa.jp", +"tonosho.kagawa.jp", +"uchinomi.kagawa.jp", +"utazu.kagawa.jp", +"zentsuji.kagawa.jp", +"akune.kagoshima.jp", +"amami.kagoshima.jp", +"hioki.kagoshima.jp", +"isa.kagoshima.jp", +"isen.kagoshima.jp", +"izumi.kagoshima.jp", +"kagoshima.kagoshima.jp", +"kanoya.kagoshima.jp", +"kawanabe.kagoshima.jp", +"kinko.kagoshima.jp", +"kouyama.kagoshima.jp", +"makurazaki.kagoshima.jp", +"matsumoto.kagoshima.jp", +"minamitane.kagoshima.jp", +"nakatane.kagoshima.jp", +"nishinoomote.kagoshima.jp", +"satsumasendai.kagoshima.jp", +"soo.kagoshima.jp", +"tarumizu.kagoshima.jp", +"yusui.kagoshima.jp", +"aikawa.kanagawa.jp", +"atsugi.kanagawa.jp", +"ayase.kanagawa.jp", +"chigasaki.kanagawa.jp", +"ebina.kanagawa.jp", +"fujisawa.kanagawa.jp", +"hadano.kanagawa.jp", +"hakone.kanagawa.jp", +"hiratsuka.kanagawa.jp", +"isehara.kanagawa.jp", +"kaisei.kanagawa.jp", +"kamakura.kanagawa.jp", +"kiyokawa.kanagawa.jp", +"matsuda.kanagawa.jp", +"minamiashigara.kanagawa.jp", +"miura.kanagawa.jp", +"nakai.kanagawa.jp", +"ninomiya.kanagawa.jp", +"odawara.kanagawa.jp", +"oi.kanagawa.jp", +"oiso.kanagawa.jp", +"sagamihara.kanagawa.jp", +"samukawa.kanagawa.jp", +"tsukui.kanagawa.jp", +"yamakita.kanagawa.jp", +"yamato.kanagawa.jp", +"yokosuka.kanagawa.jp", +"yugawara.kanagawa.jp", +"zama.kanagawa.jp", +"zushi.kanagawa.jp", +"aki.kochi.jp", +"geisei.kochi.jp", +"hidaka.kochi.jp", +"higashitsuno.kochi.jp", +"ino.kochi.jp", +"kagami.kochi.jp", +"kami.kochi.jp", +"kitagawa.kochi.jp", +"kochi.kochi.jp", +"mihara.kochi.jp", +"motoyama.kochi.jp", +"muroto.kochi.jp", +"nahari.kochi.jp", +"nakamura.kochi.jp", +"nankoku.kochi.jp", +"nishitosa.kochi.jp", +"niyodogawa.kochi.jp", +"ochi.kochi.jp", +"okawa.kochi.jp", +"otoyo.kochi.jp", +"otsuki.kochi.jp", +"sakawa.kochi.jp", +"sukumo.kochi.jp", +"susaki.kochi.jp", +"tosa.kochi.jp", +"tosashimizu.kochi.jp", +"toyo.kochi.jp", +"tsuno.kochi.jp", +"umaji.kochi.jp", +"yasuda.kochi.jp", +"yusuhara.kochi.jp", +"amakusa.kumamoto.jp", +"arao.kumamoto.jp", +"aso.kumamoto.jp", +"choyo.kumamoto.jp", +"gyokuto.kumamoto.jp", +"kamiamakusa.kumamoto.jp", +"kikuchi.kumamoto.jp", +"kumamoto.kumamoto.jp", +"mashiki.kumamoto.jp", +"mifune.kumamoto.jp", +"minamata.kumamoto.jp", +"minamioguni.kumamoto.jp", +"nagasu.kumamoto.jp", +"nishihara.kumamoto.jp", +"oguni.kumamoto.jp", +"ozu.kumamoto.jp", +"sumoto.kumamoto.jp", +"takamori.kumamoto.jp", +"uki.kumamoto.jp", +"uto.kumamoto.jp", +"yamaga.kumamoto.jp", +"yamato.kumamoto.jp", +"yatsushiro.kumamoto.jp", +"ayabe.kyoto.jp", +"fukuchiyama.kyoto.jp", +"higashiyama.kyoto.jp", +"ide.kyoto.jp", +"ine.kyoto.jp", +"joyo.kyoto.jp", +"kameoka.kyoto.jp", +"kamo.kyoto.jp", +"kita.kyoto.jp", +"kizu.kyoto.jp", +"kumiyama.kyoto.jp", +"kyotamba.kyoto.jp", +"kyotanabe.kyoto.jp", +"kyotango.kyoto.jp", +"maizuru.kyoto.jp", +"minami.kyoto.jp", +"minamiyamashiro.kyoto.jp", +"miyazu.kyoto.jp", +"muko.kyoto.jp", +"nagaokakyo.kyoto.jp", +"nakagyo.kyoto.jp", +"nantan.kyoto.jp", +"oyamazaki.kyoto.jp", +"sakyo.kyoto.jp", +"seika.kyoto.jp", +"tanabe.kyoto.jp", +"uji.kyoto.jp", +"ujitawara.kyoto.jp", +"wazuka.kyoto.jp", +"yamashina.kyoto.jp", +"yawata.kyoto.jp", +"asahi.mie.jp", +"inabe.mie.jp", +"ise.mie.jp", +"kameyama.mie.jp", +"kawagoe.mie.jp", +"kiho.mie.jp", +"kisosaki.mie.jp", +"kiwa.mie.jp", +"komono.mie.jp", +"kumano.mie.jp", +"kuwana.mie.jp", +"matsusaka.mie.jp", +"meiwa.mie.jp", +"mihama.mie.jp", +"minamiise.mie.jp", +"misugi.mie.jp", +"miyama.mie.jp", +"nabari.mie.jp", +"shima.mie.jp", +"suzuka.mie.jp", +"tado.mie.jp", +"taiki.mie.jp", +"taki.mie.jp", +"tamaki.mie.jp", +"toba.mie.jp", +"tsu.mie.jp", +"udono.mie.jp", +"ureshino.mie.jp", +"watarai.mie.jp", +"yokkaichi.mie.jp", +"furukawa.miyagi.jp", +"higashimatsushima.miyagi.jp", +"ishinomaki.miyagi.jp", +"iwanuma.miyagi.jp", +"kakuda.miyagi.jp", +"kami.miyagi.jp", +"kawasaki.miyagi.jp", +"marumori.miyagi.jp", +"matsushima.miyagi.jp", +"minamisanriku.miyagi.jp", +"misato.miyagi.jp", +"murata.miyagi.jp", +"natori.miyagi.jp", +"ogawara.miyagi.jp", +"ohira.miyagi.jp", +"onagawa.miyagi.jp", +"osaki.miyagi.jp", +"rifu.miyagi.jp", +"semine.miyagi.jp", +"shibata.miyagi.jp", +"shichikashuku.miyagi.jp", +"shikama.miyagi.jp", +"shiogama.miyagi.jp", +"shiroishi.miyagi.jp", +"tagajo.miyagi.jp", +"taiwa.miyagi.jp", +"tome.miyagi.jp", +"tomiya.miyagi.jp", +"wakuya.miyagi.jp", +"watari.miyagi.jp", +"yamamoto.miyagi.jp", +"zao.miyagi.jp", +"aya.miyazaki.jp", +"ebino.miyazaki.jp", +"gokase.miyazaki.jp", +"hyuga.miyazaki.jp", +"kadogawa.miyazaki.jp", +"kawaminami.miyazaki.jp", +"kijo.miyazaki.jp", +"kitagawa.miyazaki.jp", +"kitakata.miyazaki.jp", +"kitaura.miyazaki.jp", +"kobayashi.miyazaki.jp", +"kunitomi.miyazaki.jp", +"kushima.miyazaki.jp", +"mimata.miyazaki.jp", +"miyakonojo.miyazaki.jp", +"miyazaki.miyazaki.jp", +"morotsuka.miyazaki.jp", +"nichinan.miyazaki.jp", +"nishimera.miyazaki.jp", +"nobeoka.miyazaki.jp", +"saito.miyazaki.jp", +"shiiba.miyazaki.jp", +"shintomi.miyazaki.jp", +"takaharu.miyazaki.jp", +"takanabe.miyazaki.jp", +"takazaki.miyazaki.jp", +"tsuno.miyazaki.jp", +"achi.nagano.jp", +"agematsu.nagano.jp", +"anan.nagano.jp", +"aoki.nagano.jp", +"asahi.nagano.jp", +"azumino.nagano.jp", +"chikuhoku.nagano.jp", +"chikuma.nagano.jp", +"chino.nagano.jp", +"fujimi.nagano.jp", +"hakuba.nagano.jp", +"hara.nagano.jp", +"hiraya.nagano.jp", +"iida.nagano.jp", +"iijima.nagano.jp", +"iiyama.nagano.jp", +"iizuna.nagano.jp", +"ikeda.nagano.jp", +"ikusaka.nagano.jp", +"ina.nagano.jp", +"karuizawa.nagano.jp", +"kawakami.nagano.jp", +"kiso.nagano.jp", +"kisofukushima.nagano.jp", +"kitaaiki.nagano.jp", +"komagane.nagano.jp", +"komoro.nagano.jp", +"matsukawa.nagano.jp", +"matsumoto.nagano.jp", +"miasa.nagano.jp", +"minamiaiki.nagano.jp", +"minamimaki.nagano.jp", +"minamiminowa.nagano.jp", +"minowa.nagano.jp", +"miyada.nagano.jp", +"miyota.nagano.jp", +"mochizuki.nagano.jp", +"nagano.nagano.jp", +"nagawa.nagano.jp", +"nagiso.nagano.jp", +"nakagawa.nagano.jp", +"nakano.nagano.jp", +"nozawaonsen.nagano.jp", +"obuse.nagano.jp", +"ogawa.nagano.jp", +"okaya.nagano.jp", +"omachi.nagano.jp", +"omi.nagano.jp", +"ookuwa.nagano.jp", +"ooshika.nagano.jp", +"otaki.nagano.jp", +"otari.nagano.jp", +"sakae.nagano.jp", +"sakaki.nagano.jp", +"saku.nagano.jp", +"sakuho.nagano.jp", +"shimosuwa.nagano.jp", +"shinanomachi.nagano.jp", +"shiojiri.nagano.jp", +"suwa.nagano.jp", +"suzaka.nagano.jp", +"takagi.nagano.jp", +"takamori.nagano.jp", +"takayama.nagano.jp", +"tateshina.nagano.jp", +"tatsuno.nagano.jp", +"togakushi.nagano.jp", +"togura.nagano.jp", +"tomi.nagano.jp", +"ueda.nagano.jp", +"wada.nagano.jp", +"yamagata.nagano.jp", +"yamanouchi.nagano.jp", +"yasaka.nagano.jp", +"yasuoka.nagano.jp", +"chijiwa.nagasaki.jp", +"futsu.nagasaki.jp", +"goto.nagasaki.jp", +"hasami.nagasaki.jp", +"hirado.nagasaki.jp", +"iki.nagasaki.jp", +"isahaya.nagasaki.jp", +"kawatana.nagasaki.jp", +"kuchinotsu.nagasaki.jp", +"matsuura.nagasaki.jp", +"nagasaki.nagasaki.jp", +"obama.nagasaki.jp", +"omura.nagasaki.jp", +"oseto.nagasaki.jp", +"saikai.nagasaki.jp", +"sasebo.nagasaki.jp", +"seihi.nagasaki.jp", +"shimabara.nagasaki.jp", +"shinkamigoto.nagasaki.jp", +"togitsu.nagasaki.jp", +"tsushima.nagasaki.jp", +"unzen.nagasaki.jp", +"ando.nara.jp", +"gose.nara.jp", +"heguri.nara.jp", +"higashiyoshino.nara.jp", +"ikaruga.nara.jp", +"ikoma.nara.jp", +"kamikitayama.nara.jp", +"kanmaki.nara.jp", +"kashiba.nara.jp", +"kashihara.nara.jp", +"katsuragi.nara.jp", +"kawai.nara.jp", +"kawakami.nara.jp", +"kawanishi.nara.jp", +"koryo.nara.jp", +"kurotaki.nara.jp", +"mitsue.nara.jp", +"miyake.nara.jp", +"nara.nara.jp", +"nosegawa.nara.jp", +"oji.nara.jp", +"ouda.nara.jp", +"oyodo.nara.jp", +"sakurai.nara.jp", +"sango.nara.jp", +"shimoichi.nara.jp", +"shimokitayama.nara.jp", +"shinjo.nara.jp", +"soni.nara.jp", +"takatori.nara.jp", +"tawaramoto.nara.jp", +"tenkawa.nara.jp", +"tenri.nara.jp", +"uda.nara.jp", +"yamatokoriyama.nara.jp", +"yamatotakada.nara.jp", +"yamazoe.nara.jp", +"yoshino.nara.jp", +"aga.niigata.jp", +"agano.niigata.jp", +"gosen.niigata.jp", +"itoigawa.niigata.jp", +"izumozaki.niigata.jp", +"joetsu.niigata.jp", +"kamo.niigata.jp", +"kariwa.niigata.jp", +"kashiwazaki.niigata.jp", +"minamiuonuma.niigata.jp", +"mitsuke.niigata.jp", +"muika.niigata.jp", +"murakami.niigata.jp", +"myoko.niigata.jp", +"nagaoka.niigata.jp", +"niigata.niigata.jp", +"ojiya.niigata.jp", +"omi.niigata.jp", +"sado.niigata.jp", +"sanjo.niigata.jp", +"seiro.niigata.jp", +"seirou.niigata.jp", +"sekikawa.niigata.jp", +"shibata.niigata.jp", +"tagami.niigata.jp", +"tainai.niigata.jp", +"tochio.niigata.jp", +"tokamachi.niigata.jp", +"tsubame.niigata.jp", +"tsunan.niigata.jp", +"uonuma.niigata.jp", +"yahiko.niigata.jp", +"yoita.niigata.jp", +"yuzawa.niigata.jp", +"beppu.oita.jp", +"bungoono.oita.jp", +"bungotakada.oita.jp", +"hasama.oita.jp", +"hiji.oita.jp", +"himeshima.oita.jp", +"hita.oita.jp", +"kamitsue.oita.jp", +"kokonoe.oita.jp", +"kuju.oita.jp", +"kunisaki.oita.jp", +"kusu.oita.jp", +"oita.oita.jp", +"saiki.oita.jp", +"taketa.oita.jp", +"tsukumi.oita.jp", +"usa.oita.jp", +"usuki.oita.jp", +"yufu.oita.jp", +"akaiwa.okayama.jp", +"asakuchi.okayama.jp", +"bizen.okayama.jp", +"hayashima.okayama.jp", +"ibara.okayama.jp", +"kagamino.okayama.jp", +"kasaoka.okayama.jp", +"kibichuo.okayama.jp", +"kumenan.okayama.jp", +"kurashiki.okayama.jp", +"maniwa.okayama.jp", +"misaki.okayama.jp", +"nagi.okayama.jp", +"niimi.okayama.jp", +"nishiawakura.okayama.jp", +"okayama.okayama.jp", +"satosho.okayama.jp", +"setouchi.okayama.jp", +"shinjo.okayama.jp", +"shoo.okayama.jp", +"soja.okayama.jp", +"takahashi.okayama.jp", +"tamano.okayama.jp", +"tsuyama.okayama.jp", +"wake.okayama.jp", +"yakage.okayama.jp", +"aguni.okinawa.jp", +"ginowan.okinawa.jp", +"ginoza.okinawa.jp", +"gushikami.okinawa.jp", +"haebaru.okinawa.jp", +"higashi.okinawa.jp", +"hirara.okinawa.jp", +"iheya.okinawa.jp", +"ishigaki.okinawa.jp", +"ishikawa.okinawa.jp", +"itoman.okinawa.jp", +"izena.okinawa.jp", +"kadena.okinawa.jp", +"kin.okinawa.jp", +"kitadaito.okinawa.jp", +"kitanakagusuku.okinawa.jp", +"kumejima.okinawa.jp", +"kunigami.okinawa.jp", +"minamidaito.okinawa.jp", +"motobu.okinawa.jp", +"nago.okinawa.jp", +"naha.okinawa.jp", +"nakagusuku.okinawa.jp", +"nakijin.okinawa.jp", +"nanjo.okinawa.jp", +"nishihara.okinawa.jp", +"ogimi.okinawa.jp", +"okinawa.okinawa.jp", +"onna.okinawa.jp", +"shimoji.okinawa.jp", +"taketomi.okinawa.jp", +"tarama.okinawa.jp", +"tokashiki.okinawa.jp", +"tomigusuku.okinawa.jp", +"tonaki.okinawa.jp", +"urasoe.okinawa.jp", +"uruma.okinawa.jp", +"yaese.okinawa.jp", +"yomitan.okinawa.jp", +"yonabaru.okinawa.jp", +"yonaguni.okinawa.jp", +"zamami.okinawa.jp", +"abeno.osaka.jp", +"chihayaakasaka.osaka.jp", +"chuo.osaka.jp", +"daito.osaka.jp", +"fujiidera.osaka.jp", +"habikino.osaka.jp", +"hannan.osaka.jp", +"higashiosaka.osaka.jp", +"higashisumiyoshi.osaka.jp", +"higashiyodogawa.osaka.jp", +"hirakata.osaka.jp", +"ibaraki.osaka.jp", +"ikeda.osaka.jp", +"izumi.osaka.jp", +"izumiotsu.osaka.jp", +"izumisano.osaka.jp", +"kadoma.osaka.jp", +"kaizuka.osaka.jp", +"kanan.osaka.jp", +"kashiwara.osaka.jp", +"katano.osaka.jp", +"kawachinagano.osaka.jp", +"kishiwada.osaka.jp", +"kita.osaka.jp", +"kumatori.osaka.jp", +"matsubara.osaka.jp", +"minato.osaka.jp", +"minoh.osaka.jp", +"misaki.osaka.jp", +"moriguchi.osaka.jp", +"neyagawa.osaka.jp", +"nishi.osaka.jp", +"nose.osaka.jp", +"osakasayama.osaka.jp", +"sakai.osaka.jp", +"sayama.osaka.jp", +"sennan.osaka.jp", +"settsu.osaka.jp", +"shijonawate.osaka.jp", +"shimamoto.osaka.jp", +"suita.osaka.jp", +"tadaoka.osaka.jp", +"taishi.osaka.jp", +"tajiri.osaka.jp", +"takaishi.osaka.jp", +"takatsuki.osaka.jp", +"tondabayashi.osaka.jp", +"toyonaka.osaka.jp", +"toyono.osaka.jp", +"yao.osaka.jp", +"ariake.saga.jp", +"arita.saga.jp", +"fukudomi.saga.jp", +"genkai.saga.jp", +"hamatama.saga.jp", +"hizen.saga.jp", +"imari.saga.jp", +"kamimine.saga.jp", +"kanzaki.saga.jp", +"karatsu.saga.jp", +"kashima.saga.jp", +"kitagata.saga.jp", +"kitahata.saga.jp", +"kiyama.saga.jp", +"kouhoku.saga.jp", +"kyuragi.saga.jp", +"nishiarita.saga.jp", +"ogi.saga.jp", +"omachi.saga.jp", +"ouchi.saga.jp", +"saga.saga.jp", +"shiroishi.saga.jp", +"taku.saga.jp", +"tara.saga.jp", +"tosu.saga.jp", +"yoshinogari.saga.jp", +"arakawa.saitama.jp", +"asaka.saitama.jp", +"chichibu.saitama.jp", +"fujimi.saitama.jp", +"fujimino.saitama.jp", +"fukaya.saitama.jp", +"hanno.saitama.jp", +"hanyu.saitama.jp", +"hasuda.saitama.jp", +"hatogaya.saitama.jp", +"hatoyama.saitama.jp", +"hidaka.saitama.jp", +"higashichichibu.saitama.jp", +"higashimatsuyama.saitama.jp", +"honjo.saitama.jp", +"ina.saitama.jp", +"iruma.saitama.jp", +"iwatsuki.saitama.jp", +"kamiizumi.saitama.jp", +"kamikawa.saitama.jp", +"kamisato.saitama.jp", +"kasukabe.saitama.jp", +"kawagoe.saitama.jp", +"kawaguchi.saitama.jp", +"kawajima.saitama.jp", +"kazo.saitama.jp", +"kitamoto.saitama.jp", +"koshigaya.saitama.jp", +"kounosu.saitama.jp", +"kuki.saitama.jp", +"kumagaya.saitama.jp", +"matsubushi.saitama.jp", +"minano.saitama.jp", +"misato.saitama.jp", +"miyashiro.saitama.jp", +"miyoshi.saitama.jp", +"moroyama.saitama.jp", +"nagatoro.saitama.jp", +"namegawa.saitama.jp", +"niiza.saitama.jp", +"ogano.saitama.jp", +"ogawa.saitama.jp", +"ogose.saitama.jp", +"okegawa.saitama.jp", +"omiya.saitama.jp", +"otaki.saitama.jp", +"ranzan.saitama.jp", +"ryokami.saitama.jp", +"saitama.saitama.jp", +"sakado.saitama.jp", +"satte.saitama.jp", +"sayama.saitama.jp", +"shiki.saitama.jp", +"shiraoka.saitama.jp", +"soka.saitama.jp", +"sugito.saitama.jp", +"toda.saitama.jp", +"tokigawa.saitama.jp", +"tokorozawa.saitama.jp", +"tsurugashima.saitama.jp", +"urawa.saitama.jp", +"warabi.saitama.jp", +"yashio.saitama.jp", +"yokoze.saitama.jp", +"yono.saitama.jp", +"yorii.saitama.jp", +"yoshida.saitama.jp", +"yoshikawa.saitama.jp", +"yoshimi.saitama.jp", +"aisho.shiga.jp", +"gamo.shiga.jp", +"higashiomi.shiga.jp", +"hikone.shiga.jp", +"koka.shiga.jp", +"konan.shiga.jp", +"kosei.shiga.jp", +"koto.shiga.jp", +"kusatsu.shiga.jp", +"maibara.shiga.jp", +"moriyama.shiga.jp", +"nagahama.shiga.jp", +"nishiazai.shiga.jp", +"notogawa.shiga.jp", +"omihachiman.shiga.jp", +"otsu.shiga.jp", +"ritto.shiga.jp", +"ryuoh.shiga.jp", +"takashima.shiga.jp", +"takatsuki.shiga.jp", +"torahime.shiga.jp", +"toyosato.shiga.jp", +"yasu.shiga.jp", +"akagi.shimane.jp", +"ama.shimane.jp", +"gotsu.shimane.jp", +"hamada.shimane.jp", +"higashiizumo.shimane.jp", +"hikawa.shimane.jp", +"hikimi.shimane.jp", +"izumo.shimane.jp", +"kakinoki.shimane.jp", +"masuda.shimane.jp", +"matsue.shimane.jp", +"misato.shimane.jp", +"nishinoshima.shimane.jp", +"ohda.shimane.jp", +"okinoshima.shimane.jp", +"okuizumo.shimane.jp", +"shimane.shimane.jp", +"tamayu.shimane.jp", +"tsuwano.shimane.jp", +"unnan.shimane.jp", +"yakumo.shimane.jp", +"yasugi.shimane.jp", +"yatsuka.shimane.jp", +"arai.shizuoka.jp", +"atami.shizuoka.jp", +"fuji.shizuoka.jp", +"fujieda.shizuoka.jp", +"fujikawa.shizuoka.jp", +"fujinomiya.shizuoka.jp", +"fukuroi.shizuoka.jp", +"gotemba.shizuoka.jp", +"haibara.shizuoka.jp", +"hamamatsu.shizuoka.jp", +"higashiizu.shizuoka.jp", +"ito.shizuoka.jp", +"iwata.shizuoka.jp", +"izu.shizuoka.jp", +"izunokuni.shizuoka.jp", +"kakegawa.shizuoka.jp", +"kannami.shizuoka.jp", +"kawanehon.shizuoka.jp", +"kawazu.shizuoka.jp", +"kikugawa.shizuoka.jp", +"kosai.shizuoka.jp", +"makinohara.shizuoka.jp", +"matsuzaki.shizuoka.jp", +"minamiizu.shizuoka.jp", +"mishima.shizuoka.jp", +"morimachi.shizuoka.jp", +"nishiizu.shizuoka.jp", +"numazu.shizuoka.jp", +"omaezaki.shizuoka.jp", +"shimada.shizuoka.jp", +"shimizu.shizuoka.jp", +"shimoda.shizuoka.jp", +"shizuoka.shizuoka.jp", +"susono.shizuoka.jp", +"yaizu.shizuoka.jp", +"yoshida.shizuoka.jp", +"ashikaga.tochigi.jp", +"bato.tochigi.jp", +"haga.tochigi.jp", +"ichikai.tochigi.jp", +"iwafune.tochigi.jp", +"kaminokawa.tochigi.jp", +"kanuma.tochigi.jp", +"karasuyama.tochigi.jp", +"kuroiso.tochigi.jp", +"mashiko.tochigi.jp", +"mibu.tochigi.jp", +"moka.tochigi.jp", +"motegi.tochigi.jp", +"nasu.tochigi.jp", +"nasushiobara.tochigi.jp", +"nikko.tochigi.jp", +"nishikata.tochigi.jp", +"nogi.tochigi.jp", +"ohira.tochigi.jp", +"ohtawara.tochigi.jp", +"oyama.tochigi.jp", +"sakura.tochigi.jp", +"sano.tochigi.jp", +"shimotsuke.tochigi.jp", +"shioya.tochigi.jp", +"takanezawa.tochigi.jp", +"tochigi.tochigi.jp", +"tsuga.tochigi.jp", +"ujiie.tochigi.jp", +"utsunomiya.tochigi.jp", +"yaita.tochigi.jp", +"aizumi.tokushima.jp", +"anan.tokushima.jp", +"ichiba.tokushima.jp", +"itano.tokushima.jp", +"kainan.tokushima.jp", +"komatsushima.tokushima.jp", +"matsushige.tokushima.jp", +"mima.tokushima.jp", +"minami.tokushima.jp", +"miyoshi.tokushima.jp", +"mugi.tokushima.jp", +"nakagawa.tokushima.jp", +"naruto.tokushima.jp", +"sanagochi.tokushima.jp", +"shishikui.tokushima.jp", +"tokushima.tokushima.jp", +"wajiki.tokushima.jp", +"adachi.tokyo.jp", +"akiruno.tokyo.jp", +"akishima.tokyo.jp", +"aogashima.tokyo.jp", +"arakawa.tokyo.jp", +"bunkyo.tokyo.jp", +"chiyoda.tokyo.jp", +"chofu.tokyo.jp", +"chuo.tokyo.jp", +"edogawa.tokyo.jp", +"fuchu.tokyo.jp", +"fussa.tokyo.jp", +"hachijo.tokyo.jp", +"hachioji.tokyo.jp", +"hamura.tokyo.jp", +"higashikurume.tokyo.jp", +"higashimurayama.tokyo.jp", +"higashiyamato.tokyo.jp", +"hino.tokyo.jp", +"hinode.tokyo.jp", +"hinohara.tokyo.jp", +"inagi.tokyo.jp", +"itabashi.tokyo.jp", +"katsushika.tokyo.jp", +"kita.tokyo.jp", +"kiyose.tokyo.jp", +"kodaira.tokyo.jp", +"koganei.tokyo.jp", +"kokubunji.tokyo.jp", +"komae.tokyo.jp", +"koto.tokyo.jp", +"kouzushima.tokyo.jp", +"kunitachi.tokyo.jp", +"machida.tokyo.jp", +"meguro.tokyo.jp", +"minato.tokyo.jp", +"mitaka.tokyo.jp", +"mizuho.tokyo.jp", +"musashimurayama.tokyo.jp", +"musashino.tokyo.jp", +"nakano.tokyo.jp", +"nerima.tokyo.jp", +"ogasawara.tokyo.jp", +"okutama.tokyo.jp", +"ome.tokyo.jp", +"oshima.tokyo.jp", +"ota.tokyo.jp", +"setagaya.tokyo.jp", +"shibuya.tokyo.jp", +"shinagawa.tokyo.jp", +"shinjuku.tokyo.jp", +"suginami.tokyo.jp", +"sumida.tokyo.jp", +"tachikawa.tokyo.jp", +"taito.tokyo.jp", +"tama.tokyo.jp", +"toshima.tokyo.jp", +"chizu.tottori.jp", +"hino.tottori.jp", +"kawahara.tottori.jp", +"koge.tottori.jp", +"kotoura.tottori.jp", +"misasa.tottori.jp", +"nanbu.tottori.jp", +"nichinan.tottori.jp", +"sakaiminato.tottori.jp", +"tottori.tottori.jp", +"wakasa.tottori.jp", +"yazu.tottori.jp", +"yonago.tottori.jp", +"asahi.toyama.jp", +"fuchu.toyama.jp", +"fukumitsu.toyama.jp", +"funahashi.toyama.jp", +"himi.toyama.jp", +"imizu.toyama.jp", +"inami.toyama.jp", +"johana.toyama.jp", +"kamiichi.toyama.jp", +"kurobe.toyama.jp", +"nakaniikawa.toyama.jp", +"namerikawa.toyama.jp", +"nanto.toyama.jp", +"nyuzen.toyama.jp", +"oyabe.toyama.jp", +"taira.toyama.jp", +"takaoka.toyama.jp", +"tateyama.toyama.jp", +"toga.toyama.jp", +"tonami.toyama.jp", +"toyama.toyama.jp", +"unazuki.toyama.jp", +"uozu.toyama.jp", +"yamada.toyama.jp", +"arida.wakayama.jp", +"aridagawa.wakayama.jp", +"gobo.wakayama.jp", +"hashimoto.wakayama.jp", +"hidaka.wakayama.jp", +"hirogawa.wakayama.jp", +"inami.wakayama.jp", +"iwade.wakayama.jp", +"kainan.wakayama.jp", +"kamitonda.wakayama.jp", +"katsuragi.wakayama.jp", +"kimino.wakayama.jp", +"kinokawa.wakayama.jp", +"kitayama.wakayama.jp", +"koya.wakayama.jp", +"koza.wakayama.jp", +"kozagawa.wakayama.jp", +"kudoyama.wakayama.jp", +"kushimoto.wakayama.jp", +"mihama.wakayama.jp", +"misato.wakayama.jp", +"nachikatsuura.wakayama.jp", +"shingu.wakayama.jp", +"shirahama.wakayama.jp", +"taiji.wakayama.jp", +"tanabe.wakayama.jp", +"wakayama.wakayama.jp", +"yuasa.wakayama.jp", +"yura.wakayama.jp", +"asahi.yamagata.jp", +"funagata.yamagata.jp", +"higashine.yamagata.jp", +"iide.yamagata.jp", +"kahoku.yamagata.jp", +"kaminoyama.yamagata.jp", +"kaneyama.yamagata.jp", +"kawanishi.yamagata.jp", +"mamurogawa.yamagata.jp", +"mikawa.yamagata.jp", +"murayama.yamagata.jp", +"nagai.yamagata.jp", +"nakayama.yamagata.jp", +"nanyo.yamagata.jp", +"nishikawa.yamagata.jp", +"obanazawa.yamagata.jp", +"oe.yamagata.jp", +"oguni.yamagata.jp", +"ohkura.yamagata.jp", +"oishida.yamagata.jp", +"sagae.yamagata.jp", +"sakata.yamagata.jp", +"sakegawa.yamagata.jp", +"shinjo.yamagata.jp", +"shirataka.yamagata.jp", +"shonai.yamagata.jp", +"takahata.yamagata.jp", +"tendo.yamagata.jp", +"tozawa.yamagata.jp", +"tsuruoka.yamagata.jp", +"yamagata.yamagata.jp", +"yamanobe.yamagata.jp", +"yonezawa.yamagata.jp", +"yuza.yamagata.jp", +"abu.yamaguchi.jp", +"hagi.yamaguchi.jp", +"hikari.yamaguchi.jp", +"hofu.yamaguchi.jp", +"iwakuni.yamaguchi.jp", +"kudamatsu.yamaguchi.jp", +"mitou.yamaguchi.jp", +"nagato.yamaguchi.jp", +"oshima.yamaguchi.jp", +"shimonoseki.yamaguchi.jp", +"shunan.yamaguchi.jp", +"tabuse.yamaguchi.jp", +"tokuyama.yamaguchi.jp", +"toyota.yamaguchi.jp", +"ube.yamaguchi.jp", +"yuu.yamaguchi.jp", +"chuo.yamanashi.jp", +"doshi.yamanashi.jp", +"fuefuki.yamanashi.jp", +"fujikawa.yamanashi.jp", +"fujikawaguchiko.yamanashi.jp", +"fujiyoshida.yamanashi.jp", +"hayakawa.yamanashi.jp", +"hokuto.yamanashi.jp", +"ichikawamisato.yamanashi.jp", +"kai.yamanashi.jp", +"kofu.yamanashi.jp", +"koshu.yamanashi.jp", +"kosuge.yamanashi.jp", +"minami-alps.yamanashi.jp", +"minobu.yamanashi.jp", +"nakamichi.yamanashi.jp", +"nanbu.yamanashi.jp", +"narusawa.yamanashi.jp", +"nirasaki.yamanashi.jp", +"nishikatsura.yamanashi.jp", +"oshino.yamanashi.jp", +"otsuki.yamanashi.jp", +"showa.yamanashi.jp", +"tabayama.yamanashi.jp", +"tsuru.yamanashi.jp", +"uenohara.yamanashi.jp", +"yamanakako.yamanashi.jp", +"yamanashi.yamanashi.jp", +"ke", +"ac.ke", +"co.ke", +"go.ke", +"info.ke", +"me.ke", +"mobi.ke", +"ne.ke", +"or.ke", +"sc.ke", +"kg", +"org.kg", +"net.kg", +"com.kg", +"edu.kg", +"gov.kg", +"mil.kg", +"*.kh", +"ki", +"edu.ki", +"biz.ki", +"net.ki", +"org.ki", +"gov.ki", +"info.ki", +"com.ki", +"km", +"org.km", +"nom.km", +"gov.km", +"prd.km", +"tm.km", +"edu.km", +"mil.km", +"ass.km", +"com.km", +"coop.km", +"asso.km", +"presse.km", +"medecin.km", +"notaires.km", +"pharmaciens.km", +"veterinaire.km", +"gouv.km", +"kn", +"net.kn", +"org.kn", +"edu.kn", +"gov.kn", +"kp", +"com.kp", +"edu.kp", +"gov.kp", +"org.kp", +"rep.kp", +"tra.kp", +"kr", +"ac.kr", +"co.kr", +"es.kr", +"go.kr", +"hs.kr", +"kg.kr", +"mil.kr", +"ms.kr", +"ne.kr", +"or.kr", +"pe.kr", +"re.kr", +"sc.kr", +"busan.kr", +"chungbuk.kr", +"chungnam.kr", +"daegu.kr", +"daejeon.kr", +"gangwon.kr", +"gwangju.kr", +"gyeongbuk.kr", +"gyeonggi.kr", +"gyeongnam.kr", +"incheon.kr", +"jeju.kr", +"jeonbuk.kr", +"jeonnam.kr", +"seoul.kr", +"ulsan.kr", +"kw", +"com.kw", +"edu.kw", +"emb.kw", +"gov.kw", +"ind.kw", +"net.kw", +"org.kw", +"ky", +"edu.ky", +"gov.ky", +"com.ky", +"org.ky", +"net.ky", +"kz", +"org.kz", +"edu.kz", +"net.kz", +"gov.kz", +"mil.kz", +"com.kz", +"la", +"int.la", +"net.la", +"info.la", +"edu.la", +"gov.la", +"per.la", +"com.la", +"org.la", +"lb", +"com.lb", +"edu.lb", +"gov.lb", +"net.lb", +"org.lb", +"lc", +"com.lc", +"net.lc", +"co.lc", +"org.lc", +"edu.lc", +"gov.lc", +"li", +"lk", +"gov.lk", +"sch.lk", +"net.lk", +"int.lk", +"com.lk", +"org.lk", +"edu.lk", +"ngo.lk", +"soc.lk", +"web.lk", +"ltd.lk", +"assn.lk", +"grp.lk", +"hotel.lk", +"ac.lk", +"lr", +"com.lr", +"edu.lr", +"gov.lr", +"org.lr", +"net.lr", +"ls", +"ac.ls", +"biz.ls", +"co.ls", +"edu.ls", +"gov.ls", +"info.ls", +"net.ls", +"org.ls", +"sc.ls", +"lt", +"gov.lt", +"lu", +"lv", +"com.lv", +"edu.lv", +"gov.lv", +"org.lv", +"mil.lv", +"id.lv", +"net.lv", +"asn.lv", +"conf.lv", +"ly", +"com.ly", +"net.ly", +"gov.ly", +"plc.ly", +"edu.ly", +"sch.ly", +"med.ly", +"org.ly", +"id.ly", +"ma", +"co.ma", +"net.ma", +"gov.ma", +"org.ma", +"ac.ma", +"press.ma", +"mc", +"tm.mc", +"asso.mc", +"md", +"me", +"co.me", +"net.me", +"org.me", +"edu.me", +"ac.me", +"gov.me", +"its.me", +"priv.me", +"mg", +"org.mg", +"nom.mg", +"gov.mg", +"prd.mg", +"tm.mg", +"edu.mg", +"mil.mg", +"com.mg", +"co.mg", +"mh", +"mil", +"mk", +"com.mk", +"org.mk", +"net.mk", +"edu.mk", +"gov.mk", +"inf.mk", +"name.mk", +"ml", +"com.ml", +"edu.ml", +"gouv.ml", +"gov.ml", +"net.ml", +"org.ml", +"presse.ml", +"*.mm", +"mn", +"gov.mn", +"edu.mn", +"org.mn", +"mo", +"com.mo", +"net.mo", +"org.mo", +"edu.mo", +"gov.mo", +"mobi", +"mp", +"mq", +"mr", +"gov.mr", +"ms", +"com.ms", +"edu.ms", +"gov.ms", +"net.ms", +"org.ms", +"mt", +"com.mt", +"edu.mt", +"net.mt", +"org.mt", +"mu", +"com.mu", +"net.mu", +"org.mu", +"gov.mu", +"ac.mu", +"co.mu", +"or.mu", +"museum", +"academy.museum", +"agriculture.museum", +"air.museum", +"airguard.museum", +"alabama.museum", +"alaska.museum", +"amber.museum", +"ambulance.museum", +"american.museum", +"americana.museum", +"americanantiques.museum", +"americanart.museum", +"amsterdam.museum", +"and.museum", +"annefrank.museum", +"anthro.museum", +"anthropology.museum", +"antiques.museum", +"aquarium.museum", +"arboretum.museum", +"archaeological.museum", +"archaeology.museum", +"architecture.museum", +"art.museum", +"artanddesign.museum", +"artcenter.museum", +"artdeco.museum", +"arteducation.museum", +"artgallery.museum", +"arts.museum", +"artsandcrafts.museum", +"asmatart.museum", +"assassination.museum", +"assisi.museum", +"association.museum", +"astronomy.museum", +"atlanta.museum", +"austin.museum", +"australia.museum", +"automotive.museum", +"aviation.museum", +"axis.museum", +"badajoz.museum", +"baghdad.museum", +"bahn.museum", +"bale.museum", +"baltimore.museum", +"barcelona.museum", +"baseball.museum", +"basel.museum", +"baths.museum", +"bauern.museum", +"beauxarts.museum", +"beeldengeluid.museum", +"bellevue.museum", +"bergbau.museum", +"berkeley.museum", +"berlin.museum", +"bern.museum", +"bible.museum", +"bilbao.museum", +"bill.museum", +"birdart.museum", +"birthplace.museum", +"bonn.museum", +"boston.museum", +"botanical.museum", +"botanicalgarden.museum", +"botanicgarden.museum", +"botany.museum", +"brandywinevalley.museum", +"brasil.museum", +"bristol.museum", +"british.museum", +"britishcolumbia.museum", +"broadcast.museum", +"brunel.museum", +"brussel.museum", +"brussels.museum", +"bruxelles.museum", +"building.museum", +"burghof.museum", +"bus.museum", +"bushey.museum", +"cadaques.museum", +"california.museum", +"cambridge.museum", +"can.museum", +"canada.museum", +"capebreton.museum", +"carrier.museum", +"cartoonart.museum", +"casadelamoneda.museum", +"castle.museum", +"castres.museum", +"celtic.museum", +"center.museum", +"chattanooga.museum", +"cheltenham.museum", +"chesapeakebay.museum", +"chicago.museum", +"children.museum", +"childrens.museum", +"childrensgarden.museum", +"chiropractic.museum", +"chocolate.museum", +"christiansburg.museum", +"cincinnati.museum", +"cinema.museum", +"circus.museum", +"civilisation.museum", +"civilization.museum", +"civilwar.museum", +"clinton.museum", +"clock.museum", +"coal.museum", +"coastaldefence.museum", +"cody.museum", +"coldwar.museum", +"collection.museum", +"colonialwilliamsburg.museum", +"coloradoplateau.museum", +"columbia.museum", +"columbus.museum", +"communication.museum", +"communications.museum", +"community.museum", +"computer.museum", +"computerhistory.museum", +"comunicações.museum", +"contemporary.museum", +"contemporaryart.museum", +"convent.museum", +"copenhagen.museum", +"corporation.museum", +"correios-e-telecomunicações.museum", +"corvette.museum", +"costume.museum", +"countryestate.museum", +"county.museum", +"crafts.museum", +"cranbrook.museum", +"creation.museum", +"cultural.museum", +"culturalcenter.museum", +"culture.museum", +"cyber.museum", +"cymru.museum", +"dali.museum", +"dallas.museum", +"database.museum", +"ddr.museum", +"decorativearts.museum", +"delaware.museum", +"delmenhorst.museum", +"denmark.museum", +"depot.museum", +"design.museum", +"detroit.museum", +"dinosaur.museum", +"discovery.museum", +"dolls.museum", +"donostia.museum", +"durham.museum", +"eastafrica.museum", +"eastcoast.museum", +"education.museum", +"educational.museum", +"egyptian.museum", +"eisenbahn.museum", +"elburg.museum", +"elvendrell.museum", +"embroidery.museum", +"encyclopedic.museum", +"england.museum", +"entomology.museum", +"environment.museum", +"environmentalconservation.museum", +"epilepsy.museum", +"essex.museum", +"estate.museum", +"ethnology.museum", +"exeter.museum", +"exhibition.museum", +"family.museum", +"farm.museum", +"farmequipment.museum", +"farmers.museum", +"farmstead.museum", +"field.museum", +"figueres.museum", +"filatelia.museum", +"film.museum", +"fineart.museum", +"finearts.museum", +"finland.museum", +"flanders.museum", +"florida.museum", +"force.museum", +"fortmissoula.museum", +"fortworth.museum", +"foundation.museum", +"francaise.museum", +"frankfurt.museum", +"franziskaner.museum", +"freemasonry.museum", +"freiburg.museum", +"fribourg.museum", +"frog.museum", +"fundacio.museum", +"furniture.museum", +"gallery.museum", +"garden.museum", +"gateway.museum", +"geelvinck.museum", +"gemological.museum", +"geology.museum", +"georgia.museum", +"giessen.museum", +"glas.museum", +"glass.museum", +"gorge.museum", +"grandrapids.museum", +"graz.museum", +"guernsey.museum", +"halloffame.museum", +"hamburg.museum", +"handson.museum", +"harvestcelebration.museum", +"hawaii.museum", +"health.museum", +"heimatunduhren.museum", +"hellas.museum", +"helsinki.museum", +"hembygdsforbund.museum", +"heritage.museum", +"histoire.museum", +"historical.museum", +"historicalsociety.museum", +"historichouses.museum", +"historisch.museum", +"historisches.museum", +"history.museum", +"historyofscience.museum", +"horology.museum", +"house.museum", +"humanities.museum", +"illustration.museum", +"imageandsound.museum", +"indian.museum", +"indiana.museum", +"indianapolis.museum", +"indianmarket.museum", +"intelligence.museum", +"interactive.museum", +"iraq.museum", +"iron.museum", +"isleofman.museum", +"jamison.museum", +"jefferson.museum", +"jerusalem.museum", +"jewelry.museum", +"jewish.museum", +"jewishart.museum", +"jfk.museum", +"journalism.museum", +"judaica.museum", +"judygarland.museum", +"juedisches.museum", +"juif.museum", +"karate.museum", +"karikatur.museum", +"kids.museum", +"koebenhavn.museum", +"koeln.museum", +"kunst.museum", +"kunstsammlung.museum", +"kunstunddesign.museum", +"labor.museum", +"labour.museum", +"lajolla.museum", +"lancashire.museum", +"landes.museum", +"lans.museum", +"läns.museum", +"larsson.museum", +"lewismiller.museum", +"lincoln.museum", +"linz.museum", +"living.museum", +"livinghistory.museum", +"localhistory.museum", +"london.museum", +"losangeles.museum", +"louvre.museum", +"loyalist.museum", +"lucerne.museum", +"luxembourg.museum", +"luzern.museum", +"mad.museum", +"madrid.museum", +"mallorca.museum", +"manchester.museum", +"mansion.museum", +"mansions.museum", +"manx.museum", +"marburg.museum", +"maritime.museum", +"maritimo.museum", +"maryland.museum", +"marylhurst.museum", +"media.museum", +"medical.museum", +"medizinhistorisches.museum", +"meeres.museum", +"memorial.museum", +"mesaverde.museum", +"michigan.museum", +"midatlantic.museum", +"military.museum", +"mill.museum", +"miners.museum", +"mining.museum", +"minnesota.museum", +"missile.museum", +"missoula.museum", +"modern.museum", +"moma.museum", +"money.museum", +"monmouth.museum", +"monticello.museum", +"montreal.museum", +"moscow.museum", +"motorcycle.museum", +"muenchen.museum", +"muenster.museum", +"mulhouse.museum", +"muncie.museum", +"museet.museum", +"museumcenter.museum", +"museumvereniging.museum", +"music.museum", +"national.museum", +"nationalfirearms.museum", +"nationalheritage.museum", +"nativeamerican.museum", +"naturalhistory.museum", +"naturalhistorymuseum.museum", +"naturalsciences.museum", +"nature.museum", +"naturhistorisches.museum", +"natuurwetenschappen.museum", +"naumburg.museum", +"naval.museum", +"nebraska.museum", +"neues.museum", +"newhampshire.museum", +"newjersey.museum", +"newmexico.museum", +"newport.museum", +"newspaper.museum", +"newyork.museum", +"niepce.museum", +"norfolk.museum", +"north.museum", +"nrw.museum", +"nyc.museum", +"nyny.museum", +"oceanographic.museum", +"oceanographique.museum", +"omaha.museum", +"online.museum", +"ontario.museum", +"openair.museum", +"oregon.museum", +"oregontrail.museum", +"otago.museum", +"oxford.museum", +"pacific.museum", +"paderborn.museum", +"palace.museum", +"paleo.museum", +"palmsprings.museum", +"panama.museum", +"paris.museum", +"pasadena.museum", +"pharmacy.museum", +"philadelphia.museum", +"philadelphiaarea.museum", +"philately.museum", +"phoenix.museum", +"photography.museum", +"pilots.museum", +"pittsburgh.museum", +"planetarium.museum", +"plantation.museum", +"plants.museum", +"plaza.museum", +"portal.museum", +"portland.museum", +"portlligat.museum", +"posts-and-telecommunications.museum", +"preservation.museum", +"presidio.museum", +"press.museum", +"project.museum", +"public.museum", +"pubol.museum", +"quebec.museum", +"railroad.museum", +"railway.museum", +"research.museum", +"resistance.museum", +"riodejaneiro.museum", +"rochester.museum", +"rockart.museum", +"roma.museum", +"russia.museum", +"saintlouis.museum", +"salem.museum", +"salvadordali.museum", +"salzburg.museum", +"sandiego.museum", +"sanfrancisco.museum", +"santabarbara.museum", +"santacruz.museum", +"santafe.museum", +"saskatchewan.museum", +"satx.museum", +"savannahga.museum", +"schlesisches.museum", +"schoenbrunn.museum", +"schokoladen.museum", +"school.museum", +"schweiz.museum", +"science.museum", +"scienceandhistory.museum", +"scienceandindustry.museum", +"sciencecenter.museum", +"sciencecenters.museum", +"science-fiction.museum", +"sciencehistory.museum", +"sciences.museum", +"sciencesnaturelles.museum", +"scotland.museum", +"seaport.museum", +"settlement.museum", +"settlers.museum", +"shell.museum", +"sherbrooke.museum", +"sibenik.museum", +"silk.museum", +"ski.museum", +"skole.museum", +"society.museum", +"sologne.museum", +"soundandvision.museum", +"southcarolina.museum", +"southwest.museum", +"space.museum", +"spy.museum", +"square.museum", +"stadt.museum", +"stalbans.museum", +"starnberg.museum", +"state.museum", +"stateofdelaware.museum", +"station.museum", +"steam.museum", +"steiermark.museum", +"stjohn.museum", +"stockholm.museum", +"stpetersburg.museum", +"stuttgart.museum", +"suisse.museum", +"surgeonshall.museum", +"surrey.museum", +"svizzera.museum", +"sweden.museum", +"sydney.museum", +"tank.museum", +"tcm.museum", +"technology.museum", +"telekommunikation.museum", +"television.museum", +"texas.museum", +"textile.museum", +"theater.museum", +"time.museum", +"timekeeping.museum", +"topology.museum", +"torino.museum", +"touch.museum", +"town.museum", +"transport.museum", +"tree.museum", +"trolley.museum", +"trust.museum", +"trustee.museum", +"uhren.museum", +"ulm.museum", +"undersea.museum", +"university.museum", +"usa.museum", +"usantiques.museum", +"usarts.museum", +"uscountryestate.museum", +"usculture.museum", +"usdecorativearts.museum", +"usgarden.museum", +"ushistory.museum", +"ushuaia.museum", +"uslivinghistory.museum", +"utah.museum", +"uvic.museum", +"valley.museum", +"vantaa.museum", +"versailles.museum", +"viking.museum", +"village.museum", +"virginia.museum", +"virtual.museum", +"virtuel.museum", +"vlaanderen.museum", +"volkenkunde.museum", +"wales.museum", +"wallonie.museum", +"war.museum", +"washingtondc.museum", +"watchandclock.museum", +"watch-and-clock.museum", +"western.museum", +"westfalen.museum", +"whaling.museum", +"wildlife.museum", +"williamsburg.museum", +"windmill.museum", +"workshop.museum", +"york.museum", +"yorkshire.museum", +"yosemite.museum", +"youth.museum", +"zoological.museum", +"zoology.museum", +"ירושלים.museum", +"иком.museum", +"mv", +"aero.mv", +"biz.mv", +"com.mv", +"coop.mv", +"edu.mv", +"gov.mv", +"info.mv", +"int.mv", +"mil.mv", +"museum.mv", +"name.mv", +"net.mv", +"org.mv", +"pro.mv", +"mw", +"ac.mw", +"biz.mw", +"co.mw", +"com.mw", +"coop.mw", +"edu.mw", +"gov.mw", +"int.mw", +"museum.mw", +"net.mw", +"org.mw", +"mx", +"com.mx", +"org.mx", +"gob.mx", +"edu.mx", +"net.mx", +"my", +"com.my", +"net.my", +"org.my", +"gov.my", +"edu.my", +"mil.my", +"name.my", +"mz", +"ac.mz", +"adv.mz", +"co.mz", +"edu.mz", +"gov.mz", +"mil.mz", +"net.mz", +"org.mz", +"na", +"info.na", +"pro.na", +"name.na", +"school.na", +"or.na", +"dr.na", +"us.na", +"mx.na", +"ca.na", +"in.na", +"cc.na", +"tv.na", +"ws.na", +"mobi.na", +"co.na", +"com.na", +"org.na", +"name", +"nc", +"asso.nc", +"nom.nc", +"ne", +"net", +"nf", +"com.nf", +"net.nf", +"per.nf", +"rec.nf", +"web.nf", +"arts.nf", +"firm.nf", +"info.nf", +"other.nf", +"store.nf", +"ng", +"com.ng", +"edu.ng", +"gov.ng", +"i.ng", +"mil.ng", +"mobi.ng", +"name.ng", +"net.ng", +"org.ng", +"sch.ng", +"ni", +"ac.ni", +"biz.ni", +"co.ni", +"com.ni", +"edu.ni", +"gob.ni", +"in.ni", +"info.ni", +"int.ni", +"mil.ni", +"net.ni", +"nom.ni", +"org.ni", +"web.ni", +"nl", +"no", +"fhs.no", +"vgs.no", +"fylkesbibl.no", +"folkebibl.no", +"museum.no", +"idrett.no", +"priv.no", +"mil.no", +"stat.no", +"dep.no", +"kommune.no", +"herad.no", +"aa.no", +"ah.no", +"bu.no", +"fm.no", +"hl.no", +"hm.no", +"jan-mayen.no", +"mr.no", +"nl.no", +"nt.no", +"of.no", +"ol.no", +"oslo.no", +"rl.no", +"sf.no", +"st.no", +"svalbard.no", +"tm.no", +"tr.no", +"va.no", +"vf.no", +"gs.aa.no", +"gs.ah.no", +"gs.bu.no", +"gs.fm.no", +"gs.hl.no", +"gs.hm.no", +"gs.jan-mayen.no", +"gs.mr.no", +"gs.nl.no", +"gs.nt.no", +"gs.of.no", +"gs.ol.no", +"gs.oslo.no", +"gs.rl.no", +"gs.sf.no", +"gs.st.no", +"gs.svalbard.no", +"gs.tm.no", +"gs.tr.no", +"gs.va.no", +"gs.vf.no", +"akrehamn.no", +"åkrehamn.no", +"algard.no", +"ålgård.no", +"arna.no", +"brumunddal.no", +"bryne.no", +"bronnoysund.no", +"brønnøysund.no", +"drobak.no", +"drøbak.no", +"egersund.no", +"fetsund.no", +"floro.no", +"florø.no", +"fredrikstad.no", +"hokksund.no", +"honefoss.no", +"hønefoss.no", +"jessheim.no", +"jorpeland.no", +"jørpeland.no", +"kirkenes.no", +"kopervik.no", +"krokstadelva.no", +"langevag.no", +"langevåg.no", +"leirvik.no", +"mjondalen.no", +"mjøndalen.no", +"mo-i-rana.no", +"mosjoen.no", +"mosjøen.no", +"nesoddtangen.no", +"orkanger.no", +"osoyro.no", +"osøyro.no", +"raholt.no", +"råholt.no", +"sandnessjoen.no", +"sandnessjøen.no", +"skedsmokorset.no", +"slattum.no", +"spjelkavik.no", +"stathelle.no", +"stavern.no", +"stjordalshalsen.no", +"stjørdalshalsen.no", +"tananger.no", +"tranby.no", +"vossevangen.no", +"afjord.no", +"åfjord.no", +"agdenes.no", +"al.no", +"ål.no", +"alesund.no", +"ålesund.no", +"alstahaug.no", +"alta.no", +"áltá.no", +"alaheadju.no", +"álaheadju.no", +"alvdal.no", +"amli.no", +"åmli.no", +"amot.no", +"åmot.no", +"andebu.no", +"andoy.no", +"andøy.no", +"andasuolo.no", +"ardal.no", +"årdal.no", +"aremark.no", +"arendal.no", +"ås.no", +"aseral.no", +"åseral.no", +"asker.no", +"askim.no", +"askvoll.no", +"askoy.no", +"askøy.no", +"asnes.no", +"åsnes.no", +"audnedaln.no", +"aukra.no", +"aure.no", +"aurland.no", +"aurskog-holand.no", +"aurskog-høland.no", +"austevoll.no", +"austrheim.no", +"averoy.no", +"averøy.no", +"balestrand.no", +"ballangen.no", +"balat.no", +"bálát.no", +"balsfjord.no", +"bahccavuotna.no", +"báhccavuotna.no", +"bamble.no", +"bardu.no", +"beardu.no", +"beiarn.no", +"bajddar.no", +"bájddar.no", +"baidar.no", +"báidár.no", +"berg.no", +"bergen.no", +"berlevag.no", +"berlevåg.no", +"bearalvahki.no", +"bearalváhki.no", +"bindal.no", +"birkenes.no", +"bjarkoy.no", +"bjarkøy.no", +"bjerkreim.no", +"bjugn.no", +"bodo.no", +"bodø.no", +"badaddja.no", +"bådåddjå.no", +"budejju.no", +"bokn.no", +"bremanger.no", +"bronnoy.no", +"brønnøy.no", +"bygland.no", +"bykle.no", +"barum.no", +"bærum.no", +"bo.telemark.no", +"bø.telemark.no", +"bo.nordland.no", +"bø.nordland.no", +"bievat.no", +"bievát.no", +"bomlo.no", +"bømlo.no", +"batsfjord.no", +"båtsfjord.no", +"bahcavuotna.no", +"báhcavuotna.no", +"dovre.no", +"drammen.no", +"drangedal.no", +"dyroy.no", +"dyrøy.no", +"donna.no", +"dønna.no", +"eid.no", +"eidfjord.no", +"eidsberg.no", +"eidskog.no", +"eidsvoll.no", +"eigersund.no", +"elverum.no", +"enebakk.no", +"engerdal.no", +"etne.no", +"etnedal.no", +"evenes.no", +"evenassi.no", +"evenášši.no", +"evje-og-hornnes.no", +"farsund.no", +"fauske.no", +"fuossko.no", +"fuoisku.no", +"fedje.no", +"fet.no", +"finnoy.no", +"finnøy.no", +"fitjar.no", +"fjaler.no", +"fjell.no", +"flakstad.no", +"flatanger.no", +"flekkefjord.no", +"flesberg.no", +"flora.no", +"fla.no", +"flå.no", +"folldal.no", +"forsand.no", +"fosnes.no", +"frei.no", +"frogn.no", +"froland.no", +"frosta.no", +"frana.no", +"fræna.no", +"froya.no", +"frøya.no", +"fusa.no", +"fyresdal.no", +"forde.no", +"førde.no", +"gamvik.no", +"gangaviika.no", +"gáŋgaviika.no", +"gaular.no", +"gausdal.no", +"gildeskal.no", +"gildeskål.no", +"giske.no", +"gjemnes.no", +"gjerdrum.no", +"gjerstad.no", +"gjesdal.no", +"gjovik.no", +"gjøvik.no", +"gloppen.no", +"gol.no", +"gran.no", +"grane.no", +"granvin.no", +"gratangen.no", +"grimstad.no", +"grong.no", +"kraanghke.no", +"kråanghke.no", +"grue.no", +"gulen.no", +"hadsel.no", +"halden.no", +"halsa.no", +"hamar.no", +"hamaroy.no", +"habmer.no", +"hábmer.no", +"hapmir.no", +"hápmir.no", +"hammerfest.no", +"hammarfeasta.no", +"hámmárfeasta.no", +"haram.no", +"hareid.no", +"harstad.no", +"hasvik.no", +"aknoluokta.no", +"ákŋoluokta.no", +"hattfjelldal.no", +"aarborte.no", +"haugesund.no", +"hemne.no", +"hemnes.no", +"hemsedal.no", +"heroy.more-og-romsdal.no", +"herøy.møre-og-romsdal.no", +"heroy.nordland.no", +"herøy.nordland.no", +"hitra.no", +"hjartdal.no", +"hjelmeland.no", +"hobol.no", +"hobøl.no", +"hof.no", +"hol.no", +"hole.no", +"holmestrand.no", +"holtalen.no", +"holtålen.no", +"hornindal.no", +"horten.no", +"hurdal.no", +"hurum.no", +"hvaler.no", +"hyllestad.no", +"hagebostad.no", +"hægebostad.no", +"hoyanger.no", +"høyanger.no", +"hoylandet.no", +"høylandet.no", +"ha.no", +"hå.no", +"ibestad.no", +"inderoy.no", +"inderøy.no", +"iveland.no", +"jevnaker.no", +"jondal.no", +"jolster.no", +"jølster.no", +"karasjok.no", +"karasjohka.no", +"kárášjohka.no", +"karlsoy.no", +"galsa.no", +"gálsá.no", +"karmoy.no", +"karmøy.no", +"kautokeino.no", +"guovdageaidnu.no", +"klepp.no", +"klabu.no", +"klæbu.no", +"kongsberg.no", +"kongsvinger.no", +"kragero.no", +"kragerø.no", +"kristiansand.no", +"kristiansund.no", +"krodsherad.no", +"krødsherad.no", +"kvalsund.no", +"rahkkeravju.no", +"ráhkkerávju.no", +"kvam.no", +"kvinesdal.no", +"kvinnherad.no", +"kviteseid.no", +"kvitsoy.no", +"kvitsøy.no", +"kvafjord.no", +"kvæfjord.no", +"giehtavuoatna.no", +"kvanangen.no", +"kvænangen.no", +"navuotna.no", +"návuotna.no", +"kafjord.no", +"kåfjord.no", +"gaivuotna.no", +"gáivuotna.no", +"larvik.no", +"lavangen.no", +"lavagis.no", +"loabat.no", +"loabát.no", +"lebesby.no", +"davvesiida.no", +"leikanger.no", +"leirfjord.no", +"leka.no", +"leksvik.no", +"lenvik.no", +"leangaviika.no", +"leaŋgaviika.no", +"lesja.no", +"levanger.no", +"lier.no", +"lierne.no", +"lillehammer.no", +"lillesand.no", +"lindesnes.no", +"lindas.no", +"lindås.no", +"lom.no", +"loppa.no", +"lahppi.no", +"láhppi.no", +"lund.no", +"lunner.no", +"luroy.no", +"lurøy.no", +"luster.no", +"lyngdal.no", +"lyngen.no", +"ivgu.no", +"lardal.no", +"lerdal.no", +"lærdal.no", +"lodingen.no", +"lødingen.no", +"lorenskog.no", +"lørenskog.no", +"loten.no", +"løten.no", +"malvik.no", +"masoy.no", +"måsøy.no", +"muosat.no", +"muosát.no", +"mandal.no", +"marker.no", +"marnardal.no", +"masfjorden.no", +"meland.no", +"meldal.no", +"melhus.no", +"meloy.no", +"meløy.no", +"meraker.no", +"meråker.no", +"moareke.no", +"moåreke.no", +"midsund.no", +"midtre-gauldal.no", +"modalen.no", +"modum.no", +"molde.no", +"moskenes.no", +"moss.no", +"mosvik.no", +"malselv.no", +"målselv.no", +"malatvuopmi.no", +"málatvuopmi.no", +"namdalseid.no", +"aejrie.no", +"namsos.no", +"namsskogan.no", +"naamesjevuemie.no", +"nååmesjevuemie.no", +"laakesvuemie.no", +"nannestad.no", +"narvik.no", +"narviika.no", +"naustdal.no", +"nedre-eiker.no", +"nes.akershus.no", +"nes.buskerud.no", +"nesna.no", +"nesodden.no", +"nesseby.no", +"unjarga.no", +"unjárga.no", +"nesset.no", +"nissedal.no", +"nittedal.no", +"nord-aurdal.no", +"nord-fron.no", +"nord-odal.no", +"norddal.no", +"nordkapp.no", +"davvenjarga.no", +"davvenjárga.no", +"nordre-land.no", +"nordreisa.no", +"raisa.no", +"ráisa.no", +"nore-og-uvdal.no", +"notodden.no", +"naroy.no", +"nærøy.no", +"notteroy.no", +"nøtterøy.no", +"odda.no", +"oksnes.no", +"øksnes.no", +"oppdal.no", +"oppegard.no", +"oppegård.no", +"orkdal.no", +"orland.no", +"ørland.no", +"orskog.no", +"ørskog.no", +"orsta.no", +"ørsta.no", +"os.hedmark.no", +"os.hordaland.no", +"osen.no", +"osteroy.no", +"osterøy.no", +"ostre-toten.no", +"østre-toten.no", +"overhalla.no", +"ovre-eiker.no", +"øvre-eiker.no", +"oyer.no", +"øyer.no", +"oygarden.no", +"øygarden.no", +"oystre-slidre.no", +"øystre-slidre.no", +"porsanger.no", +"porsangu.no", +"porsáŋgu.no", +"porsgrunn.no", +"radoy.no", +"radøy.no", +"rakkestad.no", +"rana.no", +"ruovat.no", +"randaberg.no", +"rauma.no", +"rendalen.no", +"rennebu.no", +"rennesoy.no", +"rennesøy.no", +"rindal.no", +"ringebu.no", +"ringerike.no", +"ringsaker.no", +"rissa.no", +"risor.no", +"risør.no", +"roan.no", +"rollag.no", +"rygge.no", +"ralingen.no", +"rælingen.no", +"rodoy.no", +"rødøy.no", +"romskog.no", +"rømskog.no", +"roros.no", +"røros.no", +"rost.no", +"røst.no", +"royken.no", +"røyken.no", +"royrvik.no", +"røyrvik.no", +"rade.no", +"råde.no", +"salangen.no", +"siellak.no", +"saltdal.no", +"salat.no", +"sálát.no", +"sálat.no", +"samnanger.no", +"sande.more-og-romsdal.no", +"sande.møre-og-romsdal.no", +"sande.vestfold.no", +"sandefjord.no", +"sandnes.no", +"sandoy.no", +"sandøy.no", +"sarpsborg.no", +"sauda.no", +"sauherad.no", +"sel.no", +"selbu.no", +"selje.no", +"seljord.no", +"sigdal.no", +"siljan.no", +"sirdal.no", +"skaun.no", +"skedsmo.no", +"ski.no", +"skien.no", +"skiptvet.no", +"skjervoy.no", +"skjervøy.no", +"skierva.no", +"skiervá.no", +"skjak.no", +"skjåk.no", +"skodje.no", +"skanland.no", +"skånland.no", +"skanit.no", +"skánit.no", +"smola.no", +"smøla.no", +"snillfjord.no", +"snasa.no", +"snåsa.no", +"snoasa.no", +"snaase.no", +"snåase.no", +"sogndal.no", +"sokndal.no", +"sola.no", +"solund.no", +"songdalen.no", +"sortland.no", +"spydeberg.no", +"stange.no", +"stavanger.no", +"steigen.no", +"steinkjer.no", +"stjordal.no", +"stjørdal.no", +"stokke.no", +"stor-elvdal.no", +"stord.no", +"stordal.no", +"storfjord.no", +"omasvuotna.no", +"strand.no", +"stranda.no", +"stryn.no", +"sula.no", +"suldal.no", +"sund.no", +"sunndal.no", +"surnadal.no", +"sveio.no", +"svelvik.no", +"sykkylven.no", +"sogne.no", +"søgne.no", +"somna.no", +"sømna.no", +"sondre-land.no", +"søndre-land.no", +"sor-aurdal.no", +"sør-aurdal.no", +"sor-fron.no", +"sør-fron.no", +"sor-odal.no", +"sør-odal.no", +"sor-varanger.no", +"sør-varanger.no", +"matta-varjjat.no", +"mátta-várjjat.no", +"sorfold.no", +"sørfold.no", +"sorreisa.no", +"sørreisa.no", +"sorum.no", +"sørum.no", +"tana.no", +"deatnu.no", +"time.no", +"tingvoll.no", +"tinn.no", +"tjeldsund.no", +"dielddanuorri.no", +"tjome.no", +"tjøme.no", +"tokke.no", +"tolga.no", +"torsken.no", +"tranoy.no", +"tranøy.no", +"tromso.no", +"tromsø.no", +"tromsa.no", +"romsa.no", +"trondheim.no", +"troandin.no", +"trysil.no", +"trana.no", +"træna.no", +"trogstad.no", +"trøgstad.no", +"tvedestrand.no", +"tydal.no", +"tynset.no", +"tysfjord.no", +"divtasvuodna.no", +"divttasvuotna.no", +"tysnes.no", +"tysvar.no", +"tysvær.no", +"tonsberg.no", +"tønsberg.no", +"ullensaker.no", +"ullensvang.no", +"ulvik.no", +"utsira.no", +"vadso.no", +"vadsø.no", +"cahcesuolo.no", +"čáhcesuolo.no", +"vaksdal.no", +"valle.no", +"vang.no", +"vanylven.no", +"vardo.no", +"vardø.no", +"varggat.no", +"várggát.no", +"vefsn.no", +"vaapste.no", +"vega.no", +"vegarshei.no", +"vegårshei.no", +"vennesla.no", +"verdal.no", +"verran.no", +"vestby.no", +"vestnes.no", +"vestre-slidre.no", +"vestre-toten.no", +"vestvagoy.no", +"vestvågøy.no", +"vevelstad.no", +"vik.no", +"vikna.no", +"vindafjord.no", +"volda.no", +"voss.no", +"varoy.no", +"værøy.no", +"vagan.no", +"vågan.no", +"voagat.no", +"vagsoy.no", +"vågsøy.no", +"vaga.no", +"vågå.no", +"valer.ostfold.no", +"våler.østfold.no", +"valer.hedmark.no", +"våler.hedmark.no", +"*.np", +"nr", +"biz.nr", +"info.nr", +"gov.nr", +"edu.nr", +"org.nr", +"net.nr", +"com.nr", +"nu", +"nz", +"ac.nz", +"co.nz", +"cri.nz", +"geek.nz", +"gen.nz", +"govt.nz", +"health.nz", +"iwi.nz", +"kiwi.nz", +"maori.nz", +"mil.nz", +"māori.nz", +"net.nz", +"org.nz", +"parliament.nz", +"school.nz", +"om", +"co.om", +"com.om", +"edu.om", +"gov.om", +"med.om", +"museum.om", +"net.om", +"org.om", +"pro.om", +"onion", +"org", +"pa", +"ac.pa", +"gob.pa", +"com.pa", +"org.pa", +"sld.pa", +"edu.pa", +"net.pa", +"ing.pa", +"abo.pa", +"med.pa", +"nom.pa", +"pe", +"edu.pe", +"gob.pe", +"nom.pe", +"mil.pe", +"org.pe", +"com.pe", +"net.pe", +"pf", +"com.pf", +"org.pf", +"edu.pf", +"*.pg", +"ph", +"com.ph", +"net.ph", +"org.ph", +"gov.ph", +"edu.ph", +"ngo.ph", +"mil.ph", +"i.ph", +"pk", +"com.pk", +"net.pk", +"edu.pk", +"org.pk", +"fam.pk", +"biz.pk", +"web.pk", +"gov.pk", +"gob.pk", +"gok.pk", +"gon.pk", +"gop.pk", +"gos.pk", +"info.pk", +"pl", +"com.pl", +"net.pl", +"org.pl", +"aid.pl", +"agro.pl", +"atm.pl", +"auto.pl", +"biz.pl", +"edu.pl", +"gmina.pl", +"gsm.pl", +"info.pl", +"mail.pl", +"miasta.pl", +"media.pl", +"mil.pl", +"nieruchomosci.pl", +"nom.pl", +"pc.pl", +"powiat.pl", +"priv.pl", +"realestate.pl", +"rel.pl", +"sex.pl", +"shop.pl", +"sklep.pl", +"sos.pl", +"szkola.pl", +"targi.pl", +"tm.pl", +"tourism.pl", +"travel.pl", +"turystyka.pl", +"gov.pl", +"ap.gov.pl", +"ic.gov.pl", +"is.gov.pl", +"us.gov.pl", +"kmpsp.gov.pl", +"kppsp.gov.pl", +"kwpsp.gov.pl", +"psp.gov.pl", +"wskr.gov.pl", +"kwp.gov.pl", +"mw.gov.pl", +"ug.gov.pl", +"um.gov.pl", +"umig.gov.pl", +"ugim.gov.pl", +"upow.gov.pl", +"uw.gov.pl", +"starostwo.gov.pl", +"pa.gov.pl", +"po.gov.pl", +"psse.gov.pl", +"pup.gov.pl", +"rzgw.gov.pl", +"sa.gov.pl", +"so.gov.pl", +"sr.gov.pl", +"wsa.gov.pl", +"sko.gov.pl", +"uzs.gov.pl", +"wiih.gov.pl", +"winb.gov.pl", +"pinb.gov.pl", +"wios.gov.pl", +"witd.gov.pl", +"wzmiuw.gov.pl", +"piw.gov.pl", +"wiw.gov.pl", +"griw.gov.pl", +"wif.gov.pl", +"oum.gov.pl", +"sdn.gov.pl", +"zp.gov.pl", +"uppo.gov.pl", +"mup.gov.pl", +"wuoz.gov.pl", +"konsulat.gov.pl", +"oirm.gov.pl", +"augustow.pl", +"babia-gora.pl", +"bedzin.pl", +"beskidy.pl", +"bialowieza.pl", +"bialystok.pl", +"bielawa.pl", +"bieszczady.pl", +"boleslawiec.pl", +"bydgoszcz.pl", +"bytom.pl", +"cieszyn.pl", +"czeladz.pl", +"czest.pl", +"dlugoleka.pl", +"elblag.pl", +"elk.pl", +"glogow.pl", +"gniezno.pl", +"gorlice.pl", +"grajewo.pl", +"ilawa.pl", +"jaworzno.pl", +"jelenia-gora.pl", +"jgora.pl", +"kalisz.pl", +"kazimierz-dolny.pl", +"karpacz.pl", +"kartuzy.pl", +"kaszuby.pl", +"katowice.pl", +"kepno.pl", +"ketrzyn.pl", +"klodzko.pl", +"kobierzyce.pl", +"kolobrzeg.pl", +"konin.pl", +"konskowola.pl", +"kutno.pl", +"lapy.pl", +"lebork.pl", +"legnica.pl", +"lezajsk.pl", +"limanowa.pl", +"lomza.pl", +"lowicz.pl", +"lubin.pl", +"lukow.pl", +"malbork.pl", +"malopolska.pl", +"mazowsze.pl", +"mazury.pl", +"mielec.pl", +"mielno.pl", +"mragowo.pl", +"naklo.pl", +"nowaruda.pl", +"nysa.pl", +"olawa.pl", +"olecko.pl", +"olkusz.pl", +"olsztyn.pl", +"opoczno.pl", +"opole.pl", +"ostroda.pl", +"ostroleka.pl", +"ostrowiec.pl", +"ostrowwlkp.pl", +"pila.pl", +"pisz.pl", +"podhale.pl", +"podlasie.pl", +"polkowice.pl", +"pomorze.pl", +"pomorskie.pl", +"prochowice.pl", +"pruszkow.pl", +"przeworsk.pl", +"pulawy.pl", +"radom.pl", +"rawa-maz.pl", +"rybnik.pl", +"rzeszow.pl", +"sanok.pl", +"sejny.pl", +"slask.pl", +"slupsk.pl", +"sosnowiec.pl", +"stalowa-wola.pl", +"skoczow.pl", +"starachowice.pl", +"stargard.pl", +"suwalki.pl", +"swidnica.pl", +"swiebodzin.pl", +"swinoujscie.pl", +"szczecin.pl", +"szczytno.pl", +"tarnobrzeg.pl", +"tgory.pl", +"turek.pl", +"tychy.pl", +"ustka.pl", +"walbrzych.pl", +"warmia.pl", +"warszawa.pl", +"waw.pl", +"wegrow.pl", +"wielun.pl", +"wlocl.pl", +"wloclawek.pl", +"wodzislaw.pl", +"wolomin.pl", +"wroclaw.pl", +"zachpomor.pl", +"zagan.pl", +"zarow.pl", +"zgora.pl", +"zgorzelec.pl", +"pm", +"pn", +"gov.pn", +"co.pn", +"org.pn", +"edu.pn", +"net.pn", +"post", +"pr", +"com.pr", +"net.pr", +"org.pr", +"gov.pr", +"edu.pr", +"isla.pr", +"pro.pr", +"biz.pr", +"info.pr", +"name.pr", +"est.pr", +"prof.pr", +"ac.pr", +"pro", +"aaa.pro", +"aca.pro", +"acct.pro", +"avocat.pro", +"bar.pro", +"cpa.pro", +"eng.pro", +"jur.pro", +"law.pro", +"med.pro", +"recht.pro", +"ps", +"edu.ps", +"gov.ps", +"sec.ps", +"plo.ps", +"com.ps", +"org.ps", +"net.ps", +"pt", +"net.pt", +"gov.pt", +"org.pt", +"edu.pt", +"int.pt", +"publ.pt", +"com.pt", +"nome.pt", +"pw", +"co.pw", +"ne.pw", +"or.pw", +"ed.pw", +"go.pw", +"belau.pw", +"py", +"com.py", +"coop.py", +"edu.py", +"gov.py", +"mil.py", +"net.py", +"org.py", +"qa", +"com.qa", +"edu.qa", +"gov.qa", +"mil.qa", +"name.qa", +"net.qa", +"org.qa", +"sch.qa", +"re", +"asso.re", +"com.re", +"nom.re", +"ro", +"arts.ro", +"com.ro", +"firm.ro", +"info.ro", +"nom.ro", +"nt.ro", +"org.ro", +"rec.ro", +"store.ro", +"tm.ro", +"www.ro", +"rs", +"ac.rs", +"co.rs", +"edu.rs", +"gov.rs", +"in.rs", +"org.rs", +"ru", +"rw", +"ac.rw", +"co.rw", +"coop.rw", +"gov.rw", +"mil.rw", +"net.rw", +"org.rw", +"sa", +"com.sa", +"net.sa", +"org.sa", +"gov.sa", +"med.sa", +"pub.sa", +"edu.sa", +"sch.sa", +"sb", +"com.sb", +"edu.sb", +"gov.sb", +"net.sb", +"org.sb", +"sc", +"com.sc", +"gov.sc", +"net.sc", +"org.sc", +"edu.sc", +"sd", +"com.sd", +"net.sd", +"org.sd", +"edu.sd", +"med.sd", +"tv.sd", +"gov.sd", +"info.sd", +"se", +"a.se", +"ac.se", +"b.se", +"bd.se", +"brand.se", +"c.se", +"d.se", +"e.se", +"f.se", +"fh.se", +"fhsk.se", +"fhv.se", +"g.se", +"h.se", +"i.se", +"k.se", +"komforb.se", +"kommunalforbund.se", +"komvux.se", +"l.se", +"lanbib.se", +"m.se", +"n.se", +"naturbruksgymn.se", +"o.se", +"org.se", +"p.se", +"parti.se", +"pp.se", +"press.se", +"r.se", +"s.se", +"t.se", +"tm.se", +"u.se", +"w.se", +"x.se", +"y.se", +"z.se", +"sg", +"com.sg", +"net.sg", +"org.sg", +"gov.sg", +"edu.sg", +"per.sg", +"sh", +"com.sh", +"net.sh", +"gov.sh", +"org.sh", +"mil.sh", +"si", +"sj", +"sk", +"sl", +"com.sl", +"net.sl", +"edu.sl", +"gov.sl", +"org.sl", +"sm", +"sn", +"art.sn", +"com.sn", +"edu.sn", +"gouv.sn", +"org.sn", +"perso.sn", +"univ.sn", +"so", +"com.so", +"edu.so", +"gov.so", +"me.so", +"net.so", +"org.so", +"sr", +"ss", +"biz.ss", +"com.ss", +"edu.ss", +"gov.ss", +"net.ss", +"org.ss", +"st", +"co.st", +"com.st", +"consulado.st", +"edu.st", +"embaixada.st", +"gov.st", +"mil.st", +"net.st", +"org.st", +"principe.st", +"saotome.st", +"store.st", +"su", +"sv", +"com.sv", +"edu.sv", +"gob.sv", +"org.sv", +"red.sv", +"sx", +"gov.sx", +"sy", +"edu.sy", +"gov.sy", +"net.sy", +"mil.sy", +"com.sy", +"org.sy", +"sz", +"co.sz", +"ac.sz", +"org.sz", +"tc", +"td", +"tel", +"tf", +"tg", +"th", +"ac.th", +"co.th", +"go.th", +"in.th", +"mi.th", +"net.th", +"or.th", +"tj", +"ac.tj", +"biz.tj", +"co.tj", +"com.tj", +"edu.tj", +"go.tj", +"gov.tj", +"int.tj", +"mil.tj", +"name.tj", +"net.tj", +"nic.tj", +"org.tj", +"test.tj", +"web.tj", +"tk", +"tl", +"gov.tl", +"tm", +"com.tm", +"co.tm", +"org.tm", +"net.tm", +"nom.tm", +"gov.tm", +"mil.tm", +"edu.tm", +"tn", +"com.tn", +"ens.tn", +"fin.tn", +"gov.tn", +"ind.tn", +"intl.tn", +"nat.tn", +"net.tn", +"org.tn", +"info.tn", +"perso.tn", +"tourism.tn", +"edunet.tn", +"rnrt.tn", +"rns.tn", +"rnu.tn", +"mincom.tn", +"agrinet.tn", +"defense.tn", +"turen.tn", +"to", +"com.to", +"gov.to", +"net.to", +"org.to", +"edu.to", +"mil.to", +"tr", +"av.tr", +"bbs.tr", +"bel.tr", +"biz.tr", +"com.tr", +"dr.tr", +"edu.tr", +"gen.tr", +"gov.tr", +"info.tr", +"mil.tr", +"k12.tr", +"kep.tr", +"name.tr", +"net.tr", +"org.tr", +"pol.tr", +"tel.tr", +"tsk.tr", +"tv.tr", +"web.tr", +"nc.tr", +"gov.nc.tr", +"tt", +"co.tt", +"com.tt", +"org.tt", +"net.tt", +"biz.tt", +"info.tt", +"pro.tt", +"int.tt", +"coop.tt", +"jobs.tt", +"mobi.tt", +"travel.tt", +"museum.tt", +"aero.tt", +"name.tt", +"gov.tt", +"edu.tt", +"tv", +"tw", +"edu.tw", +"gov.tw", +"mil.tw", +"com.tw", +"net.tw", +"org.tw", +"idv.tw", +"game.tw", +"ebiz.tw", +"club.tw", +"網路.tw", +"組織.tw", +"商業.tw", +"tz", +"ac.tz", +"co.tz", +"go.tz", +"hotel.tz", +"info.tz", +"me.tz", +"mil.tz", +"mobi.tz", +"ne.tz", +"or.tz", +"sc.tz", +"tv.tz", +"ua", +"com.ua", +"edu.ua", +"gov.ua", +"in.ua", +"net.ua", +"org.ua", +"cherkassy.ua", +"cherkasy.ua", +"chernigov.ua", +"chernihiv.ua", +"chernivtsi.ua", +"chernovtsy.ua", +"ck.ua", +"cn.ua", +"cr.ua", +"crimea.ua", +"cv.ua", +"dn.ua", +"dnepropetrovsk.ua", +"dnipropetrovsk.ua", +"dominic.ua", +"donetsk.ua", +"dp.ua", +"if.ua", +"ivano-frankivsk.ua", +"kh.ua", +"kharkiv.ua", +"kharkov.ua", +"kherson.ua", +"khmelnitskiy.ua", +"khmelnytskyi.ua", +"kiev.ua", +"kirovograd.ua", +"km.ua", +"kr.ua", +"krym.ua", +"ks.ua", +"kv.ua", +"kyiv.ua", +"lg.ua", +"lt.ua", +"lugansk.ua", +"lutsk.ua", +"lv.ua", +"lviv.ua", +"mk.ua", +"mykolaiv.ua", +"nikolaev.ua", +"od.ua", +"odesa.ua", +"odessa.ua", +"pl.ua", +"poltava.ua", +"rivne.ua", +"rovno.ua", +"rv.ua", +"sb.ua", +"sebastopol.ua", +"sevastopol.ua", +"sm.ua", +"sumy.ua", +"te.ua", +"ternopil.ua", +"uz.ua", +"uzhgorod.ua", +"vinnica.ua", +"vinnytsia.ua", +"vn.ua", +"volyn.ua", +"yalta.ua", +"zaporizhzhe.ua", +"zaporizhzhia.ua", +"zhitomir.ua", +"zhytomyr.ua", +"zp.ua", +"zt.ua", +"ug", +"co.ug", +"or.ug", +"ac.ug", +"sc.ug", +"go.ug", +"ne.ug", +"com.ug", +"org.ug", +"uk", +"ac.uk", +"co.uk", +"gov.uk", +"ltd.uk", +"me.uk", +"net.uk", +"nhs.uk", +"org.uk", +"plc.uk", +"police.uk", +"*.sch.uk", +"us", +"dni.us", +"fed.us", +"isa.us", +"kids.us", +"nsn.us", +"ak.us", +"al.us", +"ar.us", +"as.us", +"az.us", +"ca.us", +"co.us", +"ct.us", +"dc.us", +"de.us", +"fl.us", +"ga.us", +"gu.us", +"hi.us", +"ia.us", +"id.us", +"il.us", +"in.us", +"ks.us", +"ky.us", +"la.us", +"ma.us", +"md.us", +"me.us", +"mi.us", +"mn.us", +"mo.us", +"ms.us", +"mt.us", +"nc.us", +"nd.us", +"ne.us", +"nh.us", +"nj.us", +"nm.us", +"nv.us", +"ny.us", +"oh.us", +"ok.us", +"or.us", +"pa.us", +"pr.us", +"ri.us", +"sc.us", +"sd.us", +"tn.us", +"tx.us", +"ut.us", +"vi.us", +"vt.us", +"va.us", +"wa.us", +"wi.us", +"wv.us", +"wy.us", +"k12.ak.us", +"k12.al.us", +"k12.ar.us", +"k12.as.us", +"k12.az.us", +"k12.ca.us", +"k12.co.us", +"k12.ct.us", +"k12.dc.us", +"k12.de.us", +"k12.fl.us", +"k12.ga.us", +"k12.gu.us", +"k12.ia.us", +"k12.id.us", +"k12.il.us", +"k12.in.us", +"k12.ks.us", +"k12.ky.us", +"k12.la.us", +"k12.ma.us", +"k12.md.us", +"k12.me.us", +"k12.mi.us", +"k12.mn.us", +"k12.mo.us", +"k12.ms.us", +"k12.mt.us", +"k12.nc.us", +"k12.ne.us", +"k12.nh.us", +"k12.nj.us", +"k12.nm.us", +"k12.nv.us", +"k12.ny.us", +"k12.oh.us", +"k12.ok.us", +"k12.or.us", +"k12.pa.us", +"k12.pr.us", +"k12.ri.us", +"k12.sc.us", +"k12.tn.us", +"k12.tx.us", +"k12.ut.us", +"k12.vi.us", +"k12.vt.us", +"k12.va.us", +"k12.wa.us", +"k12.wi.us", +"k12.wy.us", +"cc.ak.us", +"cc.al.us", +"cc.ar.us", +"cc.as.us", +"cc.az.us", +"cc.ca.us", +"cc.co.us", +"cc.ct.us", +"cc.dc.us", +"cc.de.us", +"cc.fl.us", +"cc.ga.us", +"cc.gu.us", +"cc.hi.us", +"cc.ia.us", +"cc.id.us", +"cc.il.us", +"cc.in.us", +"cc.ks.us", +"cc.ky.us", +"cc.la.us", +"cc.ma.us", +"cc.md.us", +"cc.me.us", +"cc.mi.us", +"cc.mn.us", +"cc.mo.us", +"cc.ms.us", +"cc.mt.us", +"cc.nc.us", +"cc.nd.us", +"cc.ne.us", +"cc.nh.us", +"cc.nj.us", +"cc.nm.us", +"cc.nv.us", +"cc.ny.us", +"cc.oh.us", +"cc.ok.us", +"cc.or.us", +"cc.pa.us", +"cc.pr.us", +"cc.ri.us", +"cc.sc.us", +"cc.sd.us", +"cc.tn.us", +"cc.tx.us", +"cc.ut.us", +"cc.vi.us", +"cc.vt.us", +"cc.va.us", +"cc.wa.us", +"cc.wi.us", +"cc.wv.us", +"cc.wy.us", +"lib.ak.us", +"lib.al.us", +"lib.ar.us", +"lib.as.us", +"lib.az.us", +"lib.ca.us", +"lib.co.us", +"lib.ct.us", +"lib.dc.us", +"lib.fl.us", +"lib.ga.us", +"lib.gu.us", +"lib.hi.us", +"lib.ia.us", +"lib.id.us", +"lib.il.us", +"lib.in.us", +"lib.ks.us", +"lib.ky.us", +"lib.la.us", +"lib.ma.us", +"lib.md.us", +"lib.me.us", +"lib.mi.us", +"lib.mn.us", +"lib.mo.us", +"lib.ms.us", +"lib.mt.us", +"lib.nc.us", +"lib.nd.us", +"lib.ne.us", +"lib.nh.us", +"lib.nj.us", +"lib.nm.us", +"lib.nv.us", +"lib.ny.us", +"lib.oh.us", +"lib.ok.us", +"lib.or.us", +"lib.pa.us", +"lib.pr.us", +"lib.ri.us", +"lib.sc.us", +"lib.sd.us", +"lib.tn.us", +"lib.tx.us", +"lib.ut.us", +"lib.vi.us", +"lib.vt.us", +"lib.va.us", +"lib.wa.us", +"lib.wi.us", +"lib.wy.us", +"pvt.k12.ma.us", +"chtr.k12.ma.us", +"paroch.k12.ma.us", +"ann-arbor.mi.us", +"cog.mi.us", +"dst.mi.us", +"eaton.mi.us", +"gen.mi.us", +"mus.mi.us", +"tec.mi.us", +"washtenaw.mi.us", +"uy", +"com.uy", +"edu.uy", +"gub.uy", +"mil.uy", +"net.uy", +"org.uy", +"uz", +"co.uz", +"com.uz", +"net.uz", +"org.uz", +"va", +"vc", +"com.vc", +"net.vc", +"org.vc", +"gov.vc", +"mil.vc", +"edu.vc", +"ve", +"arts.ve", +"co.ve", +"com.ve", +"e12.ve", +"edu.ve", +"firm.ve", +"gob.ve", +"gov.ve", +"info.ve", +"int.ve", +"mil.ve", +"net.ve", +"org.ve", +"rec.ve", +"store.ve", +"tec.ve", +"web.ve", +"vg", +"vi", +"co.vi", +"com.vi", +"k12.vi", +"net.vi", +"org.vi", +"vn", +"com.vn", +"net.vn", +"org.vn", +"edu.vn", +"gov.vn", +"int.vn", +"ac.vn", +"biz.vn", +"info.vn", +"name.vn", +"pro.vn", +"health.vn", +"vu", +"com.vu", +"edu.vu", +"net.vu", +"org.vu", +"wf", +"ws", +"com.ws", +"net.ws", +"org.ws", +"gov.ws", +"edu.ws", +"yt", +"امارات", +"հայ", +"বাংলা", +"бг", +"бел", +"中国", +"中國", +"الجزائر", +"مصر", +"ею", +"ευ", +"موريتانيا", +"გე", +"ελ", +"香港", +"公司.香港", +"教育.香港", +"政府.香港", +"個人.香港", +"網絡.香港", +"組織.香港", +"ಭಾರತ", +"ଭାରତ", +"ভাৰত", +"भारतम्", +"भारोत", +"ڀارت", +"ഭാരതം", +"भारत", +"بارت", +"بھارت", +"భారత్", +"ભારત", +"ਭਾਰਤ", +"ভারত", +"இந்தியா", +"ایران", +"ايران", +"عراق", +"الاردن", +"한국", +"қаз", +"ලංකා", +"இலங்கை", +"المغرب", +"мкд", +"мон", +"澳門", +"澳门", +"مليسيا", +"عمان", +"پاکستان", +"پاكستان", +"فلسطين", +"срб", +"пр.срб", +"орг.срб", +"обр.срб", +"од.срб", +"упр.срб", +"ак.срб", +"рф", +"قطر", +"السعودية", +"السعودیة", +"السعودیۃ", +"السعوديه", +"سودان", +"新加坡", +"சிங்கப்பூர்", +"سورية", +"سوريا", +"ไทย", +"ศึกษา.ไทย", +"ธุรกิจ.ไทย", +"รัฐบาล.ไทย", +"ทหาร.ไทย", +"เน็ต.ไทย", +"องค์กร.ไทย", +"تونس", +"台灣", +"台湾", +"臺灣", +"укр", +"اليمن", +"xxx", +"*.ye", +"ac.za", +"agric.za", +"alt.za", +"co.za", +"edu.za", +"gov.za", +"grondar.za", +"law.za", +"mil.za", +"net.za", +"ngo.za", +"nic.za", +"nis.za", +"nom.za", +"org.za", +"school.za", +"tm.za", +"web.za", +"zm", +"ac.zm", +"biz.zm", +"co.zm", +"com.zm", +"edu.zm", +"gov.zm", +"info.zm", +"mil.zm", +"net.zm", +"org.zm", +"sch.zm", +"zw", +"ac.zw", +"co.zw", +"gov.zw", +"mil.zw", +"org.zw", +"aaa", +"aarp", +"abarth", +"abb", +"abbott", +"abbvie", +"abc", +"able", +"abogado", +"abudhabi", +"academy", +"accenture", +"accountant", +"accountants", +"aco", +"actor", +"adac", +"ads", +"adult", +"aeg", +"aetna", +"afamilycompany", +"afl", +"africa", +"agakhan", +"agency", +"aig", +"aigo", +"airbus", +"airforce", +"airtel", +"akdn", +"alfaromeo", +"alibaba", +"alipay", +"allfinanz", +"allstate", +"ally", +"alsace", +"alstom", +"amazon", +"americanexpress", +"americanfamily", +"amex", +"amfam", +"amica", +"amsterdam", +"analytics", +"android", +"anquan", +"anz", +"aol", +"apartments", +"app", +"apple", +"aquarelle", +"arab", +"aramco", +"archi", +"army", +"art", +"arte", +"asda", +"associates", +"athleta", +"attorney", +"auction", +"audi", +"audible", +"audio", +"auspost", +"author", +"auto", +"autos", +"avianca", +"aws", +"axa", +"azure", +"baby", +"baidu", +"banamex", +"bananarepublic", +"band", +"bank", +"bar", +"barcelona", +"barclaycard", +"barclays", +"barefoot", +"bargains", +"baseball", +"basketball", +"bauhaus", +"bayern", +"bbc", +"bbt", +"bbva", +"bcg", +"bcn", +"beats", +"beauty", +"beer", +"bentley", +"berlin", +"best", +"bestbuy", +"bet", +"bharti", +"bible", +"bid", +"bike", +"bing", +"bingo", +"bio", +"black", +"blackfriday", +"blockbuster", +"blog", +"bloomberg", +"blue", +"bms", +"bmw", +"bnpparibas", +"boats", +"boehringer", +"bofa", +"bom", +"bond", +"boo", +"book", +"booking", +"bosch", +"bostik", +"boston", +"bot", +"boutique", +"box", +"bradesco", +"bridgestone", +"broadway", +"broker", +"brother", +"brussels", +"budapest", +"bugatti", +"build", +"builders", +"business", +"buy", +"buzz", +"bzh", +"cab", +"cafe", +"cal", +"call", +"calvinklein", +"cam", +"camera", +"camp", +"cancerresearch", +"canon", +"capetown", +"capital", +"capitalone", +"car", +"caravan", +"cards", +"care", +"career", +"careers", +"cars", +"casa", +"case", +"caseih", +"cash", +"casino", +"catering", +"catholic", +"cba", +"cbn", +"cbre", +"cbs", +"ceb", +"center", +"ceo", +"cern", +"cfa", +"cfd", +"chanel", +"channel", +"charity", +"chase", +"chat", +"cheap", +"chintai", +"christmas", +"chrome", +"church", +"cipriani", +"circle", +"cisco", +"citadel", +"citi", +"citic", +"city", +"cityeats", +"claims", +"cleaning", +"click", +"clinic", +"clinique", +"clothing", +"cloud", +"club", +"clubmed", +"coach", +"codes", +"coffee", +"college", +"cologne", +"comcast", +"commbank", +"community", +"company", +"compare", +"computer", +"comsec", +"condos", +"construction", +"consulting", +"contact", +"contractors", +"cooking", +"cookingchannel", +"cool", +"corsica", +"country", +"coupon", +"coupons", +"courses", +"cpa", +"credit", +"creditcard", +"creditunion", +"cricket", +"crown", +"crs", +"cruise", +"cruises", +"csc", +"cuisinella", +"cymru", +"cyou", +"dabur", +"dad", +"dance", +"data", +"date", +"dating", +"datsun", +"day", +"dclk", +"dds", +"deal", +"dealer", +"deals", +"degree", +"delivery", +"dell", +"deloitte", +"delta", +"democrat", +"dental", +"dentist", +"desi", +"design", +"dev", +"dhl", +"diamonds", +"diet", +"digital", +"direct", +"directory", +"discount", +"discover", +"dish", +"diy", +"dnp", +"docs", +"doctor", +"dog", +"domains", +"dot", +"download", +"drive", +"dtv", +"dubai", +"duck", +"dunlop", +"dupont", +"durban", +"dvag", +"dvr", +"earth", +"eat", +"eco", +"edeka", +"education", +"email", +"emerck", +"energy", +"engineer", +"engineering", +"enterprises", +"epson", +"equipment", +"ericsson", +"erni", +"esq", +"estate", +"esurance", +"etisalat", +"eurovision", +"eus", +"events", +"exchange", +"expert", +"exposed", +"express", +"extraspace", +"fage", +"fail", +"fairwinds", +"faith", +"family", +"fan", +"fans", +"farm", +"farmers", +"fashion", +"fast", +"fedex", +"feedback", +"ferrari", +"ferrero", +"fiat", +"fidelity", +"fido", +"film", +"final", +"finance", +"financial", +"fire", +"firestone", +"firmdale", +"fish", +"fishing", +"fit", +"fitness", +"flickr", +"flights", +"flir", +"florist", +"flowers", +"fly", +"foo", +"food", +"foodnetwork", +"football", +"ford", +"forex", +"forsale", +"forum", +"foundation", +"fox", +"free", +"fresenius", +"frl", +"frogans", +"frontdoor", +"frontier", +"ftr", +"fujitsu", +"fujixerox", +"fun", +"fund", +"furniture", +"futbol", +"fyi", +"gal", +"gallery", +"gallo", +"gallup", +"game", +"games", +"gap", +"garden", +"gay", +"gbiz", +"gdn", +"gea", +"gent", +"genting", +"george", +"ggee", +"gift", +"gifts", +"gives", +"giving", +"glade", +"glass", +"gle", +"global", +"globo", +"gmail", +"gmbh", +"gmo", +"gmx", +"godaddy", +"gold", +"goldpoint", +"golf", +"goo", +"goodyear", +"goog", +"google", +"gop", +"got", +"grainger", +"graphics", +"gratis", +"green", +"gripe", +"grocery", +"group", +"guardian", +"gucci", +"guge", +"guide", +"guitars", +"guru", +"hair", +"hamburg", +"hangout", +"haus", +"hbo", +"hdfc", +"hdfcbank", +"health", +"healthcare", +"help", +"helsinki", +"here", +"hermes", +"hgtv", +"hiphop", +"hisamitsu", +"hitachi", +"hiv", +"hkt", +"hockey", +"holdings", +"holiday", +"homedepot", +"homegoods", +"homes", +"homesense", +"honda", +"horse", +"hospital", +"host", +"hosting", +"hot", +"hoteles", +"hotels", +"hotmail", +"house", +"how", +"hsbc", +"hughes", +"hyatt", +"hyundai", +"ibm", +"icbc", +"ice", +"icu", +"ieee", +"ifm", +"ikano", +"imamat", +"imdb", +"immo", +"immobilien", +"inc", +"industries", +"infiniti", +"ing", +"ink", +"institute", +"insurance", +"insure", +"intel", +"international", +"intuit", +"investments", +"ipiranga", +"irish", +"ismaili", +"ist", +"istanbul", +"itau", +"itv", +"iveco", +"jaguar", +"java", +"jcb", +"jcp", +"jeep", +"jetzt", +"jewelry", +"jio", +"jll", +"jmp", +"jnj", +"joburg", +"jot", +"joy", +"jpmorgan", +"jprs", +"juegos", +"juniper", +"kaufen", +"kddi", +"kerryhotels", +"kerrylogistics", +"kerryproperties", +"kfh", +"kia", +"kim", +"kinder", +"kindle", +"kitchen", +"kiwi", +"koeln", +"komatsu", +"kosher", +"kpmg", +"kpn", +"krd", +"kred", +"kuokgroup", +"kyoto", +"lacaixa", +"lamborghini", +"lamer", +"lancaster", +"lancia", +"land", +"landrover", +"lanxess", +"lasalle", +"lat", +"latino", +"latrobe", +"law", +"lawyer", +"lds", +"lease", +"leclerc", +"lefrak", +"legal", +"lego", +"lexus", +"lgbt", +"lidl", +"life", +"lifeinsurance", +"lifestyle", +"lighting", +"like", +"lilly", +"limited", +"limo", +"lincoln", +"linde", +"link", +"lipsy", +"live", +"living", +"lixil", +"llc", +"llp", +"loan", +"loans", +"locker", +"locus", +"loft", +"lol", +"london", +"lotte", +"lotto", +"love", +"lpl", +"lplfinancial", +"ltd", +"ltda", +"lundbeck", +"lupin", +"luxe", +"luxury", +"macys", +"madrid", +"maif", +"maison", +"makeup", +"man", +"management", +"mango", +"map", +"market", +"marketing", +"markets", +"marriott", +"marshalls", +"maserati", +"mattel", +"mba", +"mckinsey", +"med", +"media", +"meet", +"melbourne", +"meme", +"memorial", +"men", +"menu", +"merckmsd", +"metlife", +"miami", +"microsoft", +"mini", +"mint", +"mit", +"mitsubishi", +"mlb", +"mls", +"mma", +"mobile", +"moda", +"moe", +"moi", +"mom", +"monash", +"money", +"monster", +"mormon", +"mortgage", +"moscow", +"moto", +"motorcycles", +"mov", +"movie", +"msd", +"mtn", +"mtr", +"mutual", +"nab", +"nadex", +"nagoya", +"nationwide", +"natura", +"navy", +"nba", +"nec", +"netbank", +"netflix", +"network", +"neustar", +"new", +"newholland", +"news", +"next", +"nextdirect", +"nexus", +"nfl", +"ngo", +"nhk", +"nico", +"nike", +"nikon", +"ninja", +"nissan", +"nissay", +"nokia", +"northwesternmutual", +"norton", +"now", +"nowruz", +"nowtv", +"nra", +"nrw", +"ntt", +"nyc", +"obi", +"observer", +"off", +"office", +"okinawa", +"olayan", +"olayangroup", +"oldnavy", +"ollo", +"omega", +"one", +"ong", +"onl", +"online", +"onyourside", +"ooo", +"open", +"oracle", +"orange", +"organic", +"origins", +"osaka", +"otsuka", +"ott", +"ovh", +"page", +"panasonic", +"paris", +"pars", +"partners", +"parts", +"party", +"passagens", +"pay", +"pccw", +"pet", +"pfizer", +"pharmacy", +"phd", +"philips", +"phone", +"photo", +"photography", +"photos", +"physio", +"pics", +"pictet", +"pictures", +"pid", +"pin", +"ping", +"pink", +"pioneer", +"pizza", +"place", +"play", +"playstation", +"plumbing", +"plus", +"pnc", +"pohl", +"poker", +"politie", +"porn", +"pramerica", +"praxi", +"press", +"prime", +"prod", +"productions", +"prof", +"progressive", +"promo", +"properties", +"property", +"protection", +"pru", +"prudential", +"pub", +"pwc", +"qpon", +"quebec", +"quest", +"qvc", +"racing", +"radio", +"raid", +"read", +"realestate", +"realtor", +"realty", +"recipes", +"red", +"redstone", +"redumbrella", +"rehab", +"reise", +"reisen", +"reit", +"reliance", +"ren", +"rent", +"rentals", +"repair", +"report", +"republican", +"rest", +"restaurant", +"review", +"reviews", +"rexroth", +"rich", +"richardli", +"ricoh", +"rightathome", +"ril", +"rio", +"rip", +"rmit", +"rocher", +"rocks", +"rodeo", +"rogers", +"room", +"rsvp", +"rugby", +"ruhr", +"run", +"rwe", +"ryukyu", +"saarland", +"safe", +"safety", +"sakura", +"sale", +"salon", +"samsclub", +"samsung", +"sandvik", +"sandvikcoromant", +"sanofi", +"sap", +"sarl", +"sas", +"save", +"saxo", +"sbi", +"sbs", +"sca", +"scb", +"schaeffler", +"schmidt", +"scholarships", +"school", +"schule", +"schwarz", +"science", +"scjohnson", +"scor", +"scot", +"search", +"seat", +"secure", +"security", +"seek", +"select", +"sener", +"services", +"ses", +"seven", +"sew", +"sex", +"sexy", +"sfr", +"shangrila", +"sharp", +"shaw", +"shell", +"shia", +"shiksha", +"shoes", +"shop", +"shopping", +"shouji", +"show", +"showtime", +"shriram", +"silk", +"sina", +"singles", +"site", +"ski", +"skin", +"sky", +"skype", +"sling", +"smart", +"smile", +"sncf", +"soccer", +"social", +"softbank", +"software", +"sohu", +"solar", +"solutions", +"song", +"sony", +"soy", +"spa", +"space", +"sport", +"spot", +"spreadbetting", +"srl", +"stada", +"staples", +"star", +"statebank", +"statefarm", +"stc", +"stcgroup", +"stockholm", +"storage", +"store", +"stream", +"studio", +"study", +"style", +"sucks", +"supplies", +"supply", +"support", +"surf", +"surgery", +"suzuki", +"swatch", +"swiftcover", +"swiss", +"sydney", +"symantec", +"systems", +"tab", +"taipei", +"talk", +"taobao", +"target", +"tatamotors", +"tatar", +"tattoo", +"tax", +"taxi", +"tci", +"tdk", +"team", +"tech", +"technology", +"temasek", +"tennis", +"teva", +"thd", +"theater", +"theatre", +"tiaa", +"tickets", +"tienda", +"tiffany", +"tips", +"tires", +"tirol", +"tjmaxx", +"tjx", +"tkmaxx", +"tmall", +"today", +"tokyo", +"tools", +"top", +"toray", +"toshiba", +"total", +"tours", +"town", +"toyota", +"toys", +"trade", +"trading", +"training", +"travel", +"travelchannel", +"travelers", +"travelersinsurance", +"trust", +"trv", +"tube", +"tui", +"tunes", +"tushu", +"tvs", +"ubank", +"ubs", +"unicom", +"university", +"uno", +"uol", +"ups", +"vacations", +"vana", +"vanguard", +"vegas", +"ventures", +"verisign", +"versicherung", +"vet", +"viajes", +"video", +"vig", +"viking", +"villas", +"vin", +"vip", +"virgin", +"visa", +"vision", +"viva", +"vivo", +"vlaanderen", +"vodka", +"volkswagen", +"volvo", +"vote", +"voting", +"voto", +"voyage", +"vuelos", +"wales", +"walmart", +"walter", +"wang", +"wanggou", +"watch", +"watches", +"weather", +"weatherchannel", +"webcam", +"weber", +"website", +"wed", +"wedding", +"weibo", +"weir", +"whoswho", +"wien", +"wiki", +"williamhill", +"win", +"windows", +"wine", +"winners", +"wme", +"wolterskluwer", +"woodside", +"work", +"works", +"world", +"wow", +"wtc", +"wtf", +"xbox", +"xerox", +"xfinity", +"xihuan", +"xin", +"कॉम", +"セール", +"佛山", +"慈善", +"集团", +"在线", +"大众汽车", +"点看", +"คอม", +"八卦", +"موقع", +"公益", +"公司", +"香格里拉", +"网站", +"移动", +"我爱你", +"москва", +"католик", +"онлайн", +"сайт", +"联通", +"קום", +"时尚", +"微博", +"淡马锡", +"ファッション", +"орг", +"नेट", +"ストア", +"アマゾン", +"삼성", +"商标", +"商店", +"商城", +"дети", +"ポイント", +"新闻", +"工行", +"家電", +"كوم", +"中文网", +"中信", +"娱乐", +"谷歌", +"電訊盈科", +"购物", +"クラウド", +"通販", +"网店", +"संगठन", +"餐厅", +"网络", +"ком", +"亚马逊", +"诺基亚", +"食品", +"飞利浦", +"手表", +"手机", +"ارامكو", +"العليان", +"اتصالات", +"بازار", +"ابوظبي", +"كاثوليك", +"همراه", +"닷컴", +"政府", +"شبكة", +"بيتك", +"عرب", +"机构", +"组织机构", +"健康", +"招聘", +"рус", +"珠宝", +"大拿", +"みんな", +"グーグル", +"世界", +"書籍", +"网址", +"닷넷", +"コム", +"天主教", +"游戏", +"vermögensberater", +"vermögensberatung", +"企业", +"信息", +"嘉里大酒店", +"嘉里", +"广东", +"政务", +"xyz", +"yachts", +"yahoo", +"yamaxun", +"yandex", +"yodobashi", +"yoga", +"yokohama", +"you", +"youtube", +"yun", +"zappos", +"zara", +"zero", +"zip", +"zone", +"zuerich", +"cc.ua", +"inf.ua", +"ltd.ua", +"adobeaemcloud.com", +"adobeaemcloud.net", +"*.dev.adobeaemcloud.com", +"beep.pl", +"barsy.ca", +"*.compute.estate", +"*.alces.network", +"altervista.org", +"alwaysdata.net", +"cloudfront.net", +"*.compute.amazonaws.com", +"*.compute-1.amazonaws.com", +"*.compute.amazonaws.com.cn", +"us-east-1.amazonaws.com", +"cn-north-1.eb.amazonaws.com.cn", +"cn-northwest-1.eb.amazonaws.com.cn", +"elasticbeanstalk.com", +"ap-northeast-1.elasticbeanstalk.com", +"ap-northeast-2.elasticbeanstalk.com", +"ap-northeast-3.elasticbeanstalk.com", +"ap-south-1.elasticbeanstalk.com", +"ap-southeast-1.elasticbeanstalk.com", +"ap-southeast-2.elasticbeanstalk.com", +"ca-central-1.elasticbeanstalk.com", +"eu-central-1.elasticbeanstalk.com", +"eu-west-1.elasticbeanstalk.com", +"eu-west-2.elasticbeanstalk.com", +"eu-west-3.elasticbeanstalk.com", +"sa-east-1.elasticbeanstalk.com", +"us-east-1.elasticbeanstalk.com", +"us-east-2.elasticbeanstalk.com", +"us-gov-west-1.elasticbeanstalk.com", +"us-west-1.elasticbeanstalk.com", +"us-west-2.elasticbeanstalk.com", +"*.elb.amazonaws.com", +"*.elb.amazonaws.com.cn", +"s3.amazonaws.com", +"s3-ap-northeast-1.amazonaws.com", +"s3-ap-northeast-2.amazonaws.com", +"s3-ap-south-1.amazonaws.com", +"s3-ap-southeast-1.amazonaws.com", +"s3-ap-southeast-2.amazonaws.com", +"s3-ca-central-1.amazonaws.com", +"s3-eu-central-1.amazonaws.com", +"s3-eu-west-1.amazonaws.com", +"s3-eu-west-2.amazonaws.com", +"s3-eu-west-3.amazonaws.com", +"s3-external-1.amazonaws.com", +"s3-fips-us-gov-west-1.amazonaws.com", +"s3-sa-east-1.amazonaws.com", +"s3-us-gov-west-1.amazonaws.com", +"s3-us-east-2.amazonaws.com", +"s3-us-west-1.amazonaws.com", +"s3-us-west-2.amazonaws.com", +"s3.ap-northeast-2.amazonaws.com", +"s3.ap-south-1.amazonaws.com", +"s3.cn-north-1.amazonaws.com.cn", +"s3.ca-central-1.amazonaws.com", +"s3.eu-central-1.amazonaws.com", +"s3.eu-west-2.amazonaws.com", +"s3.eu-west-3.amazonaws.com", +"s3.us-east-2.amazonaws.com", +"s3.dualstack.ap-northeast-1.amazonaws.com", +"s3.dualstack.ap-northeast-2.amazonaws.com", +"s3.dualstack.ap-south-1.amazonaws.com", +"s3.dualstack.ap-southeast-1.amazonaws.com", +"s3.dualstack.ap-southeast-2.amazonaws.com", +"s3.dualstack.ca-central-1.amazonaws.com", +"s3.dualstack.eu-central-1.amazonaws.com", +"s3.dualstack.eu-west-1.amazonaws.com", +"s3.dualstack.eu-west-2.amazonaws.com", +"s3.dualstack.eu-west-3.amazonaws.com", +"s3.dualstack.sa-east-1.amazonaws.com", +"s3.dualstack.us-east-1.amazonaws.com", +"s3.dualstack.us-east-2.amazonaws.com", +"s3-website-us-east-1.amazonaws.com", +"s3-website-us-west-1.amazonaws.com", +"s3-website-us-west-2.amazonaws.com", +"s3-website-ap-northeast-1.amazonaws.com", +"s3-website-ap-southeast-1.amazonaws.com", +"s3-website-ap-southeast-2.amazonaws.com", +"s3-website-eu-west-1.amazonaws.com", +"s3-website-sa-east-1.amazonaws.com", +"s3-website.ap-northeast-2.amazonaws.com", +"s3-website.ap-south-1.amazonaws.com", +"s3-website.ca-central-1.amazonaws.com", +"s3-website.eu-central-1.amazonaws.com", +"s3-website.eu-west-2.amazonaws.com", +"s3-website.eu-west-3.amazonaws.com", +"s3-website.us-east-2.amazonaws.com", +"amsw.nl", +"t3l3p0rt.net", +"tele.amune.org", +"apigee.io", +"on-aptible.com", +"user.aseinet.ne.jp", +"gv.vc", +"d.gv.vc", +"user.party.eus", +"pimienta.org", +"poivron.org", +"potager.org", +"sweetpepper.org", +"myasustor.com", +"myfritz.net", +"*.awdev.ca", +"*.advisor.ws", +"b-data.io", +"backplaneapp.io", +"balena-devices.com", +"app.banzaicloud.io", +"betainabox.com", +"bnr.la", +"blackbaudcdn.net", +"boomla.net", +"boxfuse.io", +"square7.ch", +"bplaced.com", +"bplaced.de", +"square7.de", +"bplaced.net", +"square7.net", +"browsersafetymark.io", +"uk0.bigv.io", +"dh.bytemark.co.uk", +"vm.bytemark.co.uk", +"mycd.eu", +"carrd.co", +"crd.co", +"uwu.ai", +"ae.org", +"ar.com", +"br.com", +"cn.com", +"com.de", +"com.se", +"de.com", +"eu.com", +"gb.com", +"gb.net", +"hu.com", +"hu.net", +"jp.net", +"jpn.com", +"kr.com", +"mex.com", +"no.com", +"qc.com", +"ru.com", +"sa.com", +"se.net", +"uk.com", +"uk.net", +"us.com", +"uy.com", +"za.bz", +"za.com", +"africa.com", +"gr.com", +"in.net", +"us.org", +"co.com", +"c.la", +"certmgr.org", +"xenapponazure.com", +"discourse.group", +"discourse.team", +"virtueeldomein.nl", +"cleverapps.io", +"*.lcl.dev", +"*.stg.dev", +"c66.me", +"cloud66.ws", +"cloud66.zone", +"jdevcloud.com", +"wpdevcloud.com", +"cloudaccess.host", +"freesite.host", +"cloudaccess.net", +"cloudcontrolled.com", +"cloudcontrolapp.com", +"cloudera.site", +"trycloudflare.com", +"workers.dev", +"wnext.app", +"co.ca", +"*.otap.co", +"co.cz", +"c.cdn77.org", +"cdn77-ssl.net", +"r.cdn77.net", +"rsc.cdn77.org", +"ssl.origin.cdn77-secure.org", +"cloudns.asia", +"cloudns.biz", +"cloudns.club", +"cloudns.cc", +"cloudns.eu", +"cloudns.in", +"cloudns.info", +"cloudns.org", +"cloudns.pro", +"cloudns.pw", +"cloudns.us", +"cloudeity.net", +"cnpy.gdn", +"co.nl", +"co.no", +"webhosting.be", +"hosting-cluster.nl", +"ac.ru", +"edu.ru", +"gov.ru", +"int.ru", +"mil.ru", +"test.ru", +"dyn.cosidns.de", +"dynamisches-dns.de", +"dnsupdater.de", +"internet-dns.de", +"l-o-g-i-n.de", +"dynamic-dns.info", +"feste-ip.net", +"knx-server.net", +"static-access.net", +"realm.cz", +"*.cryptonomic.net", +"cupcake.is", +"*.customer-oci.com", +"*.oci.customer-oci.com", +"*.ocp.customer-oci.com", +"*.ocs.customer-oci.com", +"cyon.link", +"cyon.site", +"daplie.me", +"localhost.daplie.me", +"dattolocal.com", +"dattorelay.com", +"dattoweb.com", +"mydatto.com", +"dattolocal.net", +"mydatto.net", +"biz.dk", +"co.dk", +"firm.dk", +"reg.dk", +"store.dk", +"*.dapps.earth", +"*.bzz.dapps.earth", +"builtwithdark.com", +"edgestack.me", +"debian.net", +"dedyn.io", +"dnshome.de", +"online.th", +"shop.th", +"drayddns.com", +"dreamhosters.com", +"mydrobo.com", +"drud.io", +"drud.us", +"duckdns.org", +"dy.fi", +"tunk.org", +"dyndns-at-home.com", +"dyndns-at-work.com", +"dyndns-blog.com", +"dyndns-free.com", +"dyndns-home.com", +"dyndns-ip.com", +"dyndns-mail.com", +"dyndns-office.com", +"dyndns-pics.com", +"dyndns-remote.com", +"dyndns-server.com", +"dyndns-web.com", +"dyndns-wiki.com", +"dyndns-work.com", +"dyndns.biz", +"dyndns.info", +"dyndns.org", +"dyndns.tv", +"at-band-camp.net", +"ath.cx", +"barrel-of-knowledge.info", +"barrell-of-knowledge.info", +"better-than.tv", +"blogdns.com", +"blogdns.net", +"blogdns.org", +"blogsite.org", +"boldlygoingnowhere.org", +"broke-it.net", +"buyshouses.net", +"cechire.com", +"dnsalias.com", +"dnsalias.net", +"dnsalias.org", +"dnsdojo.com", +"dnsdojo.net", +"dnsdojo.org", +"does-it.net", +"doesntexist.com", +"doesntexist.org", +"dontexist.com", +"dontexist.net", +"dontexist.org", +"doomdns.com", +"doomdns.org", +"dvrdns.org", +"dyn-o-saur.com", +"dynalias.com", +"dynalias.net", +"dynalias.org", +"dynathome.net", +"dyndns.ws", +"endofinternet.net", +"endofinternet.org", +"endoftheinternet.org", +"est-a-la-maison.com", +"est-a-la-masion.com", +"est-le-patron.com", +"est-mon-blogueur.com", +"for-better.biz", +"for-more.biz", +"for-our.info", +"for-some.biz", +"for-the.biz", +"forgot.her.name", +"forgot.his.name", +"from-ak.com", +"from-al.com", +"from-ar.com", +"from-az.net", +"from-ca.com", +"from-co.net", +"from-ct.com", +"from-dc.com", +"from-de.com", +"from-fl.com", +"from-ga.com", +"from-hi.com", +"from-ia.com", +"from-id.com", +"from-il.com", +"from-in.com", +"from-ks.com", +"from-ky.com", +"from-la.net", +"from-ma.com", +"from-md.com", +"from-me.org", +"from-mi.com", +"from-mn.com", +"from-mo.com", +"from-ms.com", +"from-mt.com", +"from-nc.com", +"from-nd.com", +"from-ne.com", +"from-nh.com", +"from-nj.com", +"from-nm.com", +"from-nv.com", +"from-ny.net", +"from-oh.com", +"from-ok.com", +"from-or.com", +"from-pa.com", +"from-pr.com", +"from-ri.com", +"from-sc.com", +"from-sd.com", +"from-tn.com", +"from-tx.com", +"from-ut.com", +"from-va.com", +"from-vt.com", +"from-wa.com", +"from-wi.com", +"from-wv.com", +"from-wy.com", +"ftpaccess.cc", +"fuettertdasnetz.de", +"game-host.org", +"game-server.cc", +"getmyip.com", +"gets-it.net", +"go.dyndns.org", +"gotdns.com", +"gotdns.org", +"groks-the.info", +"groks-this.info", +"ham-radio-op.net", +"here-for-more.info", +"hobby-site.com", +"hobby-site.org", +"home.dyndns.org", +"homedns.org", +"homeftp.net", +"homeftp.org", +"homeip.net", +"homelinux.com", +"homelinux.net", +"homelinux.org", +"homeunix.com", +"homeunix.net", +"homeunix.org", +"iamallama.com", +"in-the-band.net", +"is-a-anarchist.com", +"is-a-blogger.com", +"is-a-bookkeeper.com", +"is-a-bruinsfan.org", +"is-a-bulls-fan.com", +"is-a-candidate.org", +"is-a-caterer.com", +"is-a-celticsfan.org", +"is-a-chef.com", +"is-a-chef.net", +"is-a-chef.org", +"is-a-conservative.com", +"is-a-cpa.com", +"is-a-cubicle-slave.com", +"is-a-democrat.com", +"is-a-designer.com", +"is-a-doctor.com", +"is-a-financialadvisor.com", +"is-a-geek.com", +"is-a-geek.net", +"is-a-geek.org", +"is-a-green.com", +"is-a-guru.com", +"is-a-hard-worker.com", +"is-a-hunter.com", +"is-a-knight.org", +"is-a-landscaper.com", +"is-a-lawyer.com", +"is-a-liberal.com", +"is-a-libertarian.com", +"is-a-linux-user.org", +"is-a-llama.com", +"is-a-musician.com", +"is-a-nascarfan.com", +"is-a-nurse.com", +"is-a-painter.com", +"is-a-patsfan.org", +"is-a-personaltrainer.com", +"is-a-photographer.com", +"is-a-player.com", +"is-a-republican.com", +"is-a-rockstar.com", +"is-a-socialist.com", +"is-a-soxfan.org", +"is-a-student.com", +"is-a-teacher.com", +"is-a-techie.com", +"is-a-therapist.com", +"is-an-accountant.com", +"is-an-actor.com", +"is-an-actress.com", +"is-an-anarchist.com", +"is-an-artist.com", +"is-an-engineer.com", +"is-an-entertainer.com", +"is-by.us", +"is-certified.com", +"is-found.org", +"is-gone.com", +"is-into-anime.com", +"is-into-cars.com", +"is-into-cartoons.com", +"is-into-games.com", +"is-leet.com", +"is-lost.org", +"is-not-certified.com", +"is-saved.org", +"is-slick.com", +"is-uberleet.com", +"is-very-bad.org", +"is-very-evil.org", +"is-very-good.org", +"is-very-nice.org", +"is-very-sweet.org", +"is-with-theband.com", +"isa-geek.com", +"isa-geek.net", +"isa-geek.org", +"isa-hockeynut.com", +"issmarterthanyou.com", +"isteingeek.de", +"istmein.de", +"kicks-ass.net", +"kicks-ass.org", +"knowsitall.info", +"land-4-sale.us", +"lebtimnetz.de", +"leitungsen.de", +"likes-pie.com", +"likescandy.com", +"merseine.nu", +"mine.nu", +"misconfused.org", +"mypets.ws", +"myphotos.cc", +"neat-url.com", +"office-on-the.net", +"on-the-web.tv", +"podzone.net", +"podzone.org", +"readmyblog.org", +"saves-the-whales.com", +"scrapper-site.net", +"scrapping.cc", +"selfip.biz", +"selfip.com", +"selfip.info", +"selfip.net", +"selfip.org", +"sells-for-less.com", +"sells-for-u.com", +"sells-it.net", +"sellsyourhome.org", +"servebbs.com", +"servebbs.net", +"servebbs.org", +"serveftp.net", +"serveftp.org", +"servegame.org", +"shacknet.nu", +"simple-url.com", +"space-to-rent.com", +"stuff-4-sale.org", +"stuff-4-sale.us", +"teaches-yoga.com", +"thruhere.net", +"traeumtgerade.de", +"webhop.biz", +"webhop.info", +"webhop.net", +"webhop.org", +"worse-than.tv", +"writesthisblog.com", +"ddnss.de", +"dyn.ddnss.de", +"dyndns.ddnss.de", +"dyndns1.de", +"dyn-ip24.de", +"home-webserver.de", +"dyn.home-webserver.de", +"myhome-server.de", +"ddnss.org", +"definima.net", +"definima.io", +"bci.dnstrace.pro", +"ddnsfree.com", +"ddnsgeek.com", +"giize.com", +"gleeze.com", +"kozow.com", +"loseyourip.com", +"ooguy.com", +"theworkpc.com", +"casacam.net", +"dynu.net", +"accesscam.org", +"camdvr.org", +"freeddns.org", +"mywire.org", +"webredirect.org", +"myddns.rocks", +"blogsite.xyz", +"dynv6.net", +"e4.cz", +"en-root.fr", +"mytuleap.com", +"onred.one", +"staging.onred.one", +"enonic.io", +"customer.enonic.io", +"eu.org", +"al.eu.org", +"asso.eu.org", +"at.eu.org", +"au.eu.org", +"be.eu.org", +"bg.eu.org", +"ca.eu.org", +"cd.eu.org", +"ch.eu.org", +"cn.eu.org", +"cy.eu.org", +"cz.eu.org", +"de.eu.org", +"dk.eu.org", +"edu.eu.org", +"ee.eu.org", +"es.eu.org", +"fi.eu.org", +"fr.eu.org", +"gr.eu.org", +"hr.eu.org", +"hu.eu.org", +"ie.eu.org", +"il.eu.org", +"in.eu.org", +"int.eu.org", +"is.eu.org", +"it.eu.org", +"jp.eu.org", +"kr.eu.org", +"lt.eu.org", +"lu.eu.org", +"lv.eu.org", +"mc.eu.org", +"me.eu.org", +"mk.eu.org", +"mt.eu.org", +"my.eu.org", +"net.eu.org", +"ng.eu.org", +"nl.eu.org", +"no.eu.org", +"nz.eu.org", +"paris.eu.org", +"pl.eu.org", +"pt.eu.org", +"q-a.eu.org", +"ro.eu.org", +"ru.eu.org", +"se.eu.org", +"si.eu.org", +"sk.eu.org", +"tr.eu.org", +"uk.eu.org", +"us.eu.org", +"eu-1.evennode.com", +"eu-2.evennode.com", +"eu-3.evennode.com", +"eu-4.evennode.com", +"us-1.evennode.com", +"us-2.evennode.com", +"us-3.evennode.com", +"us-4.evennode.com", +"twmail.cc", +"twmail.net", +"twmail.org", +"mymailer.com.tw", +"url.tw", +"apps.fbsbx.com", +"ru.net", +"adygeya.ru", +"bashkiria.ru", +"bir.ru", +"cbg.ru", +"com.ru", +"dagestan.ru", +"grozny.ru", +"kalmykia.ru", +"kustanai.ru", +"marine.ru", +"mordovia.ru", +"msk.ru", +"mytis.ru", +"nalchik.ru", +"nov.ru", +"pyatigorsk.ru", +"spb.ru", +"vladikavkaz.ru", +"vladimir.ru", +"abkhazia.su", +"adygeya.su", +"aktyubinsk.su", +"arkhangelsk.su", +"armenia.su", +"ashgabad.su", +"azerbaijan.su", +"balashov.su", +"bashkiria.su", +"bryansk.su", +"bukhara.su", +"chimkent.su", +"dagestan.su", +"east-kazakhstan.su", +"exnet.su", +"georgia.su", +"grozny.su", +"ivanovo.su", +"jambyl.su", +"kalmykia.su", +"kaluga.su", +"karacol.su", +"karaganda.su", +"karelia.su", +"khakassia.su", +"krasnodar.su", +"kurgan.su", +"kustanai.su", +"lenug.su", +"mangyshlak.su", +"mordovia.su", +"msk.su", +"murmansk.su", +"nalchik.su", +"navoi.su", +"north-kazakhstan.su", +"nov.su", +"obninsk.su", +"penza.su", +"pokrovsk.su", +"sochi.su", +"spb.su", +"tashkent.su", +"termez.su", +"togliatti.su", +"troitsk.su", +"tselinograd.su", +"tula.su", +"tuva.su", +"vladikavkaz.su", +"vladimir.su", +"vologda.su", +"channelsdvr.net", +"u.channelsdvr.net", +"fastly-terrarium.com", +"fastlylb.net", +"map.fastlylb.net", +"freetls.fastly.net", +"map.fastly.net", +"a.prod.fastly.net", +"global.prod.fastly.net", +"a.ssl.fastly.net", +"b.ssl.fastly.net", +"global.ssl.fastly.net", +"fastpanel.direct", +"fastvps-server.com", +"fhapp.xyz", +"fedorainfracloud.org", +"fedorapeople.org", +"cloud.fedoraproject.org", +"app.os.fedoraproject.org", +"app.os.stg.fedoraproject.org", +"mydobiss.com", +"filegear.me", +"filegear-au.me", +"filegear-de.me", +"filegear-gb.me", +"filegear-ie.me", +"filegear-jp.me", +"filegear-sg.me", +"firebaseapp.com", +"flynnhub.com", +"flynnhosting.net", +"0e.vc", +"freebox-os.com", +"freeboxos.com", +"fbx-os.fr", +"fbxos.fr", +"freebox-os.fr", +"freeboxos.fr", +"freedesktop.org", +"*.futurecms.at", +"*.ex.futurecms.at", +"*.in.futurecms.at", +"futurehosting.at", +"futuremailing.at", +"*.ex.ortsinfo.at", +"*.kunden.ortsinfo.at", +"*.statics.cloud", +"service.gov.uk", +"gehirn.ne.jp", +"usercontent.jp", +"gentapps.com", +"lab.ms", +"github.io", +"githubusercontent.com", +"gitlab.io", +"glitch.me", +"lolipop.io", +"cloudapps.digital", +"london.cloudapps.digital", +"homeoffice.gov.uk", +"ro.im", +"shop.ro", +"goip.de", +"run.app", +"a.run.app", +"web.app", +"*.0emm.com", +"appspot.com", +"*.r.appspot.com", +"blogspot.ae", +"blogspot.al", +"blogspot.am", +"blogspot.ba", +"blogspot.be", +"blogspot.bg", +"blogspot.bj", +"blogspot.ca", +"blogspot.cf", +"blogspot.ch", +"blogspot.cl", +"blogspot.co.at", +"blogspot.co.id", +"blogspot.co.il", +"blogspot.co.ke", +"blogspot.co.nz", +"blogspot.co.uk", +"blogspot.co.za", +"blogspot.com", +"blogspot.com.ar", +"blogspot.com.au", +"blogspot.com.br", +"blogspot.com.by", +"blogspot.com.co", +"blogspot.com.cy", +"blogspot.com.ee", +"blogspot.com.eg", +"blogspot.com.es", +"blogspot.com.mt", +"blogspot.com.ng", +"blogspot.com.tr", +"blogspot.com.uy", +"blogspot.cv", +"blogspot.cz", +"blogspot.de", +"blogspot.dk", +"blogspot.fi", +"blogspot.fr", +"blogspot.gr", +"blogspot.hk", +"blogspot.hr", +"blogspot.hu", +"blogspot.ie", +"blogspot.in", +"blogspot.is", +"blogspot.it", +"blogspot.jp", +"blogspot.kr", +"blogspot.li", +"blogspot.lt", +"blogspot.lu", +"blogspot.md", +"blogspot.mk", +"blogspot.mr", +"blogspot.mx", +"blogspot.my", +"blogspot.nl", +"blogspot.no", +"blogspot.pe", +"blogspot.pt", +"blogspot.qa", +"blogspot.re", +"blogspot.ro", +"blogspot.rs", +"blogspot.ru", +"blogspot.se", +"blogspot.sg", +"blogspot.si", +"blogspot.sk", +"blogspot.sn", +"blogspot.td", +"blogspot.tw", +"blogspot.ug", +"blogspot.vn", +"cloudfunctions.net", +"cloud.goog", +"codespot.com", +"googleapis.com", +"googlecode.com", +"pagespeedmobilizer.com", +"publishproxy.com", +"withgoogle.com", +"withyoutube.com", +"awsmppl.com", +"fin.ci", +"free.hr", +"caa.li", +"ua.rs", +"conf.se", +"hs.zone", +"hs.run", +"hashbang.sh", +"hasura.app", +"hasura-app.io", +"hepforge.org", +"herokuapp.com", +"herokussl.com", +"myravendb.com", +"ravendb.community", +"ravendb.me", +"development.run", +"ravendb.run", +"bpl.biz", +"orx.biz", +"ng.city", +"biz.gl", +"ng.ink", +"col.ng", +"firm.ng", +"gen.ng", +"ltd.ng", +"ngo.ng", +"ng.school", +"sch.so", +"häkkinen.fi", +"*.moonscale.io", +"moonscale.net", +"iki.fi", +"dyn-berlin.de", +"in-berlin.de", +"in-brb.de", +"in-butter.de", +"in-dsl.de", +"in-dsl.net", +"in-dsl.org", +"in-vpn.de", +"in-vpn.net", +"in-vpn.org", +"biz.at", +"info.at", +"info.cx", +"ac.leg.br", +"al.leg.br", +"am.leg.br", +"ap.leg.br", +"ba.leg.br", +"ce.leg.br", +"df.leg.br", +"es.leg.br", +"go.leg.br", +"ma.leg.br", +"mg.leg.br", +"ms.leg.br", +"mt.leg.br", +"pa.leg.br", +"pb.leg.br", +"pe.leg.br", +"pi.leg.br", +"pr.leg.br", +"rj.leg.br", +"rn.leg.br", +"ro.leg.br", +"rr.leg.br", +"rs.leg.br", +"sc.leg.br", +"se.leg.br", +"sp.leg.br", +"to.leg.br", +"pixolino.com", +"ipifony.net", +"mein-iserv.de", +"test-iserv.de", +"iserv.dev", +"iobb.net", +"myjino.ru", +"*.hosting.myjino.ru", +"*.landing.myjino.ru", +"*.spectrum.myjino.ru", +"*.vps.myjino.ru", +"*.triton.zone", +"*.cns.joyent.com", +"js.org", +"kaas.gg", +"khplay.nl", +"keymachine.de", +"kinghost.net", +"uni5.net", +"knightpoint.systems", +"oya.to", +"co.krd", +"edu.krd", +"git-repos.de", +"lcube-server.de", +"svn-repos.de", +"leadpages.co", +"lpages.co", +"lpusercontent.com", +"lelux.site", +"co.business", +"co.education", +"co.events", +"co.financial", +"co.network", +"co.place", +"co.technology", +"app.lmpm.com", +"linkitools.space", +"linkyard.cloud", +"linkyard-cloud.ch", +"members.linode.com", +"nodebalancer.linode.com", +"we.bs", +"loginline.app", +"loginline.dev", +"loginline.io", +"loginline.services", +"loginline.site", +"krasnik.pl", +"leczna.pl", +"lubartow.pl", +"lublin.pl", +"poniatowa.pl", +"swidnik.pl", +"uklugs.org", +"glug.org.uk", +"lug.org.uk", +"lugs.org.uk", +"barsy.bg", +"barsy.co.uk", +"barsyonline.co.uk", +"barsycenter.com", +"barsyonline.com", +"barsy.club", +"barsy.de", +"barsy.eu", +"barsy.in", +"barsy.info", +"barsy.io", +"barsy.me", +"barsy.menu", +"barsy.mobi", +"barsy.net", +"barsy.online", +"barsy.org", +"barsy.pro", +"barsy.pub", +"barsy.shop", +"barsy.site", +"barsy.support", +"barsy.uk", +"*.magentosite.cloud", +"mayfirst.info", +"mayfirst.org", +"hb.cldmail.ru", +"miniserver.com", +"memset.net", +"cloud.metacentrum.cz", +"custom.metacentrum.cz", +"flt.cloud.muni.cz", +"usr.cloud.muni.cz", +"meteorapp.com", +"eu.meteorapp.com", +"co.pl", +"azurecontainer.io", +"azurewebsites.net", +"azure-mobile.net", +"cloudapp.net", +"mozilla-iot.org", +"bmoattachments.org", +"net.ru", +"org.ru", +"pp.ru", +"ui.nabu.casa", +"pony.club", +"of.fashion", +"on.fashion", +"of.football", +"in.london", +"of.london", +"for.men", +"and.mom", +"for.mom", +"for.one", +"for.sale", +"of.work", +"to.work", +"nctu.me", +"bitballoon.com", +"netlify.com", +"4u.com", +"ngrok.io", +"nh-serv.co.uk", +"nfshost.com", +"dnsking.ch", +"mypi.co", +"n4t.co", +"001www.com", +"ddnslive.com", +"myiphost.com", +"forumz.info", +"16-b.it", +"32-b.it", +"64-b.it", +"soundcast.me", +"tcp4.me", +"dnsup.net", +"hicam.net", +"now-dns.net", +"ownip.net", +"vpndns.net", +"dynserv.org", +"now-dns.org", +"x443.pw", +"now-dns.top", +"ntdll.top", +"freeddns.us", +"crafting.xyz", +"zapto.xyz", +"nsupdate.info", +"nerdpol.ovh", +"blogsyte.com", +"brasilia.me", +"cable-modem.org", +"ciscofreak.com", +"collegefan.org", +"couchpotatofries.org", +"damnserver.com", +"ddns.me", +"ditchyourip.com", +"dnsfor.me", +"dnsiskinky.com", +"dvrcam.info", +"dynns.com", +"eating-organic.net", +"fantasyleague.cc", +"geekgalaxy.com", +"golffan.us", +"health-carereform.com", +"homesecuritymac.com", +"homesecuritypc.com", +"hopto.me", +"ilovecollege.info", +"loginto.me", +"mlbfan.org", +"mmafan.biz", +"myactivedirectory.com", +"mydissent.net", +"myeffect.net", +"mymediapc.net", +"mypsx.net", +"mysecuritycamera.com", +"mysecuritycamera.net", +"mysecuritycamera.org", +"net-freaks.com", +"nflfan.org", +"nhlfan.net", +"no-ip.ca", +"no-ip.co.uk", +"no-ip.net", +"noip.us", +"onthewifi.com", +"pgafan.net", +"point2this.com", +"pointto.us", +"privatizehealthinsurance.net", +"quicksytes.com", +"read-books.org", +"securitytactics.com", +"serveexchange.com", +"servehumour.com", +"servep2p.com", +"servesarcasm.com", +"stufftoread.com", +"ufcfan.org", +"unusualperson.com", +"workisboring.com", +"3utilities.com", +"bounceme.net", +"ddns.net", +"ddnsking.com", +"gotdns.ch", +"hopto.org", +"myftp.biz", +"myftp.org", +"myvnc.com", +"no-ip.biz", +"no-ip.info", +"no-ip.org", +"noip.me", +"redirectme.net", +"servebeer.com", +"serveblog.net", +"servecounterstrike.com", +"serveftp.com", +"servegame.com", +"servehalflife.com", +"servehttp.com", +"serveirc.com", +"serveminecraft.net", +"servemp3.com", +"servepics.com", +"servequake.com", +"sytes.net", +"webhop.me", +"zapto.org", +"stage.nodeart.io", +"nodum.co", +"nodum.io", +"pcloud.host", +"nyc.mn", +"nom.ae", +"nom.af", +"nom.ai", +"nom.al", +"nym.by", +"nom.bz", +"nym.bz", +"nom.cl", +"nym.ec", +"nom.gd", +"nom.ge", +"nom.gl", +"nym.gr", +"nom.gt", +"nym.gy", +"nym.hk", +"nom.hn", +"nym.ie", +"nom.im", +"nom.ke", +"nym.kz", +"nym.la", +"nym.lc", +"nom.li", +"nym.li", +"nym.lt", +"nym.lu", +"nom.lv", +"nym.me", +"nom.mk", +"nym.mn", +"nym.mx", +"nom.nu", +"nym.nz", +"nym.pe", +"nym.pt", +"nom.pw", +"nom.qa", +"nym.ro", +"nom.rs", +"nom.si", +"nym.sk", +"nom.st", +"nym.su", +"nym.sx", +"nom.tj", +"nym.tw", +"nom.ug", +"nom.uy", +"nom.vc", +"nom.vg", +"static.observableusercontent.com", +"cya.gg", +"cloudycluster.net", +"nid.io", +"opencraft.hosting", +"operaunite.com", +"skygearapp.com", +"outsystemscloud.com", +"ownprovider.com", +"own.pm", +"ox.rs", +"oy.lc", +"pgfog.com", +"pagefrontapp.com", +"art.pl", +"gliwice.pl", +"krakow.pl", +"poznan.pl", +"wroc.pl", +"zakopane.pl", +"pantheonsite.io", +"gotpantheon.com", +"mypep.link", +"perspecta.cloud", +"on-web.fr", +"*.platform.sh", +"*.platformsh.site", +"dyn53.io", +"co.bn", +"xen.prgmr.com", +"priv.at", +"prvcy.page", +"*.dweb.link", +"protonet.io", +"chirurgiens-dentistes-en-france.fr", +"byen.site", +"pubtls.org", +"qualifioapp.com", +"qbuser.com", +"instantcloud.cn", +"ras.ru", +"qa2.com", +"qcx.io", +"*.sys.qcx.io", +"dev-myqnapcloud.com", +"alpha-myqnapcloud.com", +"myqnapcloud.com", +"*.quipelements.com", +"vapor.cloud", +"vaporcloud.io", +"rackmaze.com", +"rackmaze.net", +"*.on-k3s.io", +"*.on-rancher.cloud", +"*.on-rio.io", +"readthedocs.io", +"rhcloud.com", +"app.render.com", +"onrender.com", +"repl.co", +"repl.run", +"resindevice.io", +"devices.resinstaging.io", +"hzc.io", +"wellbeingzone.eu", +"ptplus.fit", +"wellbeingzone.co.uk", +"git-pages.rit.edu", +"sandcats.io", +"logoip.de", +"logoip.com", +"schokokeks.net", +"gov.scot", +"scrysec.com", +"firewall-gateway.com", +"firewall-gateway.de", +"my-gateway.de", +"my-router.de", +"spdns.de", +"spdns.eu", +"firewall-gateway.net", +"my-firewall.org", +"myfirewall.org", +"spdns.org", +"senseering.net", +"biz.ua", +"co.ua", +"pp.ua", +"shiftedit.io", +"myshopblocks.com", +"shopitsite.com", +"mo-siemens.io", +"1kapp.com", +"appchizi.com", +"applinzi.com", +"sinaapp.com", +"vipsinaapp.com", +"siteleaf.net", +"bounty-full.com", +"alpha.bounty-full.com", +"beta.bounty-full.com", +"stackhero-network.com", +"static.land", +"dev.static.land", +"sites.static.land", +"apps.lair.io", +"*.stolos.io", +"spacekit.io", +"customer.speedpartner.de", +"api.stdlib.com", +"storj.farm", +"utwente.io", +"soc.srcf.net", +"user.srcf.net", +"temp-dns.com", +"applicationcloud.io", +"scapp.io", +"*.s5y.io", +"*.sensiosite.cloud", +"syncloud.it", +"diskstation.me", +"dscloud.biz", +"dscloud.me", +"dscloud.mobi", +"dsmynas.com", +"dsmynas.net", +"dsmynas.org", +"familyds.com", +"familyds.net", +"familyds.org", +"i234.me", +"myds.me", +"synology.me", +"vpnplus.to", +"direct.quickconnect.to", +"taifun-dns.de", +"gda.pl", +"gdansk.pl", +"gdynia.pl", +"med.pl", +"sopot.pl", +"edugit.org", +"telebit.app", +"telebit.io", +"*.telebit.xyz", +"gwiddle.co.uk", +"thingdustdata.com", +"cust.dev.thingdust.io", +"cust.disrec.thingdust.io", +"cust.prod.thingdust.io", +"cust.testing.thingdust.io", +"arvo.network", +"azimuth.network", +"bloxcms.com", +"townnews-staging.com", +"12hp.at", +"2ix.at", +"4lima.at", +"lima-city.at", +"12hp.ch", +"2ix.ch", +"4lima.ch", +"lima-city.ch", +"trafficplex.cloud", +"de.cool", +"12hp.de", +"2ix.de", +"4lima.de", +"lima-city.de", +"1337.pictures", +"clan.rip", +"lima-city.rocks", +"webspace.rocks", +"lima.zone", +"*.transurl.be", +"*.transurl.eu", +"*.transurl.nl", +"tuxfamily.org", +"dd-dns.de", +"diskstation.eu", +"diskstation.org", +"dray-dns.de", +"draydns.de", +"dyn-vpn.de", +"dynvpn.de", +"mein-vigor.de", +"my-vigor.de", +"my-wan.de", +"syno-ds.de", +"synology-diskstation.de", +"synology-ds.de", +"uber.space", +"*.uberspace.de", +"hk.com", +"hk.org", +"ltd.hk", +"inc.hk", +"virtualuser.de", +"virtual-user.de", +"urown.cloud", +"dnsupdate.info", +"lib.de.us", +"2038.io", +"router.management", +"v-info.info", +"voorloper.cloud", +"v.ua", +"wafflecell.com", +"*.webhare.dev", +"wedeploy.io", +"wedeploy.me", +"wedeploy.sh", +"remotewd.com", +"wmflabs.org", +"myforum.community", +"community-pro.de", +"diskussionsbereich.de", +"community-pro.net", +"meinforum.net", +"half.host", +"xnbay.com", +"u2.xnbay.com", +"u2-local.xnbay.com", +"cistron.nl", +"demon.nl", +"xs4all.space", +"yandexcloud.net", +"storage.yandexcloud.net", +"website.yandexcloud.net", +"official.academy", +"yolasite.com", +"ybo.faith", +"yombo.me", +"homelink.one", +"ybo.party", +"ybo.review", +"ybo.science", +"ybo.trade", +"nohost.me", +"noho.st", +"za.net", +"za.org", +"now.sh", +"bss.design", +"basicserver.io", +"virtualserver.io", +"enterprisecloud.nu" +] \ No newline at end of file diff --git a/node_modules/psl/dist/psl.js b/node_modules/psl/dist/psl.js new file mode 100644 index 000000000..f4b9b8925 --- /dev/null +++ b/node_modules/psl/dist/psl.js @@ -0,0 +1,9645 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.psl = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= punySuffix.length) { + // return memo; + // } + //} + return rule; + }, null); +}; + + +// +// Error codes and messages. +// +exports.errorCodes = { + DOMAIN_TOO_SHORT: 'Domain name too short.', + DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', + LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', + LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', + LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', + LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', + LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' +}; + + +// +// Validate domain name and throw if not valid. +// +// From wikipedia: +// +// Hostnames are composed of series of labels concatenated with dots, as are all +// domain names. Each label must be between 1 and 63 characters long, and the +// entire hostname (including the delimiting dots) has a maximum of 255 chars. +// +// Allowed chars: +// +// * `a-z` +// * `0-9` +// * `-` but not as a starting or ending character +// * `.` as a separator for the textual portions of a domain name +// +// * http://en.wikipedia.org/wiki/Domain_name +// * http://en.wikipedia.org/wiki/Hostname +// +internals.validate = function (input) { + + // Before we can validate we need to take care of IDNs with unicode chars. + var ascii = Punycode.toASCII(input); + + if (ascii.length < 1) { + return 'DOMAIN_TOO_SHORT'; + } + if (ascii.length > 255) { + return 'DOMAIN_TOO_LONG'; + } + + // Check each part's length and allowed chars. + var labels = ascii.split('.'); + var label; + + for (var i = 0; i < labels.length; ++i) { + label = labels[i]; + if (!label.length) { + return 'LABEL_TOO_SHORT'; + } + if (label.length > 63) { + return 'LABEL_TOO_LONG'; + } + if (label.charAt(0) === '-') { + return 'LABEL_STARTS_WITH_DASH'; + } + if (label.charAt(label.length - 1) === '-') { + return 'LABEL_ENDS_WITH_DASH'; + } + if (!/^[a-z0-9\-]+$/.test(label)) { + return 'LABEL_INVALID_CHARS'; + } + } +}; + + +// +// Public API +// + + +// +// Parse domain. +// +exports.parse = function (input) { + + if (typeof input !== 'string') { + throw new TypeError('Domain name must be a string.'); + } + + // Force domain to lowercase. + var domain = input.slice(0).toLowerCase(); + + // Handle FQDN. + // TODO: Simply remove trailing dot? + if (domain.charAt(domain.length - 1) === '.') { + domain = domain.slice(0, domain.length - 1); + } + + // Validate and sanitise input. + var error = internals.validate(domain); + if (error) { + return { + input: input, + error: { + message: exports.errorCodes[error], + code: error + } + }; + } + + var parsed = { + input: input, + tld: null, + sld: null, + domain: null, + subdomain: null, + listed: false + }; + + var domainParts = domain.split('.'); + + // Non-Internet TLD + if (domainParts[domainParts.length - 1] === 'local') { + return parsed; + } + + var handlePunycode = function () { + + if (!/xn--/.test(domain)) { + return parsed; + } + if (parsed.domain) { + parsed.domain = Punycode.toASCII(parsed.domain); + } + if (parsed.subdomain) { + parsed.subdomain = Punycode.toASCII(parsed.subdomain); + } + return parsed; + }; + + var rule = internals.findRule(domain); + + // Unlisted tld. + if (!rule) { + if (domainParts.length < 2) { + return parsed; + } + parsed.tld = domainParts.pop(); + parsed.sld = domainParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + if (domainParts.length) { + parsed.subdomain = domainParts.pop(); + } + return handlePunycode(); + } + + // At this point we know the public suffix is listed. + parsed.listed = true; + + var tldParts = rule.suffix.split('.'); + var privateParts = domainParts.slice(0, domainParts.length - tldParts.length); + + if (rule.exception) { + privateParts.push(tldParts.shift()); + } + + parsed.tld = tldParts.join('.'); + + if (!privateParts.length) { + return handlePunycode(); + } + + if (rule.wildcard) { + tldParts.unshift(privateParts.pop()); + parsed.tld = tldParts.join('.'); + } + + if (!privateParts.length) { + return handlePunycode(); + } + + parsed.sld = privateParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + + if (privateParts.length) { + parsed.subdomain = privateParts.join('.'); + } + + return handlePunycode(); +}; + + +// +// Get domain. +// +exports.get = function (domain) { + + if (!domain) { + return null; + } + return exports.parse(domain).domain || null; +}; + + +// +// Check whether domain belongs to a known public suffix. +// +exports.isValid = function (domain) { + + var parsed = exports.parse(domain); + return Boolean(parsed.domain && parsed.listed); +}; + +},{"./data/rules.json":1,"punycode":3}],3:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}]},{},[2])(2) +}); diff --git a/node_modules/psl/dist/psl.min.js b/node_modules/psl/dist/psl.min.js new file mode 100644 index 000000000..d5c787e48 --- /dev/null +++ b/node_modules/psl/dist/psl.min.js @@ -0,0 +1 @@ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).psl=a()}}(function(){return function s(m,t,u){function r(o,a){if(!t[o]){if(!m[o]){var i="function"==typeof require&&require;if(!a&&i)return i(o,!0);if(p)return p(o,!0);var e=new Error("Cannot find module '"+o+"'");throw e.code="MODULE_NOT_FOUND",e}var n=t[o]={exports:{}};m[o][0].call(n.exports,function(a){return r(m[o][1][a]||a)},n,n.exports,s,m,t,u)}return t[o].exports}for(var p="function"==typeof require&&require,a=0;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=b-y,x=Math.floor,q=String.fromCharCode;function A(a){throw new RangeError(k[a])}function l(a,o){for(var i=a.length,e=[];i--;)e[i]=o(a[i]);return e}function g(a,o){var i=a.split("@"),e="";return 1>>10&1023|55296),a=56320|1023&a),o+=q(a)}).join("")}function L(a,o){return a+22+75*(a<26)-((0!=o)<<5)}function I(a,o,i){var e=0;for(a=i?x(a/t):a>>1,a+=x(a/o);c*f>>1x((d-g)/m))&&A("overflow"),g+=u*m,!(u<(r=t<=j?y:j+f<=t?f:t-j));t+=b)m>x(d/(p=b-r))&&A("overflow"),m*=p;j=I(g-s,o=c.length+1,0==s),x(g/o)>d-h&&A("overflow"),h+=x(g/o),g%=o,c.splice(g++,0,h)}return _(c)}function j(a){var o,i,e,n,s,m,t,u,r,p,k,c,l,g,h,j=[];for(c=(a=O(a)).length,o=w,s=v,m=i=0;mx((d-i)/(l=e+1))&&A("overflow"),i+=(t-o)*l,o=t,m=0;md&&A("overflow"),k==o){for(u=i,r=b;!(u<(p=r<=s?y:s+f<=r?f:r-s));r+=b)h=u-p,g=b-p,j.push(q(L(p+h%g,0))),u=x(h/g);j.push(q(L(u,0))),s=I(i,l,e==n),i=0,++e}++i,++o}return j.join("")}if(n={version:"1.4.1",ucs2:{decode:O,encode:_},decode:h,encode:j,toASCII:function(a){return g(a,function(a){return r.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return g(a,function(a){return u.test(a)?h(a.slice(4).toLowerCase()):a})}},0,o&&i)if(T.exports==o)i.exports=n;else for(s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);else a.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)}); diff --git a/node_modules/psl/index.js b/node_modules/psl/index.js new file mode 100644 index 000000000..da7bc1213 --- /dev/null +++ b/node_modules/psl/index.js @@ -0,0 +1,269 @@ +/*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */ +'use strict'; + + +var Punycode = require('punycode'); + + +var internals = {}; + + +// +// Read rules from file. +// +internals.rules = require('./data/rules.json').map(function (rule) { + + return { + rule: rule, + suffix: rule.replace(/^(\*\.|\!)/, ''), + punySuffix: -1, + wildcard: rule.charAt(0) === '*', + exception: rule.charAt(0) === '!' + }; +}); + + +// +// Check is given string ends with `suffix`. +// +internals.endsWith = function (str, suffix) { + + return str.indexOf(suffix, str.length - suffix.length) !== -1; +}; + + +// +// Find rule for a given domain. +// +internals.findRule = function (domain) { + + var punyDomain = Punycode.toASCII(domain); + return internals.rules.reduce(function (memo, rule) { + + if (rule.punySuffix === -1){ + rule.punySuffix = Punycode.toASCII(rule.suffix); + } + if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) { + return memo; + } + // This has been commented out as it never seems to run. This is because + // sub tlds always appear after their parents and we never find a shorter + // match. + //if (memo) { + // var memoSuffix = Punycode.toASCII(memo.suffix); + // if (memoSuffix.length >= punySuffix.length) { + // return memo; + // } + //} + return rule; + }, null); +}; + + +// +// Error codes and messages. +// +exports.errorCodes = { + DOMAIN_TOO_SHORT: 'Domain name too short.', + DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', + LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', + LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', + LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', + LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', + LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' +}; + + +// +// Validate domain name and throw if not valid. +// +// From wikipedia: +// +// Hostnames are composed of series of labels concatenated with dots, as are all +// domain names. Each label must be between 1 and 63 characters long, and the +// entire hostname (including the delimiting dots) has a maximum of 255 chars. +// +// Allowed chars: +// +// * `a-z` +// * `0-9` +// * `-` but not as a starting or ending character +// * `.` as a separator for the textual portions of a domain name +// +// * http://en.wikipedia.org/wiki/Domain_name +// * http://en.wikipedia.org/wiki/Hostname +// +internals.validate = function (input) { + + // Before we can validate we need to take care of IDNs with unicode chars. + var ascii = Punycode.toASCII(input); + + if (ascii.length < 1) { + return 'DOMAIN_TOO_SHORT'; + } + if (ascii.length > 255) { + return 'DOMAIN_TOO_LONG'; + } + + // Check each part's length and allowed chars. + var labels = ascii.split('.'); + var label; + + for (var i = 0; i < labels.length; ++i) { + label = labels[i]; + if (!label.length) { + return 'LABEL_TOO_SHORT'; + } + if (label.length > 63) { + return 'LABEL_TOO_LONG'; + } + if (label.charAt(0) === '-') { + return 'LABEL_STARTS_WITH_DASH'; + } + if (label.charAt(label.length - 1) === '-') { + return 'LABEL_ENDS_WITH_DASH'; + } + if (!/^[a-z0-9\-]+$/.test(label)) { + return 'LABEL_INVALID_CHARS'; + } + } +}; + + +// +// Public API +// + + +// +// Parse domain. +// +exports.parse = function (input) { + + if (typeof input !== 'string') { + throw new TypeError('Domain name must be a string.'); + } + + // Force domain to lowercase. + var domain = input.slice(0).toLowerCase(); + + // Handle FQDN. + // TODO: Simply remove trailing dot? + if (domain.charAt(domain.length - 1) === '.') { + domain = domain.slice(0, domain.length - 1); + } + + // Validate and sanitise input. + var error = internals.validate(domain); + if (error) { + return { + input: input, + error: { + message: exports.errorCodes[error], + code: error + } + }; + } + + var parsed = { + input: input, + tld: null, + sld: null, + domain: null, + subdomain: null, + listed: false + }; + + var domainParts = domain.split('.'); + + // Non-Internet TLD + if (domainParts[domainParts.length - 1] === 'local') { + return parsed; + } + + var handlePunycode = function () { + + if (!/xn--/.test(domain)) { + return parsed; + } + if (parsed.domain) { + parsed.domain = Punycode.toASCII(parsed.domain); + } + if (parsed.subdomain) { + parsed.subdomain = Punycode.toASCII(parsed.subdomain); + } + return parsed; + }; + + var rule = internals.findRule(domain); + + // Unlisted tld. + if (!rule) { + if (domainParts.length < 2) { + return parsed; + } + parsed.tld = domainParts.pop(); + parsed.sld = domainParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + if (domainParts.length) { + parsed.subdomain = domainParts.pop(); + } + return handlePunycode(); + } + + // At this point we know the public suffix is listed. + parsed.listed = true; + + var tldParts = rule.suffix.split('.'); + var privateParts = domainParts.slice(0, domainParts.length - tldParts.length); + + if (rule.exception) { + privateParts.push(tldParts.shift()); + } + + parsed.tld = tldParts.join('.'); + + if (!privateParts.length) { + return handlePunycode(); + } + + if (rule.wildcard) { + tldParts.unshift(privateParts.pop()); + parsed.tld = tldParts.join('.'); + } + + if (!privateParts.length) { + return handlePunycode(); + } + + parsed.sld = privateParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + + if (privateParts.length) { + parsed.subdomain = privateParts.join('.'); + } + + return handlePunycode(); +}; + + +// +// Get domain. +// +exports.get = function (domain) { + + if (!domain) { + return null; + } + return exports.parse(domain).domain || null; +}; + + +// +// Check whether domain belongs to a known public suffix. +// +exports.isValid = function (domain) { + + var parsed = exports.parse(domain); + return Boolean(parsed.domain && parsed.listed); +}; diff --git a/node_modules/psl/package.json b/node_modules/psl/package.json new file mode 100644 index 000000000..c14733a5e --- /dev/null +++ b/node_modules/psl/package.json @@ -0,0 +1,78 @@ +{ + "_from": "psl@^1.1.28", + "_id": "psl@1.8.0", + "_inBundle": false, + "_integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "_location": "/psl", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "psl@^1.1.28", + "name": "psl", + "escapedName": "psl", + "rawSpec": "^1.1.28", + "saveSpec": null, + "fetchSpec": "^1.1.28" + }, + "_requiredBy": [ + "/@azure/core-http/tough-cookie", + "/tough-cookie" + ], + "_resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "_shasum": "9326f8bcfb013adcc005fdff056acce020e51c24", + "_spec": "psl@^1.1.28", + "_where": "/home/chris/src/github.com/github/codeql-action/node_modules/tough-cookie", + "author": { + "name": "Lupo Montero", + "email": "lupomontero@gmail.com", + "url": "https://lupomontero.com/" + }, + "bugs": { + "url": "https://github.com/lupomontero/psl/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Domain name parser based on the Public Suffix List", + "devDependencies": { + "JSONStream": "^1.3.5", + "browserify": "^16.5.0", + "commit-and-pr": "^1.0.4", + "eslint": "^6.8.0", + "eslint-config-hapi": "^12.0.0", + "eslint-plugin-hapi": "^4.1.0", + "karma": "^4.4.1", + "karma-browserify": "^7.0.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.5", + "karma-phantomjs-launcher": "^1.0.4", + "mocha": "^7.1.1", + "phantomjs-prebuilt": "^2.1.16", + "request": "^2.88.2", + "uglify-js": "^3.8.0", + "watchify": "^3.11.1" + }, + "homepage": "https://github.com/lupomontero/psl#readme", + "keywords": [ + "publicsuffix", + "publicsuffixlist" + ], + "license": "MIT", + "main": "index.js", + "name": "psl", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/lupomontero/psl.git" + }, + "scripts": { + "build": "browserify ./index.js --standalone=psl > ./dist/psl.js", + "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\"", + "commit-and-pr": "commit-and-pr", + "postbuild": "cat ./dist/psl.js | uglifyjs -c -m > ./dist/psl.min.js", + "prebuild": "./scripts/update-rules.js", + "pretest": "eslint .", + "test": "mocha test && karma start ./karma.conf.js --single-run", + "watch": "mocha test --watch" + }, + "version": "1.8.0" +} diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json index 638a6a24d..7273ed9f4 100644 --- a/node_modules/pump/package.json +++ b/node_modules/pump/package.json @@ -1,24 +1,64 @@ { - "name": "pump", - "version": "3.0.0", - "repository": "git://github.com/mafintosh/pump.git", - "license": "MIT", - "description": "pipe streams together and close all of them if one of them closes", + "_args": [ + [ + "pump@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pump@3.0.0", + "_id": "pump@3.0.0", + "_inBundle": false, + "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "_location": "/pump", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pump@3.0.0", + "name": "pump", + "escapedName": "pump", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/cacheable-request/get-stream", + "/get-stream" + ], + "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, "browser": { "fs": false }, + "bugs": { + "url": "https://github.com/mafintosh/pump/issues" + }, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "description": "pipe streams together and close all of them if one of them closes", + "homepage": "https://github.com/mafintosh/pump#readme", "keywords": [ "streams", "pipe", "destroy", "callback" ], - "author": "Mathias Buus Madsen ", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "license": "MIT", + "name": "pump", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pump.git" }, "scripts": { "test": "node test-browser.js && node test-node.js" - } -} \ No newline at end of file + }, + "version": "3.0.0" +} diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json index 1d21784d7..dc0c7d44a 100644 --- a/node_modules/punycode/package.json +++ b/node_modules/punycode/package.json @@ -1,14 +1,71 @@ { - "name": "punycode", - "version": "2.1.1", + "_args": [ + [ + "punycode@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "punycode@2.1.1", + "_id": "punycode@2.1.1", + "_inBundle": false, + "_integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "_location": "/punycode", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "punycode@2.1.1", + "name": "punycode", + "escapedName": "punycode", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/@azure/core-http/tough-cookie", + "/tough-cookie", + "/uri-js" + ], + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", + "devDependencies": { + "codecov": "^1.0.1", + "istanbul": "^0.4.1", + "mocha": "^2.5.3" + }, "engines": { "node": ">=6" }, + "files": [ + "LICENSE-MIT.txt", + "punycode.js", + "punycode.es6.js" + ], + "homepage": "https://mths.be/punycode", + "jsnext:main": "punycode.es6.js", + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + }, "keywords": [ "punycode", "unicode", @@ -19,40 +76,16 @@ "domain" ], "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], + "main": "punycode.js", + "module": "punycode.es6.js", + "name": "punycode", "repository": { "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git" + "url": "git+https://github.com/bestiejs/punycode.js.git" }, - "bugs": "https://github.com/bestiejs/punycode.js/issues", - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], "scripts": { - "test": "mocha tests", - "prepublish": "node scripts/prepublish.js" + "prepublish": "node scripts/prepublish.js", + "test": "mocha tests" }, - "devDependencies": { - "codecov": "^1.0.1", - "istanbul": "^0.4.1", - "mocha": "^2.5.3" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - } -} \ No newline at end of file + "version": "2.1.1" +} diff --git a/node_modules/pupa/package.json b/node_modules/pupa/package.json index 0bb8cca69..e1f4dc782 100644 --- a/node_modules/pupa/package.json +++ b/node_modules/pupa/package.json @@ -1,24 +1,58 @@ { - "name": "pupa", - "version": "2.0.1", - "description": "Simple micro templating", - "license": "MIT", - "repository": "sindresorhus/pupa", + "_args": [ + [ + "pupa@2.0.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pupa@2.0.1", + "_id": "pupa@2.0.1", + "_inBundle": false, + "_integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "_location": "/pupa", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pupa@2.0.1", + "name": "pupa", + "escapedName": "pupa", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pupa/issues" + }, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "description": "Simple micro templating", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/pupa#readme", "keywords": [ "string", "formatting", @@ -36,12 +70,14 @@ "transform", "micro" ], - "dependencies": { - "escape-goat": "^2.0.0" + "license": "MIT", + "name": "pupa", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pupa.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.0.1" +} diff --git a/node_modules/rc/package.json b/node_modules/rc/package.json index 07a1a16b0..d65781b5e 100644 --- a/node_modules/rc/package.json +++ b/node_modules/rc/package.json @@ -1,29 +1,69 @@ { - "name": "rc", - "version": "1.2.8", - "description": "hardwired configuration loader", - "main": "index.js", + "_args": [ + [ + "rc@1.2.8", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "rc@1.2.8", + "_id": "rc@1.2.8", + "_inBundle": false, + "_integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "_location": "/rc", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "rc@1.2.8", + "name": "rc", + "escapedName": "rc", + "rawSpec": "1.2.8", + "saveSpec": null, + "fetchSpec": "1.2.8" + }, + "_requiredBy": [ + "/registry-auth-token", + "/registry-url" + ], + "_resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "_spec": "1.2.8", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bin": { + "rc": "cli.js" + }, "browser": "browser.js", - "scripts": { - "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js" + "bugs": { + "url": "https://github.com/dominictarr/rc/issues" }, - "repository": { - "type": "git", - "url": "https://github.com/dominictarr/rc.git" + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "description": "hardwired configuration loader", + "homepage": "https://github.com/dominictarr/rc#readme", "keywords": [ "config", "rc", "unix", "defaults" ], - "bin": "./cli.js", - "author": "Dominic Tarr (dominictarr.com)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } -} \ No newline at end of file + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "main": "index.js", + "name": "rc", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/rc.git" + }, + "scripts": { + "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js" + }, + "version": "1.2.8" +} diff --git a/node_modules/read-pkg-up/node_modules/find-up/package.json b/node_modules/read-pkg-up/node_modules/find-up/package.json index 7ec1b7ef8..0d640783d 100644 --- a/node_modules/read-pkg-up/node_modules/find-up/package.json +++ b/node_modules/read-pkg-up/node_modules/find-up/package.json @@ -1,23 +1,57 @@ { - "name": "find-up", - "version": "2.1.0", - "description": "Find a file by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", + "_args": [ + [ + "find-up@2.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "find-up@2.1.0", + "_id": "find-up@2.1.0", + "_inBundle": false, + "_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "_location": "/read-pkg-up/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "find-up@2.1.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/read-pkg-up" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "dependencies": { + "locate-path": "^2.0.0" + }, + "description": "Find a file by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/find-up#readme", "keywords": [ "find", "up", @@ -39,15 +73,17 @@ "walking", "path" ], - "dependencies": { - "locate-path": "^2.0.0" + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" }, - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.1.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/load-json-file/package.json b/node_modules/read-pkg-up/node_modules/load-json-file/package.json index 88b29bb39..a025cde0b 100644 --- a/node_modules/read-pkg-up/node_modules/load-json-file/package.json +++ b/node_modules/read-pkg-up/node_modules/load-json-file/package.json @@ -1,23 +1,59 @@ { - "name": "load-json-file", - "version": "2.0.0", - "description": "Read and parse a JSON file", - "license": "MIT", - "repository": "sindresorhus/load-json-file", + "_args": [ + [ + "load-json-file@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "load-json-file@2.0.0", + "_id": "load-json-file@2.0.0", + "_inBundle": false, + "_integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "_location": "/read-pkg-up/load-json-file", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "load-json-file@2.0.0", + "name": "load-json-file", + "escapedName": "load-json-file", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/load-json-file/issues" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "description": "Read and parse a JSON file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/load-json-file#readme", "keywords": [ "read", "json", @@ -27,17 +63,17 @@ "graceful", "load" ], - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "license": "MIT", + "name": "load-json-file", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/load-json-file.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/locate-path/package.json b/node_modules/read-pkg-up/node_modules/locate-path/package.json index e05a6304b..36533661e 100644 --- a/node_modules/read-pkg-up/node_modules/locate-path/package.json +++ b/node_modules/read-pkg-up/node_modules/locate-path/package.json @@ -1,23 +1,57 @@ { - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", + "_args": [ + [ + "locate-path@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "locate-path@2.0.0", + "_id": "locate-path@2.0.0", + "_inBundle": false, + "_integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "_location": "/read-pkg-up/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "locate-path@2.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", "keywords": [ "locate", "path", @@ -33,15 +67,17 @@ "iterable", "iterator" ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/p-limit/package.json b/node_modules/read-pkg-up/node_modules/p-limit/package.json index 275cb73ae..91057bf22 100644 --- a/node_modules/read-pkg-up/node_modules/p-limit/package.json +++ b/node_modules/read-pkg-up/node_modules/p-limit/package.json @@ -1,23 +1,60 @@ { - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", + "_args": [ + [ + "p-limit@1.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-limit@1.3.0", + "_id": "p-limit@1.3.0", + "_inBundle": false, + "_integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "_location": "/read-pkg-up/p-limit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-limit@1.3.0", + "name": "p-limit", + "escapedName": "p-limit", + "rawSpec": "1.3.0", + "saveSpec": null, + "fetchSpec": "1.3.0" + }, + "_requiredBy": [ + "/read-pkg-up/p-locate" + ], + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "_spec": "1.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-limit/issues" + }, + "dependencies": { + "p-try": "^1.0.0" + }, + "description": "Run multiple promise-returning & async functions with limited concurrency", + "devDependencies": { + "ava": "*", + "delay": "^2.0.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-limit#readme", "keywords": [ "promise", "limit", @@ -35,15 +72,14 @@ "promises", "bluebird" ], - "dependencies": { - "p-try": "^1.0.0" + "license": "MIT", + "name": "p-limit", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-limit.git" }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava" + }, + "version": "1.3.0" +} diff --git a/node_modules/read-pkg-up/node_modules/p-locate/package.json b/node_modules/read-pkg-up/node_modules/p-locate/package.json index b938aa4c5..7cad41acb 100644 --- a/node_modules/read-pkg-up/node_modules/p-locate/package.json +++ b/node_modules/read-pkg-up/node_modules/p-locate/package.json @@ -1,23 +1,59 @@ { - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", + "_args": [ + [ + "p-locate@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-locate@2.0.0", + "_id": "p-locate@2.0.0", + "_inBundle": false, + "_integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "_location": "/read-pkg-up/p-locate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-locate@2.0.0", + "name": "p-locate", + "escapedName": "p-locate", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "dependencies": { + "p-limit": "^1.1.0" + }, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "in-range": "^1.0.0", + "time-span": "^1.0.0", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-locate#readme", "keywords": [ "promise", "locate", @@ -38,17 +74,17 @@ "promises", "bluebird" ], - "dependencies": { - "p-limit": "^1.1.0" + "license": "MIT", + "name": "p-locate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/p-try/package.json b/node_modules/read-pkg-up/node_modules/p-try/package.json index a4623262b..aaa5b6421 100644 --- a/node_modules/read-pkg-up/node_modules/p-try/package.json +++ b/node_modules/read-pkg-up/node_modules/p-try/package.json @@ -1,23 +1,53 @@ { - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", + "_args": [ + [ + "p-try@1.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "p-try@1.0.0", + "_id": "p-try@1.0.0", + "_inBundle": false, + "_integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "_location": "/read-pkg-up/p-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-try@1.0.0", + "name": "p-try", + "escapedName": "p-try", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/p-limit" + ], + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/p-try/issues" + }, + "description": "`Promise#try()` ponyfill - Starts a promise chain", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/p-try#readme", "keywords": [ "promise", "try", @@ -33,11 +63,17 @@ "shim", "bluebird" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "p-try", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-try.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/parse-json/package.json b/node_modules/read-pkg-up/node_modules/parse-json/package.json index bdc3dba4c..f10f6e276 100644 --- a/node_modules/read-pkg-up/node_modules/parse-json/package.json +++ b/node_modules/read-pkg-up/node_modules/parse-json/package.json @@ -1,24 +1,57 @@ { - "name": "parse-json", - "version": "2.2.0", - "description": "Parse JSON with more helpful errors", - "license": "MIT", - "repository": "sindresorhus/parse-json", + "_args": [ + [ + "parse-json@2.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "parse-json@2.2.0", + "_id": "parse-json@2.2.0", + "_inBundle": false, + "_integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "_location": "/read-pkg-up/parse-json", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "parse-json@2.2.0", + "name": "parse-json", + "escapedName": "parse-json", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/read-pkg-up/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/parse-json/issues" + }, + "dependencies": { + "error-ex": "^1.2.0" + }, + "description": "Parse JSON with more helpful errors", + "devDependencies": { + "ava": "0.0.4", + "xo": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && node test.js" - }, "files": [ "index.js", "vendor" ], + "homepage": "https://github.com/sindresorhus/parse-json#readme", "keywords": [ "parse", "json", @@ -31,16 +64,19 @@ "string", "str" ], - "dependencies": { - "error-ex": "^1.2.0" + "license": "MIT", + "name": "parse-json", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/parse-json.git" }, - "devDependencies": { - "ava": "0.0.4", - "xo": "*" + "scripts": { + "test": "xo && node test.js" }, + "version": "2.2.0", "xo": { "ignores": [ "vendor/**" ] } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/path-exists/package.json b/node_modules/read-pkg-up/node_modules/path-exists/package.json index ed507545d..e1ff06fd7 100644 --- a/node_modules/read-pkg-up/node_modules/path-exists/package.json +++ b/node_modules/read-pkg-up/node_modules/path-exists/package.json @@ -1,23 +1,53 @@ { - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", + "_args": [ + [ + "path-exists@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-exists@3.0.0", + "_id": "path-exists@3.0.0", + "_inBundle": false, + "_integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "_location": "/read-pkg-up/path-exists", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-exists@3.0.0", + "name": "path-exists", + "escapedName": "path-exists", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/locate-path" + ], + "_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-exists/issues" + }, + "description": "Check if a path exists", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/path-exists#readme", "keywords": [ "path", "exists", @@ -30,11 +60,17 @@ "access", "stat" ], - "devDependencies": { - "ava": "*", - "xo": "*" + "license": "MIT", + "name": "path-exists", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-exists.git" }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/path-type/package.json b/node_modules/read-pkg-up/node_modules/path-type/package.json index 18405ddb8..3130764b3 100644 --- a/node_modules/read-pkg-up/node_modules/path-type/package.json +++ b/node_modules/read-pkg-up/node_modules/path-type/package.json @@ -1,23 +1,56 @@ { - "name": "path-type", - "version": "2.0.0", - "description": "Check if a path is a file, directory, or symlink", - "license": "MIT", - "repository": "sindresorhus/path-type", + "_args": [ + [ + "path-type@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "path-type@2.0.0", + "_id": "path-type@2.0.0", + "_inBundle": false, + "_integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "_location": "/read-pkg-up/path-type", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-type@2.0.0", + "name": "path-type", + "escapedName": "path-type", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/path-type/issues" + }, + "dependencies": { + "pify": "^2.0.0" + }, + "description": "Check if a path is a file, directory, or symlink", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/path-type#readme", "keywords": [ "path", "fs", @@ -35,14 +68,17 @@ "stats", "filesystem" ], - "dependencies": { - "pify": "^2.0.0" + "license": "MIT", + "name": "path-type", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-type.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/node_modules/pify/package.json b/node_modules/read-pkg-up/node_modules/pify/package.json index 279aa197f..daa65cac9 100644 --- a/node_modules/read-pkg-up/node_modules/pify/package.json +++ b/node_modules/read-pkg-up/node_modules/pify/package.json @@ -1,24 +1,56 @@ { - "name": "pify", - "version": "2.3.0", - "description": "Promisify a callback-style function", - "license": "MIT", - "repository": "sindresorhus/pify", + "_args": [ + [ + "pify@2.3.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "pify@2.3.0", + "_id": "pify@2.3.0", + "_inBundle": false, + "_integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "_location": "/read-pkg-up/pify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pify@2.3.0", + "name": "pify", + "escapedName": "pify", + "rawSpec": "2.3.0", + "saveSpec": null, + "fetchSpec": "2.3.0" + }, + "_requiredBy": [ + "/read-pkg-up/load-json-file", + "/read-pkg-up/path-type" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "_spec": "2.3.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "xo && ava && npm run optimization-test", - "optimization-test": "node --allow-natives-syntax optimization-test.js" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/pify#readme", "keywords": [ "promise", "promises", @@ -39,10 +71,15 @@ "async", "es2015" ], - "devDependencies": { - "ava": "*", - "pinkie-promise": "^1.0.0", - "v8-natives": "0.0.2", - "xo": "*" - } -} \ No newline at end of file + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava && npm run optimization-test" + }, + "version": "2.3.0" +} diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/package.json b/node_modules/read-pkg-up/node_modules/read-pkg/package.json index 7732e809e..e116a7d60 100644 --- a/node_modules/read-pkg-up/node_modules/read-pkg/package.json +++ b/node_modules/read-pkg-up/node_modules/read-pkg/package.json @@ -1,23 +1,58 @@ { - "name": "read-pkg", - "version": "2.0.0", - "description": "Read a package.json file", - "license": "MIT", - "repository": "sindresorhus/read-pkg", + "_args": [ + [ + "read-pkg@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "read-pkg@2.0.0", + "_id": "read-pkg@2.0.0", + "_inBundle": false, + "_integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "_location": "/read-pkg-up/read-pkg", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "read-pkg@2.0.0", + "name": "read-pkg", + "escapedName": "read-pkg", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up" + ], + "_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/read-pkg/issues" + }, + "dependencies": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "description": "Read a package.json file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/read-pkg#readme", "keywords": [ "json", "read", @@ -30,16 +65,17 @@ "package", "normalize" ], - "dependencies": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "license": "MIT", + "name": "read-pkg", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/read-pkg.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg-up/package.json b/node_modules/read-pkg-up/package.json index 781160ca1..c5f0ecd3d 100644 --- a/node_modules/read-pkg-up/package.json +++ b/node_modules/read-pkg-up/package.json @@ -1,23 +1,62 @@ { - "name": "read-pkg-up", - "version": "2.0.0", - "description": "Read the closest package.json file", - "license": "MIT", - "repository": "sindresorhus/read-pkg-up", + "_args": [ + [ + "read-pkg-up@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "read-pkg-up@2.0.0", + "_id": "read-pkg-up@2.0.0", + "_inBundle": false, + "_integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "_location": "/read-pkg-up", + "_phantomChildren": { + "error-ex": "1.3.2", + "graceful-fs": "4.2.3", + "normalize-package-data": "2.5.0", + "strip-bom": "3.0.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "read-pkg-up@2.0.0", + "name": "read-pkg-up", + "escapedName": "read-pkg-up", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/eslint-plugin-import" + ], + "_resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/read-pkg-up/issues" + }, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "description": "Read the closest package.json file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, "engines": { "node": ">=4" }, - "scripts": { - "test": "xo && ava" - }, "files": [ "index.js" ], + "homepage": "https://github.com/sindresorhus/read-pkg-up#readme", "keywords": [ "json", "read", @@ -48,15 +87,17 @@ "walking", "path" ], - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "license": "MIT", + "name": "read-pkg-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/read-pkg-up.git" }, - "devDependencies": { - "ava": "*", - "xo": "*" + "scripts": { + "test": "xo && ava" }, + "version": "2.0.0", "xo": { "esnext": true } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg/node_modules/parse-json/package.json b/node_modules/read-pkg/node_modules/parse-json/package.json index 6c5bb850d..7af7c1225 100644 --- a/node_modules/read-pkg/node_modules/parse-json/package.json +++ b/node_modules/read-pkg/node_modules/parse-json/package.json @@ -1,24 +1,61 @@ { - "name": "parse-json", - "version": "5.0.0", - "description": "Parse JSON with more helpful errors", - "license": "MIT", - "repository": "sindresorhus/parse-json", + "_args": [ + [ + "parse-json@5.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "parse-json@5.0.0", + "_id": "parse-json@5.0.0", + "_inBundle": false, + "_integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "_location": "/read-pkg/parse-json", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "parse-json@5.0.0", + "name": "parse-json", + "escapedName": "parse-json", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/parse-json/issues" + }, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + }, + "description": "Parse JSON with more helpful errors", + "devDependencies": { + "ava": "^1.4.1", + "nyc": "^14.1.1", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && nyc ava" - }, "files": [ "index.js", "vendor" ], + "homepage": "https://github.com/sindresorhus/parse-json#readme", "keywords": [ "parse", "json", @@ -30,15 +67,14 @@ "helpful", "string" ], - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" + "license": "MIT", + "name": "parse-json", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/parse-json.git" }, - "devDependencies": { - "ava": "^1.4.1", - "nyc": "^14.1.1", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && nyc ava" + }, + "version": "5.0.0" +} diff --git a/node_modules/read-pkg/node_modules/type-fest/package.json b/node_modules/read-pkg/node_modules/type-fest/package.json index 03b929edc..6cca52025 100644 --- a/node_modules/read-pkg/node_modules/type-fest/package.json +++ b/node_modules/read-pkg/node_modules/type-fest/package.json @@ -1,24 +1,58 @@ { - "name": "type-fest", - "version": "0.6.0", - "description": "A collection of essential TypeScript types", - "license": "(MIT OR CC0-1.0)", - "repository": "sindresorhus/type-fest", + "_args": [ + [ + "type-fest@0.6.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "type-fest@0.6.0", + "_id": "type-fest@0.6.0", + "_inBundle": false, + "_integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "_location": "/read-pkg/type-fest", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "type-fest@0.6.0", + "name": "type-fest", + "escapedName": "type-fest", + "rawSpec": "0.6.0", + "saveSpec": null, + "fetchSpec": "0.6.0" + }, + "_requiredBy": [ + "/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "_spec": "0.6.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/type-fest/issues" + }, + "description": "A collection of essential TypeScript types", + "devDependencies": { + "@sindresorhus/tsconfig": "^0.4.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.10.2", + "eslint-config-xo-typescript": "^0.14.0", + "tsd": "^0.7.3", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && tsd" - }, "files": [ "index.d.ts", "source" ], + "homepage": "https://github.com/sindresorhus/type-fest#readme", "keywords": [ "typescript", "ts", @@ -30,14 +64,16 @@ "merge", "json" ], - "devDependencies": { - "@sindresorhus/tsconfig": "^0.4.0", - "@typescript-eslint/eslint-plugin": "^1.9.0", - "@typescript-eslint/parser": "^1.10.2", - "eslint-config-xo-typescript": "^0.14.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" + "license": "(MIT OR CC0-1.0)", + "name": "type-fest", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/type-fest.git" }, + "scripts": { + "test": "xo && tsd" + }, + "version": "0.6.0", "xo": { "extends": "xo-typescript", "extensions": [ @@ -48,4 +84,4 @@ "@typescript-eslint/indent": "off" } } -} \ No newline at end of file +} diff --git a/node_modules/read-pkg/package.json b/node_modules/read-pkg/package.json index 8330328dd..3f5af10a1 100644 --- a/node_modules/read-pkg/package.json +++ b/node_modules/read-pkg/package.json @@ -1,24 +1,66 @@ { - "name": "read-pkg", - "version": "5.2.0", - "description": "Read a package.json file", - "license": "MIT", - "repository": "sindresorhus/read-pkg", + "_args": [ + [ + "read-pkg@5.2.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "read-pkg@5.2.0", + "_id": "read-pkg@5.2.0", + "_inBundle": false, + "_integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "_location": "/read-pkg", + "_phantomChildren": { + "@babel/code-frame": "7.5.5", + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2", + "lines-and-columns": "1.1.6" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "read-pkg@5.2.0", + "name": "read-pkg", + "escapedName": "read-pkg", + "rawSpec": "5.2.0", + "saveSpec": null, + "fetchSpec": "5.2.0" + }, + "_requiredBy": [ + "/ava" + ], + "_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "_spec": "5.2.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/read-pkg/issues" + }, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "description": "Read a package.json file", + "devDependencies": { + "ava": "^2.2.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/read-pkg#readme", "keywords": [ "json", "read", @@ -30,20 +72,19 @@ "package", "normalize" ], - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "license": "MIT", + "name": "read-pkg", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/read-pkg.git" }, - "devDependencies": { - "ava": "^2.2.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava && tsd" }, + "version": "5.2.0", "xo": { "ignores": [ "test/test.js" ] } -} \ No newline at end of file +} diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json index a7424e864..dbe14fe87 100644 --- a/node_modules/readdirp/package.json +++ b/node_modules/readdirp/package.json @@ -1,49 +1,56 @@ { - "name": "readdirp", - "description": "Recursive version of fs.readdir with streaming API.", - "version": "3.4.0", - "homepage": "https://github.com/paulmillr/readdirp", - "repository": { - "type": "git", - "url": "git://github.com/paulmillr/readdirp.git" + "_args": [ + [ + "readdirp@3.4.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "readdirp@3.4.0", + "_id": "readdirp@3.4.0", + "_inBundle": false, + "_integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "_location": "/readdirp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "readdirp@3.4.0", + "name": "readdirp", + "escapedName": "readdirp", + "rawSpec": "3.4.0", + "saveSpec": null, + "fetchSpec": "3.4.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "_spec": "3.4.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" }, - "license": "MIT", "bugs": { "url": "https://github.com/paulmillr/readdirp/issues" }, - "author": "Thorsten Lorenz (thlorenz.com)", "contributors": [ - "Thorsten Lorenz (thlorenz.com)", - "Paul Miller (https://paulmillr.com)" + { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } ], - "main": "index.js", - "engines": { - "node": ">=8.10.0" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "recursive", - "fs", - "stream", - "streams", - "readdir", - "filesystem", - "find", - "filter" - ], - "scripts": { - "dtslint": "dtslint", - "nyc": "nyc", - "mocha": "mocha --exit", - "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "test": "npm run lint && nyc npm run mocha" - }, "dependencies": { "picomatch": "^2.2.1" }, + "description": "Recursive version of fs.readdir with streaming API.", "devDependencies": { "@types/node": "^13", "chai": "^4.2", @@ -54,11 +61,8 @@ "nyc": "^15.0.0", "rimraf": "^3.0.0" }, - "nyc": { - "reporter": [ - "html", - "text" - ] + "engines": { + "node": ">=8.10.0" }, "eslintConfig": { "root": true, @@ -117,5 +121,41 @@ "single" ] } - } -} \ No newline at end of file + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/paulmillr/readdirp", + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "license": "MIT", + "main": "index.js", + "name": "readdirp", + "nyc": { + "reporter": [ + "html", + "text" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/paulmillr/readdirp.git" + }, + "scripts": { + "dtslint": "dtslint", + "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --exit", + "nyc": "nyc", + "test": "npm run lint && nyc npm run mocha" + }, + "version": "3.4.0" +} diff --git a/node_modules/regexpp/package.json b/node_modules/regexpp/package.json index bee0304fa..de2db3b70 100644 --- a/node_modules/regexpp/package.json +++ b/node_modules/regexpp/package.json @@ -1,15 +1,43 @@ { - "name": "regexpp", - "version": "3.1.0", - "description": "Regular expression parser for ECMAScript.", - "engines": { - "node": ">=8" - }, - "main": "index", - "files": [ - "index.*" + "_args": [ + [ + "regexpp@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], + "_development": true, + "_from": "regexpp@3.1.0", + "_id": "regexpp@3.1.0", + "_inBundle": false, + "_integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "_location": "/regexpp", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "regexpp@3.1.0", + "name": "regexpp", + "escapedName": "regexpp", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/@typescript-eslint/eslint-plugin", + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/mysticatea/regexpp/issues" + }, "dependencies": {}, + "description": "Regular expression parser for ECMAScript.", "devDependencies": { "@mysticatea/eslint-plugin": "^11.0.0", "@types/eslint": "^4.16.2", @@ -30,31 +58,14 @@ "ts-node": "^8.3.0", "typescript": "^3.5.3" }, - "scripts": { - "prebuild": "npm run -s clean", - "build": "run-s build:*", - "build:tsc": "tsc --module es2015", - "build:rollup": "rollup -c", - "build:dts": "dts-bundle --name regexpp --main .temp/index.d.ts --out ../index.d.ts", - "clean": "rimraf .temp index.*", - "codecov": "nyc report -r lcovonly && codecov -t ${CODECOV_TOKEN} --disable=gcov", - "lint": "eslint scripts src test --ext .ts", - "pretest": "run-s build lint", - "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000", - "update:test": "ts-node scripts/update-fixtures.ts", - "update:unicode": "run-s update:unicode:*", - "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts", - "update:unicode:props": "ts-node scripts/update-unicode-properties.ts", - "preversion": "npm test", - "version": "npm run -s build", - "postversion": "git push && git push --tags", - "prewatch": "npm run -s clean", - "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/regexpp.git" + "engines": { + "node": ">=8" }, + "files": [ + "index.*" + ], + "funding": "https://github.com/sponsors/mysticatea", + "homepage": "https://github.com/mysticatea/regexpp#readme", "keywords": [ "regexp", "regular", @@ -74,11 +85,33 @@ "es2020", "annexB" ], - "author": "Toru Nagashima (https://github.com/mysticatea)", "license": "MIT", - "bugs": { - "url": "https://github.com/mysticatea/regexpp/issues" + "main": "index", + "name": "regexpp", + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/regexpp.git" }, - "homepage": "https://github.com/mysticatea/regexpp#readme", - "funding": "https://github.com/sponsors/mysticatea" -} \ No newline at end of file + "scripts": { + "build": "run-s build:*", + "build:dts": "dts-bundle --name regexpp --main .temp/index.d.ts --out ../index.d.ts", + "build:rollup": "rollup -c", + "build:tsc": "tsc --module es2015", + "clean": "rimraf .temp index.*", + "codecov": "nyc report -r lcovonly && codecov -t ${CODECOV_TOKEN} --disable=gcov", + "lint": "eslint scripts src test --ext .ts", + "postversion": "git push && git push --tags", + "prebuild": "npm run -s clean", + "pretest": "run-s build lint", + "preversion": "npm test", + "prewatch": "npm run -s clean", + "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000", + "update:test": "ts-node scripts/update-fixtures.ts", + "update:unicode": "run-s update:unicode:*", + "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts", + "update:unicode:props": "ts-node scripts/update-unicode-properties.ts", + "version": "npm run -s build", + "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl" + }, + "version": "3.1.0" +} diff --git a/node_modules/registry-auth-token/package.json b/node_modules/registry-auth-token/package.json index f98fc4d62..e04906682 100644 --- a/node_modules/registry-auth-token/package.json +++ b/node_modules/registry-auth-token/package.json @@ -1,20 +1,54 @@ { - "name": "registry-auth-token", - "version": "4.1.1", - "description": "Get the auth token set for an npm registry (if any)", - "main": "index.js", - "scripts": { - "test": "mocha", - "posttest": "standard", - "coverage": "istanbul cover _mocha" + "_args": [ + [ + "registry-auth-token@4.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "registry-auth-token@4.1.1", + "_id": "registry-auth-token@4.1.1", + "_inBundle": false, + "_integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", + "_location": "/registry-auth-token", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "registry-auth-token@4.1.1", + "name": "registry-auth-token", + "escapedName": "registry-auth-token", + "rawSpec": "4.1.1", + "saveSpec": null, + "fetchSpec": "4.1.1" }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/rexxars/registry-auth-token.git" + "_requiredBy": [ + "/package-json" + ], + "_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", + "_spec": "4.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Espen Hovlandsdal", + "email": "espen@hovlandsdal.com" + }, + "bugs": { + "url": "https://github.com/rexxars/registry-auth-token/issues" + }, + "dependencies": { + "rc": "^1.2.8" + }, + "description": "Get the auth token set for an npm registry (if any)", + "devDependencies": { + "istanbul": "^0.4.2", + "mocha": "^6.1.4", + "require-uncached": "^1.0.2", + "standard": "^12.0.1" }, "engines": { "node": ">=6.0.0" }, + "homepage": "https://github.com/rexxars/registry-auth-token#readme", "keywords": [ "npm", "conf", @@ -25,24 +59,22 @@ "token", "authtoken" ], - "author": "Espen Hovlandsdal ", "license": "MIT", - "bugs": { - "url": "https://github.com/rexxars/registry-auth-token/issues" + "main": "index.js", + "name": "registry-auth-token", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/rexxars/registry-auth-token.git" }, - "homepage": "https://github.com/rexxars/registry-auth-token#readme", - "dependencies": { - "rc": "^1.2.8" - }, - "devDependencies": { - "istanbul": "^0.4.2", - "mocha": "^6.1.4", - "require-uncached": "^1.0.2", - "standard": "^12.0.1" + "scripts": { + "coverage": "istanbul cover _mocha", + "posttest": "standard", + "test": "mocha" }, "standard": { "ignore": [ "coverage/**" ] - } -} \ No newline at end of file + }, + "version": "4.1.1" +} diff --git a/node_modules/registry-url/package.json b/node_modules/registry-url/package.json index eb2b76756..394a58556 100644 --- a/node_modules/registry-url/package.json +++ b/node_modules/registry-url/package.json @@ -1,24 +1,62 @@ { - "name": "registry-url", - "version": "5.1.0", - "description": "Get the set npm registry URL", - "license": "MIT", - "repository": "sindresorhus/registry-url", + "_args": [ + [ + "registry-url@5.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "registry-url@5.1.0", + "_id": "registry-url@5.1.0", + "_inBundle": false, + "_integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "_location": "/registry-url", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "registry-url@5.1.0", + "name": "registry-url", + "escapedName": "registry-url", + "rawSpec": "5.1.0", + "saveSpec": null, + "fetchSpec": "5.1.0" + }, + "_requiredBy": [ + "/package-json" + ], + "_resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "_spec": "5.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "ava": { + "serial": true + }, + "bugs": { + "url": "https://github.com/sindresorhus/registry-url/issues" + }, + "dependencies": { + "rc": "^1.2.8" + }, + "description": "Get the set npm registry URL", + "devDependencies": { + "ava": "^1.4.1", + "import-fresh": "^3.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/registry-url#readme", "keywords": [ "npm", "conf", @@ -29,16 +67,14 @@ "uri", "scope" ], - "dependencies": { - "rc": "^1.2.8" + "license": "MIT", + "name": "registry-url", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/registry-url.git" }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "scripts": { + "test": "xo && ava && tsd" }, - "ava": { - "serial": true - } -} \ No newline at end of file + "version": "5.1.0" +} diff --git a/node_modules/removeNPMAbsolutePaths/package.json b/node_modules/removeNPMAbsolutePaths/package.json index 28ccddcaa..05293a8e0 100644 --- a/node_modules/removeNPMAbsolutePaths/package.json +++ b/node_modules/removeNPMAbsolutePaths/package.json @@ -1,39 +1,45 @@ { - "name": "removeNPMAbsolutePaths", - "version": "2.0.0", - "description": "Remove the fields containing local aboslute paths created by NPM", - "keywords": [ - "npm", - "modules" + "_args": [ + [ + "removeNPMAbsolutePaths@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "main": "src/removeNPMAbsolutePaths.js", - "scripts": { - "lint": "eslint bin/removeNPMAbsolutePaths src test --ignore-pattern 'test/data/malformed/module/'", - "test": "mocha test", - "test-with-coverage": "nyc --reporter=text mocha test", - "travis": "npm run lint && npm run test-with-coverage", - "coveralls": "nyc report --reporter=text-lcov | coveralls" + "_development": true, + "_from": "removeNPMAbsolutePaths@2.0.0", + "_id": "removeNPMAbsolutePaths@2.0.0", + "_inBundle": false, + "_integrity": "sha512-Hea7U6iJcD0NE/aqBqxBMPKeKaxjqMNyTTajmH2dH9hhafJ9Tem5r4UeJK8+BdE1MK9lqoOYqNM0Sq9rl1OIbQ==", + "_location": "/removeNPMAbsolutePaths", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "removeNPMAbsolutePaths@2.0.0", + "name": "removeNPMAbsolutePaths", + "escapedName": "removeNPMAbsolutePaths", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" }, - "author": "Juanjo Diaz ", - "repository": { - "type": "git", - "url": "git://github.com/juanjoDiaz/removeNPMAbsolutePaths" + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/removeNPMAbsolutePaths/-/removeNPMAbsolutePaths-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Juanjo Diaz", + "email": "juanjo.diazmo@gmail.com" + }, + "bin": { + "removeNPMAbsolutePaths": "bin/removeNPMAbsolutePaths" }, "bugs": { "url": "https://github.com/removeNPMAbsolutePaths/issues", "email": "juanjo.diazmo@gmail.com" }, - "license": "MIT", - "preferGlobal": true, - "bin": { - "removeNPMAbsolutePaths": "bin/removeNPMAbsolutePaths" - }, - "files": [ - "LICENSE", - "README.md", - "bin/", - "src/" - ], + "description": "Remove the fields containing local aboslute paths created by NPM", "devDependencies": { "chai": "^4.2.0", "chai-as-promised": "^7.1.1", @@ -48,5 +54,32 @@ }, "engines": { "node": ">=4.0.0" - } -} \ No newline at end of file + }, + "files": [ + "LICENSE", + "README.md", + "bin/", + "src/" + ], + "homepage": "https://github.com/juanjoDiaz/removeNPMAbsolutePaths#readme", + "keywords": [ + "npm", + "modules" + ], + "license": "MIT", + "main": "src/removeNPMAbsolutePaths.js", + "name": "removeNPMAbsolutePaths", + "preferGlobal": true, + "repository": { + "type": "git", + "url": "git://github.com/juanjoDiaz/removeNPMAbsolutePaths.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint bin/removeNPMAbsolutePaths src test --ignore-pattern 'test/data/malformed/module/'", + "test": "mocha test", + "test-with-coverage": "nyc --reporter=text mocha test", + "travis": "npm run lint && npm run test-with-coverage" + }, + "version": "2.0.0" +} diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json index 0970ec04c..ff0d68a10 100644 --- a/node_modules/require-directory/package.json +++ b/node_modules/require-directory/package.json @@ -1,40 +1,73 @@ { - "author": "Troy Goode (http://github.com/troygoode/)", - "name": "require-directory", - "version": "2.1.1", + "_args": [ + [ + "require-directory@2.1.1", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "require-directory@2.1.1", + "_id": "require-directory@2.1.1", + "_inBundle": false, + "_integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "_location": "/require-directory", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "require-directory@2.1.1", + "name": "require-directory", + "escapedName": "require-directory", + "rawSpec": "2.1.1", + "saveSpec": null, + "fetchSpec": "2.1.1" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "_spec": "2.1.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "url": "http://github.com/troygoode/" + }, + "bugs": { + "url": "http://github.com/troygoode/node-require-directory/issues/" + }, + "contributors": [ + { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "url": "http://github.com/troygoode/" + } + ], "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", + "devDependencies": { + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/troygoode/node-require-directory/", "keywords": [ "require", "directory", "library", "recursive" ], - "homepage": "https://github.com/troygoode/node-require-directory/", + "license": "MIT", "main": "index.js", + "name": "require-directory", "repository": { "type": "git", "url": "git://github.com/troygoode/node-require-directory.git" }, - "contributors": [ - { - "name": "Troy Goode", - "email": "troygoode@gmail.com", - "web": "http://github.com/troygoode/" - } - ], - "license": "MIT", - "bugs": { - "url": "http://github.com/troygoode/node-require-directory/issues/" - }, - "engines": { - "node": ">=0.10.0" - }, - "devDependencies": { - "jshint": "^2.6.0", - "mocha": "^2.1.0" - }, "scripts": { - "test": "mocha", - "lint": "jshint index.js test/test.js" - } -} \ No newline at end of file + "lint": "jshint index.js test/test.js", + "test": "mocha" + }, + "version": "2.1.1" +} diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json index 3c441b325..2dd1af6e6 100644 --- a/node_modules/require-main-filename/package.json +++ b/node_modules/require-main-filename/package.json @@ -1,35 +1,67 @@ { - "name": "require-main-filename", - "version": "2.0.0", - "description": "shim for require.main.filename() that works in as many environments as possible", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "tap --coverage test.js", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/require-main-filename.git" - }, - "keywords": [ - "require", - "shim", - "iisnode" + "_args": [ + [ + "require-main-filename@2.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "files": [ - "index.js" + "_development": true, + "_from": "require-main-filename@2.0.0", + "_id": "require-main-filename@2.0.0", + "_inBundle": false, + "_integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "_location": "/require-main-filename", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "require-main-filename@2.0.0", + "name": "require-main-filename", + "escapedName": "require-main-filename", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/yargs" ], - "author": "Ben Coe ", - "license": "ISC", + "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, "bugs": { "url": "https://github.com/yargs/require-main-filename/issues" }, - "homepage": "https://github.com/yargs/require-main-filename#readme", + "description": "shim for require.main.filename() that works in as many environments as possible", "devDependencies": { "chai": "^4.0.0", "standard": "^10.0.3", "standard-version": "^4.0.0", "tap": "^11.0.0" - } -} \ No newline at end of file + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/yargs/require-main-filename#readme", + "keywords": [ + "require", + "shim", + "iisnode" + ], + "license": "ISC", + "main": "index.js", + "name": "require-main-filename", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/require-main-filename.git" + }, + "scripts": { + "pretest": "standard", + "release": "standard-version", + "test": "tap --coverage test.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/requireindex/package.json b/node_modules/requireindex/package.json index e678bc792..2ff79c8e4 100644 --- a/node_modules/requireindex/package.json +++ b/node_modules/requireindex/package.json @@ -1,9 +1,61 @@ { - "name": "requireindex", + "_args": [ + [ + "requireindex@1.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "requireindex@1.1.0", + "_id": "requireindex@1.1.0", + "_inBundle": false, + "_integrity": "sha1-5UBLgVV+91225JxacgBIk/4D4WI=", + "_location": "/requireindex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "requireindex@1.1.0", + "name": "requireindex", + "escapedName": "requireindex", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/eslint-plugin-no-async-foreach" + ], + "_resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Stephen Handley", + "email": "stephen.handley@gmail.com", + "url": "http://person.sh" + }, + "bugs": { + "url": "http://github.com/stephenhandley/requireindex/issues" + }, "description": "Write minimal node index.js files that require and export siblings by file basename", - "version": "1.1.0", + "devDependencies": { + "asserts": "4.0.x" + }, + "directories": { + "lib": ".", + "test": "test" + }, + "engines": { + "node": ">=0.10.5" + }, + "homepage": "https://github.com/stephenhandley/requireindex#readme", + "keywords": [ + "require", + "index", + "index.js" + ], "license": "MIT", "main": "index.js", + "name": "requireindex", "repository": { "type": "git", "url": "git://github.com/stephenhandley/requireindex.git" @@ -11,27 +63,5 @@ "scripts": { "test": "node test/test.js" }, - "keywords": [ - "require", - "index", - "index.js" - ], - "directories": { - "lib": ".", - "test": "test" - }, - "bugs": { - "url": "http://github.com/stephenhandley/requireindex/issues" - }, - "engines": { - "node": ">=0.10.5" - }, - "devDependencies": { - "asserts": "4.0.x" - }, - "author": { - "name": "Stephen Handley", - "email": "stephen.handley@gmail.com", - "url": "http://person.sh" - } -} \ No newline at end of file + "version": "1.1.0" +} diff --git a/node_modules/resolve-cwd/package.json b/node_modules/resolve-cwd/package.json index a7d509c0f..d2082c4c3 100644 --- a/node_modules/resolve-cwd/package.json +++ b/node_modules/resolve-cwd/package.json @@ -1,24 +1,59 @@ { - "name": "resolve-cwd", - "version": "3.0.0", - "description": "Resolve the path of a module like `require.resolve()` but from the current working directory", - "license": "MIT", - "repository": "sindresorhus/resolve-cwd", + "_args": [ + [ + "resolve-cwd@3.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "resolve-cwd@3.0.0", + "_id": "resolve-cwd@3.0.0", + "_inBundle": false, + "_integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "_location": "/resolve-cwd", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "resolve-cwd@3.0.0", + "name": "resolve-cwd", + "escapedName": "resolve-cwd", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/ava", + "/import-local" + ], + "_resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/resolve-cwd/issues" + }, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "description": "Resolve the path of a module like `require.resolve()` but from the current working directory", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/resolve-cwd#readme", "keywords": [ "require", "resolve", @@ -32,12 +67,14 @@ "directory", "import" ], - "dependencies": { - "resolve-from": "^5.0.0" + "license": "MIT", + "name": "resolve-cwd", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/resolve-cwd.git" }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.0.0" +} diff --git a/node_modules/resolve-from/package.json b/node_modules/resolve-from/package.json index 3d6db83a4..5f0843737 100644 --- a/node_modules/resolve-from/package.json +++ b/node_modules/resolve-from/package.json @@ -1,24 +1,55 @@ { - "name": "resolve-from", - "version": "5.0.0", - "description": "Resolve the path of a module like `require.resolve()` but from a given path", - "license": "MIT", - "repository": "sindresorhus/resolve-from", + "_args": [ + [ + "resolve-from@5.0.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "resolve-from@5.0.0", + "_id": "resolve-from@5.0.0", + "_inBundle": false, + "_integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "_location": "/resolve-from", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "resolve-from@5.0.0", + "name": "resolve-from", + "escapedName": "resolve-from", + "rawSpec": "5.0.0", + "saveSpec": null, + "fetchSpec": "5.0.0" + }, + "_requiredBy": [ + "/resolve-cwd" + ], + "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "_spec": "5.0.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/resolve-from/issues" + }, + "description": "Resolve the path of a module like `require.resolve()` but from a given path", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && ava && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/resolve-from#readme", "keywords": [ "require", "resolve", @@ -28,9 +59,14 @@ "like", "import" ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "license": "MIT", + "name": "resolve-from", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/resolve-from.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.0.0" +} diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json index f8e40a6ac..550b899df 100644 --- a/node_modules/resolve/package.json +++ b/node_modules/resolve/package.json @@ -1,28 +1,46 @@ { - "name": "resolve", - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.13.1", - "repository": { - "type": "git", - "url": "git://github.com/browserify/resolve.git" - }, - "main": "index.js", - "keywords": [ - "resolve", - "require", - "node", - "module" + "_args": [ + [ + "resolve@1.13.1", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "scripts": { - "prepublish": "safe-publish-latest", - "lint": "eslint .", - "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", - "tests-only": "tape test/*.js", - "pretest": "npm run lint", - "test": "npm run --silent tests-only", - "posttest": "npm run test:multirepo", - "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" + "_development": true, + "_from": "resolve@1.13.1", + "_id": "resolve@1.13.1", + "_inBundle": false, + "_integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "_location": "/resolve", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "resolve@1.13.1", + "name": "resolve", + "escapedName": "resolve", + "rawSpec": "1.13.1", + "saveSpec": null, + "fetchSpec": "1.13.1" }, + "_requiredBy": [ + "/eslint-import-resolver-node", + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "_spec": "1.13.1", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/browserify/resolve/issues" + }, + "dependencies": { + "path-parse": "^1.0.6" + }, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", "devDependencies": { "@ljharb/eslint-config": "^15.0.2", "array.prototype.map": "^1.0.1", @@ -32,16 +50,32 @@ "tap": "0.4.13", "tape": "^4.11.0" }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, "funding": { "url": "https://github.com/sponsors/ljharb" }, - "dependencies": { - "path-parse": "^1.0.6" - } -} \ No newline at end of file + "homepage": "https://github.com/browserify/resolve#readme", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "name": "resolve", + "repository": { + "type": "git", + "url": "git://github.com/browserify/resolve.git" + }, + "scripts": { + "lint": "eslint .", + "posttest": "npm run test:multirepo", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", + "test": "npm run --silent tests-only", + "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test", + "tests-only": "tape test/*.js" + }, + "version": "1.13.1" +} diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json index a60376465..c13b8cf6a 100644 --- a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -1,3 +1,3 @@ { "main": "main.js" -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json index ddf31dc61..c41e4dbf7 100644 --- a/node_modules/resolve/test/resolver/baz/package.json +++ b/node_modules/resolve/test/resolver/baz/package.json @@ -1,3 +1,3 @@ { - "main": "quux.js" -} \ No newline at end of file + "main": "quux.js" +} diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json index 291ab03bc..bf406f083 100644 --- a/node_modules/resolve/test/resolver/browser_field/package.json +++ b/node_modules/resolve/test/resolver/browser_field/package.json @@ -2,4 +2,4 @@ "name": "browser_field", "main": "a", "browser": "b" -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json index d08e00e9d..d7f4fc807 100644 --- a/node_modules/resolve/test/resolver/dot_main/package.json +++ b/node_modules/resolve/test/resolver/dot_main/package.json @@ -1,3 +1,3 @@ { - "main": "." -} \ No newline at end of file + "main": "." +} diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json index a92bfd7b1..f51287b9d 100644 --- a/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json @@ -1,3 +1,3 @@ { - "main": "./" -} \ No newline at end of file + "main": "./" +} diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json index b3b73da08..b71880417 100644 --- a/node_modules/resolve/test/resolver/incorrect_main/package.json +++ b/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -1,3 +1,3 @@ { - "main": "wrong.js" -} \ No newline at end of file + "main": "wrong.js" +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json index 3158504f6..0cf827995 100644 --- a/node_modules/resolve/test/resolver/invalid_main/package.json +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -4,4 +4,4 @@ "why is this a thing", "srsly omg wtf" ] -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json index 9c6d56b61..8508f9d2c 100644 --- a/node_modules/resolve/test/resolver/multirepo/package.json +++ b/node_modules/resolve/test/resolver/multirepo/package.json @@ -17,4 +17,4 @@ "devDependencies": { "lerna": "^3.4.3" } -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json index a2bbfff89..204de51e0 100644 --- a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json @@ -11,4 +11,4 @@ "dependencies": { "@my-scope/package-b": "^0.0.0" } -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json index f7adacdeb..f57c3b5f5 100644 --- a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json @@ -11,4 +11,4 @@ "dependencies": { "@my-scope/package-a": "^0.0.0" } -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json index f3fffe71c..acfe9e951 100644 --- a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json @@ -12,4 +12,4 @@ "dependencies": { "buffer": "*" } -} \ No newline at end of file +} diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json index b6e6d85fd..8e1b58591 100644 --- a/node_modules/resolve/test/resolver/symlinked/package/package.json +++ b/node_modules/resolve/test/resolver/symlinked/package/package.json @@ -1,3 +1,3 @@ { - "main": "bar.js" + "main": "bar.js" } \ No newline at end of file diff --git a/node_modules/responselike/package.json b/node_modules/responselike/package.json index 67f605a8d..2b8501493 100644 --- a/node_modules/responselike/package.json +++ b/node_modules/responselike/package.json @@ -1,29 +1,43 @@ { - "name": "responselike", - "version": "1.0.2", - "description": "A response-like object for mocking a Node.js HTTP response stream", - "main": "src/index.js", - "scripts": { - "test": "xo && nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls" - }, - "xo": { - "extends": "xo-lukechilds" - }, - "keywords": [ - "http", - "https", - "response", - "mock", - "request", - "responselike" + "_args": [ + [ + "responselike@1.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] ], - "repository": { - "type": "git", - "url": "https://github.com/lukechilds/responselike.git" + "_development": true, + "_from": "responselike@1.0.2", + "_id": "responselike@1.0.2", + "_inBundle": false, + "_integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "_location": "/responselike", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "responselike@1.0.2", + "name": "responselike", + "escapedName": "responselike", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" }, - "author": "lukechilds", - "license": "MIT", + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "lukechilds" + }, + "bugs": { + "url": "https://github.com/lukechilds/responselike/issues" + }, + "dependencies": { + "lowercase-keys": "^1.0.0" + }, + "description": "A response-like object for mocking a Node.js HTTP response stream", "devDependencies": { "ava": "^0.22.0", "coveralls": "^2.13.1", @@ -32,7 +46,28 @@ "nyc": "^11.1.0", "xo": "^0.19.0" }, - "dependencies": { - "lowercase-keys": "^1.0.0" + "homepage": "https://github.com/lukechilds/responselike#readme", + "keywords": [ + "http", + "https", + "response", + "mock", + "request", + "responselike" + ], + "license": "MIT", + "main": "src/index.js", + "name": "responselike", + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/responselike.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "1.0.2", + "xo": { + "extends": "xo-lukechilds" } -} \ No newline at end of file +} diff --git a/node_modules/restore-cursor/package.json b/node_modules/restore-cursor/package.json index d23571572..0c6860284 100644 --- a/node_modules/restore-cursor/package.json +++ b/node_modules/restore-cursor/package.json @@ -1,24 +1,58 @@ { - "name": "restore-cursor", - "version": "3.1.0", - "description": "Gracefully restore the CLI cursor on exit", - "license": "MIT", - "repository": "sindresorhus/restore-cursor", + "_args": [ + [ + "restore-cursor@3.1.0", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "restore-cursor@3.1.0", + "_id": "restore-cursor@3.1.0", + "_inBundle": false, + "_integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "_location": "/restore-cursor", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "restore-cursor@3.1.0", + "name": "restore-cursor", + "escapedName": "restore-cursor", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/cli-cursor" + ], + "_resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "_spec": "3.1.0", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/restore-cursor/issues" + }, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "description": "Gracefully restore the CLI cursor on exit", + "devDependencies": { + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, "engines": { "node": ">=8" }, - "scripts": { - "test": "xo && tsd" - }, "files": [ "index.js", "index.d.ts" ], + "homepage": "https://github.com/sindresorhus/restore-cursor#readme", "keywords": [ "exit", "quit", @@ -41,12 +75,14 @@ "shell", "command-line" ], - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "license": "MIT", + "name": "restore-cursor", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/restore-cursor.git" }, - "devDependencies": { - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} \ No newline at end of file + "scripts": { + "test": "xo && tsd" + }, + "version": "3.1.0" +} diff --git a/node_modules/reusify/package.json b/node_modules/reusify/package.json index 4572b152f..83d972ddb 100644 --- a/node_modules/reusify/package.json +++ b/node_modules/reusify/package.json @@ -1,14 +1,64 @@ { - "name": "reusify", - "version": "1.0.4", - "description": "Reuse objects and functions with style", - "main": "reusify.js", - "scripts": { - "lint": "standard", - "test": "tape test.js | faucet", - "istanbul": "istanbul cover tape test.js", - "coverage": "npm run istanbul; cat coverage/lcov.info | coveralls" + "_args": [ + [ + "reusify@1.0.4", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "reusify@1.0.4", + "_id": "reusify@1.0.4", + "_inBundle": false, + "_integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "_location": "/reusify", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "reusify@1.0.4", + "name": "reusify", + "escapedName": "reusify", + "rawSpec": "1.0.4", + "saveSpec": null, + "fetchSpec": "1.0.4" }, + "_requiredBy": [ + "/fastq" + ], + "_resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "_spec": "1.0.4", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + "bugs": { + "url": "https://github.com/mcollina/reusify/issues" + }, + "description": "Reuse objects and functions with style", + "devDependencies": { + "coveralls": "^2.13.3", + "faucet": "0.0.1", + "istanbul": "^0.4.5", + "pre-commit": "^1.2.2", + "standard": "^10.0.3", + "tape": "^4.8.0" + }, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + }, + "homepage": "https://github.com/mcollina/reusify#readme", + "keywords": [ + "reuse", + "object", + "performance", + "function", + "fast" + ], + "license": "MIT", + "main": "reusify.js", + "name": "reusify", "pre-commit": [ "lint", "test" @@ -17,29 +67,11 @@ "type": "git", "url": "git+https://github.com/mcollina/reusify.git" }, - "keywords": [ - "reuse", - "object", - "performance", - "function", - "fast" - ], - "author": "Matteo Collina ", - "license": "MIT", - "bugs": { - "url": "https://github.com/mcollina/reusify/issues" + "scripts": { + "coverage": "npm run istanbul; cat coverage/lcov.info | coveralls", + "istanbul": "istanbul cover tape test.js", + "lint": "standard", + "test": "tape test.js | faucet" }, - "homepage": "https://github.com/mcollina/reusify#readme", - "engines": { - "node": ">=0.10.0", - "iojs": ">=1.0.0" - }, - "devDependencies": { - "coveralls": "^2.13.3", - "faucet": "0.0.1", - "istanbul": "^0.4.5", - "pre-commit": "^1.2.2", - "standard": "^10.0.3", - "tape": "^4.8.0" - } -} \ No newline at end of file + "version": "1.0.4" +} diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 56eb03067..cf15890fa 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,32 +1,74 @@ { - "name": "rimraf", - "version": "3.0.2", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": "git://github.com/isaacs/rimraf.git", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "test": "tap test/*.js" + "_args": [ + [ + "rimraf@3.0.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "rimraf@3.0.2", + "_id": "rimraf@3.0.2", + "_inBundle": false, + "_integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "_location": "/rimraf", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "rimraf@3.0.2", + "name": "rimraf", + "escapedName": "rimraf", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/del" + ], + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/home/chris/src/github.com/github/codeql-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "rimraf": "bin.js" + }, + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" }, - "bin": "./bin.js", "dependencies": { "glob": "^7.1.3" }, + "description": "A deep deletion module for node (like `rm -rf`)", + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^12.1.1" + }, "files": [ "LICENSE", "README.md", "bin.js", "rimraf.js" ], - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^12.1.1" - }, "funding": { "url": "https://github.com/sponsors/isaacs" - } -} \ No newline at end of file + }, + "homepage": "https://github.com/isaacs/rimraf#readme", + "license": "ISC", + "main": "rimraf.js", + "name": "rimraf", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js" + }, + "version": "3.0.2" +} diff --git a/node_modules/run-parallel/package.json b/node_modules/run-parallel/package.json index 87ebaf64b..c7564ba8f 100644 --- a/node_modules/run-parallel/package.json +++ b/node_modules/run-parallel/package.json @@ -1,7 +1,33 @@ { - "name": "run-parallel", - "description": "Run an array of functions in parallel", - "version": "1.1.9", + "_args": [ + [ + "run-parallel@1.1.9", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "run-parallel@1.1.9", + "_id": "run-parallel@1.1.9", + "_inBundle": false, + "_integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "_location": "/run-parallel", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "run-parallel@1.1.9", + "name": "run-parallel", + "escapedName": "run-parallel", + "rawSpec": "1.1.9", + "saveSpec": null, + "fetchSpec": "1.1.9" + }, + "_requiredBy": [ + "/@nodelib/fs.scandir" + ], + "_resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "_spec": "1.1.9", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", @@ -11,6 +37,7 @@ "url": "https://github.com/feross/run-parallel/issues" }, "dependencies": {}, + "description": "Run an array of functions in parallel", "devDependencies": { "airtap": "0.0.4", "standard": "*", @@ -29,6 +56,7 @@ ], "license": "MIT", "main": "index.js", + "name": "run-parallel", "repository": { "type": "git", "url": "git://github.com/feross/run-parallel.git" @@ -38,5 +66,6 @@ "test-browser": "airtap -- test/*.js", "test-browser-local": "airtap --local -- test/*.js", "test-node": "tape test/*.js" - } -} \ No newline at end of file + }, + "version": "1.1.9" +} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json index fdb8bc5f3..c6f92778f 100644 --- a/node_modules/safe-buffer/package.json +++ b/node_modules/safe-buffer/package.json @@ -1,7 +1,33 @@ { - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.1.2", + "_args": [ + [ + "safe-buffer@5.1.2", + "/home/chris/src/github.com/github/codeql-action" + ] + ], + "_development": true, + "_from": "safe-buffer@5.1.2", + "_id": "safe-buffer@5.1.2", + "_inBundle": false, + "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "_location": "/safe-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "safe-buffer@5.1.2", + "name": "safe-buffer", + "escapedName": "safe-buffer", + "rawSpec": "5.1.2", + "saveSpec": null, + "fetchSpec": "5.1.2" + }, + "_requiredBy": [ + "/convert-source-map" + ], + "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "_spec": "5.1.2", + "_where": "/home/chris/src/github.com/github/codeql-action", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", @@ -10,6 +36,7 @@ "bugs": { "url": "https://github.com/feross/safe-buffer/issues" }, + "description": "Safer Node.js Buffer API", "devDependencies": { "standard": "*", "tape": "^4.0.0" @@ -26,12 +53,14 @@ ], "license": "MIT", "main": "index.js", - "types": "index.d.ts", + "name": "safe-buffer", "repository": { "type": "git", "url": "git://github.com/feross/safe-buffer.git" }, "scripts": { "test": "standard && tape test/*.js" - } -} \ No newline at end of file + }, + "types": "index.d.ts", + "version": "5.1.2" +} diff --git a/node_modules/sax/LICENSE b/node_modules/sax/LICENSE new file mode 100644 index 000000000..ccffa082c --- /dev/null +++ b/node_modules/sax/LICENSE @@ -0,0 +1,41 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/sax/README.md b/node_modules/sax/README.md new file mode 100644 index 000000000..afcd3f3dd --- /dev/null +++ b/node_modules/sax/README.md @@ -0,0 +1,225 @@ +# sax js + +A sax-style parser for XML and HTML. + +Designed with [node](http://nodejs.org/) in mind, but should work fine in +the browser or other CommonJS implementations. + +## What This Is + +* A very simple tool to parse through an XML string. +* A stepping stone to a streaming HTML parser. +* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML + docs. + +## What This Is (probably) Not + +* An HTML Parser - That's a fine goal, but this isn't it. It's just + XML. +* A DOM Builder - You can use it to build an object model out of XML, + but it doesn't do that out of the box. +* XSLT - No DOM = no querying. +* 100% Compliant with (some other SAX implementation) - Most SAX + implementations are in Java and do a lot more than this does. +* An XML Validator - It does a little validation when in strict mode, but + not much. +* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic + masochism. +* A DTD-aware Thing - Fetching DTDs is a much bigger job. + +## Regarding `Hello, world!').close(); + +// stream usage +// takes the same options as the parser +var saxStream = require("sax").createStream(strict, options) +saxStream.on("error", function (e) { + // unhandled errors will throw, since this is a proper node + // event emitter. + console.error("error!", e) + // clear the error + this._parser.error = null + this._parser.resume() +}) +saxStream.on("opentag", function (node) { + // same object as above +}) +// pipe is supported, and it's readable/writable +// same chunks coming in also go out. +fs.createReadStream("file.xml") + .pipe(saxStream) + .pipe(fs.createWriteStream("file-copy.xml")) +``` + + +## Arguments + +Pass the following arguments to the parser function. All are optional. + +`strict` - Boolean. Whether or not to be a jerk. Default: `false`. + +`opt` - Object bag of settings regarding string formatting. All default to `false`. + +Settings supported: + +* `trim` - Boolean. Whether or not to trim text and comment nodes. +* `normalize` - Boolean. If true, then turn any whitespace into a single + space. +* `lowercase` - Boolean. If true, then lowercase tag names and attribute names + in loose mode, rather than uppercasing them. +* `xmlns` - Boolean. If true, then namespaces are supported. +* `position` - Boolean. If false, then don't track line/col/position. +* `strictEntities` - Boolean. If true, only parse [predefined XML + entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent) + (`&`, `'`, `>`, `<`, and `"`) + +## Methods + +`write` - Write bytes onto the stream. You don't have to do this all at +once. You can keep writing as much as you want. + +`close` - Close the stream. Once closed, no more data may be written until +it is done processing the buffer, which is signaled by the `end` event. + +`resume` - To gracefully handle errors, assign a listener to the `error` +event. Then, when the error is taken care of, you can call `resume` to +continue parsing. Otherwise, the parser will not continue while in an error +state. + +## Members + +At all times, the parser object will have the following members: + +`line`, `column`, `position` - Indications of the position in the XML +document where the parser currently is looking. + +`startTagPosition` - Indicates the position where the current tag starts. + +`closed` - Boolean indicating whether or not the parser can be written to. +If it's `true`, then wait for the `ready` event to write again. + +`strict` - Boolean indicating whether or not the parser is a jerk. + +`opt` - Any options passed into the constructor. + +`tag` - The current tag being dealt with. + +And a bunch of other stuff that you probably shouldn't touch. + +## Events + +All events emit with a single argument. To listen to an event, assign a +function to `on`. Functions get executed in the this-context of +the parser object. The list of supported events are also in the exported +`EVENTS` array. + +When using the stream interface, assign handlers using the EventEmitter +`on` function in the normal fashion. + +`error` - Indication that something bad happened. The error will be hanging +out on `parser.error`, and must be deleted before parsing can continue. By +listening to this event, you can keep an eye on that kind of stuff. Note: +this happens *much* more in strict mode. Argument: instance of `Error`. + +`text` - Text node. Argument: string of text. + +`doctype` - The ``. Argument: +object with `name` and `body` members. Attributes are not parsed, as +processing instructions have implementation dependent semantics. + +`sgmldeclaration` - Random SGML declarations. Stuff like `` +would trigger this kind of event. This is a weird thing to support, so it +might go away at some point. SAX isn't intended to be used to parse SGML, +after all. + +`opentagstart` - Emitted immediately when the tag name is available, +but before any attributes are encountered. Argument: object with a +`name` field and an empty `attributes` set. Note that this is the +same object that will later be emitted in the `opentag` event. + +`opentag` - An opening tag. Argument: object with `name` and `attributes`. +In non-strict mode, tag names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, then it will contain +namespace binding information on the `ns` member, and will have a +`local`, `prefix`, and `uri` member. + +`closetag` - A closing tag. In loose mode, tags are auto-closed if their +parent closes. In strict mode, well-formedness is enforced. Note that +self-closing tags will have `closeTag` emitted immediately after `openTag`. +Argument: tag name. + +`attribute` - An attribute node. Argument: object with `name` and `value`. +In non-strict mode, attribute names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, it will also contains namespace +information. + +`comment` - A comment node. Argument: the string of the comment. + +`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"` +event, and their contents are not checked for special xml characters. +If you pass `noscript: true`, then this behavior is suppressed. + +## Reporting Problems + +It's best to write a failing test if you find an issue. I will always +accept pull requests with failing tests if they demonstrate intended +behavior, but it is very hard to figure out what issue you're describing +without a test. Writing a test is also the best way for you yourself +to figure out if you really understand the issue you think you have with +sax-js. diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js new file mode 100644 index 000000000..795d607ef --- /dev/null +++ b/node_modules/sax/lib/sax.js @@ -0,0 +1,1565 @@ +;(function (sax) { // wrapper for non-node envs + sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + + // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. + // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), + // since that's the earliest that a buffer overrun could occur. This way, checks are + // as rare as required, but as often as necessary to ensure never crossing this bound. + // Furthermore, buffers are only tested at most once per write(), so passing a very + // large string into write() might have undesirable effects, but this is manageable by + // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme + // edge case, result in creating at most one complete copy of the string passed in. + // Set to Infinity to have unlimited buffers. + sax.MAX_BUFFER_LENGTH = 64 * 1024 + + var buffers = [ + 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', + 'procInstName', 'procInstBody', 'entity', 'attribName', + 'attribValue', 'cdata', 'script' + ] + + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] + + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf + } + } + + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + + function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break + + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } + + function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' + } + } + + function flushBuffers (parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + } + + SAXParser.prototype = { + end: function () { end(this) }, + write: write, + resume: function () { this.error = null; return this }, + close: function () { return this.write(null) }, + flush: function () { flushBuffers(this) } + } + + var Stream + try { + Stream = require('stream').Stream + } catch (ex) { + Stream = function () {} + } + + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + + function createStream (strict, opt) { + return new SAXStream(strict, opt) + } + + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + + Stream.apply(this) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + var me = this + + this._parser.onend = function () { + me.emit('end') + } + + this._parser.onerror = function (er) { + me.emit('error', er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + this._decoder = null + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) + } + + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream + } + }) + + SAXStream.prototype.write = function (data) { + if (typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = require('string_decoder').StringDecoder + this._decoder = new SD('utf8') + } + data = this._decoder.write(data) + } + + this._parser.write(data.toString()) + this.emit('data', data) + return true + } + + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true + } + + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) + } + + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + + // http://www.w3.org/TR/REC-xml/#NT-NameStartChar + // This implementation works on strings, a single character at a time + // as such, it cannot ever support astral-plane characters (10000-EFFFF) + // without a significant breaking change to either this parser, or the + // JavaScript language. Implementation of an emoji-capable xml parser + // is left as an exercise for the reader. + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + function isWhitespace (c) { + return c === ' ' || c === '\n' || c === '\r' || c === '\t' + } + + function isQuote (c) { + return c === '"' || c === '\'' + } + + function isAttribEnd (c) { + return c === '>' || isWhitespace(c) + } + + function isMatch (regex, c) { + return regex.test(c) + } + + function notMatch (regex, c) { + return !isMatch(regex, c) + } + + var S = 0 + sax.STATE = { + BEGIN: S++, // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, // leading whitespace + TEXT: S++, // general stuff + TEXT_ENTITY: S++, // & and such. + OPEN_WAKA: S++, // < + SGML_DECL: S++, // + SCRIPT: S++, //